8.1
general documentation
cs_wall_condensation.h
Go to the documentation of this file.
1 #ifndef __CS_WALL_CONDENSATION_H__
2 #define __CS_WALL_CONDENSATION_H__
3 
4 /*============================================================================
5  * Base wall condensation model.
6  *============================================================================*/
7 
8 /*
9  This file is part of code_saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2023 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  * Type definitions
42  *============================================================================*/
43 
44 typedef enum {
50 
51 typedef enum {
55 
56 typedef enum {
60 
61 typedef struct {
62 
63  int icondb; // Switch used to activate wall condensation (0 : activated)
64  int icondv; /* Switch used to activate wall condensation
65  with metal structures(0 : activated) */
66  // Model type
70 
71  /* Surface wall condensation */
72 
73  // Mesh related quantities
87 
88  // Zone related quantities
96 
97  /* Volume wall condensation */
98 
107 
109 
110 /*============================================================================
111  * Static global variables
112  *============================================================================*/
113 
114 /* Pointer to wall condensation descriptor structure */
116 
117 /*=============================================================================
118  * Public function prototypes
119  *============================================================================*/
120 
121 /*----------------------------------------------------------------------------*/
127 /*----------------------------------------------------------------------------*/
128 
131 
132 /*----------------------------------------------------------------------------*/
138 /*----------------------------------------------------------------------------*/
139 
140 void
142 
143 /*----------------------------------------------------------------------------*/
151 /*----------------------------------------------------------------------------*/
152 
153 void
155  int icondv);
156 
157 /*----------------------------------------------------------------------------*/
167 /*----------------------------------------------------------------------------*/
168 
169 void
174  cs_lnum_t nvar);
175 
176 /*----------------------------------------------------------------------------*/
180 /*----------------------------------------------------------------------------*/
181 
182 void
184 
185 /*----------------------------------------------------------------------------*/
189 /*----------------------------------------------------------------------------*/
190 
191 void
193 
194 /*----------------------------------------------------------------------------*/
198 /*----------------------------------------------------------------------------*/
199 
200 void
202 
203 /*----------------------------------------------------------------------------*/
204 /*
205  * \brief Explicit and implicit sources terms from sources
206  * condensation computation.
207  *
208  * \param[in] f pointer to field structure
209  * \param[in] xcpp array of specific heat (Cp)
210  * \param[in] pvara variable value at time step beginning
211  * \param[in,out] st_exp explicit source term part linear in the variable
212  * \param[in,out] st_imp associated value with \c tsexp
213  * to be stored in the matrix
214  */
215 /*----------------------------------------------------------------------------*/
216 
217 
218 void
220  const cs_real_t xcpp[],
221  const cs_real_t pvara[],
222  cs_real_t st_exp[],
223  cs_real_t st_imp[]);
224 
225 /*----------------------------------------------------------------------------*/
226 
228 
229 #endif /* __CS_WALL_CONDENSATION_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:514
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
#define END_C_DECLS
Definition: cs_defs.h:515
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:313
void cs_wall_condensation_create(cs_lnum_t nfbpcd, cs_lnum_t nzones, cs_lnum_t ncmast, cs_lnum_t nvolumes, cs_lnum_t nvar)
Create the context for wall condensation models.
Definition: cs_wall_condensation.c:964
void cs_wall_condensation_free(void)
Free all structures related to wall condensation models.
Definition: cs_wall_condensation.c:1100
cs_wall_cond_forced_conv_model_t
Definition: cs_wall_condensation.h:51
@ CS_WALL_COND_MODEL_SCHLICHTING
Definition: cs_wall_condensation.h:53
@ CS_WALL_COND_MODEL_WALL_LAW
Definition: cs_wall_condensation.h:52
void cs_wall_condensation_source_terms(const cs_field_t *f, const cs_real_t xcpp[], const cs_real_t pvara[], cs_real_t st_exp[], cs_real_t st_imp[])
Definition: cs_wall_condensation.c:1349
cs_wall_cond_natural_conv_model_t
Definition: cs_wall_condensation.h:44
@ CS_WALL_COND_MODEL_COPAIN_BD
Definition: cs_wall_condensation.h:46
@ CS_WALL_COND_MODEL_DEHBI
Definition: cs_wall_condensation.h:48
@ CS_WALL_COND_MODEL_COPAIN
Definition: cs_wall_condensation.h:45
@ CS_WALL_COND_MODEL_UCHIDA
Definition: cs_wall_condensation.h:47
cs_wall_condensation_t * cs_get_glob_wall_condensation(void)
Provide writable access to _wall_cond structure.
Definition: cs_wall_condensation.c:914
cs_wall_cond_mixed_conv_model_t
Definition: cs_wall_condensation.h:56
@ CS_WALL_COND_MIXED_INCROPERA
Definition: cs_wall_condensation.h:58
@ CS_WALL_COND_MIXED_MAX
Definition: cs_wall_condensation.h:57
void cs_wall_condensation_log(void)
Output statistics about wall condensation source terms (for user log)
Definition: cs_wall_condensation.c:1238
void cs_wall_condensation_set_onoff_state(int icondb, int icondv)
Set the onoff state of wall condensation modeling.
Definition: cs_wall_condensation.c:944
void cs_wall_condensation_compute(cs_real_t total_htc[])
Compute the wall condensation source terms.
Definition: cs_wall_condensation.c:1138
void cs_wall_condensation_set_model(cs_wall_cond_natural_conv_model_t model)
Set the wall condensation model.
Definition: cs_wall_condensation.c:928
const cs_wall_condensation_t * cs_glob_wall_condensation
Definition: cs_wall_condensation.c:162
integer(c_int), pointer, save nvolumes
number of the volume strutures with a specific condensation source terms depending on the wall temper...
Definition: cs_nz_condensation.f90:174
integer(c_int), pointer, save ncmast
number of the cells in which a condensation source terms is imposed. See lstmast list and the subrout...
Definition: cs_nz_condensation.f90:167
integer(c_int), pointer, save nzones
number of the zones with a specific condensation source terms depending on the wall temperature and m...
Definition: cs_nz_condensation.f90:103
integer(c_int), pointer, save nfbpcd
number of faces in which a condensation source terms is imposed. See ifbpcd and the user subroutine c...
Definition: cs_nz_condensation.f90:55
integer, save nvar
number of solved variables (must be lower than nvarmx)
Definition: dimens.f90:42
integer(c_int), pointer, save icondv
Specific condensation modelling if = -1 module not activated if = 0 condensation source terms with me...
Definition: ppincl.f90:265
integer(c_int), pointer, save icondb
Specific condensation modelling if = -1 module not activated if = 0 condensation source terms activat...
Definition: ppincl.f90:252
Field descriptor.
Definition: cs_field.h:131
Definition: cs_wall_condensation.h:61
cs_real_t * ztpar
Definition: cs_wall_condensation.h:93
cs_wall_cond_forced_conv_model_t forced_conv_model
Definition: cs_wall_condensation.h:68
cs_lnum_t * itagms
Definition: cs_wall_condensation.h:106
cs_lnum_t * izzftcd
Definition: cs_wall_condensation.h:77
int icondb
Definition: cs_wall_condensation.h:63
cs_lnum_t * itypst
Definition: cs_wall_condensation.h:102
cs_real_t * hpcond
Definition: cs_wall_condensation.h:79
cs_real_t * zprojcond
Definition: cs_wall_condensation.h:95
cs_lnum_t * iztag1d
Definition: cs_wall_condensation.h:92
int icondv
Definition: cs_wall_condensation.h:64
cs_real_t * convective_htc
Definition: cs_wall_condensation.h:82
cs_lnum_t nvolumes
Definition: cs_wall_condensation.h:100
cs_lnum_t * itypcd
Definition: cs_wall_condensation.h:76
cs_lnum_t ncmast
Definition: cs_wall_condensation.h:99
cs_lnum_t * izmast
Definition: cs_wall_condensation.h:103
cs_wall_cond_mixed_conv_model_t mixed_conv_model
Definition: cs_wall_condensation.h:69
cs_real_t * flthr
Definition: cs_wall_condensation.h:85
cs_real_t * thermal_condensation_flux
Definition: cs_wall_condensation.h:81
cs_wall_cond_natural_conv_model_t natural_conv_model
Definition: cs_wall_condensation.h:67
cs_real_t * dflthr
Definition: cs_wall_condensation.h:86
cs_lnum_t * izcophc
Definition: cs_wall_condensation.h:90
cs_lnum_t * ltmast
Definition: cs_wall_condensation.h:101
cs_lnum_t * izcophg
Definition: cs_wall_condensation.h:91
cs_real_t * spcond
Definition: cs_wall_condensation.h:78
cs_real_t * svcond
Definition: cs_wall_condensation.h:104
cs_lnum_t nfbpcd
Definition: cs_wall_condensation.h:74
cs_real_t * zxrefcond
Definition: cs_wall_condensation.h:94
cs_real_t * total_htc
Definition: cs_wall_condensation.h:84
cs_lnum_t nzones
Definition: cs_wall_condensation.h:89
cs_lnum_t * ifbpcd
Definition: cs_wall_condensation.h:75
cs_real_t * flxmst
Definition: cs_wall_condensation.h:105
cs_real_t * condensation_htc
Definition: cs_wall_condensation.h:83
cs_real_t * twall_cond
Definition: cs_wall_condensation.h:80