7.3
general documentation
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;
cs_real_t *cvar_fm = CS_F_(fm)->val;
const cs_real_t fs = cm->gas.fs[0];
/* Mean Mixture Fraction */
cs_array_real_set_scalar(n_cells, fs, cvar_fm);
/* Enthalpy */
const cs_real_t hinoxy = cm->hinoxy;
const cs_real_t hinfue = cm->fuel.hinfue;
cs_real_t h_ini = hinfue*fs + hinoxy*(1.0-fs);
cs_array_real_set_scalar(n_cells, h_ini, cvar_scalt);
}