Fluids

Fluids are classes representing different type of working fluids, which can potentially have properties that depend on temperature.

Fluid

The class Fluid provides a blueprint for all fluid classes and defines the main methods that are used during simulations. The following table shows a summary of the fluid properties that need to be implemented and the relevant method:

Name

Symbol

Method

Unit

Specific heat capacity

\(c_p\)

get_cp()

\(J/(kg \cdot K)\)

Density

\(\rho\)

get_rho()

\(kg/m^3\)

Dynamic viscosity

\(\mu\)

get_mu()

\(Pa \cdot s\)

Thermal conductivity

\(k\)

get_k()

\(W/(m \cdot K)\)

ConstantWater

The class ConstantWater represents water with constant properties:

Symbol

Documentation

Default

Unit

\(c_p\)

CP_WATER

4182.0

\(J/(kg \cdot K)\)

\(\rho\)

RHO_WATER

990.0

\(kg/m^3\)

\(\mu\)

MU_WATER

0.0004

\(Pa \cdot s\)

\(k\)

K_WATER

0.598

\(W/(m \cdot K)\)

Example usage:

>>> from pydhn.fluids import ConstantWater
>>> fluid = ConstantWater()
>>> # Print the fluid specific heat capacity at 60°C
>>> print(fluid.get_cp(t=60))
4182.0
>>> # Print the fluid density at 40°C
>>> print(fluid.get_rho(t=40))
990.0

Water

The class Water models water with variable properties. The relationships between the fluid properties and its temperature are taken from [CzWo98]. The range of validity is 0-150°C.

Example usage:

>>> from pydhn.fluids import Water
>>> fluid = Water()
>>> # Print the fluid specific heat capacity at 60°C
>>> print(fluid.get_cp(t=60))
4184.625980441447
>>> # Print the fluid specific heat capacity at 40°C
>>> print(fluid.get_cp(t=40))
4178.8227047312685