9.2
general documentation
cs_porous_model.h
Go to the documentation of this file.
1#ifndef CS_POROUS_MODEL_H
2#define CS_POROUS_MODEL_H
3
4/*============================================================================
5 * Porous model management
6 *============================================================================*/
7
8/*
9 This file is part of code_saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2026 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 "base/cs_base.h"
35#include "mesh/cs_mesh.h"
37
38#include "fvm/fvm_nodal.h"
39
40/*=============================================================================
41 * Macro definitions
42 *============================================================================*/
43
44/*============================================================================
45 * Type definition
46 *============================================================================*/
47
48typedef struct {
49 fvm_nodal_t *ib_mesh;
53
54/*============================================================================
55 * Global variables
56 *============================================================================*/
57
59
60/* Choice of the porous model */
61extern int cs_glob_porous_model;
62
63/* Specific mesh quantities associated with porous model */
65
66/*=============================================================================
67 * Public function prototypes
68 *============================================================================*/
69
70/*----------------------------------------------------------------------------*/
74/*----------------------------------------------------------------------------*/
75
76void
78
79/*----------------------------------------------------------------------------
80 * Compute fluid volumes and fluid surfaces in addition to cell volumes
81 * and surfaces.
82 *
83 * parameters:
84 * porous_model <-- porous model option (> 0 for porosity)
85 *----------------------------------------------------------------------------*/
86
87void
88cs_porous_model_set_model(int porous_model);
89
90/*----------------------------------------------------------------------------*/
94/*----------------------------------------------------------------------------*/
95
96void
98
99/*----------------------------------------------------------------------------*/
105/*----------------------------------------------------------------------------*/
106
107void
109
110/*----------------------------------------------------------------------------*/
114/*----------------------------------------------------------------------------*/
115
116void
118
119/*----------------------------------------------------------------------------*/
123/*----------------------------------------------------------------------------*/
124
125void
127
128/*----------------------------------------------------------------------------*/
134/*----------------------------------------------------------------------------*/
135
136void
138
139/*----------------------------------------------------------------------------*/
140/*
141 * \brief Preprocess the fluid surfaces.
142 */
143/*----------------------------------------------------------------------------*/
144
145void
147
148/*----------------------------------------------------------------------------*/
149/*
150 * \brief Penalize porosity and fluid surfaces.
151 */
152/*----------------------------------------------------------------------------*/
153
154void
156
157/*----------------------------------------------------------------------------*/
158/*
159 * \brief Convert cell array to boundary array
160 */
161/*----------------------------------------------------------------------------*/
162
163void
165 const cs_lnum_t ibcell_cells[]);
166
167/*----------------------------------------------------------------------------*/
171/*----------------------------------------------------------------------------*/
172
173void
175
176/*----------------------------------------------------------------------------*/
193/*----------------------------------------------------------------------------*/
194
195void
197 const cs_lnum_t n_ib_cells_filt,
198 const cs_lnum_t ib_cells_filt[],
199 const cs_lnum_t n_glob_vtx,
200 const cs_lnum_t ibcell_cells[],
201 const cs_lnum_t vtx_ids[][2],
202 const cs_lnum_t w_vtx_idx[],
203 const cs_lnum_t face_vertex_idx[],
204 const cs_real_t w_vtx[][3]);
205
206/*----------------------------------------------------------------------------*/
207
208#endif /* CS_POROUS_MODEL_H */
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:325
void cs_porous_model_set_model(int porous_model)
Definition: cs_porous_model.cpp:315
cs_mesh_quantities_t * cs_glob_mesh_quantities_f
void cs_porous_model_mesh_quantities_update(void)
Compute solid quantities.
Definition: cs_porous_model.cpp:425
void cs_porous_model_fluid_surfaces_preprocessing(void)
Preprocess the fluid surfaces.
Definition: cs_porous_model.cpp:620
void cs_porous_map_mesh_quantites_f_and_compute(void)
Map fluid mesh quantities.
Definition: cs_porous_model.cpp:256
void cs_porous_model_set_has_disable_flag(int flag)
Set (unset) has_disable_flag.
Definition: cs_porous_model.cpp:380
int cs_glob_porous_model
void cs_porous_model_clip(void)
Definition: cs_porous_model.cpp:544
void cs_porous_model_init_disable_flag(void)
Initialize disable_flag.
Definition: cs_porous_model.cpp:327
void cs_porous_model_init_fluid_quantities(void)
Init fluid quantities.
Definition: cs_porous_model.cpp:411
void cs_porous_model_convert_cell_to_boundary(const cs_lnum_t n_ib_cells, const cs_lnum_t ibcell_cells[])
Convert cell array to boundary array.
Definition: cs_porous_model.cpp:724
cs_porous_model_extra_faces * cs_glob_porous_model_extra_faces
void cs_porous_model_post_immmersed_plane(const cs_lnum_t n_ib_cells, const cs_lnum_t n_ib_cells_filt, const cs_lnum_t ib_cells_filt[], const cs_lnum_t n_glob_vtx, const cs_lnum_t ibcell_cells[], const cs_lnum_t vtx_ids[][2], const cs_lnum_t w_vtx_idx[], const cs_lnum_t face_vertex_idx[], const cs_real_t w_vtx[][3])
Post-processes the immersed boundary (ib) planes for display on paraview.
Definition: cs_porous_model.cpp:925
void cs_porous_model_postprocess_meshes(void)
Initialize porous model arrays.
Definition: cs_porous_model.cpp:886
void cs_porous_model_auto_face_porosity(void)
Automatic computation of the face porosity and factors.
Definition: cs_porous_model.cpp:450
Definition: cs_mesh_quantities.h:88
Definition: cs_porous_model.h:48
fvm_nodal_t * ib_mesh
Definition: cs_porous_model.h:49
int mesh_id
Definition: cs_porous_model.h:50
bool activate_post
Definition: cs_porous_model.h:51