programmer's documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cs_wall_functions.h
Go to the documentation of this file.
1 #ifndef __CS_WALL_FUNCTIONS_H__
2 #define __CS_WALL_FUNCTIONS_H__
3 
4 /*============================================================================
5  * Wall functions
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2014 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_base.h"
35 
36 /*----------------------------------------------------------------------------*/
37 
39 
40 /*=============================================================================
41  * Local Macro definitions
42  *============================================================================*/
43 
44 /*============================================================================
45  * Type definition
46  *============================================================================*/
47 
48 /* Wall functions descriptor */
49 /*--------------------------------------------*/
50 
51 typedef struct {
52 
53  int ideuch; /* wall functions
54  - 0: one scale of friction velocities
55  - 1: two scale of friction velocities
56  - 2: scalable wall functions */
57  int iwallt; /* exchange coefficient correlation
58  - 0: not use by default
59  - 1: exchange coefficient computed with a
60  correlation */
61  int ilogpo; /* wall function with
62  - 0: a power lay (deprecated)
63  - 1: a log lay */
64  double ypluli; /* limit value of y+ for the viscous
65  sublayer */
66 
68 
69 /*============================================================================
70  * Global variables
71  *============================================================================*/
72 
73 /* Pointer to wall functions descriptor structure */
74 
76 
77 /*============================================================================
78  * Public function definitions for Fortran API
79  *============================================================================*/
80 
81 /*----------------------------------------------------------------------------
82  * Wrapper to cs_wall_functions_velocity.
83  *----------------------------------------------------------------------------*/
84 
85 void CS_PROCF (wallfunctions, WALLFUNCTIONS)
86 (
87  const cs_int_t *const iwallf,
88  const cs_lnum_t *const ifac,
89  const cs_real_t *const viscosity,
90  const cs_real_t *const t_visc,
91  const cs_real_t *const vel,
92  const cs_real_t *const y,
93  const cs_real_t *const kinetic_en,
94  cs_int_t *iuntur,
95  cs_lnum_t *nsubla,
96  cs_lnum_t *nlogla,
97  cs_real_t *ustar,
98  cs_real_t *uk,
99  cs_real_t *yplus,
100  cs_real_t *ypup,
101  cs_real_t *cofimp,
102  cs_real_t *dplus
103 );
104 
105 /*----------------------------------------------------------------------------
106  * Wrapper to cs_wall_functions_scalar.
107  *----------------------------------------------------------------------------*/
108 
109 void CS_PROCF (hturbp, HTURBP)
110 (
111  const cs_real_t *const prl,
112  const cs_real_t *const prt,
113  const cs_real_t *const ckarm,
114  const cs_real_t *const yplus,
115  const cs_real_t *const dplus,
116  cs_real_t *htur,
117  cs_real_t *yplim
118 );
119 
120 /*=============================================================================
121  * Public function prototypes
122  *============================================================================*/
123 
127 /*-------------------------------------------------------------------------------
128  Arguments
129  ______________________________________________________________________________.
130  mode name role !
131  ______________________________________________________________________________*/
155 /*-------------------------------------------------------------------------------*/
156 
157 void
158 cs_wall_functions_velocity(int iwallf,
159  cs_lnum_t ifac,
160  cs_real_t l_visc,
161  cs_real_t t_visc,
162  cs_real_t vel,
163  cs_real_t y,
164  cs_real_t kinetic_en,
165  int *iuntur,
166  cs_lnum_t *nsubla,
167  cs_lnum_t *nlogla,
168  cs_real_t *ustar,
169  cs_real_t *uk,
170  cs_real_t *yplus,
171  cs_real_t *ypup,
172  cs_real_t *cofimp,
173  cs_real_t *dplus);
174 
175 /*-------------------------------------------------------------------------------*/
176 
205 /*-------------------------------------------------------------------------------
206  Arguments
207  ______________________________________________________________________________.
208  mode name role !
209  ______________________________________________________________________________*/
220 /*-------------------------------------------------------------------------------*/
221 
222 void
223 cs_wall_functions_scalar(double prl,
224  double prt,
225  double ckarm,
226  double yplus,
227  double dplus,
228  double *htur,
229  double *yplim);
230 
231 /*----------------------------------------------------------------------------*/
232 
234 
235 #endif /* __CS_WALL_FUNCTIONS_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:405
int cs_int_t
Fortran-compatible integer.
Definition: cs_defs.h:295
void cs_wall_functions_scalar(double prl, double prt, double ckarm, double yplus, double dplus, double *htur, double *yplim)
Compute the correction of the exchange coefficient between the fluid and the wall for a turbulent flo...
Definition: cs_wall_functions.c:835
void wallfunctions(const cs_int_t *const iwallf, const cs_lnum_t *const ifac, const cs_real_t *const viscosity, const cs_real_t *const t_visc, const cs_real_t *const vel, const cs_real_t *const y, const cs_real_t *const kinetic_en, cs_int_t *iuntur, cs_lnum_t *nsubla, cs_lnum_t *nlogla, cs_real_t *ustar, cs_real_t *uk, cs_real_t *yplus, cs_real_t *ypup, cs_real_t *cofimp, cs_real_t *dplus)
Definition: cs_wall_functions.c:585
void cs_wall_functions_velocity(int iwallf, cs_lnum_t ifac, cs_real_t l_visc, cs_real_t t_visc, cs_real_t vel, cs_real_t y, cs_real_t kinetic_en, int *iuntur, cs_lnum_t *nsubla, cs_lnum_t *nlogla, cs_real_t *ustar, cs_real_t *uk, cs_real_t *yplus, cs_real_t *ypup, cs_real_t *cofimp, cs_real_t *dplus)
Compute the friction velocity and / .
Definition: cs_wall_functions.c:683
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:292
int ilogpo
Definition: cs_wall_functions.h:61
void hturbp(const cs_real_t *const prl, const cs_real_t *const prt, const cs_real_t *const ckarm, const cs_real_t *const yplus, const cs_real_t *const dplus, cs_real_t *htur, cs_real_t *yplim)
Definition: cs_wall_functions.c:627
#define END_C_DECLS
Definition: cs_defs.h:406
wall functions descriptor.
Definition: cs_wall_functions.h:51
double cs_real_t
Definition: cs_defs.h:296
#define CS_PROCF(x, y)
Definition: cs_defs.h:419
int iwallt
Definition: cs_wall_functions.h:57
int ideuch
Definition: cs_wall_functions.h:53
double ypluli
Definition: cs_wall_functions.h:64
const cs_wall_functions_t * cs_glob_wall_functions