8.3
general documentation
cs_divergence.h
Go to the documentation of this file.
1#ifndef __CS_DIVERGENCE_H__
2#define __CS_DIVERGENCE_H__
3
4/*============================================================================
5 * Divergence operators.
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_field.h"
36#include "cs_halo.h"
37#include "cs_gradient.h"
38#include "cs_mesh.h"
39#include "cs_mesh_quantities.h"
40
41/*----------------------------------------------------------------------------*/
42
44
45/*=============================================================================
46 * Local Macro definitions
47 *============================================================================*/
48
49/*============================================================================
50 * Type definition
51 *============================================================================*/
52
53/*============================================================================
54 * Global variables
55 *============================================================================*/
56
57/*=============================================================================
58 * Public function prototypes
59 *============================================================================*/
60
61/*----------------------------------------------------------------------------*/
112/*----------------------------------------------------------------------------*/
113
114void
116 const cs_mesh_quantities_t *fvq,
117 int f_id,
118 int itypfl,
119 int iflmb0,
120 int init,
121 int inc,
122 int imrgra,
123 int nswrgu,
124 cs_gradient_limit_t imligu,
125 int iwarnu,
126 double epsrgu,
127 double climgu,
128 const cs_real_t rom[],
129 const cs_real_t romb[],
130 const cs_real_3_t vel[],
131 cs_field_bc_coeffs_t *bc_coeffs_v,
132 cs_real_t *i_massflux,
133 cs_real_t *b_massflux);
134
135/*----------------------------------------------------------------------------*/
151/*----------------------------------------------------------------------------*/
152
153void
155 int init,
156 const cs_real_t i_massflux[],
157 const cs_real_t b_massflux[],
158 cs_real_t *diverg);
159
160/*----------------------------------------------------------------------------*/
176/*----------------------------------------------------------------------------*/
177
178void
180 int init,
181 const cs_real_3_t i_massflux[],
182 const cs_real_3_t b_massflux[],
183 cs_real_3_t *diverg);
184
185/*----------------------------------------------------------------------------*/
211/*----------------------------------------------------------------------------*/
212
213void
216 int init,
217 int nswrgu,
218 const cs_real_3_t frcxt[],
219 const cs_real_t cofbfp[],
220 cs_real_t *i_massflux,
221 cs_real_t *b_massflux,
222 const cs_real_t i_visc[],
223 const cs_real_t b_visc[],
224 const cs_real_t viselx[],
225 const cs_real_t visely[],
226 const cs_real_t viselz[]);
227
228/*----------------------------------------------------------------------------*/
257/*----------------------------------------------------------------------------*/
258
259void
262 int init,
263 int nswrgp,
264 int ircflp,
265 const cs_real_3_t frcxt[],
266 const cs_real_t cofbfp[],
267 const cs_real_t i_visc[],
268 const cs_real_t b_visc[],
269 cs_real_6_t viscel[],
270 const cs_real_2_t weighf[],
271 cs_real_t *i_massflux,
272 cs_real_t *b_massflux);
273
274/*----------------------------------------------------------------------------*/
311/*----------------------------------------------------------------------------*/
312
313void
315 const cs_mesh_quantities_t *fvq,
316 int f_id,
317 int itypfl,
318 int iflmb0,
319 int init,
320 int inc,
321 int imrgra,
322 int nswrgu,
323 cs_gradient_limit_t imligu,
324 int iwarnu,
325 double epsrgu,
326 double climgu,
327 const cs_real_t c_rho[],
328 const cs_real_t b_rho[],
329 const cs_real_6_t c_var[],
330 const cs_field_bc_coeffs_t *bc_coeffs_ts,
331 cs_real_3_t *i_massflux,
332 cs_real_3_t *b_massflux);
333
334/*----------------------------------------------------------------------------*/
335
337
338#endif /* __CS_DIVERGENCE_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
double cs_real_t
Floating-point value.
Definition: cs_defs.h:342
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:359
cs_real_t cs_real_2_t[2]
vector of 2 floating-point values
Definition: cs_defs.h:358
cs_real_t cs_real_6_t[6]
vector of 6 floating-point values
Definition: cs_defs.h:361
#define END_C_DECLS
Definition: cs_defs.h:543
void cs_ext_force_anisotropic_flux(const cs_mesh_t *m, cs_mesh_quantities_t *fvq, int init, int nswrgp, int ircflp, const cs_real_3_t frcxt[], const cs_real_t cofbfp[], const cs_real_t i_visc[], const cs_real_t b_visc[], cs_real_6_t viscel[], const cs_real_2_t weighf[], cs_real_t *i_massflux, cs_real_t *b_massflux)
Project the external source terms to the faces in coherence with cs_face_anisotropic_diffusion_scalar...
void cs_tensor_divergence(const cs_mesh_t *m, int init, const cs_real_3_t i_massflux[], const cs_real_3_t b_massflux[], cs_real_3_t *diverg)
Add the integrated mass flux on the cells for a tensor variable.
void cs_divergence(const cs_mesh_t *m, int init, const cs_real_t i_massflux[], const cs_real_t b_massflux[], cs_real_t *diverg)
Add the integrated mass flux on the cells.
void cs_tensor_face_flux(const cs_mesh_t *m, const cs_mesh_quantities_t *fvq, int f_id, int itypfl, int iflmb0, int init, int inc, int imrgra, int nswrgu, cs_gradient_limit_t imligu, int iwarnu, double epsrgu, double climgu, const cs_real_t c_rho[], const cs_real_t b_rho[], const cs_real_6_t c_var[], const cs_field_bc_coeffs_t *bc_coeffs_ts, cs_real_3_t *i_massflux, cs_real_3_t *b_massflux)
Add to a flux.
void cs_mass_flux(const cs_mesh_t *m, const cs_mesh_quantities_t *fvq, int f_id, int itypfl, int iflmb0, int init, int inc, int imrgra, int nswrgu, cs_gradient_limit_t imligu, int iwarnu, double epsrgu, double climgu, const cs_real_t rom[], const cs_real_t romb[], const cs_real_3_t vel[], cs_field_bc_coeffs_t *bc_coeffs_v, cs_real_t *i_massflux, cs_real_t *b_massflux)
Add to the mass flux .
void cs_ext_force_flux(const cs_mesh_t *m, cs_mesh_quantities_t *fvq, int init, int nswrgu, const cs_real_3_t frcxt[], const cs_real_t cofbfp[], cs_real_t *i_massflux, cs_real_t *b_massflux, const cs_real_t i_visc[], const cs_real_t b_visc[], const cs_real_t viselx[], const cs_real_t visely[], const cs_real_t viselz[])
Project the external source terms to the faces in coherence with cs_face_diffusion_scalar for the imp...
@ vel
Definition: cs_field_pointer.h:70
cs_gradient_limit_t
Definition: cs_gradient.h:72
integer(c_int), pointer, save imrgra
type of gradient reconstruction
Definition: optcal.f90:92
Field boundary condition descriptor (for variables)
Definition: cs_field.h:104
Definition: cs_mesh_quantities.h:92
Definition: cs_mesh.h:85