8.0
general documentation
Loading...
Searching...
No Matches
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-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_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
63void CS_PROCF (viscfa, VISCFA)
64(
65 const int *const visc_mean_type,
66 cs_real_t c_visc[],
67 cs_real_t i_visc[],
68 cs_real_t b_visc[]
69);
70
71/*----------------------------------------------------------------------------
72 * Wrapper to cs_face_anisotropic_viscosity_vector
73 *----------------------------------------------------------------------------*/
74
75void CS_PROCF (vistnv, VISTNV)
76(
77 const int *const visc_mean_type,
78 cs_real_6_t c_visc[],
79 cs_real_33_t i_visc[],
80 cs_real_t b_visc[]
81);
82
83/*----------------------------------------------------------------------------
84 * Wrapper to cs_face_anisotropic_viscosity_scalar
85 *----------------------------------------------------------------------------*/
86
87void CS_PROCF (vitens, VITENS)
88(
89 cs_real_6_t c_visc[],
90 const int *const iwarnp,
91 cs_real_2_t weighf[],
92 cs_real_t weighb[],
93 cs_real_t i_visc[],
94 cs_real_t b_visc[]
95);
96
97/*============================================================================
98 * Public function prototypes
99 *============================================================================*/
100
101/*----------------------------------------------------------------------------*/
121/*----------------------------------------------------------------------------*/
122
123void
125 const cs_mesh_quantities_t *fvq,
126 const int visc_mean_type,
127 cs_real_t *restrict c_visc,
128 cs_real_t *restrict i_visc,
129 cs_real_t *restrict b_visc);
130
131/*----------------------------------------------------------------------------*/
147/*----------------------------------------------------------------------------*/
148
149void
151 const cs_mesh_quantities_t *fvq,
152 const int visc_mean_type,
153 cs_real_6_t *restrict c_visc,
154 cs_real_33_t *restrict i_visc,
155 cs_real_t *restrict b_visc);
156
157/*----------------------------------------------------------------------------*/
180/*----------------------------------------------------------------------------*/
181
182void
184 const cs_mesh_quantities_t *fvq,
185 cs_real_6_t *restrict c_visc,
186 const int iwarnp,
187 cs_real_2_t *restrict weighf,
188 cs_real_t *restrict weighb,
189 cs_real_t *restrict i_visc,
190 cs_real_t *restrict b_visc);
191
192/*----------------------------------------------------------------------------*/
193
195
196#endif /* __CS_FACE_VISCOSITY_H__ */
#define restrict
Definition cs_defs.h:139
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition cs_defs.h:341
#define BEGIN_C_DECLS
Definition cs_defs.h:509
double cs_real_t
Floating-point value.
Definition cs_defs.h:319
#define CS_PROCF(x, y)
Definition cs_defs.h:523
cs_real_t cs_real_2_t[2]
vector of 2 floating-point values
Definition cs_defs.h:331
cs_real_t cs_real_6_t[6]
vector of 6 floating-point values
Definition cs_defs.h:334
#define END_C_DECLS
Definition cs_defs.h:510
void viscfa(const int *const visc_mean_type, cs_real_t c_visc[], cs_real_t i_visc[], cs_real_t b_visc[])
Definition cs_face_viscosity.c:110
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:156
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:133
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
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
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
Definition cs_mesh_quantities.h:92
Definition cs_mesh.h:85