My Project
programmer's documentation
Loading...
Searching...
No Matches
cs_cdo_advection.h
Go to the documentation of this file.
1#ifndef __CS_CDO_ADVECTION_H__
2#define __CS_CDO_ADVECTION_H__
3
4/*============================================================================
5 * Build discrete convection operators for CDO schemes
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_advection_field.h"
35#include "cs_cdo_connect.h"
36#include "cs_cdo_local.h"
37#include "cs_cdo_quantities.h"
38#include "cs_equation_param.h"
39#include "cs_property.h"
40
41/*----------------------------------------------------------------------------*/
42
44
45/*============================================================================
46 * Macro definitions
47 *============================================================================*/
48
49/*============================================================================
50 * Type definitions
51 *============================================================================*/
52
53/*----------------------------------------------------------------------------*/
61/*----------------------------------------------------------------------------*/
62
63typedef void
65 const cs_real_t fluxes[],
66 cs_sdm_t *adv);
67
68/*----------------------------------------------------------------------------*/
78/*----------------------------------------------------------------------------*/
79
80typedef void
82 const cs_cell_mesh_t *cm,
84 cs_cell_sys_t *csys);
85
86/*----------------------------------------------------------------------------*/
98/*----------------------------------------------------------------------------*/
99
100typedef void
102 const cs_cell_mesh_t *cm,
103 cs_real_t t_eval,
106
107/*----------------------------------------------------------------------------*/
119/*----------------------------------------------------------------------------*/
120
121typedef void
123 const cs_equation_param_t *eqp,
124 cs_real_t t_eval,
127 cs_cell_sys_t *csys);
128
129/*============================================================================
130 * Global variables
131 *============================================================================*/
132
133/*============================================================================
134 * Public function prototypes
135 *============================================================================*/
136
137/*----------------------------------------------------------------------------*/
143/*----------------------------------------------------------------------------*/
144
145void
146cs_cdo_advection_set_cip_coef(double new_value);
147
148/*----------------------------------------------------------------------------*/
154/*----------------------------------------------------------------------------*/
155
156double
158
159/*----------------------------------------------------------------------------*/
170/*----------------------------------------------------------------------------*/
171
172void
174 const cs_cell_mesh_t *cm,
175 cs_real_t t_eval,
176 cs_cdofb_advection_t *build_func,
178
179/*----------------------------------------------------------------------------*/
189/*----------------------------------------------------------------------------*/
190
191void
193 const cs_cell_mesh_t *cm,
195 cs_cell_sys_t *csys);
196
197/*----------------------------------------------------------------------------*/
207/*----------------------------------------------------------------------------*/
208
209void
211 const cs_cell_mesh_t *cm,
213 cs_cell_sys_t *csys);
214
215/*----------------------------------------------------------------------------*/
225/*----------------------------------------------------------------------------*/
226
227void
229 const cs_cell_mesh_t *cm,
231 cs_cell_sys_t *csys);
232
233/*----------------------------------------------------------------------------*/
244/*----------------------------------------------------------------------------*/
245
246void
248 const cs_cell_mesh_t *cm,
250 cs_cell_sys_t *csys);
251
252/*----------------------------------------------------------------------------*/
267/*----------------------------------------------------------------------------*/
268
269void
271 const cs_real_t fluxes[],
272 cs_sdm_t *adv);
273
274/*----------------------------------------------------------------------------*/
289/*----------------------------------------------------------------------------*/
290
291void
293 const cs_real_t fluxes[],
294 cs_sdm_t *adv);
295
296/*----------------------------------------------------------------------------*/
311/*----------------------------------------------------------------------------*/
312
313void
315 const cs_real_t fluxes[],
316 cs_sdm_t *adv);
317
318/*----------------------------------------------------------------------------*/
333/*----------------------------------------------------------------------------*/
334
335void
337 const cs_real_t fluxes[],
338 cs_sdm_t *adv);
339
340/*----------------------------------------------------------------------------*/
353/*----------------------------------------------------------------------------*/
354
355void
357 const cs_cell_mesh_t *cm,
358 cs_real_t t_eval,
361
362/*----------------------------------------------------------------------------*/
375/*----------------------------------------------------------------------------*/
376
377void
379 const cs_cell_mesh_t *cm,
380 cs_real_t t_eval,
383
384/*----------------------------------------------------------------------------*/
397/*----------------------------------------------------------------------------*/
398
399void
401 const cs_cell_mesh_t *cm,
402 cs_real_t t_eval,
405
406/*----------------------------------------------------------------------------*/
419/*----------------------------------------------------------------------------*/
420
421void
423 const cs_cell_mesh_t *cm,
424 cs_real_t t_eval,
427
428/*----------------------------------------------------------------------------*/
441/*----------------------------------------------------------------------------*/
442
443void
445 const cs_cell_mesh_t *cm,
446 cs_real_t t_eval,
449
450/*----------------------------------------------------------------------------*/
463/*----------------------------------------------------------------------------*/
464
465void
467 const cs_cell_mesh_t *cm,
468 cs_real_t t_eval,
471
472/*----------------------------------------------------------------------------*/
485/*----------------------------------------------------------------------------*/
486
487void
489 const cs_cell_mesh_t *cm,
490 cs_real_t t_eval,
493
494/*----------------------------------------------------------------------------*/
506/*----------------------------------------------------------------------------*/
507
508void
510 const cs_cell_mesh_t *cm,
511 cs_real_t t_eval,
514
515/*----------------------------------------------------------------------------*/
526/*----------------------------------------------------------------------------*/
527
528void
530 const cs_cell_mesh_t *cm,
531 cs_real_t t_eval,
534
535/*----------------------------------------------------------------------------*/
546/*----------------------------------------------------------------------------*/
547
548void
550 const cs_equation_param_t *eqp,
551 cs_real_t t_eval,
554 cs_cell_sys_t *csys);
555
556/*----------------------------------------------------------------------------*/
568/*----------------------------------------------------------------------------*/
569
570void
572 const cs_equation_param_t *eqp,
573 cs_real_t t_eval,
576 cs_cell_sys_t *csys);
577
578/*----------------------------------------------------------------------------*/
589/*----------------------------------------------------------------------------*/
590
591void
594 cs_real_t coefval[]);
595
596/*----------------------------------------------------------------------------*/
597
599
600#endif /* __CS_CDO_ADVECTION_H__ */
void cs_cdo_advection_vb_upwnoc_di(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, cs_face_mesh_t *fm, cs_cell_builder_t *cb)
Compute the convection operator attached to a cell with a CDO vertex-based scheme when diffusion is a...
Definition cs_cdo_advection.c:1913
void cs_cdo_advection_vb_upwcsv_di(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, cs_face_mesh_t *fm, cs_cell_builder_t *cb)
Compute the convection operator attached to a cell with a CDO vertex-based scheme when diffusion is a...
Definition cs_cdo_advection.c:1684
void cs_cdo_advection_vb_cennoc(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, cs_face_mesh_t *fm, cs_cell_builder_t *cb)
Compute the convection operator attached to a cell with a CDO vertex-based scheme when a centered sch...
Definition cs_cdo_advection.c:2046
void cs_cdo_advection_fb_bc_wdi(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Add the contribution of the boundary conditions to the local system in CDO-Fb schemes (with a diffusi...
Definition cs_cdo_advection.c:1268
void() cs_cdovb_advection_t(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, cs_face_mesh_t *fm, cs_cell_builder_t *cb)
Compute the convection operator attached to a cell with a CDO vertex-based scheme....
Definition cs_cdo_advection.h:101
void cs_cdo_advection_vcb_bc(const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, cs_real_t t_eval, cs_face_mesh_t *fm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Compute the BC contribution for the convection operator with CDO V+C schemes.
Definition cs_cdo_advection.c:2448
double cs_cdo_advection_get_cip_coef(void)
Get the value of the stabilization coefficient used in CIP scheme.
Definition cs_cdo_advection.c:1134
void() cs_cdofb_advection_bc_t(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Add the contribution of the boundary conditions to the local system in CDO-Fb schemes.
Definition cs_cdo_advection.h:81
void cs_cdo_advection_vb_cencsv(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, cs_face_mesh_t *fm, cs_cell_builder_t *cb)
Compute the convection operator attached to a cell with a CDO vertex-based scheme when a centered sch...
Definition cs_cdo_advection.c:1819
void cs_cdo_advection_vcb_cw_cst(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, cs_face_mesh_t *fm, cs_cell_builder_t *cb)
Compute the convection operator attached to a cell with a CDO vertex+cell-based scheme when the advec...
Definition cs_cdo_advection.c:2092
void cs_cdo_advection_vb_upwcsv(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, cs_face_mesh_t *fm, cs_cell_builder_t *cb)
Compute the convection operator attached to a cell with a CDO vertex-based scheme without diffusion a...
Definition cs_cdo_advection.c:1760
void cs_cdo_advection_fb_upwnoc_di(const cs_cell_mesh_t *cm, const cs_real_t fluxes[], cs_sdm_t *adv)
Compute the convection operator attached to a cell with a CDO face-based scheme in the non-conservati...
Definition cs_cdo_advection.c:1633
void cs_cdo_advection_vb_mcucsv(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, cs_face_mesh_t *fm, cs_cell_builder_t *cb)
Compute the convection operator attached to a cell with a CDO vertex-based scheme when a mixed center...
Definition cs_cdo_advection.c:1866
void cs_cdofb_advection_build(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, cs_cdofb_advection_t *build_func, cs_cell_builder_t *cb)
Build the cellwise advection operator for CDO-Fb schemes The local matrix related to this operator is...
Definition cs_cdo_advection.c:1153
void cs_cdo_advection_vb_bc(const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, cs_real_t t_eval, cs_face_mesh_t *fm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Compute the BC contribution for the convection operator.
Definition cs_cdo_advection.c:2343
void cs_cdo_advection_fb_bc_v(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Add the contribution of the boundary conditions to the local system in CDO-Fb schemes (without diffus...
Definition cs_cdo_advection.c:1316
void cs_cdo_advection_fb_bc(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Add the contribution of the boundary conditions to the local system in CDO-Fb schemes (without diffus...
Definition cs_cdo_advection.c:1199
void cs_cdo_advection_fb_upwcsv_di(const cs_cell_mesh_t *cm, const cs_real_t fluxes[], cs_sdm_t *adv)
Compute the convection operator attached to a cell with a CDO face-based scheme in the conservative f...
Definition cs_cdo_advection.c:1516
void cs_cdo_advection_fb_bc_wdi_v(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Add the contribution of the boundary conditions to the local system in CDO-Fb schemes (with a diffusi...
Definition cs_cdo_advection.c:1396
void cs_cdo_advection_set_cip_coef(double new_value)
Set the value of the stabilization coefficient used in CIP scheme.
Definition cs_cdo_advection.c:1120
void() cs_cdovb_advection_bc_t(const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, cs_real_t t_eval, cs_face_mesh_t *fm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Compute the BC contribution for the advection operator in CDO vertex-based (or vertex+cell-based) sch...
Definition cs_cdo_advection.h:122
void cs_cdo_advection_cell_upwind_coef(const cs_cdo_quantities_t *cdoq, cs_param_advection_scheme_t scheme, cs_real_t coefval[])
Compute the value of the upwinding coefficient in each cell knowing the related Peclet number.
Definition cs_cdo_advection.c:2513
void cs_cdo_advection_vcb(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, cs_face_mesh_t *fm, cs_cell_builder_t *cb)
Compute the convection operator attached to a cell with a CDO vertex+cell-based scheme.
Definition cs_cdo_advection.c:2222
void cs_cdo_advection_fb_upwcsv(const cs_cell_mesh_t *cm, const cs_real_t fluxes[], cs_sdm_t *adv)
Compute the convection operator attached to a cell with a CDO face-based scheme in the conservative f...
Definition cs_cdo_advection.c:1452
void() cs_cdofb_advection_t(const cs_cell_mesh_t *cm, const cs_real_t fluxes[], cs_sdm_t *adv)
Define the local convection operator in CDO-Fb schemes.
Definition cs_cdo_advection.h:64
void cs_cdo_advection_fb_upwnoc(const cs_cell_mesh_t *cm, const cs_real_t fluxes[], cs_sdm_t *adv)
Compute the convection operator attached to a cell with a CDO face-based scheme in the non-conservati...
Definition cs_cdo_advection.c:1570
void cs_cdo_advection_vb_upwnoc(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, cs_face_mesh_t *fm, cs_cell_builder_t *cb)
Compute the convection operator attached to a cell with a CDO vertex-based scheme without diffusion w...
Definition cs_cdo_advection.c:1987
#define BEGIN_C_DECLS
Definition cs_defs.h:467
double cs_real_t
Floating-point value.
Definition cs_defs.h:302
#define END_C_DECLS
Definition cs_defs.h:468
Structure and routines handling the specific settings related to a cs_equation_t structure.
@ fm
Definition cs_field_pointer.h:134
cs_param_advection_scheme_t
Definition cs_param.h:255
Definition cs_cdo_quantities.h:94
Set of local and temporary buffers useful for building the algebraic system with a cellwise process....
Definition cs_cdo_local.h:56
Set of local quantities and connectivities related to a mesh cell This is a key structure for all cel...
Definition cs_cdo_local.h:146
Set of arrays and local (small) dense matrices related to a mesh cell This is a key structure for bui...
Definition cs_cdo_local.h:93
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources.
Definition cs_equation_param.h:148
Set of local quantities and connectivities related to a mesh face Structure used to get a better memo...
Definition cs_cdo_local.h:212