8.3
general documentation
cs_gwf_tpf.h
Go to the documentation of this file.
1#ifndef __CS_GWF_TPF_H__
2#define __CS_GWF_TPF_H__
3
4/*============================================================================
5 * Main functions dedicated to the modelling of two-phase flows in a porous
6 * media. This media is always considered as unsaturated. Two sub-models are
7 * considered: miscible (MTPF) or immiscible (ITPF)
8 *============================================================================*/
9
10/*
11 This file is part of code_saturne, a general-purpose CFD tool.
12
13 Copyright (C) 1998-2024 EDF S.A.
14
15 This program is free software; you can redistribute it and/or modify it under
16 the terms of the GNU General Public License as published by the Free Software
17 Foundation; either version 2 of the License, or (at your option) any later
18 version.
19
20 This program is distributed in the hope that it will be useful, but WITHOUT
21 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
22 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
23 details.
24
25 You should have received a copy of the GNU General Public License along with
26 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
27 Street, Fifth Floor, Boston, MA 02110-1301, USA.
28*/
29
30/*----------------------------------------------------------------------------*/
31
32/*----------------------------------------------------------------------------
33 * Local headers
34 *----------------------------------------------------------------------------*/
35
37
38/*----------------------------------------------------------------------------*/
39
41
42/*============================================================================
43 * Macro definitions
44 *============================================================================*/
45
46/*============================================================================
47 * Type definitions
48 *============================================================================*/
49
50/*============================================================================
51 * Public function prototypes
52 *============================================================================*/
53
54/*----------------------------------------------------------------------------*/
63/*----------------------------------------------------------------------------*/
64
67
68/*----------------------------------------------------------------------------*/
75/*----------------------------------------------------------------------------*/
76
77void
79
80/*----------------------------------------------------------------------------*/
87/*----------------------------------------------------------------------------*/
88
89void
91 double val);
92
93/*----------------------------------------------------------------------------*/
103/*----------------------------------------------------------------------------*/
104
105cs_xdef_t *
107 cs_time_func_t *func,
108 void *func_context);
109
110/*----------------------------------------------------------------------------*/
117/*----------------------------------------------------------------------------*/
118
119void
121
122/*----------------------------------------------------------------------------*/
131/*----------------------------------------------------------------------------*/
132
133void
135 cs_property_type_t perm_type);
136
137/*----------------------------------------------------------------------------*/
146/*----------------------------------------------------------------------------*/
147
148void
150 cs_gwf_tpf_t *tpf);
151
152/*----------------------------------------------------------------------------*/
162/*----------------------------------------------------------------------------*/
163
164void
166 const cs_cdo_quantities_t *cdoq,
167 cs_flag_t flag,
168 cs_gwf_tpf_t *tpf);
169
170/*----------------------------------------------------------------------------*/
179/*----------------------------------------------------------------------------*/
180
181void
183 const cs_cdo_quantities_t *cdoq,
184 cs_gwf_tpf_t *tpf);
185
186/*----------------------------------------------------------------------------*/
198/*----------------------------------------------------------------------------*/
199
200void
202 const cs_cdo_connect_t *connect,
203 const cs_cdo_quantities_t *cdoq,
204 const cs_time_step_t *time_step,
205 cs_flag_t option_flag,
206 cs_gwf_tpf_t *tpf);
207
208/*----------------------------------------------------------------------------*/
217/*----------------------------------------------------------------------------*/
218
219void
221 cs_gwf_tpf_t *tpf);
222
223/*----------------------------------------------------------------------------*/
237/*----------------------------------------------------------------------------*/
238
239void
241 const cs_cdo_connect_t *connect,
242 const cs_cdo_quantities_t *cdoq,
243 double time_eval,
244 cs_flag_t option_flag,
245 cs_gwf_tpf_t *tpf);
246
247/*----------------------------------------------------------------------------*/
258/*----------------------------------------------------------------------------*/
259
260void
262 const cs_cdo_quantities_t *cdoq,
263 const cs_time_step_t *ts,
264 cs_flag_t post_flag,
265 cs_gwf_tpf_t *tpf);
266
267/*----------------------------------------------------------------------------*/
282/*----------------------------------------------------------------------------*/
283
284void
285cs_gwf_tpf_extra_post(int mesh_id,
286 cs_lnum_t n_cells,
287 const cs_lnum_t cell_ids[],
288 cs_flag_t post_flag,
289 const cs_property_t *abs_perm,
290 const cs_gwf_tpf_t *tpf,
291 const cs_cdo_connect_t *connect,
292 const cs_cdo_quantities_t *cdoq,
293 const cs_time_step_t *time_step);
294
295/*----------------------------------------------------------------------------*/
296
298
299#endif /* __CS_GWF_TPF_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
#define END_C_DECLS
Definition: cs_defs.h:543
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:335
unsigned short int cs_flag_t
Definition: cs_defs.h:344
cs_gwf_model_type_t
Type of system of equation(s) to consider for the physical modelling.
Definition: cs_gwf_param.h:127
void cs_gwf_tpf_update(const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, double time_eval, cs_flag_t option_flag, cs_gwf_tpf_t *tpf)
Perform the update step in the case of a two-phase flow model in porous media (miscible or immiscible...
Definition: cs_gwf_tpf.cpp:3267
cs_xdef_t * cs_gwf_tpf_define_relax_pty_by_time_func(cs_gwf_tpf_t *tpf, cs_time_func_t *func, void *func_context)
Define the relaxation property by value and set this value.
Definition: cs_gwf_tpf.cpp:2555
void cs_gwf_tpf_finalize_setup(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, cs_flag_t flag, cs_gwf_tpf_t *tpf)
Last setup stage in the case of two-phase flows in a porous media (miscible or immiscible case)
Definition: cs_gwf_tpf.cpp:2989
void cs_gwf_tpf_free(cs_gwf_tpf_t **p_tpf)
Free the context structure associated to the modelling of two-phase flows in a porous media.
Definition: cs_gwf_tpf.cpp:2488
void cs_gwf_tpf_define_relax_pty_by_value(cs_gwf_tpf_t *tpf, double val)
Define the relaxation property by value and set this value.
Definition: cs_gwf_tpf.cpp:2528
void cs_gwf_tpf_extra_post(int mesh_id, cs_lnum_t n_cells, const cs_lnum_t cell_ids[], cs_flag_t post_flag, const cs_property_t *abs_perm, const cs_gwf_tpf_t *tpf, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, const cs_time_step_t *time_step)
Predefined post-processing output for the groundwater flow module in case of saturated two-phase flow...
Definition: cs_gwf_tpf.cpp:3457
void cs_gwf_tpf_compute(const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, const cs_time_step_t *time_step, cs_flag_t option_flag, cs_gwf_tpf_t *tpf)
Compute the new state for the groundwater flows module. Case of two-phase flows in porous media.
Definition: cs_gwf_tpf.cpp:3145
void cs_gwf_tpf_init_values(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, cs_gwf_tpf_t *tpf)
Last setup stage in the case of two-phase flows in a porous media (miscible or immiscible case)
Definition: cs_gwf_tpf.cpp:3086
void cs_gwf_tpf_init_setup(cs_flag_t post_flag, cs_gwf_tpf_t *tpf)
Initial setup stage for two-phase flows in porous media. At this stage, all soils have been defined a...
Definition: cs_gwf_tpf.cpp:2795
void cs_gwf_tpf_current_to_previous(const cs_cdo_connect_t *connect, cs_gwf_tpf_t *tpf)
Operate a "current to previous" step on fields or arrays which have at least a storage of the previou...
Definition: cs_gwf_tpf.cpp:3226
void cs_gwf_tpf_extra_op(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, const cs_time_step_t *ts, cs_flag_t post_flag, cs_gwf_tpf_t *tpf)
Predefined extra-operations for the groundwater flow module in case of miscible or immiscible two-pha...
Definition: cs_gwf_tpf.cpp:3317
void cs_gwf_tpf_init(cs_gwf_tpf_t *tpf, cs_property_type_t perm_type)
Initialize the model context according to the settings done inside the function cs_user_model() Case ...
Definition: cs_gwf_tpf.cpp:2718
void cs_gwf_tpf_log_setup(cs_gwf_tpf_t *tpf)
Log the setup related to the model context of two-phase flows. Common to the different sub-models rel...
Definition: cs_gwf_tpf.cpp:2585
cs_gwf_tpf_t * cs_gwf_tpf_create(cs_gwf_model_type_t model)
Allocate and initialize the model context structure for two-phase flows in a porous media.
Definition: cs_gwf_tpf.cpp:2352
void() cs_time_func_t(double time, void *input, cs_real_t *retval)
Function which defines the evolution of a quantity according to the current time and any structure gi...
Definition: cs_param_types.h:172
cs_flag_t cs_property_type_t
Definition: cs_property.h:123
Definition: mesh.f90:26
Definition: cs_cdo_connect.h:61
Definition: cs_cdo_quantities.h:139
Structure to handle the modelling of miscible or immiscible two-phase flows in a porous media.
Definition: cs_gwf_hydraulic_model.h:310
Definition: cs_mesh.h:85
Structure associated to the definition of a property relying on the cs_xdef_t structure.
time step descriptor
Definition: cs_time_step.h:64
Structure storing medata for defining a quantity in a very flexible way.
Definition: cs_xdef.h:160