Media Module¶
- class pygfunction.media.Fluid(fluid_str: str, percent: float, T: float = 20.0)¶
Bases:
object
An object for handling the fluid properties
- Parameters
- fluid_str: str
- The mixer for this application should be one of:
‘Water’ - Complete water solution
‘MEG’ - Ethylene glycol mixed with water
‘MPG’ - Propylene glycol mixed with water
‘MEA’ - Ethanol mixed with water
‘MMA’ - Methanol mixed with water
- percent: float
Mass fraction of the mixing fluid added to water (in %). Lower bound = 0. Upper bound is dependent on the mixture.
- T: float, optional
The temperature of the fluid (in Celcius). Default is 20 degC.
Examples
>>> import pygfunction as gt >>> T_f = 20. # Temp at 20 C
>>> # complete water solution >>> fluid_str = 'Water' >>> percent = 0 >>> fluid = gt.media.Fluid(fluid_str, percent, T=T_f) >>> print(fluid)
>>> # 20 % propylene glycol mixed with water >>> fluid_str = 'MPG' >>> percent = 20 >>> fluid = gt.media.Fluid(fluid_str, percent, T=T_f)
>>> # 60% ethylene glycol mixed with water >>> fluid_str = 'MEG' >>> percent = 60 >>> fluid = gt.media.Fluid(fluid_str, percent, T=T_f) >>> print(fluid)
>>> # 5% methanol mixed with water >>> fluid_str = 'MMA' >>> percent = 5 >>> fluid = gt.media.Fluid(fluid_str, percent, T=T_f) >>> print(fluid)
>>> # ethanol / water >>> fluid_str = 'MEA' >>> percent = 10 >>> fluid = gt.media.Fluid(fluid_str, percent, T=T_f) >>> print(fluid)
- Prandlt_number()¶
Returns the Prandtl of the fluid.
- Returns
- Prfloat
Prandlt number.
- append_to_dict(dnary)¶
- density()¶
Returns the density of the fluid (in kg/m3).
- Returns
- rhofloat
Density (in kg/m3).
- dynamic_viscosity()¶
Returns the dynamic viscosity of the fluid (in Pa.s, or N.s/m2).
- Returns
- mufloat
Dynamic viscosity (in Pa.s, or N.s/m2).
- kinematic_viscosity()¶
Returns the kinematic viscosity of the fluid (in m2/s).
- Returns
- nufloat
Kinematic viscosity (in m2/s).
- specific_heat_capacity()¶
Returns the specific isobaric heat capacity of the fluid (J/kg.K).
- Returns
- cpfloat
Specific isobaric heat capacity (J/kg.K).
- thermal_conductivity()¶
Returns the thermal conductivity of the fluid (in W/m.K).
- Returns
- kfloat
Thermal conductivity (in W/m.K).
- volumetric_heat_capacity()¶
Returns the volumetric heat capacity of the fluid (J/m3.K).
- Returns
- rhoCpfloat
Volumetric heat capacity (in J/m3.K).