As usual, one can access any field using the field_get_val_s_by_name function. cvar_*(iel) is the value of this variable in cell number iel. ONLY done if there is no restart computation
The following local variables need to be defined for the examples in this section:
const cs_lnum_t n_cells = domain->mesh->n_cells;
cs_coal_model_t * cs_glob_coal_model
Definition: cs_coal.cpp:95
#define CS_COMBUSTION_GAS_MAX_ELEMENTARY_COMPONENTS
Definition: cs_combustion_gas.h:60
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:325
const cs_fluid_properties_t * cs_glob_fluid_properties
Definition: cs_physical_constants.cpp:462
Fluid properties descriptor.
Definition: cs_physical_constants.h:61
The following initialization block allows setting some variable values (variables not set here keep their GUI-defined or default values):
if (domain->time_step->nt_prev > 0)
return;
bft_printf(
"%s: settings for pulverized coal\n", __func__);
const int ico2 = cm->
ico2 - 1;
const int ih2o = cm->
ih2o - 1;
const int in2 = cm->
in2 - 1;
const int io2 = cm->
io2 - 1;
coefe[ige] = 0.;
const int ioxy = 0;
coefe[io2] = cm->
wmole[io2] * cm->
oxyo2[ioxy ]/dmas;
coefe[in2] = cm->
wmole[in2] * cm->
oxyn2[ioxy ]/dmas;
for (
cs_lnum_t cell_id = 0; cell_id < n_cells; cell_id++)
cvar_h[cell_id] = h1init;
for (
cs_lnum_t cell_id = 0; cell_id < n_cells; cell_id++)
cvar_yco2[cell_id] = xco2;
}
for (
cs_lnum_t cell_id = 0; cell_id < n_cells; cell_id++)
cvar_nox[cell_id] = h1init;
}
int bft_printf(const char *const format,...)
Replacement for printf() with modifiable behavior.
Definition: bft_printf.cpp:134
cs_real_t * val
Definition: cs_field.h:298
cs_real_t cs_coal_ht_convert_h_to_t_gas_by_yi(cs_real_t eh, const cs_real_t xesp[])
Calculation of the gas temperature from gas enthalpy and given mass fractions for coal combustion.
Definition: cs_coal_ht_convert.cpp:516
cs_field_t * cs_field(int id)
Return a pointer to a field based on its id. This function requires that a field of the given id is d...
Definition: cs_field.cpp:4295
@ h
Definition: cs_field_pointer.h:90
#define CS_F_(e)
Macro used to return a field pointer by its enumerated value.
Definition: cs_field_pointer.h:47
int ico2
Definition: cs_coal.h:381
int in2
Definition: cs_coal.h:380
int ih2o
Definition: cs_coal.h:379
double oxyo2[CS_COMBUSTION_COAL_MAX_OXYDANTS]
Definition: cs_coal.h:120
double oxyn2[CS_COMBUSTION_COAL_MAX_OXYDANTS]
Definition: cs_coal.h:123
double wmole[CS_COMBUSTION_COAL_MAX_ELEMENTARY_COMPONENTS]
Definition: cs_coal.h:114
int ieqco2
Definition: cs_coal.h:149
double oxyco2[CS_COMBUSTION_COAL_MAX_OXYDANTS]
Definition: cs_coal.h:129
int ieqnox
Definition: cs_coal.h:157
int io2
Definition: cs_coal.h:378
double oxyh2o[CS_COMBUSTION_COAL_MAX_OXYDANTS]
Definition: cs_coal.h:126
double t0
Definition: cs_physical_constants.h:84