9.0
general documentation
Loading...
Searching...
No Matches
Gas 3 PTCHEM example
Gas 3 PTCHEM example
Initialization
The following initialization block needs to be added for the following examples:
/* If this is restarted computation, do not reinitialize values */
if
(domain->
time_step
->
nt_prev
> 0)
return
;
const
cs_lnum_t
n_cells = domain->
mesh
->
n_cells
;
const
cs_combustion_gas_model_t
*cm =
cs_glob_combustion_gas_model
;
cs_real_t
*cvar_fm =
CS_F_
(
fm
)->val;
cs_real_t
*cvar_scalt =
cs_thermal_model_field
()->
val
;
const
cs_real_t
fs
= cm->
fs
[0];
/* Mean Mixture Fraction */
cs_array_real_set_scalar
(n_cells, fs, cvar_fm);
/* Enthalpy */
if
(
cs_glob_physical_model_flag
[
CS_COMBUSTION_3PT
] == 1) {
const
cs_real_t
hinoxy
= cm->
hinoxy
;
const
cs_real_t
hinfue
= cm->
hinfue
;
cs_real_t
h_ini =
hinfue
*
fs
+
hinoxy
*(1.0-
fs
);
cs_array_real_set_scalar
(n_cells, h_ini, cvar_scalt);
}
Generated on
for code_saturne by
1.14.0