programmer's documentation
Data Structures | Macros | Enumerations | Functions | Variables
cs_field_pointer.h File Reference
#include "cs_defs.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, u, k,
  eps, r11, r22, r33,
  r12, r23, r13, rij,
  phi, f_bar, alpha, omg,
  nusa, mesh_u, void_f, h,
  t, t_b, energy, rho,
  rho_b, cp, cv, mu,
  mu_t, poro, t_poro, t_kelvin,
  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, rad_lumin,
  rad_q, rad_ets, rad_its, rad_abs,
  rad_emi, rad_cak, qinci, xlam,
  epa, emissivity, fnet, fconv,
  hconv, mol_mass, 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_electric_arcs (int n_gasses)
 Map base fields to enumerated pointers for electric arcs. More...
 
void cs_field_pointer_map_gas_combustion (void)
 Map base fields to enumerated pointers for gas combustion. More...
 
void cs_field_pointer_map_radiation (int n_r_phases)
 Map base fields to enumerated pointers for radiation module. More...
 

Variables

union cs_field_pointer_val_tcs_glob_field_pointers
 

Macro Definition Documentation

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_ (   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_ (   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

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

Enumerator
dt 

local time step

pressure

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

alpha 

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

omg 

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

nusa 

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

mesh_u 

mesh velocity

void_f 

void fraction

enthalpy

temperature

t_b 

temperature (at boundary faces)

energy 

total energy

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

poro 

porosity

t_poro 

tensorial porosity

t_kelvin 

temperature, in Kelvin

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

rad_lumin 

Radiative luminance

rad_q 

Radiative flux

rad_ets 

Radiative flux explicit source term

rad_its 

Radiative flux implicit source term

rad_abs 

Radiative absorption

rad_emi 

Radiative emission

rad_cak 

Radiative absorption coefficient

qinci 

Radiative incident radiative flux density

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

CS_FIELD_N_POINTERS 

Function Documentation

void cs_field_pointer_destroy_all ( void  )

Free all field pointer data.

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
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
void cs_field_pointer_map_base ( void  )

Map base fields to enumerated pointers.

void cs_field_pointer_map_boundary ( void  )

Map some boundary fields to enumerated pointers.

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
void cs_field_pointer_map_compressible ( void  )

Map base fields to enumerated pointers for compressible model.

void cs_field_pointer_map_electric_arcs ( int  n_gasses)

Map base fields to enumerated pointers for electric arcs.

Parameters
[in]n_gassesnumber of gasses
void cs_field_pointer_map_gas_combustion ( void  )

Map base fields to enumerated pointers for gas combustion.

void cs_field_pointer_map_gas_mix ( void  )

Map base fields to enumerated pointers for gas mix model.

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_F_(e, i).

Parameters
[in]efield enumerator value
[in]indexfield enumerator index
[in]fpointer to field structure
void cs_field_pointer_map_radiation ( int  n_r_phases)

Map base fields to enumerated pointers for radiation module.

Parameters
[in]n_r_phasesnumber of radiating phases: 1 + possibly number of combustible classes (coal, fuel)

Variable Documentation

union cs_field_pointer_val_t* cs_glob_field_pointers