8.2
general 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-2024 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_anisotropic_viscosity_vector
61  *----------------------------------------------------------------------------*/
62 
63 void CS_PROCF (vistnv, VISTNV)
64 (
65  const int *const visc_mean_type,
66  cs_real_6_t c_visc[],
67  cs_real_33_t i_visc[],
68  cs_real_t b_visc[]
69 );
70 
71 /*----------------------------------------------------------------------------
72  * Wrapper to cs_face_anisotropic_viscosity_scalar
73  *----------------------------------------------------------------------------*/
74 
75 void CS_PROCF (vitens, VITENS)
76 (
77  cs_real_6_t c_visc[],
78  const int *const iwarnp,
79  cs_real_2_t weighf[],
80  cs_real_t weighb[],
81  cs_real_t i_visc[],
82  cs_real_t b_visc[]
83 );
84 
85 /*============================================================================
86  * Public function prototypes
87  *============================================================================*/
88 
89 /*----------------------------------------------------------------------------*/
118 /*----------------------------------------------------------------------------*/
119 
120 void
122  cs_real_t secvib[]);
123 
124 /*----------------------------------------------------------------------------*/
144 /*----------------------------------------------------------------------------*/
145 
146 void
148  const cs_mesh_quantities_t *fvq,
149  const int visc_mean_type,
150  cs_real_t *restrict c_visc,
151  cs_real_t *restrict i_visc,
152  cs_real_t *restrict b_visc);
153 
154 /*----------------------------------------------------------------------------*/
170 /*----------------------------------------------------------------------------*/
171 
172 void
174  const cs_mesh_quantities_t *fvq,
175  const int visc_mean_type,
176  cs_real_6_t *restrict c_visc,
177  cs_real_33_t *restrict i_visc,
178  cs_real_t *restrict b_visc);
179 
180 /*----------------------------------------------------------------------------*/
203 /*----------------------------------------------------------------------------*/
204 
205 void
207  const cs_mesh_quantities_t *fvq,
208  cs_real_6_t *restrict c_visc,
209  const int iwarnp,
210  cs_real_2_t *restrict weighf,
211  cs_real_t *restrict weighb,
212  cs_real_t *restrict i_visc,
213  cs_real_t *restrict b_visc);
214 
215 /*----------------------------------------------------------------------------*/
216 
218 
219 #endif /* __CS_FACE_VISCOSITY_H__ */
#define restrict
Definition: cs_defs.h:141
#define BEGIN_C_DECLS
Definition: cs_defs.h:528
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
#define CS_PROCF(x, y)
Definition: cs_defs.h:560
cs_real_t cs_real_2_t[2]
vector of 2 floating-point values
Definition: cs_defs.h:346
cs_real_t cs_real_6_t[6]
vector of 6 floating-point values
Definition: cs_defs.h:349
#define END_C_DECLS
Definition: cs_defs.h:529
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:356
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:738
void vitens(cs_real_6_t c_visc[], const int *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:136
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:523
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:379
void cs_face_viscosity_secondary(cs_real_t secvif[], cs_real_t secvib[])
Computes the secondary viscosity contribution in order to compute:
Definition: cs_face_viscosity.c:194
void vistnv(const int *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:113
Definition: cs_mesh_quantities.h:92
Definition: cs_mesh.h:85