9.0
general documentation
Loading...
Searching...
No Matches
Pulverized coal

The examples provided here are only concern inlet boundary conditions. Other boundary condition types are not specific to the pulverized coal model, so generic examples apply (and as usual, the GUI is recommended).

Note that turbulence variables BC's are usually computed automatically, based on definitions using cs_boundary_conditions_inlet_set_turbulence_hyd_diam or cs_boundary_conditions_inlet_set_turbulence_internsity.

This following examples show how user code con be defined in cs_user_boundary_conditions_setup, so as to define inlet properties using the high-level for non-coal-specific variables, and access the coal inlet structure definition to set the required properties.

Example 1

Secondary or tertiary air inlet, for zone 'inlet', using either the base pulverized coal model or the pulverized coal with moisture model (with Lagrangian particle tracking).

{
const cs_zone_t *z = cs_boundary_zone_by_name("inlet");
/* Inlet velocity direction based on constant vector;
value based on oxidizer mass flow rate (in kg/s);*/
cs_real_t u[] = {0, 0, 0.5};
ci->ientat = 1;
/* Oxidizer's number (1 to 3) */
ci->inmoxy = 1;
/* Oxidizer Temperature in K */
/* Turbulence variables BC's calculated based on hydraulic diameter */
/* Automatic treatment of non-user scalars */
/* Treatment of user-defined scalars */
const char *names[] = {"scalar1", "scalar2"};
for (int i = 0; i < 2; i++) {
if (eqp == nullptr)
continue;
cs_real_t val[1] = {1.0};
z->name,
val);
}
}

Example 2

Primary air and coal inlet, for zone 'primary_inlet'.

{
const cs_zone_t *z = cs_boundary_zone_by_name("primary_inlet");
/* Inlet velocity direction based on constant vector;
value based on oxidizer mass flow rate (in kg/s);*/
cs_real_t u[] = {0, 0, 0.5};
(z, 1.46e-03);
/* Turbulence variables BC's calculated based on hydraulic diameter */
/* Air inlet with pulverized coal */
ci->ientcp = 1;
/* Oxidizer's number (1 to 3) */
ci->inmoxy = 1;
/* Oxidizer Temperature in K */
/* code_saturne deals with ncha different coals (component of blend)
every coal is described by n_classes_per_coal[icha] class of particles
(each of them described by an inlet diameter) */
/* Treatment for the first coal */
int icha = 0;
/* Coal mass flow rate in kg/s */
ci->qimpcp[icha] = 1.46e-4;
/* Percentage mass fraction of each granulometric class */
for (int iclapc = 0; iclapc < coal->n_classes_per_coal[icha]; iclapc++) {
ci->distch[icha][iclapc] = 100.0/(double)coal->n_classes_per_coal[icha];
}
/* Inlet temperature for coal & primary air */
/* Automatic treatment of non-user scalars */
}