My Project
programmer's documentation
cs_thermal_model.h
Go to the documentation of this file.
1 #ifndef __CS_THERMAL_MODEL_H__
2 #define __CS_THERMAL_MODEL_H__
3 
4 /*============================================================================
5  * Base thermal model data.
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2019 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 #include "cs_field.h"
36 
37 /*----------------------------------------------------------------------------*/
38 
40 
41 /*=============================================================================
42  * Macro definitions
43  *============================================================================*/
44 
45 /*============================================================================
46  * Type definitions
47  *============================================================================*/
48 
49 /*----------------------------------------------------------------------------
50  * Thermal model type
51  *----------------------------------------------------------------------------*/
52 
53 typedef enum {
54 
60 
62 
63 typedef enum {
64 
68 
70 
71 /* thermal model descriptor */
72 /*--------------------------*/
73 
74 typedef struct {
75 
76  int itherm; /* thermal model
77  - 0: no thermal model
78  - 1: temperature
79  - 2: enthalpy
80  - 3: total energy (only for compressible
81  module) */
82  int itpscl; /* temperature scale
83  - 0: none
84  - 1: Kelvin
85  - 2: Celsius */
86  int iscalt; /* index of the thermal scalar (temperature,
87  energy or enthalpy), the index of the
88  corresponding variable is isca(iscalt) */
89 
91 
92 /*============================================================================
93  * Static global variables
94  *============================================================================*/
95 
96 /* Pointer to thermal model structure */
97 
99 
100 /*=============================================================================
101  * Public function prototypes
102  *============================================================================*/
103 
104 /*----------------------------------------------------------------------------
105  * Provide access to cs_glob_thermal_model
106  *
107  * needed to initialize structure with GUI
108  *----------------------------------------------------------------------------*/
109 
112 
113 /*----------------------------------------------------------------------------
114  * Return thermal field (temperature, enthalpy, total energy according to
115  * thermal model).
116  *
117  * returns:
118  * pointer to thermal field
119  *----------------------------------------------------------------------------*/
120 
121 cs_field_t *
123 
124 /*----------------------------------------------------------------------------
125  * Print the thermal model structure to setup.log.
126  *----------------------------------------------------------------------------*/
127 
128 void
130 
131 /*----------------------------------------------------------------------------*/
132 
134 
135 #endif /* __CS_THERMAL_MODEL_H__ */
cs_thermal_model_t::itherm
int itherm
Definition: cs_thermal_model.h:76
cs_defs.h
CS_THERMAL_MODEL_NONE
Definition: cs_thermal_model.h:55
CS_TEMPERATURE_SCALE_KELVIN
Definition: cs_thermal_model.h:66
cs_thermal_model_t::iscalt
int iscalt
Definition: cs_thermal_model.h:86
cs_get_glob_thermal_model
cs_thermal_model_t * cs_get_glob_thermal_model(void)
Definition: cs_thermal_model.c:233
CS_TEMPERATURE_SCALE_CELSIUS
Definition: cs_thermal_model.h:67
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:468
cs_thermal_model_t
Thermal model descriptor.
Definition: cs_thermal_model.h:74
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
CS_THERMAL_MODEL_TEMPERATURE
Definition: cs_thermal_model.h:56
cs_glob_thermal_model
const cs_thermal_model_t * cs_glob_thermal_model
cs_field.h
cs_thermal_model_variable_t
cs_thermal_model_variable_t
Definition: cs_thermal_model.h:53
CS_THERMAL_MODEL_TOTAL_ENERGY
Definition: cs_thermal_model.h:58
cs_thermal_model_log_setup
void cs_thermal_model_log_setup(void)
Definition: cs_thermal_model.c:245
cs_thermal_model_t::itpscl
int itpscl
Definition: cs_thermal_model.h:82
CS_THERMAL_MODEL_N_TYPES
Definition: cs_thermal_model.h:59
cs_thermal_model_field
cs_field_t * cs_thermal_model_field(void)
Definition: cs_thermal_model.c:205
CS_TEMPERATURE_SCALE_NONE
Definition: cs_thermal_model.h:65
CS_THERMAL_MODEL_ENTHALPY
Definition: cs_thermal_model.h:57
cs_field_t
Field descriptor.
Definition: cs_field.h:124
cs_temperature_scale_t
cs_temperature_scale_t
Definition: cs_thermal_model.h:63