By default, when not using a specific physical model (which will usually contain a more advanced conversion), a simple
law is used.
This simple law will also be used by default in solid zones even when using a specific fluid model.
When using variable Cp values, an appropriate temperaure to enthalpy conversion should be defined by the user if solving the Enthalpy.
The cs_user_physical_properties_h_to_t and cs_user_physical_properties_t_to_h functions (in cs_user_physical_properties.cpp) can be used to define an enthalpy-temperature conversion law and its inverse.
If can be defined on a "per-zone" basis if needed in case different zones (both solid and boundary) correspond to different fluids or solid ones.
The following code blocks show an example of enthalpy-temperature conversion law.
The following block is added either outside cs_user_physical_properties_h_to_t and cs_user_physical_properties_t_to_h functions (before all function definitions in cs_user_physical_properties.cpp), or in both of these functions:
The following block is then used in cs_user_physical_properties_h_to_t to convert enthalpy to temperature:
Note that z->name
or z->location_id
can be used as a filter if "per-zone" properties are needed (such as with solid zones).
The following block must then be added in cs_user_physical_properties_t_to_h for the matching temperature to Enthalpy conversion:
Note that temperature to enthalpy conversion is only needed when solving the Enthalpy and using radiative tranfers or temperature-based boundary conditions.