8.1
general documentation
cs_parameters.h File Reference
#include <stdarg.h>
#include "cs_defs.h"
#include "cs_equation_param.h"
#include "cs_field.h"
#include "cs_tree.h"
+ Include dependency graph for cs_parameters.h:

Go to the source code of this file.

Data Structures

struct  cs_solving_info_t
 
struct  cs_space_disc_t
 Space discretisation options descriptor. More...
 
struct  cs_time_scheme_t
 Time scheme descriptor. More...
 
struct  cs_restart_auxiliary_t
 Additional checkpoint/restart files. More...
 

Typedefs

typedef cs_equation_param_t cs_var_cal_opt_t
 

Enumerations

enum  {
  CS_INDEF = 1 , CS_INLET = 2 , CS_OUTLET = 3 , CS_SYMMETRY = 4 ,
  CS_SMOOTHWALL = 5 , CS_ROUGHWALL = 6 , CS_ESICF = 7 , CS_SSPCF = 8 ,
  CS_SOPCF = 9 , CS_EPHCF = 10 , CS_EQHCF = 11 , CS_COUPLED = 12 ,
  CS_COUPLED_FD = 13 , CS_FREE_INLET = 14 , CS_FREE_SURFACE = 64 , CS_CONVECTIVE_INLET = 16
}
 
enum  {
  CS_DRIFT_SCALAR_ON = (1 << 0) , CS_DRIFT_SCALAR_ADD_DRIFT_FLUX = (1 << 1) , CS_DRIFT_SCALAR_THERMOPHORESIS = (1 << 2) , CS_DRIFT_SCALAR_TURBOPHORESIS = (1 << 3) ,
  CS_DRIFT_SCALAR_ELECTROPHORESIS = (1 << 4) , CS_DRIFT_SCALAR_CENTRIFUGALFORCE = (1 << 5) , CS_DRIFT_SCALAR_IMPOSED_MASS_FLUX = (1 << 6) , CS_DRIFT_SCALAR_ZERO_BNDY_FLUX = (1 << 7) ,
  CS_DRIFT_SCALAR_ZERO_BNDY_FLUX_AT_WALLS = (1 << 8)
}
 

Functions

static int cs_parameters_iscavr (cs_field_t *f)
 For a given field, returns the scalar number of the fluctuating field if given field is a variance. More...
 
cs_space_disc_tcs_get_glob_space_disc (void)
 Provide access to cs_glob_space_disc. More...
 
cs_time_scheme_tcs_get_glob_time_scheme (void)
 Provide access to cs_glob_time_scheme. More...
 
void cs_parameters_define_field_keys (void)
 Define general field keys. More...
 
void cs_parameters_read_restart_info (void)
 Read general restart info. More...
 
void cs_parameters_add_variable (const char *name, int dim)
 Define a user variable. More...
 
void cs_parameters_add_variable_variance (const char *name, const char *variable_name)
 Define a user variable which is a variance of another variable. More...
 
void cs_parameters_add_property (const char *name, int dim, int location_id)
 Define a user property. More...
 
int cs_parameters_n_added_variables (void)
 Return the number of defined user variables not added yet. More...
 
int cs_parameters_n_added_properties (void)
 Return the number of defined user properties not added yet. More...
 
void cs_parameters_create_added_variables (void)
 Create previously added user variables. More...
 
void cs_parameters_define_auxiliary_fields (void)
 Create properties definied directly in C. More...
 
void cs_parameters_create_added_properties (void)
 Create previously added user properties. More...
 
cs_field_tcs_parameters_add_boundary_values (cs_field_t *f)
 Define a boundary values field for a variable field. More...
 
cs_field_tcs_parameters_add_boundary_temperature (void)
 Define a boundary values field for temperature, if applicable. More...
 
bool cs_parameters_need_extended_neighborhood (void)
 Check if extended neighborhood is needed. More...
 
void cs_parameters_global_complete (void)
 Complete global parameters. More...
 
void cs_parameters_eqp_complete (void)
 Complete general equation parameter definitions. More...
 
void cs_parameters_output_complete (void)
 Complete general output options definitions. More...
 
cs_var_cal_opt_t cs_parameters_var_cal_opt_default (void)
 Return a local variable calculation options structure, with default options. More...
 
void cs_time_scheme_log_setup (void)
 Print the time scheme structure to setup.log. More...
 
void cs_space_disc_log_setup (void)
 Print the space discretization structure to setup.log. More...
 

Variables

const cs_space_disc_tcs_glob_space_disc
 
const cs_time_scheme_tcs_glob_time_scheme
 
cs_restart_auxiliary_tcs_glob_restart_auxiliary
 
cs_tree_node_t * cs_glob_tree
 

Typedef Documentation

◆ cs_var_cal_opt_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CS_INDEF 

undefined

CS_INLET 

standard inlet

CS_OUTLET 

standard outlet

CS_SYMMETRY 
CS_SMOOTHWALL 

solid wall, with friction

CS_ROUGHWALL 

rough wall, with friction

CS_ESICF 

compressible flow, prescribed inlet/outlet (for example supersonic inlet)

CS_SSPCF 

compressible flow, supersonic outlet

CS_SOPCF 

subsonic outlet with prescribed pressure

CS_EPHCF 

mixed inlet with prescribed total pressure and enthalpy

CS_EQHCF 

subsonic inlet with prescribed mass and enthalpy flow (not available yet)

CS_COUPLED 

coupled face

CS_COUPLED_FD 

coupled face with decentered flux

CS_FREE_INLET 

free outlet or inlet (based on Bernoulli relationship)

CS_FREE_SURFACE 

free surface (CS_BOUNDARY_FREE_SURFACE)

CS_CONVECTIVE_INLET 

inlet with zero diffusive flux for all transported variables (species and velocity)

◆ anonymous enum

anonymous enum
Enumerator
CS_DRIFT_SCALAR_ON 
CS_DRIFT_SCALAR_ADD_DRIFT_FLUX 
CS_DRIFT_SCALAR_THERMOPHORESIS 
CS_DRIFT_SCALAR_TURBOPHORESIS 
CS_DRIFT_SCALAR_ELECTROPHORESIS 
CS_DRIFT_SCALAR_CENTRIFUGALFORCE 
CS_DRIFT_SCALAR_IMPOSED_MASS_FLUX 
CS_DRIFT_SCALAR_ZERO_BNDY_FLUX 
CS_DRIFT_SCALAR_ZERO_BNDY_FLUX_AT_WALLS 

Function Documentation

◆ cs_get_glob_space_disc()

cs_space_disc_t* cs_get_glob_space_disc ( void  )

Provide access to cs_glob_space_disc.

needed to initialize structure in GUI and user C functions.

Returns
space discretization description structure

◆ cs_get_glob_time_scheme()

cs_time_scheme_t* cs_get_glob_time_scheme ( void  )

Provide access to cs_glob_time_scheme.

needed to initialize structure with GUI and user C functions.

Returns
time scheme information structure

◆ cs_parameters_add_boundary_temperature()

cs_field_t* cs_parameters_add_boundary_temperature ( void  )

Define a boundary values field for temperature, if applicable.

When a volume temperature variable field already exists, this amounts to calling cs_parameters_add_boundary_values for that field. When such a variable does not exist but we have an Enthalpy variables, an associated temperature boundary field is returned.

Returns
pointer to boundary values field, or NULL if not applicable

◆ cs_parameters_add_boundary_values()

cs_field_t* cs_parameters_add_boundary_values ( cs_field_t f)

Define a boundary values field for a variable field.

Parameters
[in,out]fpointer to field structure
Returns
pointer to boundary values field, or NULL if not applicable

◆ cs_parameters_add_property()

void cs_parameters_add_property ( const char *  name,
int  dim,
int  location_id 
)

Define a user property.

Parameters
[in]namename of property and associated field
[in]dimproperty dimension
[in]location_idid of associated mesh location

◆ cs_parameters_add_variable()

void cs_parameters_add_variable ( const char *  name,
int  dim 
)

Define a user variable.

Solved variables are always defined on cells.

Parameters
[in]namename of variable and associated field
[in]dimvariable dimension

◆ cs_parameters_add_variable_variance()

void cs_parameters_add_variable_variance ( const char *  name,
const char *  variable_name 
)

Define a user variable which is a variance of another variable.

Only variances of thermal or user-defined variables are currently handled.

Parameters
[in]namename of variance and associated field
[in]variable_namename of associated variable

◆ cs_parameters_create_added_properties()

void cs_parameters_create_added_properties ( void  )

Create previously added user properties.

◆ cs_parameters_create_added_variables()

void cs_parameters_create_added_variables ( void  )

Create previously added user variables.

◆ cs_parameters_define_auxiliary_fields()

void cs_parameters_define_auxiliary_fields ( void  )

Create properties definied directly in C.

Create properties definied directly in C.

◆ cs_parameters_define_field_keys()

void cs_parameters_define_field_keys ( void  )

Define general field keys.

A recommended practice for different submodules would be to use "cs_<module>_key_init() functions to define keys specific to those modules.

◆ cs_parameters_eqp_complete()

void cs_parameters_eqp_complete ( void  )

Complete general equation parameter definitions.

◆ cs_parameters_global_complete()

void cs_parameters_global_complete ( void  )

Complete global parameters.

◆ cs_parameters_iscavr()

static int cs_parameters_iscavr ( cs_field_t f)
inlinestatic

For a given field, returns the scalar number of the fluctuating field if given field is a variance.

Parameters
[in]ffield
Returns
if f is a variance: scalar number of fluctuating field else if f is not a variance: 0 else if f is the variance of a field that is not a scalar: -1

◆ cs_parameters_n_added_properties()

int cs_parameters_n_added_properties ( void  )

Return the number of defined user properties not added yet.

This number is reset to 0 when cs_parameters_create_added_properties() is called.

Returns
number of defined user properties
number of defined user properties

◆ cs_parameters_n_added_variables()

int cs_parameters_n_added_variables ( void  )

Return the number of defined user variables not added yet.

This number is reset to 0 when cs_parameters_create_added_variables() is called.

Returns
number of defined user variables

This number is reset to 0 when cs_parameters_create_added_variables is called.

Returns
number of defined user variables

◆ cs_parameters_need_extended_neighborhood()

bool cs_parameters_need_extended_neighborhood ( void  )

Check if extended neighborhood is needed.

Returns
true if extended neighborhoo is needed, false otherwise.

◆ cs_parameters_output_complete()

void cs_parameters_output_complete ( void  )

Complete general output options definitions.

Complete general output options definitions.

◆ cs_parameters_read_restart_info()

void cs_parameters_read_restart_info ( void  )

Read general restart info.

This updates the previous time step info and notebook varaibles values.

◆ cs_parameters_var_cal_opt_default()

cs_var_cal_opt_t cs_parameters_var_cal_opt_default ( void  )

Return a local variable calculation options structure, with default options.

Returns
variable calculations options structure

◆ cs_space_disc_log_setup()

void cs_space_disc_log_setup ( void  )

Print the space discretization structure to setup.log.

◆ cs_time_scheme_log_setup()

void cs_time_scheme_log_setup ( void  )

Print the time scheme structure to setup.log.

Variable Documentation

◆ cs_glob_restart_auxiliary

cs_restart_auxiliary_t* cs_glob_restart_auxiliary
extern

◆ cs_glob_space_disc

const cs_space_disc_t* cs_glob_space_disc
extern

◆ cs_glob_time_scheme

const cs_time_scheme_t* cs_glob_time_scheme
extern

◆ cs_glob_tree

cs_tree_node_t* cs_glob_tree
extern

Global parameters tree structure