8.0
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  int icondb; // Switch used to activate wall condensation (0 : activated)
63  int icondv; /* Switch used to activate wall condensation
64  with metal structures(0 : activated) */
65  // Model type
69 
70  // Mesh-related information
84 
85  // Zone related quantities
94 
95 /*============================================================================
96  * Static global variables
97  *============================================================================*/
98 
99 /* Pointer to wall condensation descriptor structure */
100 extern const cs_wall_cond_t *cs_glob_wall_cond;
101 
102 /*=============================================================================
103  * Public function prototypes
104  *============================================================================*/
105 
106 /*----------------------------------------------------------------------------*/
112 /*----------------------------------------------------------------------------*/
113 
116 
117 /*----------------------------------------------------------------------------*/
123 /*----------------------------------------------------------------------------*/
124 
125 void
127 
128 /*----------------------------------------------------------------------------*/
136 /*----------------------------------------------------------------------------*/
137 
138 void
140  int icondv);
141 
142 /*----------------------------------------------------------------------------*/
150 /*----------------------------------------------------------------------------*/
151 
152 void
155  cs_lnum_t nvar);
156 
157 /*----------------------------------------------------------------------------*/
161 /*----------------------------------------------------------------------------*/
162 
163 void
165 
166 /*----------------------------------------------------------------------------*/
170 /*----------------------------------------------------------------------------*/
171 
172 void
174 
175 /*----------------------------------------------------------------------------*/
179 /*----------------------------------------------------------------------------*/
180 
181 void
183 
184 /*----------------------------------------------------------------------------*/
185 /*
186  * \brief Explicit and implicit sources terms from sources
187  * condensation computation.
188  *
189  * \param[in] f pointer to field structure
190  * \param[in] ncmast number of cells with metal mass condensation
191  * \param[in] ltmast list of cells with condensation source terms
192  * (1 to n numbering)
193  * \param[in] itypst type of metal mass condensation source terms
194  * \param[in] spcondp value of the variable associated
195  * to surface condensation source term
196  * \param[in] gam_s surface condensation flow rate value
197  * \param[in] svcondp value of the variable associated
198  * to metal mass condensation source term
199  * \param[in] gam_ms metal mass condensation flow rate value
200  * \param[in] fluxv_ms metal mass condensation heat transfer flux
201  * \param[in] pvara variable value at time step beginning
202  * \param[in,out] st_exp explicit source term part linear in the variable
203  * \param[in,out] st_imp associated value with \c tsexp
204  * to be stored in the matrix
205  */
206 /*----------------------------------------------------------------------------*/
207 
208 void
211  const cs_lnum_t ltmast[],
212  const cs_lnum_t itypst[],
213  const cs_real_t spcondp[],
214  const cs_real_t gam_s[],
215  const cs_real_t svcondp[],
216  const cs_real_t gam_ms[],
217  const cs_real_t fluxv_ms[],
218  const cs_real_t pvara[],
219  cs_real_t st_exp[],
220  cs_real_t st_imp[]);
221 
222 /*----------------------------------------------------------------------------*/
223 
225 
226 #endif /* __CS_WALL_CONDENSATION_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:509
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
#define END_C_DECLS
Definition: cs_defs.h:510
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:313
void cs_wall_condensation_free(void)
Free all structures related to wall condensation models.
Definition: cs_wall_condensation.c:937
void cs_wall_condensation_source_terms(const cs_field_t *f, cs_lnum_t ncmast, const cs_lnum_t ltmast[], const cs_lnum_t itypst[], const cs_real_t spcondp[], const cs_real_t gam_s[], const cs_real_t svcondp[], const cs_real_t gam_ms[], const cs_real_t fluxv_ms[], const cs_real_t pvara[], cs_real_t st_exp[], cs_real_t st_imp[])
Definition: cs_wall_condensation.c:1091
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
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_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
cs_wall_cond_t * cs_get_glob_wall_cond(void)
Provide writable access to _wall_cond structure.
Definition: cs_wall_condensation.c:812
void cs_wall_condensation_log(void)
Output statistics about wall condensation source terms (for user log)
Definition: cs_wall_condensation.c:1016
void cs_wall_condensation_set_onoff_state(int icondb, int icondv)
Set the onoff state of wall condensation modeling.
Definition: cs_wall_condensation.c:842
void cs_wall_condensation_create(cs_lnum_t nfbpcd, cs_lnum_t nzones, cs_lnum_t nvar)
Create the context for wall condensation models.
Definition: cs_wall_condensation.c:860
void cs_wall_condensation_compute(cs_real_t total_htc[])
Compute the wall condensation source terms.
Definition: cs_wall_condensation.c:967
const cs_wall_cond_t * cs_glob_wall_cond
Definition: cs_wall_condensation.c:147
void cs_wall_condensation_set_model(cs_wall_cond_natural_conv_model_t model)
Set the wall condensation model.
Definition: cs_wall_condensation.c:826
integer, save ncmast
number of the ncmast cells in which a condensation source terms is imposed. See lstmast list and the ...
Definition: pointe.f90:218
integer, dimension(:), allocatable ltmast
list on the ncmast cells in which a condensation source terms is imposed. See the user subroutine cs_...
Definition: pointe.f90:222
integer, dimension(:,:), allocatable itypst
type of condensation source terms for each variable
Definition: pointe.f90:232
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:102
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:298
integer(c_int), pointer, save icondb
Specific condensation modelling if = -1 module not activated if = 0 condensation source terms activat...
Definition: ppincl.f90:285
Field descriptor.
Definition: cs_field.h:130
Definition: cs_wall_condensation.h:61
cs_real_t * ztpar
Definition: cs_wall_condensation.h:90
cs_wall_cond_forced_conv_model_t forced_conv_model
Definition: cs_wall_condensation.h:67
cs_lnum_t * izzftcd
Definition: cs_wall_condensation.h:74
int icondb
Definition: cs_wall_condensation.h:62
cs_real_t * hpcond
Definition: cs_wall_condensation.h:76
cs_real_t * zprojcond
Definition: cs_wall_condensation.h:92
cs_lnum_t * iztag1d
Definition: cs_wall_condensation.h:89
int icondv
Definition: cs_wall_condensation.h:63
cs_real_t * convective_htc
Definition: cs_wall_condensation.h:79
cs_lnum_t * itypcd
Definition: cs_wall_condensation.h:73
cs_wall_cond_mixed_conv_model_t mixed_conv_model
Definition: cs_wall_condensation.h:68
cs_real_t * flthr
Definition: cs_wall_condensation.h:82
cs_real_t * thermal_condensation_flux
Definition: cs_wall_condensation.h:78
cs_wall_cond_natural_conv_model_t natural_conv_model
Definition: cs_wall_condensation.h:66
cs_real_t * dflthr
Definition: cs_wall_condensation.h:83
cs_lnum_t * izcophc
Definition: cs_wall_condensation.h:87
cs_lnum_t * izcophg
Definition: cs_wall_condensation.h:88
cs_real_t * spcond
Definition: cs_wall_condensation.h:75
cs_lnum_t nfbpcd
Definition: cs_wall_condensation.h:71
cs_real_t * zxrefcond
Definition: cs_wall_condensation.h:91
cs_real_t * total_htc
Definition: cs_wall_condensation.h:81
cs_lnum_t nzones
Definition: cs_wall_condensation.h:86
cs_lnum_t * ifbpcd
Definition: cs_wall_condensation.h:72
cs_real_t * condensation_htc
Definition: cs_wall_condensation.h:80
cs_real_t * twall_cond
Definition: cs_wall_condensation.h:77