8.3
general documentation
cs_gas_mix.h
Go to the documentation of this file.
1#ifndef __CS_GAS_MIX_H__
2#define __CS_GAS_MIX_H__
3
4/*============================================================================
5 * Base gas mix data.
6 *============================================================================*/
7
8/*
9 This file is part of code_saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2024 EDF S.A.
12
13 This program is free software; you can redistribute it and/or modify it under
14 the terms of the GNU General Public License as published by the Free Software
15 Foundation; either version 2 of the License, or (at your option) any later
16 version.
17
18 This program is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21 details.
22
23 You should have received a copy of the GNU General Public License along with
24 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25 Street, Fifth Floor, Boston, MA 02110-1301, USA.
26*/
27
28/*----------------------------------------------------------------------------*/
29
30/*----------------------------------------------------------------------------
31 * Local headers
32 *----------------------------------------------------------------------------*/
33
34#include "cs_defs.h"
35
36/*----------------------------------------------------------------------------*/
37
39
40/*=============================================================================
41 * Macro definitions
42 *============================================================================*/
43
44/*============================================================================
45 * Type definitions
46 *============================================================================*/
47
48/* Gas mix types
49 ------------- */
50
51typedef enum {
52
63
64/* Gas mix descriptor
65 ------------------ */
66
67typedef struct {
68
76
77/*
78 * Gas mix modelling physical properties
79 * ------------------------------------- */
80
81typedef struct {
82
83 double mol_mas; /* molar mass */
84 double cp; /* specific heat at constant pressure */
85 double vol_dif; /* volume diffusion */
86 double mu_a; /* dynamic viscosity a */
87 double mu_b; /* dynamic viscosity a */
88 double lambda_a; /* thermal conductivity a */
89 double lambda_b; /* thermal conductivity b */
90 double muref; /* ref. viscosity for Sutherland law */
91 double lamref; /* ref. thermal conductivity for Sutherland law */
92 double trefmu; /* ref. temperature for viscosity in Sutherland law */
93 double treflam; /* ref. temperature for conductivity Sutherland law */
94 double smu; /* Sutherland temperature for viscosity */
95 double slam; /* Sutherland temperature for conductivity */
96
98
99/*============================================================================
100 * Static global variables
101 *============================================================================*/
102
103/* Pointer to main physical constants structure */
104
105extern const cs_gas_mix_t *cs_glob_gas_mix;
106
107/*=============================================================================
108 * Public function prototypes
109 *============================================================================*/
110
111/*----------------------------------------------------------------------------*/
117/*----------------------------------------------------------------------------*/
118
119int
121
122/*----------------------------------------------------------------------------*/
128/*----------------------------------------------------------------------------*/
129
130void
131cs_gas_mix_add_species(int f_id);
132
133/*----------------------------------------------------------------------------*/
152/*----------------------------------------------------------------------------*/
153
154void
158 cs_real_t vol_diff,
159 cs_real_t mu_a,
160 cs_real_t mu_b,
161 cs_real_t lambda_a,
162 cs_real_t lambda_b,
163 cs_real_t mu_ref,
164 cs_real_t lambda_ref,
165 cs_real_t tref_mu,
166 cs_real_t tref_lambda,
167 cs_real_t s_mu,
168 cs_real_t s_lambda);
169
170/*----------------------------------------------------------------------------*/
174/*----------------------------------------------------------------------------*/
175
176void
178
179/*----------------------------------------------------------------------------*/
183/*----------------------------------------------------------------------------*/
184
185void
187
188/*----------------------------------------------------------------------------*/
194/*----------------------------------------------------------------------------*/
195
196void
198
199/*----------------------------------------------------------------------------*/
207/*----------------------------------------------------------------------------*/
208
209void
211
212/*----------------------------------------------------------------------------*/
213
215
216#endif /* __CS_GAS_MIX_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
double cs_real_t
Floating-point value.
Definition: cs_defs.h:342
#define END_C_DECLS
Definition: cs_defs.h:543
@ mol_mass
Definition: cs_field_pointer.h:197
@ cp
Definition: cs_field_pointer.h:102
void cs_gas_mix_initialization(void)
Initialization of calculation variables for gas mixture modelling in presence of the steam gas or ano...
Definition: cs_gas_mix.cpp:1118
cs_gas_mix_type_t
Definition: cs_gas_mix.h:51
@ CS_GAS_MIX_HELIUM_AIR
Definition: cs_gas_mix.h:59
@ CS_GAS_MIX_AIR_HELIUM
Definition: cs_gas_mix.h:54
@ CS_GAS_MIX_AIR_STEAM
Definition: cs_gas_mix.h:56
@ CS_GAS_MIX_AIR_HELIUM_STEAM
Definition: cs_gas_mix.h:57
@ CS_GAS_MIX_AIR_HYDROGEN
Definition: cs_gas_mix.h:55
@ CS_GAS_MIX_OFF
Definition: cs_gas_mix.h:53
@ CS_GAS_MIX_USER
Definition: cs_gas_mix.h:60
@ CS_GAS_MIX_AIR_HYDROGEN_STEAM
Definition: cs_gas_mix.h:58
void cs_gas_mix_add_property_fields(void)
Add property fields specific to a gas mix.
Definition: cs_gas_mix.cpp:641
void cs_gas_mix_finalize(void)
Free array mapping gas mix species ids to field ids.
Definition: cs_gas_mix.cpp:1103
void cs_gas_mix_physical_properties(void)
Fills physical properties which are variable in time for the gas mixtures modelling with or without s...
Definition: cs_gas_mix.cpp:756
int cs_gas_mix_get_field_key(void)
Get the field key for gas mix properties.
Definition: cs_gas_mix.cpp:508
const cs_gas_mix_t * cs_glob_gas_mix
Definition: cs_gas_mix.cpp:147
void cs_gas_mix_add_species(int f_id)
Add a species field to the gas mix (set of fields).
Definition: cs_gas_mix.cpp:543
void cs_gas_mix_add_species_with_properties(int f_id, cs_real_t mol_mass, cs_real_t cp, cs_real_t vol_diff, cs_real_t mu_a, cs_real_t mu_b, cs_real_t lambda_a, cs_real_t lambda_b, cs_real_t mu_ref, cs_real_t lambda_ref, cs_real_t tref_mu, cs_real_t tref_lambda, cs_real_t s_mu, cs_real_t s_lambda)
Add a species field to the gas mix (set of fields).
Definition: cs_gas_mix.cpp:588
Definition: cs_gas_mix.h:81
double muref
Definition: cs_gas_mix.h:90
double vol_dif
Definition: cs_gas_mix.h:85
double lambda_a
Definition: cs_gas_mix.h:88
double smu
Definition: cs_gas_mix.h:94
double lamref
Definition: cs_gas_mix.h:91
double trefmu
Definition: cs_gas_mix.h:92
double mol_mas
Definition: cs_gas_mix.h:83
double mu_b
Definition: cs_gas_mix.h:87
double cp
Definition: cs_gas_mix.h:84
double treflam
Definition: cs_gas_mix.h:93
double lambda_b
Definition: cs_gas_mix.h:89
double mu_a
Definition: cs_gas_mix.h:86
double slam
Definition: cs_gas_mix.h:95
Gas mix descriptor.
Definition: cs_gas_mix.h:67
int n_species
Definition: cs_gas_mix.h:69
int * species_to_field_id
Definition: cs_gas_mix.h:72
int n_species_solved
Definition: cs_gas_mix.h:70