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;
#define CS_COMBUSTION_MAX_COALS
Definition: cs_coal.h:51
cs_combustion_model_t * cs_glob_combustion_model
Definition: cs_combustion_model.c:120
#define CS_COMBUSTION_GAS_MAX_ELEMENTARY_COMPONENTS
Definition: cs_combustion_model.h:56
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:313
const cs_fluid_properties_t * cs_glob_fluid_properties
Definition: cs_physical_constants.c:424
Definition: cs_combustion_model.h:104
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__);
coefe[ige] = 0.;
const int ioxy = 0;
f1mc[icha] = 0;
f2mc[icha] = 0;
}
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.c:140
double cs_coal_thconvers1(const double xesp[], const double f1mc[], const double f2mc[], cs_real_t tp)
Compute gas enthalpy Function with gas temperature and concentrations.
cs_field_t * cs_field_by_name(const char *name)
Return a pointer to a field based on its name.
Definition: cs_field.c:2344
@ h
Definition: cs_field_pointer.h:91
#define CS_F_(e)
Macro used to return a field pointer by its enumerated value.
Definition: cs_field_pointer.h:51
real(c_double), pointer, save xco2
Molar coefficient of CO2.
Definition: ppthch.f90:165
integer(c_int), pointer, save ico2
Definition: cpincl.f90:233
integer(c_int), pointer, save in2
Definition: cpincl.f90:233
integer(c_int), pointer, save ih2o
Definition: cpincl.f90:233
integer(c_int), pointer, save io2
Definition: cpincl.f90:233
int ico2
Definition: cs_combustion_model.h:130
int in2
Definition: cs_combustion_model.h:129
int ih2o
Definition: cs_combustion_model.h:131
double wmole[CS_COMBUSTION_GAS_MAX_ELEMENTARY_COMPONENTS]
Definition: cs_combustion_model.h:143
double oxyo2[CS_COMBUSTION_MAX_OXYDANTS]
Definition: cs_combustion_model.h:146
int ieqco2
Definition: cs_combustion_model.h:118
int ieqnox
Definition: cs_combustion_model.h:124
double oxyh2o[CS_COMBUSTION_MAX_OXYDANTS]
Definition: cs_combustion_model.h:152
double oxyco2[CS_COMBUSTION_MAX_OXYDANTS]
Definition: cs_combustion_model.h:155
int io2
Definition: cs_combustion_model.h:128
double oxyn2[CS_COMBUSTION_MAX_OXYDANTS]
Definition: cs_combustion_model.h:149
cs_real_t * val
Definition: cs_field.h:152
double t0
Definition: cs_physical_constants.h:80