programmer's documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cs_face_viscosity.h
Go to the documentation of this file.
1 #ifndef __CS_FACE_VISCOSITY_H__
2 #define __CS_FACE_VISCOSITY_H__
3 
4 /*============================================================================
5  * Face viscosity
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 #include "cs_halo.h"
36 
37 /*----------------------------------------------------------------------------*/
38 
40 
41 /*=============================================================================
42  * Local Macro definitions
43  *============================================================================*/
44 
45 /*============================================================================
46  * Type definition
47  *============================================================================*/
48 
49 /*============================================================================
50  * Global variables
51  *============================================================================*/
52 
53 /*============================================================================
54  * Public function prototypes for Fortran API
55  *============================================================================*/
56 
57 /*----------------------------------------------------------------------------
58  * Wrapper to cs_face_viscosity_scalar
59  *----------------------------------------------------------------------------*/
60 
61 void CS_PROCF (viscfa, VISCFA)
62 (
63  const cs_int_t *const visc_mean_type,
64  cs_real_t c_visc[],
65  cs_real_t i_visc[],
66  cs_real_t b_visc[]
67 );
68 
69 /*----------------------------------------------------------------------------
70  * Wrapper to cs_face_viscosity_tensor_velocity
71  *----------------------------------------------------------------------------*/
72 
73 void CS_PROCF (vistnv, VISTNV)
74 (
75  const cs_int_t *const visc_mean_type,
76  cs_real_6_t c_visc[],
77  cs_real_33_t i_visc[],
78  cs_real_t b_visc[]
79 );
80 
81 /*----------------------------------------------------------------------------
82  * Wrapper to cs_face_viscosity_tensor
83  *----------------------------------------------------------------------------*/
84 
85 void CS_PROCF (vitens, VITENS)
86 (
87  cs_real_6_t c_visc[],
88  const cs_int_t *const iwarnp,
89  cs_real_2_t weighf[],
90  cs_real_t weighb[],
91  cs_real_t i_visc[],
92  cs_real_t b_visc[]
93 );
94 
95 /*============================================================================
96  * Public function prototypes
97  *============================================================================*/
98 
99 /*----------------------------------------------------------------------------*/
119 /*----------------------------------------------------------------------------*/
120 
121 void
124  const int visc_mean_type,
125  cs_real_t *restrict c_visc,
126  cs_real_t *restrict i_visc,
127  cs_real_t *restrict b_visc);
128 
129 /*----------------------------------------------------------------------------*/
145 /*----------------------------------------------------------------------------*/
146 
147 void
150  const int visc_mean_type,
151  cs_real_6_t *restrict c_visc,
152  cs_real_33_t *restrict i_visc,
153  cs_real_t *restrict b_visc);
154 
155 /*----------------------------------------------------------------------------*/
178 /*----------------------------------------------------------------------------*/
179 
180 void
183  cs_real_6_t *restrict c_visc,
184  const int iwarnp,
185  cs_real_2_t *restrict weighf,
186  cs_real_t *restrict weighb,
187  cs_real_t *restrict i_visc,
188  cs_real_t *restrict b_visc);
189 
190 /*----------------------------------------------------------------------------*/
191 
193 
194 #endif /* __CS_FACE_VISCOSITY_H__ */
#define restrict
Definition: cs_defs.h:122
cs_real_t cs_real_2_t[2]
vector of 2 floating-point values
Definition: cs_defs.h:306
cs_real_t cs_real_6_t[6]
vector of 6 floating-point values
Definition: cs_defs.h:309
void cs_face_viscosity_scalar(const cs_mesh_t *m, cs_mesh_quantities_t *fvq, const int visc_mean_type, cs_real_t *restrict c_visc, cs_real_t *restrict i_visc, cs_real_t *restrict b_visc)
Compute the diffusion velocity at faces. i_visc,b_visc = viscosity*surface/distance, homogeneous to a rate of flow in kg/s.
Definition: cs_face_viscosity.c:201
#define BEGIN_C_DECLS
Definition: cs_defs.h:405
int cs_int_t
Fortran-compatible integer.
Definition: cs_defs.h:295
Definition: cs_mesh.h:62
void cs_face_viscosity_tensor(const cs_mesh_t *m, cs_mesh_quantities_t *fvq, cs_real_6_t *restrict c_visc, const int iwarnp, cs_real_2_t *restrict weighf, cs_real_t *restrict weighb, cs_real_t *restrict i_visc, cs_real_t *restrict b_visc)
Compute the equivalent viscosity at faces for a 3x3 symetric tensor, always using a harmonic mean...
Definition: cs_face_viscosity.c:557
void vistnv(const cs_int_t *const visc_mean_type, cs_real_6_t c_visc[], cs_real_33_t i_visc[], cs_real_t b_visc[])
Definition: cs_face_viscosity.c:129
void cs_face_viscosity_tensor_velocity(const cs_mesh_t *m, cs_mesh_quantities_t *fvq, const int visc_mean_type, cs_real_6_t *restrict c_visc, cs_real_33_t *restrict i_visc, cs_real_t *restrict b_visc)
Compute the equivalent tensor viscosity at faces for a 3x3 symetric tensor.
Definition: cs_face_viscosity.c:342
Definition: cs_mesh_quantities.h:51
void vitens(cs_real_6_t c_visc[], const cs_int_t *const iwarnp, cs_real_2_t weighf[], cs_real_t weighb[], cs_real_t i_visc[], cs_real_t b_visc[])
Definition: cs_face_viscosity.c:152
#define END_C_DECLS
Definition: cs_defs.h:406
double cs_real_t
Definition: cs_defs.h:296
#define CS_PROCF(x, y)
Definition: cs_defs.h:419
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:311
void viscfa(const cs_int_t *const visc_mean_type, cs_real_t c_visc[], cs_real_t i_visc[], cs_real_t b_visc[])
Definition: cs_face_viscosity.c:106