Fluid Abstract Base Class
A fluid base class is available for developers to create new derived fluid mixtures:
- class scp.base_fluid.BaseFluid(t_min: float, t_max: float, x: Optional[float] = None, x_min: Optional[float] = None, x_max: Optional[float] = None)[source]
Bases:
ABC
A fluid base class that provides convenience methods that can be accessed in derived classes.
- alpha(temp: float) float [source]
Convenience function for returning the thermal diffusivity by the common shorthand ‘alpha’
@param temp: Fluid temperature, in degrees Celsius @return: Returns the thermal diffusivity in [m2/s]
- abstract conductivity(temp: float) float [source]
Abstract method; derived classes should override to return the thermal conductivity of that fluid.
@param temp: Fluid temperature, in degrees Celsius @return: Returns the thermal conductivity in [W/m-K]
- static conductivity_units() str [source]
- cp(temp: float) float [source]
Convenience function for returning the specific heat by the common shorthand ‘cp’
@param temp: Fluid temperature, in degrees Celsius @return: Returns the specific heat in [J/kg-K]
- abstract density(temp: float) float [source]
Abstract method; derived classes should override to return the density of that fluid.
@param temp: Fluid temperature, in degrees Celsius @return: Returns the density in [kg/m3]
- static density_units() str [source]
- abstract property fluid_name: str
An abstract property that needs to return the fluid name in derived fluid classes
Derived function must be decorated with @property
@return: string name of the fluid
- abstract freeze_point(x: float) float [source]
Abstract method; derived classes shoule override the freezing point of that fluid
@param x: Fluid concentration fraction, ranging from 0 to 1 @return Returns the freezing point of the fluid, in Celsius
- static freeze_point_units() str [source]
- k(temp: float) float [source]
Convenience function for returning the thermal conductivity by the common shorthand ‘k’
@param temp: Fluid temperature, in degrees Celsius @return: Returns the thermal conductivity, in [W/m-K]
- mu(temp: float) float [source]
Convenience function for returning the dynamic viscosity by the common letter ‘mu’
@param temp: Fluid temperature, in degrees Celsius @return: Returns the dynamic viscosity – which one is mu in [Pa-s]
- pr(temp: float = 0.0) float [source]
Convenience function for returning the Prandtl number by the common shorthand ‘pr’
@param temp: Fluid temperature, in degrees Celsius @return: Returns the dimensionless Prandtl number
- prandtl(temp: float) float [source]
Returns the Prandtl number for this fluid
@param temp: Fluid temperature, in degrees Celsius @return: Returns the dimensionless Prandtl number
- static prandtl_units() str [source]
- rho(temp: float) float [source]
Convenience function for returning the density by the common shorthand ‘rho’
@param temp: Fluid temperature, in degrees Celsius @return: Returns the density, in [kg/m3]
- abstract specific_heat(temp: float) float [source]
Abstract method; derived classes should override to return the specific heat of that fluid.
@param temp: Fluid temperature, in degrees Celsius @return: Returns the specific heat in [J/kg-K]
- static specific_heat_units() str [source]
- thermal_diffusivity(temp: float) float [source]
Returns the thermal diffusivity for this fluid
@param temp: Fluid temperature, in degrees Celsius @return: Returns the thermal diffusivity in [m2/s]
- static thermal_diffusivity_units() str [source]
- abstract viscosity(temp: float) float [source]
Abstract method; derived classes should override to return the dynamic viscosity of that fluid.
@param temp: Fluid temperature, in degrees Celsius @return: Returns the dynamic viscosity in [Pa-s]
- static viscosity_units() str [source]