8.3
general documentation
cs_user_physical_properties.cpp File Reference

User definition of physical properties. More...

#include "cs_defs.h"
#include <assert.h>
#include <math.h>
#include <string.h>
#include "cs_headers.h"
+ Include dependency graph for cs_user_physical_properties.cpp:

Functions

void cs_user_physical_properties (cs_domain_t *domain)
 Function called at each time step to define physical properties. More...
 
void cs_user_physical_properties_h_to_t (cs_domain_t *domain, const cs_zone_t *z, bool z_local, const cs_real_t h[], cs_real_t t[])
 User definition of enthalpy to temperature conversion. More...
 
void cs_user_physical_properties_t_to_h (cs_domain_t *domain, const cs_zone_t *z, bool z_local, const cs_real_t t[], cs_real_t h[])
 User definition of temperature to enthalpy conversion. More...
 
void cs_user_physical_properties_turb_viscosity (cs_domain_t *domain)
 User modification of the turbulence viscosity. More...
 
void cs_user_physical_properties_td_pressure (cs_real_t *td_p)
 User function to define a custom law for the thermodynamic pressure. More...
 

Detailed Description

User definition of physical properties.

Function Documentation

◆ cs_user_physical_properties()

void cs_user_physical_properties ( cs_domain_t domain)

Function called at each time step to define physical properties.

This function is called each time step to define physical properties.

Parameters
[in,out]domainpointer to a cs_domain_t structure

◆ cs_user_physical_properties_h_to_t()

void cs_user_physical_properties_h_to_t ( cs_domain_t domain,
const cs_zone_t z,
bool  z_local,
const cs_real_t  h[],
cs_real_t  t[] 
)

User definition of enthalpy to temperature conversion.

This allows overwriting the solver defaults if necessary.

This function may be called on a per-zone basis, so as to allow different conversion relations in zones representing solids or different fluids.

Parameters
[in,out]domainpointer to a cs_domain_t structure
[in]zzone (volume or boundary) applying to current call
[in]z_localif true, h and t arrays are defined in a compact (contiguous) manner for this zone only; if false, h and t are defined on the zone's parent location (usually all cells or boundary faces)
[in]henthalpy values
[in,out]ttemperature values

◆ cs_user_physical_properties_t_to_h()

void cs_user_physical_properties_t_to_h ( cs_domain_t domain,
const cs_zone_t z,
bool  z_local,
const cs_real_t  t[],
cs_real_t  h[] 
)

User definition of temperature to enthalpy conversion.

This allows overwriting the solver defaults if necessary.

This function may be called on a per-zone basis, so as to allow different conversion relations in zones representing solids or different fluids.

Parameters
[in,out]domainpointer to a cs_domain_t structure
[in]zzone (volume or boundary) applying to current call
[in]z_localif true, h and t arrays are defined in a compact (contiguous) manner for this zone only; if false, h and t are defined on the zone's parent location (usually all cells or boundary faces)
[in]htemperature values
[in,out]tenthalpy values

◆ cs_user_physical_properties_td_pressure()

void cs_user_physical_properties_td_pressure ( cs_real_t td_p)

User function to define a custom law for the thermodynamic pressure.

Allows to define a custom law for the constant uniform thermodynamic pressure (whenn cs_velocity_pressure_model_t::idilat = 3 or cs_fluid_properties_t::ipthrm = 1).

The density is then updated (in cs_compute_thermo_pressure_density.c) as:

\[\rho^{n+1} =\rho^{n} \cdot \frac{P_{th}^{n+1}}{P_{th}^{n}}\]

.

Parameters
[in,out]td_pUpdated value of the thermodynamic pressure

◆ cs_user_physical_properties_turb_viscosity()

void cs_user_physical_properties_turb_viscosity ( cs_domain_t domain)

User modification of the turbulence viscosity.

Turbulent viscosity $ \mu_T $ (kg/(m s)) can be modified. You can access the field by its name.

Parameters
[in,out]domainpointer to a cs_domain_t structure