User definition of physical properties. More...
#include "cs_defs.h"
#include <assert.h>
#include <math.h>
#include <string.h>
#include "cs_headers.h"
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_smagorinsky_c (cs_domain_t *domain, const cs_real_t mijlij[], const cs_real_t mijmij[]) |
User modification of the Smagorinsky constant for the dynamic Smagorinsky model. 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... | |
User definition of 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.
[in,out] | domain | pointer to a cs_domain_t structure |
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.
[in,out] | domain | pointer to a cs_domain_t structure |
[in] | z | zone (volume or boundary) applying to current call |
[in] | z_local | if 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] | h | enthalpy values |
[in,out] | t | temperature values |
void cs_user_physical_properties_smagorinsky_c | ( | cs_domain_t * | domain, |
const cs_real_t | mijlij[], | ||
const cs_real_t | mijmij[] | ||
) |
User modification of the Smagorinsky constant for the dynamic Smagorinsky model.
CS = Mij.Lij / Mij.Mij
The local averages of the numerator and denominator are done before calling this function, so
CS = < Mij.Lij > / < Mij.Mij >
In this subroutine, Mij.Lij and Mij.Mij are passed as arguments before the local average.
[in,out] | domain | pointer to a cs_domain_t structure |
[in] | mijlij | mij.lij before the local averaging |
[in] | mijmij | mij.mij before the local averaging |
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.
[in,out] | domain | pointer to a cs_domain_t structure |
[in] | z | zone (volume or boundary) applying to current call |
[in] | z_local | if 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] | h | temperature values |
[in,out] | t | enthalpy values |
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 pthrbm.f90) as:
.
Here is an extremely basic example where the thermodynamic pressure increases by 10.0 at every iteration.
[in,out] | td_p | Updated value of the thermodynamic pressure |