8.2.4. Pure liquids

The definition of pure liquids and liquids mixtures are very similar to the definition of gases, except that pure liquids must inherit from the PureLiquidProperties and mixtures from the MixtureLiquidProperties base classes. To define e.g. the pure liquid water, we proceed as follows:

from pyoomph.materials import *

# Define pure water
@MaterialProperties.register()
class PureLiquidWater(PureLiquidProperties):
     name="water"
     def __init__(self):
             super().__init__()
             self.molar_mass=18.01528*gram/mol # Molar mass

             # Density and viscosity (assuming constants here)
             self.mass_density=998*kilogram/meter**3
             self.dynamic_viscosity=1*milli* pascal * second

             # Thermal properties (assuming constants here)
             self.specific_heat_capacity=4.187* kilo * joule / (kilogram * kelvin)
             self.thermal_conductivity=0.597* watt / (meter * kelvin)
             self.latent_heat_of_evaporation=2437.69081321*kilo*joule/kilogram # Liquids also have a latent heat of evaporation

             # Default surface tension against air as function of the temperature
             TKelvin=var("temperature")/kelvin
             self.default_surface_tension["gas"]=0.07275*(1.0-0.002*(TKelvin-291.0)) * newton/meter

             # Vapor pressure can be set by Antoine coefficients (in mmHg, C convention)
             # You can also add e.g. bar and kelvin as fourth and fifth argument to use the [bar,K] convention
             self.set_vapor_pressure_by_Antoine_coeffs(8.07131,1730.63 ,233.426)
             #Alternatively, you can set the vapor pressure by hand by setting self.vapor_pressure= ...

             #For UNIFAC calculations of activity coefficients in mixtures, we also need the UNIFAC groups
             self.set_unifac_groups({"H2O":1}) #Just one H2O group here

The dynamic_viscosity and mass_density properties are the same as in case of gases. Also the thermal properties specific_heat_capacity and thermal_conductivity must be set when thermal effects should be considered in the simulation.

Pure liquids also have some additional properties, which can be set. First of all, there is the thermal property latent_heat_of_evaporation (measured per mass, not per mole), which must be set when evaporative cooling should be considered. Then, pure liquids have a vapor_pressure() property, which can either be set by hand or by the method set_vapor_pressure_by_Antoine_coeffs(). The coefficients \(A\), \(B\) and \(C\) of the Antoine equation are often given in the (\(\:\mathrm{mmHg}\),\(\:\mathrm{^\circ C}\)) convention in literature, but you can also change the convention by supplying e.g. bar, kelvin as additional arguments, if the Antoine parameters \(A\), \(B\) and \(C\) in the literature are given in that convention. The definition of the vapor pressure is important if mass transfer should be considered, e.g. evaporation. Pure liquids without a vapor pressure will be non-volatile when the default mass transfer model is used.

Also, we can specify a default surface tension of the liquid against the gas phase. Usually, the particular composition of the gas phase does not alter the surface tension strongly, whereas the liquid composition does. Thus, irrespectively of the composition of the gas phase, we can set a typical surface tension which is always used, when a liquid-gas interface is considered with this particular liquid, unless it is explicitly override by a definition of particular liquid-gas interface properties (cf. Section 8.4.)

Finally, if you want to use UNIFAC models to calculate the activity coefficients of mixtures, you must specify the particular UNIFAC subgroups of each pure component. This can be done with the set_unifac_groups() method. More details on this are provided later in Section 8.8.

Loading a pure liquid from the material library works exactly as loading a pure gas, but with the routine get_pure_liquid() instead of get_pure_gas().