Base setup should be done in the Graphical User Interface (GUI), possibly completed by using the user functions in cs_user_parameters.c. In the GUI, the initialization is performed by filling the parameters displayed in figures calculation features to fluid_properties.
If some options (for example 'Mobile mesh') are activated in the GUI, additional pages may appear. In general, when activating or deactivating an option, pages below the one currently being visited (in the setup tree) may be shown or hidden, but pages appearing above should not be modified, so setting up a computation by visiting GUI pages from top to bottom is recommended, though any page may be re-visited at any time.
The sections filled for the initialization of the main parameters are the following:
- Mesh zone definitions: volume and surface regions required by further definitions must be defined here, using the appropriate selection criteria. In many cases, zones should simply correspond to mesh groups, but explicitely defining them allows merging or splitting selections using boolean operations with group ranges and geometric criteria when needed (see see mesh zone definitions example figure.
- Thermophysical model options: specific physical models, ALE mobile mesh, turbulence model, thermal model and species transport (definition of the scalars and their variances); see figures calculation features to species. If a thermal model is activated, two other sections on conjugate heat transfer and radiative transfers can be filled in (see thermal scalar).
- Body forces: gravity and coriolis forces, see body forces.
- Physical properties: reference pressure, fluid properties (density, viscosity, thermal conductivity, specific heat and scalar dynamic diffusivity), see fluid properties.
- Volume conditions: definition of volume regions (for initialization, head losses and source terms, user source terms and head losses, initialization of the variables (including scalars), see figure.
- Boundary conditions: definition of boundary conditions.
- Time settings: number and type of time steps, and restart settings, see figure time step.
- Numerical parameters: number and type of time steps, and advanced parameters for the numerical solution of the equations, see figures global parameters to numerical parameters.
Definition of mesh zones
Calculation feature selection
Turbulence model selection
Thermal model selection
Transported species and scalars definition
Body forces definition
Fluid properties
Variables initialization
Global resolution parameters
Numerical parameters for the main variables
Time step settings
For more details about the different parameters, please refer to the field keyword list, variable reference, and examples.
In addition to the GUI, user-defined functions may be used:
- cs_user_model to select a given physical model.
- cs_user_parameters to define most general or variable-based parameters
- cs_user_time_moments to define time moments associated with the various fields.
- linear_solvers to define linear solver options specific to any given system.
- cs_user_finalize_setup to modify or variable-based settings, or define them for secondary variables based on options set on main parameters (such as additional variables associated with variable scalar dynamic diffusivity, turbulent Schmidt number, ...). The settings of CDO/HHO schemes (boundary conditions, initial conditions, source terms, definitions of properties or advection fields) take place in this function (example).