8.0
general documentation
Loading...
Searching...
No Matches
cs_gwf_physical_properties.h
Go to the documentation of this file.
1#ifndef __CS_GWF_PHYSICAL_PROPERTIES_H__
2#define __CS_GWF_PHYSICAL_PROPERTIES_H__
3
4/*============================================================================
5 * Physical properties management for groundwater flow module.
6 *============================================================================*/
7
8/*
9 This file is part of code_saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2023 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 * Standard C library headers
32 *----------------------------------------------------------------------------*/
33
34#include <stdarg.h>
35
36/*----------------------------------------------------------------------------
37 * Local headers
38 *----------------------------------------------------------------------------*/
39
40#include "cs_defs.h"
41#include "cs_gwf_parameters.h"
42
43/*----------------------------------------------------------------------------*/
44
46
47/*=============================================================================
48 * Public function prototypes
49 *============================================================================*/
50
51/*----------------------------------------------------------------------------
52 * Update delay of all transported species (user scalars)
53 *
54 * Species transport is delayed by retention in solid phase. This delay is
55 * computed as follows:
56 * R = 1 + rho K_d/theta
57 * where R is the delay factor, rho the soil density,
58 * K_d the contaminant distribution coefficient and theta the moisture content
59 * (saturation).
60 *---------------------------------------------------------------------------*/
61
62void
64
65/*----------------------------------------------------------------------------
66 * Add first-order decay to implicit part of source term array
67 *
68 * Corresponding EDO for decay phenomenon is:
69 * dc/dt = -decay_rate * c
70 *
71 * parameters:
72 * f_id --> field index of scalar on which decay is set
73 * ts_imp <-> implicit part of the source term
74 *----------------------------------------------------------------------------*/
75
76void
77cs_gwf_decay_rate(const int f_id,
78 cs_real_t *ts_imp);
79
80/*----------------------------------------------------------------------------
81 * Update sorbed concentration for scalars with kinetic sorption.
82 *
83 * It is estimated by the following analytical expression :
84 * S^{n+1} = S^n exp(- (k^{-} + decay_rate) * dt)
85 * - C^n * k^{+}/(k^{-} + decay_rate)
86 * (exp(- (k^{-} + decay_rate) * dt) - 1)
87 *
88 * parameters:
89 * f_id --> field index of scalar which properties are updated
90 *----------------------------------------------------------------------------*/
91
92void
94
95/*----------------------------------------------------------------------------
96 * Clip liquid concentration to solubility index.
97 *
98 * parameters:
99 * f_id --> field index of scalar which properties are updated
100 *----------------------------------------------------------------------------*/
101
102void
103cs_gwf_precipitation(const int f_id);
104
105/*----------------------------------------------------------------------------
106 * Take into account kinetic chemical reaction in evolution equation
107 * of total liquid concentration.
108 *
109 * parameters:
110 * f_id --> field index of scalar which properties are updated
111 * ts_imp <-> implicit part of the source term
112 * ts_exp <-> explicit part of the source term
113 *----------------------------------------------------------------------------*/
114
115void
116cs_gwf_kinetic_reaction(const int f_id,
117 cs_real_t *ts_imp,
118 cs_real_t *ts_exp);
119
120/*----------------------------------------------------------------------------*/
121
123
124#endif /* __CS_GWF_PHYSICAL_PROPERTIES_H__ */
#define BEGIN_C_DECLS
Definition cs_defs.h:509
double cs_real_t
Floating-point value.
Definition cs_defs.h:319
#define END_C_DECLS
Definition cs_defs.h:510
void cs_gwf_precipitation(const int f_id)
Update liquid concentration according to precipitation phenomenon.
Definition cs_gwf_physical_properties.c:230
void cs_gwf_delay_update(void)
Update delay of all transported species (user scalars)
Definition cs_gwf_physical_properties.c:92
void cs_gwf_kinetic_reaction(const int f_id, cs_real_t *ts_imp, cs_real_t *ts_exp)
Take into account kinetic chemical reaction in evolution equation of total liquid concentration.
Definition cs_gwf_physical_properties.c:280
void cs_gwf_decay_rate(const int f_id, cs_real_t *ts_imp)
Add first-order decay to implicit part of source term array.
Definition cs_gwf_physical_properties.c:138
void cs_gwf_sorbed_concentration_update(const int f_id)
Update sorbed concentration for scalars with kinetic sorption.
Definition cs_gwf_physical_properties.c:169