My Project
programmer's documentation
Data Structures | Macros | Enumerations | Functions | Variables
cs_field_pointer.h File Reference
#include "cs_defs.h"
#include "cs_field.h"
Include dependency graph for cs_field_pointer.h:

Go to the source code of this file.

Data Structures

struct  cs_field_pointer_array_t
 
union  cs_field_pointer_val_t
 

Macros

#define CS_ENUMF_(e)   CS_FIELD_POINTER_ ## e
 Macro used for scoping of field pointer enums. More...
 
#define CS_F_(e)   cs_glob_field_pointers[CS_FIELD_POINTER_ ## e].f
 Macro used to return a field pointer by its enumerated value. More...
 
#define CS_FI_(e, i)   cs_glob_field_pointers[CS_FIELD_POINTER_ ## e].a->p[i]
 Macro used to return a field pointer by its enumerated value. More...
 

Enumerations

enum  cs_field_pointer_id_t {
  dt, p, vel, k,
  eps, r11, r22, r33,
  r12, r23, r13, rij,
  phi, f_bar, alp_bl, omg,
  nusa, hybrid_blend, mesh_u, void_f,
  vol_f, h, t, t_b,
  e_tot, h_tot, rho, rho_b,
  cp, cv, mu, mu_t,
  lambda, th_diff, poro, if_poro,
  t_poro, t_kelvin, vism, volume_f,
  mass_f, energy_f, pot_t, totwt,
  ntdrp, chemistry, fm, fp2m,
  fsm, npm, ygfm, yfm,
  yfp2m, coyfp, np, xch,
  xck, xwt, h2, f1m,
  f2m, f4m, f5m, f6m,
  f7m, f8m, f9m, fvp2m,
  yco2, yhcn, yno, ynh3,
  hox, potr, poti, potva,
  ycoel, joulp, radsc, elech,
  curre, curim, laplf, magfl,
  elefl, rad_lumin, rad_q, rad_est,
  rad_ist, rad_abs, rad_emi, rad_cak,
  qinci, qinsp, xlam, epa,
  emissivity, fnet, fconv, hconv,
  mol_mass, head, humid, ym_w,
  t_l, h_l, y_l_pack, thermal_diff_h,
  thermal_diff_l, pack_zone_id, yf_ncond, qp,
  qfp, qfpxx, qfpxy, qfpxz,
  qfpyx, qfpyy, qfpyz, qfpzx,
  qfpzy, qfpzz, gamma, ia,
  x2, d32, drag, ad_mass,
  wlubr, th_diff_t, drho_dp, drho_dh,
  tau12_t, lift, disp_t, drift_vel,
  yplus, vel_mean, vel_rel, dt_dp,
  add_var, user, CS_FIELD_N_POINTERS
}
 

Functions

void cs_field_pointer_destroy_all (void)
 Free all field pointer data. More...
 
void cs_field_pointer_map (cs_field_pointer_id_t e, cs_field_t *f)
 Map a simple field to an enumerated pointer. More...
 
void cs_field_pointer_map_indexed (cs_field_pointer_id_t e, int index, cs_field_t *f)
 Map a field to an (enumerated pointer, index) couple. More...
 
void cs_field_pointer_map_base (void)
 Map base fields to enumerated pointers. More...
 
void cs_field_pointer_map_boundary (void)
 Map some boundary fields to enumerated pointers. More...
 
void cs_field_pointer_map_atmospheric (int n_chem_species, const int species_f_id[])
 Map base fields to enumerated pointers for atmospheric models. More...
 
void cs_field_pointer_map_coal_combustion (int n_coals, int n_classes)
 Map base fields to enumerated pointers for coal combustion. More...
 
void cs_field_pointer_map_compressible (void)
 Map base fields to enumerated pointers for compressible model. More...
 
void cs_field_pointer_map_gas_mix (void)
 Map base fields to enumerated pointers for gas mix model. More...
 
void cs_field_pointer_map_gas_combustion (void)
 Map base fields to enumerated pointers for gas combustion. More...
 
void cs_field_pointer_map_groundwater (void)
 Map base fields to enumerated pointers for groundwater flows. More...
 

Variables

union cs_field_pointer_val_tcs_glob_field_pointers
 

Macro Definition Documentation

◆ CS_ENUMF_

CS_ENUMF_ (   e)    CS_FIELD_POINTER_ ## e

Macro used for scoping of field pointer enums.

This macro replaces CS_ENUMF_ by CS_FIELD_POINTER_ and allows to rebuild a full enumerated field pointer id.

Parameters
[in]esuffix of enumerated field pointer id.

◆ CS_F_

CS_F_ (   e)    cs_glob_field_pointers[CS_FIELD_POINTER_ ## e].f

Macro used to return a field pointer by its enumerated value.

This macro replaces CS_F_ by an access to the global array of field pointers cs_glob_field_pointers using a rebuilt enumerated field pointer id.

Parameters
[in]esuffix of enumerated field pointer id.

◆ CS_FI_

CS_FI_ (   e,
 
)    cs_glob_field_pointers[CS_FIELD_POINTER_ ## e].a->p[i]

Macro used to return a field pointer by its enumerated value.

This macro replaces CS_FI_ by an access to the global array of field pointers cs_glob_field_pointers using a rebuilt enumerated field pointer id and its field sublist index.

Parameters
[in]esuffix of enumerated field pointer id.
[in]ifield enumerator value.

Enumeration Type Documentation

◆ cs_field_pointer_id_t

Suffixes of enumerated field pointer ids, arguments of the macro CS_F_().

Enumerator
dt 

local time step

pressure

vel 

velocity

turbulent kinetic energy $ k $

eps 

turbulent dissipation $ \varepsilon $

r11 

Reynolds stress component $ R_{xx} $

r22 

Reynolds stress component $ R_{yy} $

r33 

Reynolds stress component $ R_{zz} $

r12 

Reynolds stress component $ R_{xy} $

r23 

Reynolds stress component $ R_{yz} $

r13 

Reynolds stress component $ R_{xz} $

rij 

Reynolds stress tensor $ R_{ij} $

phi 

$ \phi $ for $ \phi-f_b $ model

f_bar 

$ f_b $ for $ \phi-f_b $ model

alp_bl 

$ \alpha $ for $ Bl-v^2-k $ or EBRSM model

omg 

$ \omega $ for $ k-\omega $ SST model

nusa 

$ \widetilde{\nu}_T $ for Spalart- Allmaras

hybrid_blend 

Blending factor for DDES

mesh_u 

mesh velocity

void_f 

void fraction

vol_f 

volume fraction

enthalpy

temperature

t_b 

temperature (at boundary faces)

e_tot 

total energy

h_tot 

total enthalpy

rho 

density (at cells)

rho_b 

density (at boundary faces)

cp 

isobaric specific heat

cv 

isochoric specific heat

mu 

molecular viscosity

mu_t 

turbulent dynamic viscosity

lambda 

Thermal conductivity

th_diff 

Thermal diffusivity

poro 

porosity

if_poro 

internal faces porosity

t_poro 

tensorial porosity

t_kelvin 

temperature, in Kelvin

vism 

mesh viscosity

volume_f 

homogeneous model volume fraction

mass_f 

homogeneous model mass fraction

energy_f 

homogeneous model energy fraction

pot_t 

potential temperature

totwt 

total water content

ntdrp 

total number of droplets

chemistry 

chemistry species (indexed)

fm 

mixture fraction

fp2m 

mixture fraction variance

fsm 

soot mass fraction

npm 

soot precursor number

ygfm 

fresh gas fraction

yfm 

mass fraction

yfp2m 

mass fraction variance

coyfp 

mass fraction covariance

np 

particles per kg for coal class

xch 

reactive coal mass fraction for coal class

xck 

coke mass fraction for coal class

xwt 

water mass fraction for coal class

h2 

mass enthalpy for coal class (permeatic case)

f1m 

mean value light volatiles for coal class

f2m 

mean value heavy volatiles for coal class

f4m 

oxydant 2 mass fraction

f5m 

oxydant 3 mass fraction

f6m 

water from coal drying mass fraction

f7m 

carbon from coal oxidyzed by O2 mass fraction

f8m 

carbon from coal gasified by CO2 mass fraction

f9m 

carbon from coal gasified by H2O mass fraction

fvp2m 

f1f2 variance

yco2 

CO2 fraction

yhcn 

HCN fraction

yno 

NO fraction

ynh3 

NH3 enthalpy

hox 

Ox enthalpy

potr 

Electric potential, real part

poti 

Electric potential, imaginary part

potva 

Vector potential

ycoel 

Constituent mass fraction

joulp 

Joule power

radsc 

radiation source

elech 

electric charge

curre 

current real

curim 

current imaginary

laplf 

laplace forces

magfl 

magnetic field

elefl 

electric field

rad_lumin 

Radiative luminance

rad_q 

Radiative flux

rad_est 

Radiative flux explicit source term

rad_ist 

Radiative flux implicit source term

rad_abs 

Radiative absorption

rad_emi 

Radiative emission

rad_cak 

Radiative absorption coefficient

qinci 

Radiative incident radiative flux density

qinsp 

Spectral radiative incident flux

xlam 

Wall thermal conductivity

epa 

Wall thickness

emissivity 

Wall emissivity

fnet 

Boundary radiative flux

fconv 

Boundary radiative convective flux

hconv 

radiative exchange coefficient

mol_mass 

gas mix molar max

head 

hydraulic head

humid 

Humidity

ym_w 

Mass fraction of dry air in humid air

t_l 

Injected liquid water temperature

h_l 

Injected liquid water enthalpy

y_l_pack 

Mass of liquid per unit volume of cell

thermal_diff_h 

Humid air thermal diffusivity

thermal_diff_l 

Injected liquid water thermal diffusivity

pack_zone_id 

Id of the packing zone

yf_ncond 

non-condensable mass fraction

qp 

Turbulent Kinetic Energy q2

qfp 

Covariance q12

qfpxx 

XX component of qfp

qfpxy 

XY component of qfp

qfpxz 

XZ component of qfp

qfpyx 

YX component of qfp

qfpyy 

YY component of qfp

qfpyz 

YZ component of qfp

qfpzx 

ZX component of qfp

qfpzy 

ZY component of qfp

qfpzz 

ZZ component of qfp

gamma 

Interfacial mass transfer

ia 

Interfacial area

x2 

x2 for droplets

d32 

Sauter diameter

drag 

Phases drag

ad_mass 

Added mass

wlubr 

Wall lubrication

th_diff_t 

Turbulent thermal diffusivity

drho_dp 

drho over dp

drho_dh 

drho over dh

tau12_t 

turbulent tau12

lift 

Particles lift

disp_t 

Turbulent dispersion

drift_vel 

Particles drift velocity

yplus 

Wall distance: y+

vel_mean 

Mean velocity (for dispersed phases)

vel_rel 

Relative velocity (for dispersed phases)

dt_dp 

dtemp/dpress derivative

add_var 

User added variables

user 
CS_FIELD_N_POINTERS 

Function Documentation

◆ cs_field_pointer_destroy_all()

void cs_field_pointer_destroy_all ( void  )

Free all field pointer data.

◆ cs_field_pointer_map()

void cs_field_pointer_map ( cs_field_pointer_id_t  e,
cs_field_t f 
)

Map a simple field to an enumerated pointer.

The associated field pointer may then be retreived using CS_F_(e).

Parameters
[in]efield enumerator value
[in]fpointer to field structure

◆ cs_field_pointer_map_atmospheric()

void cs_field_pointer_map_atmospheric ( int  n_chem_species,
const int  species_f_id[] 
)

Map base fields to enumerated pointers for atmospheric models.

Parameters
[in]n_chem_speciesnumber of chemical species
[in]species_f_idfield id for each chemical species

◆ cs_field_pointer_map_base()

void cs_field_pointer_map_base ( void  )

Map base fields to enumerated pointers.

◆ cs_field_pointer_map_boundary()

void cs_field_pointer_map_boundary ( void  )

Map some boundary fields to enumerated pointers.

◆ cs_field_pointer_map_coal_combustion()

void cs_field_pointer_map_coal_combustion ( int  n_coals,
int  n_classes 
)

Map base fields to enumerated pointers for coal combustion.

Parameters
[in]n_coalsnumber of coals
[in]n_classesnumber of coal classes

◆ cs_field_pointer_map_compressible()

void cs_field_pointer_map_compressible ( void  )

Map base fields to enumerated pointers for compressible model.

◆ cs_field_pointer_map_gas_combustion()

void cs_field_pointer_map_gas_combustion ( void  )

Map base fields to enumerated pointers for gas combustion.

◆ cs_field_pointer_map_gas_mix()

void cs_field_pointer_map_gas_mix ( void  )

Map base fields to enumerated pointers for gas mix model.

◆ cs_field_pointer_map_groundwater()

void cs_field_pointer_map_groundwater ( void  )

Map base fields to enumerated pointers for groundwater flows.

◆ cs_field_pointer_map_indexed()

void cs_field_pointer_map_indexed ( cs_field_pointer_id_t  e,
int  index,
cs_field_t f 
)

Map a field to an (enumerated pointer, index) couple.

This sort of mapping may be used for sets of fields whose size is not known in advance.

The associated field pointer may then be retreived using CS_FI_(e, i).

Parameters
[in]efield enumerator value
[in]indexfield enumerator index
[in]fpointer to field structure

Variable Documentation

◆ cs_glob_field_pointers

union cs_field_pointer_val_t* cs_glob_field_pointers