8.0
general documentation
Parameters settings for lagrangian module

Introduction

This page gives some examples of settings for the stochastic lagrangian module.

Lagrangian module

Particle tracking mode settings:

/* Particle-tracking mode
* ====================== */
/* iilagr = CS_LAGR_OFF: no particle tracking (default)
* = CS_LAGR_ONEWAY_COUPLING: particle-tracking one-way coupling
* = CS_LAGR_TWOWAY_COUPLING: particle-tracking two-way coupling
* = CS_LAGR_FROZEN_CONTINUOUS_PHASE: particle tracking on frozen field
* (this option requires a calculation restart isuite=1,
* all Eulerian fields are frozen (pressure, velocities,
* scalars). This option is stronger than iccvfg) */
@ CS_LAGR_ONEWAY_COUPLING
Definition: cs_lagr.h:124
cs_lagr_time_scheme_t * cs_glob_lagr_time_scheme
int iilagr
Definition: cs_lagr.h:196

In case of restart

/* Particle-tracking calculation restart
* ===================================== */
/* isuila = 0 : no restart (default)
= 1 : restart (this value requires a restart on the continuous
phase too, i.e. isuite = 1) */
/* Restart on volume and boundary statistics, and two-way coupling terms; */
/* useful if isuila = 1 (defaul off: 0 ; on: 1) */
cs_lagr_stat_options_t * cs_glob_lagr_stat_options
int isuist
Definition: cs_lagr_stat.h:199
int isuila
Definition: cs_lagr.h:217

Specific models

/* Particle tracking: specific models
* ================================== */
/* physical_model
* = CS_LAGR_PHYS_OFF: only transport modeling (default)
* = CS_LAGR_PHYS_HEAT: equation on temperature (in Celsius degrees),
* diameter or mass
* = CS_LAGR_PHYS_COAL: pulverized coal combustion
* (only available if the continuous phase is a flame of pulverized coal)
*/
/* 3.1 equation on temperature, diameter or mass */
/* equation on diameter */
/* (default off: 0 ; on: 1) */
/* equation on temperature (in Celsius degrees) */
/* (default off: 0 ; on: 1) */
/* This option requires a thermal scalar for the continuous phase. */
/* equation on mass */
/* (default off: 0 ; on: 1) */
}
cs_lagr_model_t * cs_glob_lagr_model
cs_lagr_specific_physics_t * cs_glob_lagr_specific_physics
@ CS_LAGR_PHYS_OFF
Definition: cs_lagr.h:149
@ CS_LAGR_PHYS_HEAT
Definition: cs_lagr.h:150
int physical_model
Definition: cs_lagr.h:274
int itpvar
Definition: cs_lagr.h:411
int idpvar
Definition: cs_lagr.h:416
int impvar
Definition: cs_lagr.h:421

Example of coal fouling

/* Coal fouling
* ---------------------------------------------------------------------
* Reference internal reports EDF/R&D: HI-81/00/030/A and HI-81/01/033/A
*
* Evaluation of the probability for a particle to stick to a wall.
* This probability is the ratio of a critical viscosity on the
* viscosity of coal ashes
*
* visref
* P(Tp) = -------- for viscen >= visref
* viscen
*
* = 1 otherwise
*
*
* The expression of J.D. Watt and T.Fereday (J.Inst.Fuel-Vol42-p99)
* is used to evaluate the viscosity of the ashes
*
* Enc1 * 1.0d+7
* Log (10*viscen) = --------------- + Enc2
* 10 2
* (Tp(C) - 150)
*
* In literature, the range of the critical viscosity visref is between
* 8 Pa.s and 1.D7 Pa.s For general purpose 1.0D+4 Pa.s is chosen
*----------------------------------------------------------------------- */
/* iencra = 0 no fouling (default)
= 1 fouling
The boundary on which the fouling can occur must be specified with
boundary condition definitions.
* Post-processing:
* iencnbbd = 1 / iencckbd = 1 (10.2) */
/* Example of definition of fouling criteria for each coal first
(and single) coal icha = 1 */
int icha = 0;
/* tprenc : threshold temperature below which no fouling occurs
(in degrees Celcius) */
/* visref : critical viscosity (Pa.s) */
/* > coal composition in mineral matters:
(with SiO2 + Al2O3 + Fe2O3 + CaO + MgO = 100% in mass) */
cs_real_t sio2 = 36.0;
cs_real_t al2o3 = 20.8;
cs_real_t fe2o3 = 4.9;
cs_real_t cao = 13.3;
/* Enc1 and Enc2 : coefficients in Watt and Fereday expression */
= 0.00835 * sio2 + 0.00601 * al2o3 - 0.109;
= 0.0415 * sio2 + 0.0192 * al2o3 + 0.0276 * fe2o3 + 0.016 * cao - 3.92;
}
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
cs_lagr_encrustation_t * cs_glob_lagr_encrustation
@ CS_LAGR_PHYS_COAL
Definition: cs_lagr.h:151
cs_real_t * visref
Definition: cs_lagr.h:783
cs_real_t * tprenc
Definition: cs_lagr.h:778
cs_real_t * enc2
Definition: cs_lagr.h:773
cs_real_t * enc1
Definition: cs_lagr.h:771
int fouling
Definition: cs_lagr.h:325

Calculation features for the dispersed phases

/* Calculation features for the dispersed phases
* ============================================= */
/* Additional variables
* --------------------
*
* Additional variables may be accessed using the (CS_LAGR_USER + i)
* attribute, where 0 <= i < lagr_params->n_user_variables
* is the additional variable index.
*
* The integration of the associated differential stochastic equation
* requires a user intervention in cs_user_lagr_sde() function */
/* Steady or unsteady continuous phase
* -----------------------------------
* if steady: isttio = 1
* if unsteady: isttio = 0
* if iilagr = CS_LAGR_FROZEN_CONTINUOUS_PHASE then isttio = 1
Remark: if isttio = 0, then the statistical averages are reset
at each time step */
/* Two-way coupling: (iilagr = CS_LAGR_TWOWAY_COUPLING)
------------------------------ */
/* * number of absolute time step (i.e. with restart)
from which a time average for two-way coupling source terms is
computed (steady source terms)
* if the time step is lower than NSTITS, source terms are
unsteady: they are reset at each time step
* useful only if ISTTIO = 1.
* the min value for NSTITS is 1 */
/* two-way coupling for dynamic (velocities and turbulent scalars) */
/* (default off: 0; on: 1) */
/* (useful if ICCVFG = 0) */
/* two-way coupling for mass,
(if physical_model = CS_LAGR_PHYS_HEAT and impvar = 1)
(default off: 0; on: 1) */
/* two-way coupling for thermal scalar
(if physical_model = CS_LAGR_PHYS_HEAT and impvar = 1,
or physical_model = CS_LAGR_PHYS_COAL)
or for coal variables (if physical_model = CS_LAGR_PHYS_COAL)
(default off: 0; on: 1) */
}
cs_lagr_source_terms_t * cs_glob_lagr_source_terms
@ CS_LAGR_TWOWAY_COUPLING
Definition: cs_lagr.h:125
@ CS_LAGR_FROZEN_CONTINUOUS_PHASE
Definition: cs_lagr.h:126
void cs_lagr_set_n_user_variables(int n_user_variables)
Set number of user particle variables.
Definition: cs_lagr_particle.c:1309
int ltsmas
Definition: cs_lagr.h:648
int ltsthe
Definition: cs_lagr.h:656
int ltsdyn
Definition: cs_lagr.h:642
int nstits
Definition: cs_lagr.h:703
int isttio
Definition: cs_lagr.h:210

Example of volume statistics

/* Volume statistics
----------------- */
/* Threshold for the use of volume statistics
------------------------------------------
* the value of the threshold variable is a statistical weight.
* each cell of the mesh contains a statistical weight
(sum of the statistical weights of all the particles
located in the cell); threshold is the minimal value under
which the contribution in statistical weight of a particle
is ignored in the full model of turbulent dispersion and in the
resolution of the Poisson equation for the correction of the
mean velocities. */
/* Calculation of the volume statistics from the absolute number
* of time steps
* * idstnt is a absolute number of time steps
* (i.e. including calculation restarts) */
/* Steady calculation from the absolute time step nstist
* * nstist is a absolute number of time steps
* (i.e. including calculation restarts) from which the statistics
* are averaged in time.
* * useful if the calculation is steady (isttio=1)
* * if the number of time steps is lower than nstits,
* the transmitted source terms are unsteady (i.e. they are reset to
* zero at each time step)
* * the minimal value acceptable for nstist is 1. */
/* Volume statistical variables
---------------------------- */
/* Activation of the calculation of the particle volume fraction */
/* Activation of the calculation of the particle velocity */
/* Activation of the calculation of the particle residence time */
/* Activation of the calculation of the weight */
/* Specific models (physical_model = CS_LAGR_PHYS_HEAT)
* following the chosen options:
* Mean and variance of the temperature
* Mean and variance of the diameter
* Mean and variance of the mass
*/
/* Statistics per class
* -------------------- */
@ CS_LAGR_VELOCITY
Definition: cs_lagr_particle.h:96
@ CS_LAGR_RESIDENCE_TIME
Definition: cs_lagr_particle.h:91
@ CS_LAGR_STAT_WEIGHT
Definition: cs_lagr_particle.h:90
void cs_lagr_stat_activate_attr(int attr_id)
Activate Lagrangian statistics for a given particle attribute.
Definition: cs_lagr_stat.c:4244
void cs_lagr_stat_activate(int stat_type)
Activate Lagrangian statistics for a given statistics type.
Definition: cs_lagr_stat.c:4135
@ CS_LAGR_STAT_VOLUME_FRACTION
Definition: cs_lagr_stat.h:94
int n_stat_classes
Definition: cs_lagr.h:335
int idstnt
Definition: cs_lagr_stat.h:203
cs_real_t threshold
Definition: cs_lagr_stat.h:217
int nstist
Definition: cs_lagr_stat.h:213

Options concerning the numerical treatment of the dispersed phase

/* Options concerning the numerical treatment of the dispersed phase
* ================================================================= */
/* Integration order of the stochastic differential equations */
/* Options concerning the treatment of the dispersed phase
* ======================================================= */
/* A value of 1 sets the assumption that we have regular particles.
Since the turbulent dispersion model uses volume statistics,
When modcpl=0 then the particles are assumed to be fluid particles
and the turbulence dispersion model is disabled. */
int modcpl
Definition: cs_lagr.h:283
int t_order
Definition: cs_lagr.h:220

Options concerning the treatment of specific forces

/* Options concerning the treatment of specific forces
* =================================================== */
/* If dlvo = 1, DLVO deposition conditions are activated for the
wall with appropriate condition type \ref CS_LAGR_DEPO_DLVO. */
if (cs_glob_lagr_model->dlvo == 1) {
/* Constants for the van der Waals forces
--------------------------------------
Hamaker constant for the particle/fluid/substrate system:*/
/* Retardation wavelength for the particle/fluid/substrate system:*/
/* Constants for the elecstrostatic forces
---------------------------------------
Dielectric constant of the fluid (example: water at 293 K)*/
/* Electrokinetic potential of the first solid - particle (Volt)*/
/* Electrokinetic potential of the second solid - surface (Volt)*/
/* Valency of ions in the solution (used for EDL forces)*/
/* Ionic force (mol/l)*/
}
cs_lagr_physico_chemical_t * cs_glob_lagr_physico_chemical
int dlvo
Definition: cs_lagr.h:301
cs_real_t cstham
Definition: cs_lagr.h:796
cs_real_t fion
Definition: cs_lagr.h:815
cs_real_t phi_s
Definition: cs_lagr.h:809
cs_real_t lambda_vdw
Definition: cs_lagr.h:800
cs_real_t epseau
Definition: cs_lagr.h:803
cs_real_t phi_p
Definition: cs_lagr.h:806
cs_real_t valen
Definition: cs_lagr.h:812

Brownian motion:

/* Activation of Brownian motion
* ============================= */
/* Activation of Brownian motion:
(default off: 0 ; on: 1)
Caution: OPTION FOR DEVELOPERS ONLY
======== */
cs_lagr_brownian_t * cs_glob_lagr_brownian
int lamvbr
Definition: cs_lagr.h:824

Deposition model:

/* Activation of deposition model
* ============================== */
/* Activation of the deposition model (default off: 0 ; on: 1) */
int deposition
Definition: cs_lagr.h:299

Roughness resuspension model

/* Activation of roughness and resuspension model
* ============================================== */
/* Activation of the resuspension model (default off: 0 ; on: 1) */
/* Caution: OPTION FOR DEVELOPERS ONLY
========
dlvo deposition conditions for roughness surface */
/* Parameters of the particle resuspension model for the roughness */
/* average distance between two large-scale asperities */
/* density of the small-scale asperities */
/* radius of small asperities */
/* radius of large asperities */
/* Young's modulus (GPa) */
cs_lagr_reentrained_model_t * cs_glob_lagr_reentrained_model
int roughness
Definition: cs_lagr.h:305
int resuspension
Definition: cs_lagr.h:309
cs_real_t denasp
Definition: cs_lagr.h:457
cs_real_t rayasp
Definition: cs_lagr.h:459
cs_real_t modyeq
Definition: cs_lagr.h:458
cs_real_t rayasg
Definition: cs_lagr.h:460
cs_real_t espasg
Definition: cs_lagr.h:456

Clogging model

/* Activation of the clogging model
* ================================ */
/* Activation of the clogging model
(default off: 0 ; on: 1)
Caution: OPTION FOR DEVELOPERS ONLY
======== */
/* Parameters for the particle clogging model */
/* Mean diameter*/
/* Jamming limit */
/* Minimal porosity
* from 0.366 to 0.409 for random packings
* equal to 0.26 for close packings */
/* Hamaker constant for the particle/fluid/particle system */
cs_lagr_clogging_model_t * cs_glob_lagr_clogging_model
cs_real_t jamlim
Definition: cs_lagr.h:489
cs_real_t diam_mean
Definition: cs_lagr.h:492
cs_real_t mporos
Definition: cs_lagr.h:490
cs_real_t csthpp
Definition: cs_lagr.h:491
int clogging
Definition: cs_lagr.h:313

Deposit influence

/* Influence of the deposit on the flow
* ==================================== */
/* Activation of the influence of the deposit on the flow
by the head losses calculation (with clogging model only)
(default off: 0 ; on: 1) */
/* One-way coupling */
/* The statistical averages are not reset
at each time step */
}
int iflow
Definition: cs_lagr.h:453

Consolidation model:

/* Activation of the consolidation model
* ===================================== */
/* Activation of the consolidation model
(default off: 0 ; on: 1) */
/* Caution: valid only for multilayer deposition: */
/* Parameters for the particle consolidation model */
/* Consolidated height hconsol calculated using the deposit time
* hconsol = t_depo * rconsol
* Adhesion calculated using the following formula:
* Fadh = F_consol + (F_DLVO - F_consol)
* * (0.5+0.5*tanh((h-hconsol)/kconsol/hconsol))
*/
/* Consolidated force (N) */
/* Slope of consolidation (->0 for a two-layer system) */
/* Consolidation rate (m/s) */
cs_lagr_consolidation_model_t * cs_glob_lagr_consolidation_model
cs_real_t force_consol
Definition: cs_lagr.h:537
cs_real_t slope_consol
Definition: cs_lagr.h:536
cs_real_t rate_consol
Definition: cs_lagr.h:535
int consolidation
Definition: cs_lagr.h:322

Precipitation disolution model

/* Activation of the precipitation/disolution model
* ================================================ */
/* Activation of the precipitation/dissolution model
(default off: 0 ; on: 1)
Caution: OPTION FOR DEVELOPERS ONLY */
/* Diameter of particles formed by precipitation */
/* Diameter of particles formed by precipitation */
/* Number of particle classes */
cs_lagr_precipitation_model_t * cs_glob_lagr_precipitation_model
int precipitation
Definition: cs_lagr.h:324
cs_real_t diameter
Definition: cs_lagr.h:472
int nbrclas
Definition: cs_lagr.h:470
cs_real_t rho
Definition: cs_lagr.h:474

Boundary statistics

/* Boundary statistics
* =================== */
/* Number of particle/boundary interactions
(default off: 0 ; on: 1) */
/* Particle mass flux associated to particle/boundary interactions */
/* Angle between particle velocity and the plane of the boundary face */
/* Norm of particle velocity during the integration with the boundary face;
example: deactivate even if activated in GUI */
/* (default off: 0 ; on: 1) */
/* Mass of fouled coal particles */
/* Diameter of fouled coal particles */
/* Coke fraction of fouled coal particles */
}
/* Add a user-defined boundary statistic:
incident kinetic energy */
for (int class = 0;
class < cs_glob_lagr_model->n_stat_classes + 1;
class++) {
m_type++) {
("part_kinetic_energy",
-1, /* non predefined stat type */
m_type,
class,
1, /* dimension */
-1, /* component_id, */
_incident_kinetic_energy, /* data_func */
NULL, /* data_input */
_boundary_impact_weight, /* w_data_func */
NULL, /* w_data_input */
0,
-1,
}
}
/* Name of the recordings for display,
Average in time of particle average
of the boundary statistics
-----------------------------------*/
/* The user intervenes only in the additional user information
to be recorded: he must prescribe the name of the recording as well as
the type of average that he wishes to apply to it for the writing
of the log and the post-processing. */
/* Frequency for the output of the Lagrangian log
* ============================================== */
/* Post-process particle attributes
* ================================ */
cs_lagr_boundary_interactions_t * cs_glob_lagr_boundary_interactions
int cs_glob_lagr_log_frequency_n
@ CS_LAGR_STAT_CLASS
Definition: cs_lagr_particle.h:169
void cs_lagr_post_set_attr(cs_lagr_attribute_t attr_id, bool active)
Activate or deactive postprocessing for a given particle attribute.
Definition: cs_lagr_post.c:390
int cs_lagr_stat_event_define(const char *name, int location_id, int stat_type, cs_lagr_stat_group_t stat_group, cs_lagr_stat_moment_t m_type, int class_id, int dim, int component_id, cs_lagr_moment_e_data_t *data_func, void *data_input, cs_lagr_moment_e_data_t *w_data_func, void *w_data_input, int nt_start, double t_start, cs_lagr_stat_restart_t restart_mode)
Define an event-based statistic.
Definition: cs_lagr_stat.c:3821
void cs_lagr_stat_activate_time_moment(int stat_type, cs_lagr_stat_moment_t moment)
Activate time moment for some predefined Lagrangian statistics types.
Definition: cs_lagr_stat.c:4192
void cs_lagr_stat_deactivate(int stat_type)
Deactivate Lagrangian statistics for a given statistics type.
Definition: cs_lagr_stat.c:4220
@ CS_LAGR_STAT_FOULING_MASS_FLUX
Definition: cs_lagr_stat.h:109
@ CS_LAGR_STAT_MASS_FLUX
Definition: cs_lagr_stat.h:107
@ CS_LAGR_STAT_IMPACT_ANGLE
Definition: cs_lagr_stat.h:111
@ CS_LAGR_STAT_IMPACT_VELOCITY
Definition: cs_lagr_stat.h:113
@ CS_LAGR_STAT_FOULING_DIAMETER
Definition: cs_lagr_stat.h:114
@ CS_LAGR_STAT_FOULING_COKE_FRACTION
Definition: cs_lagr_stat.h:115
@ CS_LAGR_MOMENT_RESTART_AUTO
Definition: cs_lagr_stat.h:78
cs_lagr_stat_moment_t
Definition: cs_lagr_stat.h:55
@ CS_LAGR_MOMENT_VARIANCE
Definition: cs_lagr_stat.h:58
@ CS_LAGR_MOMENT_MEAN
Definition: cs_lagr_stat.h:57
@ CS_LAGR_STAT_GROUP_TRACKING_EVENT
Definition: cs_lagr_stat.h:67
@ CS_MESH_LOCATION_BOUNDARY_FACES
Definition: cs_mesh_location.h:65
int has_part_impact_nbr
Definition: cs_lagr.h:853