9.2
general documentation
cs_cdofb_ac.h
Go to the documentation of this file.
1#ifndef CS_CDOFB_AC_H
2#define CS_CDOFB_AC_H
3
4/*============================================================================
5 * Build an algebraic CDO face-based system for the Navier-Stokes equations
6 * and solved it with an artificial compressibility algorithm
7 *============================================================================*/
8
9/*
10 This file is part of code_saturne, a general-purpose CFD tool.
11
12 Copyright (C) 1998-2026 EDF S.A.
13
14 This program is free software; you can redistribute it and/or modify it under
15 the terms of the GNU General Public License as published by the Free Software
16 Foundation; either version 2 of the License, or (at your option) any later
17 version.
18
19 This program is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
21 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
22 details.
23
24 You should have received a copy of the GNU General Public License along with
25 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
26 Street, Fifth Floor, Boston, MA 02110-1301, USA.
27*/
28
29/*----------------------------------------------------------------------------*/
30
31#include "base/cs_defs.h"
32
33/*----------------------------------------------------------------------------
34 * Standard C library headers
35 *----------------------------------------------------------------------------*/
36
37/*----------------------------------------------------------------------------
38 * Local headers
39 *----------------------------------------------------------------------------*/
40
41#include "base/cs_base.h"
42#include "base/cs_time_step.h"
43#include "cdo/cs_cdo_connect.h"
45#include "cdo/cs_cdofb_navsto.h"
46#include "cdo/cs_equation.h"
49#include "cdo/cs_navsto_param.h"
50#include "cdo/cs_source_term.h"
51#include "mesh/cs_mesh.h"
52
53/*============================================================================
54 * Macro definitions
55 *============================================================================*/
56
57/*============================================================================
58 * Type definitions
59 *============================================================================*/
60
82
86};
87
88/*============================================================================
89 * Inline static function prototypes
90 *============================================================================*/
91
92/*----------------------------------------------------------------------------*/
100/*----------------------------------------------------------------------------*/
101
102inline static cs_real_t *
104{
106 previous);
107}
108
109/*============================================================================
110 * Public function prototypes
111 *============================================================================*/
112
113/*----------------------------------------------------------------------------*/
121/*----------------------------------------------------------------------------*/
122
123void
125 const cs_cdo_connect_t *connect,
126 const cs_time_step_t *time_step);
127
128/*----------------------------------------------------------------------------*/
141/*----------------------------------------------------------------------------*/
142
145 cs_adv_field_t *adv_field,
146 cs_real_t *mflux,
147 cs_real_t *mflux_pre,
148 cs_boundary_type_t *fb_type,
149 void *nsc_input);
150
151/*----------------------------------------------------------------------------*/
159/*----------------------------------------------------------------------------*/
160
161void *
163
164/*----------------------------------------------------------------------------*/
174/*----------------------------------------------------------------------------*/
175
176void
178 const cs_navsto_param_t *nsp,
179 cs_cdofb_ac_t *sc);
180
181/*----------------------------------------------------------------------------*/
192/*----------------------------------------------------------------------------*/
193
194void
196 const cs_navsto_param_t *nsp,
197 cs_cdofb_ac_t *sc);
198
199#endif /* CS_CDOFB_AC_H */
time step descriptor
Definition: cs_time_step.h:60
int cs_boundary_type_t
Definition: cs_boundary.h:65
cs::cdo_navsto_ctx_t * cs_cdofb_ac_init_scheme_context(const cs_navsto_param_t *nsp, cs_adv_field_t *adv_field, cs_real_t *mflux, cs_real_t *mflux_pre, cs_boundary_type_t *fb_type, void *nsc_input)
Initialize a cs_cdofb_ac_t structure.
Definition: cs_cdofb_ac.cpp:757
static cs_real_t * cs_cdofb_ac_get_face_velocity(bool previous)
Retrieve the values of the velocity on the faces.
Definition: cs_cdofb_ac.h:103
void cs_cdofb_ac_compute_implicit(const cs_mesh_t *mesh, const cs_navsto_param_t *nsp, cs_cdofb_ac_t *sc)
Solve the unsteady Navier-Stokes system with a CDO face-based scheme using a Artificial Compressibili...
Definition: cs_cdofb_ac.cpp:938
void cs_cdofb_ac_init_common(const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_time_step_t *time_step)
Set shared pointers from the main domain members.
Definition: cs_cdofb_ac.cpp:730
void cs_cdofb_ac_compute_implicit_nl(const cs_mesh_t *mesh, const cs_navsto_param_t *nsp, cs_cdofb_ac_t *sc)
Solve the unsteady Navier-Stokes system with a CDO face-based scheme using a Artificial Compressibili...
Definition: cs_cdofb_ac.cpp:1097
void * cs_cdofb_ac_free_scheme_context(cs_cdofb_ac_t *sc)
Destroy a cs_cdofb_ac_t structure.
Definition: cs_cdofb_ac.cpp:905
void() cs_cdofb_navsto_source_t(const cs_navsto_param_t *nsp, const cs_cell_mesh_t *cm, const cs_cdofb_navsto_builder_t *nsb, cs_cell_sys_t *csys)
Compute and add a source term to the local RHS. This is a special treatment to enable source involvin...
Definition: cs_cdofb_navsto.h:184
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
cs_real_t * cs_equation_get_face_values(const cs_equation_t *eq, bool previous)
For a given equation, retrieve an array of values related to each face of the mesh for the unknowns.
Definition: cs_equation.cpp:3253
cs_equation_t * cs_equation_by_name(const char *eqname)
Find the cs_equation_t structure with name eqname Return null if not find.
Definition: cs_equation.cpp:495
Definition: mesh.f90:26
Definition: cs_navsto_context.h:233
Context related to CDO face-based discretization when dealing with Navier-Stokes equations and vector...
Definition: cs_navsto_context.h:48
Definition: cs_advection_field.h:151
Definition: cs_cdo_connect.h:57
Definition: cs_cdo_quantities.h:142
Context related to CDO face-based discretization when dealing with the Navier-Stokes equations with a...
Definition: cs_cdofb_ac.h:67
cs_cdofb_navsto_source_t * add_gravity_term
Definition: cs_cdofb_ac.h:81
Definition: cs_mesh.h:85
Structure storing the parameters related to the resolution of the Navier-Stokes system.
Definition: cs_navsto_param.h:296