My Project
programmer's documentation
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-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_base.h"
35 #include "cs_halo.h"
36 #include "cs_mesh.h"
37 #include "cs_mesh_quantities.h"
38 
39 /*----------------------------------------------------------------------------*/
40 
42 
43 /*=============================================================================
44  * Local Macro definitions
45  *============================================================================*/
46 
47 /*============================================================================
48  * Type definition
49  *============================================================================*/
50 
51 /*============================================================================
52  * Global variables
53  *============================================================================*/
54 
55 /*============================================================================
56  * Public function prototypes for Fortran API
57  *============================================================================*/
58 
59 /*----------------------------------------------------------------------------
60  * Wrapper to cs_face_viscosity
61  *----------------------------------------------------------------------------*/
62 
63 void CS_PROCF (viscfa, VISCFA)
64 (
65  const cs_int_t *const visc_mean_type,
67  cs_real_t i_visc[],
69 );
70 
71 /*----------------------------------------------------------------------------
72  * Wrapper to cs_face_anisotropic_viscosity_vector
73  *----------------------------------------------------------------------------*/
74 
75 void CS_PROCF (vistnv, VISTNV)
76 (
77  const cs_int_t *const visc_mean_type,
81 );
82 
83 /*----------------------------------------------------------------------------
84  * Wrapper to cs_face_anisotropic_viscosity_scalar
85  *----------------------------------------------------------------------------*/
86 
87 void CS_PROCF (vitens, VITENS)
88 (
90  const cs_int_t *const iwarnp,
92  cs_real_t weighb[],
93  cs_real_t i_visc[],
95 );
96 
97 /*============================================================================
98  * Public function prototypes
99  *============================================================================*/
100 
101 /*----------------------------------------------------------------------------*/
121 /*----------------------------------------------------------------------------*/
122 
123 void
125  const cs_mesh_quantities_t *fvq,
126  const int visc_mean_type,
130 
131 /*----------------------------------------------------------------------------*/
147 /*----------------------------------------------------------------------------*/
148 
149 void
151  const cs_mesh_quantities_t *fvq,
152  const int visc_mean_type,
156 
157 /*----------------------------------------------------------------------------*/
180 /*----------------------------------------------------------------------------*/
181 
182 void
184  const cs_mesh_quantities_t *fvq,
186  const int iwarnp,
191 
192 /*----------------------------------------------------------------------------*/
193 
195 
196 #endif /* __CS_FACE_VISCOSITY_H__ */
cs_face_viscosity
void cs_face_viscosity(const cs_mesh_t *m, const 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,...
Definition: cs_face_viscosity.c:212
weighb
void const cs_int_t *const cs_real_2_t cs_real_t weighb[]
Definition: cs_face_viscosity.h:90
cs_face_anisotropic_viscosity_vector
void cs_face_anisotropic_viscosity_vector(const cs_mesh_t *m, const 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:356
restrict
#define restrict
Definition: cs_defs.h:127
cs_real_2_t
cs_real_t cs_real_2_t[2]
vector of 2 floating-point values
Definition: cs_defs.h:314
CS_PROCF
void CS_PROCF(viscfa, VISCFA)(const cs_int_t *const visc_mean_type
i_visc
void cs_real_t cs_real_t i_visc[]
Definition: cs_face_viscosity.h:66
b_visc
void cs_real_t cs_real_t cs_real_t b_visc[]
Definition: cs_face_viscosity.h:66
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:468
c_visc
void cs_real_t c_visc[]
Definition: cs_face_viscosity.h:66
cs_real_t
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
iwarnp
void const cs_int_t *const iwarnp
Definition: cs_face_viscosity.h:90
cs_mesh_quantities.h
cs_mesh_quantities_t
Definition: cs_mesh_quantities.h:90
cs_mesh.h
cs_halo.h
cs_real_6_t
cs_real_t cs_real_6_t[6]
vector of 6 floating-point values
Definition: cs_defs.h:317
cs_face_anisotropic_viscosity_scalar
void cs_face_anisotropic_viscosity_scalar(const cs_mesh_t *m, const 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:571
cs_real_33_t
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:321
cs_int_t
int cs_int_t
Fortran-compatible integer.
Definition: cs_defs.h:301
weighf
void const cs_int_t *const cs_real_2_t weighf[]
Definition: cs_face_viscosity.h:90
cs_mesh_t
Definition: cs_mesh.h:63
cs_base.h