Equation SpecificationΒΆ

CGNS Mid-Level Library - Equation Specification

Equation Specification

  • Flow Equation Set
    • cg_equationset_write - Write dimensionality of flow equations
    • cg_equationset_read - Read flow equation set info
    • cg_equationset_chemistry_read - Read chemistry equation set info
    • cg_equationset_elecmagn_read - Read electromagnetic equation set info
  • Governing Equations
    • cg_governing_write - Write type of governing equation
    • cg_governing_read - Read type of governing equation
    • cg_diffusion_write - Write flags for diffusion terms
    • cg_diffusion_read - Read flags for diffusion terms
  • Auxiliary Models
    • cg_model_write - Write auxiliary model types
    • cg_model_read - Read auxiliary model types

Flow Equation Set

Node: FlowEquationSet_t (SIDS, File Mapping)

Functions Modes
ier = cg_equationset_write(int EquationDimension); - w m
ier = cg_equationset_read(int *EquationDimension,
      int *GoverningEquationsFlag, int *GasModelFlag,
      int *ViscosityModelFlag, int *ThermalConductModelFlag,
      int *TurbulenceClosureFlag, int *TurbulenceModelFlag);
r - m
ier = cg_equationset_chemistry_read(int *ThermalRelaxationFlag,
      int *ChemicalKineticsFlag);
r - m
ier = cg_equationset_elecmagn_read(int *ElecFldModelFlag,
      int *MagnFldModelFlag, int *ConductivityModelFlag);
r - m
call cg_equationset_write_f(EquationDimension, ier) - w m
call cg_equationset_read_f(EquationDimension,
     GoverningEquationsFlag, GasModelFlag, ViscosityModelFlag,
     ThermalConductModelFlag, TurbulenceClosureFlag,
     TurbulenceModelFlag, ier)
r - m
call cg_equationset_chemistry_read_f(ThermalRelaxationFlag,
     ChemicalKineticsFlag, ier)
r - m
call cg_equationset_elecmagn_read_f(ElecFldModelFlag,
     MagnFldModelFlag, ConductivityModelFlag, ier)
r - m

Input/Output

    EquationDimension   Dimensionality of the governing equations; it is the number of spatial variables describing the flow.
GoverningEquationsFlag Flag indicating whether or not this FlowEquationSet_t node includes the definition of the governing equations; 0 if it doesn't, 1 if it does.
GasModelFlag Flag indicating whether or not this FlowEquationSet_t node includes the definition of a gas model; 0 if it doesn't, 1 if it does.
ViscosityModelFlag Flag indicating whether or not this FlowEquationSet_t node includes the definition of a viscosity model; 0 if it doesn't, 1 if it does.
ThermalConductModelFlag Flag indicating whether or not this FlowEquationSet_t node includes the definition of a thermal conductivity model; 0 if it doesn't, 1 if it does.
TurbulenceClosureFlag Flag indicating whether or not this FlowEquationSet_t node includes the definition of the turbulence closure; 0 if it doesn't, 1 if it does.
TurbulenceModelFlag Flag indicating whether or not this FlowEquationSet_t node includes the definition of a turbulence model; 0 if it doesn't, 1 if it does.
ThermalRelaxationFlag Flag indicating whether or not this FlowEquationSet_t node includes the definition of a thermal relaxation model; 0 if it doesn't, 1 if it does.
ChemicalKineticsFlag Flag indicating whether or not this FlowEquationSet_t node includes the definition of a chemical kinetics model; 0 if it doesn't, 1 if it does.
ElecFldModelFlag Flag indicating whether or not this FlowEquationSet_t node includes the definition of an electric field model for electromagnetic flows;; 0 if it doesn't, 1 if it does.
MagnFldModelFlag Flag indicating whether or not this FlowEquationSet_t node includes the definition of a magnetic field model for electromagnetic flows;; 0 if it doesn't, 1 if it does.
ConductivityModelFlag Flag indicating whether or not this FlowEquationSet_t node includes the definition of a conductivity model for electromagnetic flows; 0 if it doesn't, 1 if it does.
ier Error status.

Governing Equations

Node: GoverningEquations_t (SIDS, File Mapping)

Functions Modes
ier = cg_governing_write(GoverningEquationsType_t Equationstype); - w m
ier = cg_governing_read(GoverningEquationsType_t *EquationsType); r - m
ier = cg_diffusion_write(int *diffusion_model); - w m
ier = cg_diffusion_read(int *diffusion_model); r - m
call cg_governing_write_f(EquationsType, ier) - w m
call cg_governing_read_f(EquationsType, ier) r - m
call cg_diffusion_write_f(diffusion_model, ier) - w m
call cg_diffusion_read_f(diffusion_model, ier) r - m

Input/Output

    EquationsType   Type of governing equations. The admissible types are CG_Null, CG_UserDefined, FullPotential, Euler, NSLaminar, NSTurbulent, NSLaminarIncompressible, and NSTurbulentIncompressible.
diffusion_model Flags defining which diffusion terms are included in the governing equations. This is only applicable to the Navier-Stokes equations with structured grids. See the discussion in the SIDS manual for details.
ier Error status.

Auxiliary Models

Nodes: GasModel_t (SIDS, File Mapping)
ViscosityModel_t (SIDS, File Mapping)
ThermalConductivityModel_t (SIDS, File Mapping)
TurbulenceClosure_t (SIDS, File Mapping)
TurbulenceModel_t (SIDS, File Mapping)
ThermalRelaxationModel_t (SIDS, File Mapping)
ChemicalKineticsModel_t (SIDS, File Mapping)
EMElectricFieldModel_t (SIDS, File Mapping)
EMMagneticFieldModel_t (SIDS, File Mapping)
EMConductivityModel_t (SIDS, File Mapping)

Functions Modes
ier = cg_model_write(char *ModelLabel, ModelType_t ModelType); - w m
ier = cg_model_read(char *ModelLabel, ModelType_t *ModelType); r - m
call cg_model_write_f(ModelLabel, ModelType, ier) - w m
call cg_model_read_f(ModelLabel, ModelType, ier) r - m

Input/Output

    ModelLabel   The CGNS label for the model being defined. The models supported by CGNS are:
  • GasModel_t
  • ViscosityModel_t
  • ThermalConductivityModel_t
  • TurbulenceClosure_t
  • TurbulenceModel_t
  • ThermalRelaxationModel_t
  • ChemicalKineticsModel_t
  • EMElectricFieldModel_t
  • EMMagneticFieldModel_t
  • EMConductivityModel_t
 
ModelType One of the model types (listed below) allowed for the ModelLabel selected.
ier Error status.

The types allowed for the various models are:

    GasModel_t   CG_Null, CG_UserDefined, Ideal, VanderWaals, CaloricallyPerfect, ThermallyPerfect, ConstantDensity, RedlichKwong
ViscosityModel_t CG_Null, CG_UserDefined, Constant, PowerLaw, SutherlandLaw
ThermalConductivityModel_t CG_Null, CG_UserDefined, PowerLaw, SutherlandLaw, ConstantPrandtl
TurbulenceModel_t CG_Null, CG_UserDefined, Algebraic_BaldwinLomax, Algebraic_CebeciSmith, HalfEquation_JohnsonKing, OneEquation_BaldwinBarth, OneEquation_SpalartAllmaras, TwoEquation_JonesLaunder, TwoEquation_MenterSST, TwoEquation_Wilcox
TurbulenceClosure_t CG_Null, CG_UserDefined, EddyViscosity, ReynoldsStress, ReynoldsStressAlgebraic
ThermalRelaxationModel_t CG_Null, CG_UserDefined, Frozen, ThermalEquilib, ThermalNonequilib
ChemicalKineticsModel_t CG_Null, CG_UserDefined, Frozen, ChemicalEquilibCurveFit, ChemicalEquilibMinimization, ChemicalNonequilib
EMElectricFieldModel_t CG_Null, CG_UserDefined, Constant, Frozen, Interpolated, Voltage
EMMagneticFieldModel_t CG_Null, CG_UserDefined, Constant, Frozen, Interpolated
EMConductivityModel_t CG_Null, CG_UserDefined, Constant, Frozen, Equilibrium_LinRessler, Chemistry_LinRessler