My Project
programmer's documentation
cs_lagr_clogging.h
Go to the documentation of this file.
1 #ifndef __CS_LAGR_CLOGGING_H__
2 #define __CS_LAGR_CLOGGING_H__
3 
4 /*============================================================================
5  * Clogging modeling.
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_defs.h"
35 #include "cs_lagr_particle.h"
36 
37 /*----------------------------------------------------------------------------*/
38 
40 
41 /*============================================================================
42  * Type definitions
43  *============================================================================*/
44 
45 typedef struct {
46 
55 
61 
63 
64 /*============================================================================
65  * Public function definitions
66  *============================================================================*/
67 
68 /*----------------------------------------------------------------------------
69  * Clogging initialization.
70  *
71  * - Retrieve various parameters for storing in global structure.
72  * - Compute and store the Debye screening length
73  *----------------------------------------------------------------------------*/
74 
75 void
76 cloginit(const cs_real_t *water_permit,
77  const cs_real_t *ionic_strength,
78  const cs_real_t *jamming_limit,
79  const cs_real_t *min_porosity,
80  const cs_real_t *diam_mean,
81  const cs_real_t temperature[],
82  const cs_real_t *valen,
83  const cs_real_t *phi_p,
84  const cs_real_t *phi_s,
85  const cs_real_t *cstham,
86  const cs_real_t *csthpp,
87  const cs_real_t *lambda_vdw
88  );
89 
90 /*----------------------------------------------------------------------------
91  * Clogging finalization.
92  *
93  * Deallocate the arrays storing temperature and Debye length.
94  *----------------------------------------------------------------------------*/
95 
96 void
98 
99 /*----------------------------------------------------------------------------
100  * Clogging:
101  *
102  * - Compute the number of deposited particles in contact with the depositing
103  * particle
104  * - Re-compute the energy barrier if this number is greater than zero
105  *
106  * parameters:
107  * particle <-- pointer to particle data
108  * attr_map <-- pointer to attribute map
109  * iel <-- id of cell where the particle is
110  * face_area <-- area of face
111  * energy_barrier <-> energy barrier
112  * surface_coverage <-> surface coverage
113  * limit <-> jamming limit
114  * mporos <-> minimum porosity
115  *
116  * returns:
117  * number of deposited particles in contact with the depositing particle
118  *----------------------------------------------------------------------------*/
119 
120 int
121 cs_lagr_clogging_barrier(const void *particle,
122  const cs_lagr_attribute_map_t *attr_map,
123  cs_lnum_t iel,
124  cs_real_t *energy_barrier,
125  cs_real_t *surface_coverage,
126  cs_real_t *limit,
127  cs_real_t *mporos);
128 
129 /*----------------------------------------------------------------------------*/
130 
132 
133 #endif /* __CS_LAGR_CLOGGING_H__ */
134 
cs_lagr_clogging_param_t::diam_mean
cs_real_t diam_mean
Definition: cs_lagr_clogging.h:51
cs_lagr_attribute_map_t
Definition: cs_lagr_particle.h:176
cs_lagr_clogging_finalize
void cs_lagr_clogging_finalize(void)
Definition: cs_lagr_clogging.c:194
cs_defs.h
cs_lagr_clogging_barrier
int cs_lagr_clogging_barrier(const void *particle, const cs_lagr_attribute_map_t *attr_map, cs_lnum_t iel, cs_real_t *energy_barrier, cs_real_t *surface_coverage, cs_real_t *limit, cs_real_t *mporos)
Definition: cs_lagr_clogging.c:221
cs_lagr_clogging_param_t::temperature
cs_real_t * temperature
Definition: cs_lagr_clogging.h:56
cs_lagr_clogging_param_t::debye_length
cs_real_t * debye_length
Definition: cs_lagr_clogging.h:57
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:468
cs_lagr_clogging_param_t::ionic_strength
cs_real_t ionic_strength
Definition: cs_lagr_clogging.h:48
cs_lagr_clogging_param_t::phi_s
cs_real_t phi_s
Definition: cs_lagr_clogging.h:54
cs_real_t
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
cs_lagr_clogging_param_t::cstham
cs_real_t cstham
Definition: cs_lagr_clogging.h:58
cs_lagr_clogging_param_t::water_permit
cs_real_t water_permit
Definition: cs_lagr_clogging.h:47
cs_lagr_clogging_param_t::jamming_limit
cs_real_t jamming_limit
Definition: cs_lagr_clogging.h:49
cs_lagr_particle.h
cloginit
void cloginit(const cs_real_t *water_permit, const cs_real_t *ionic_strength, const cs_real_t *jamming_limit, const cs_real_t *min_porosity, const cs_real_t *diam_mean, const cs_real_t temperature[], const cs_real_t *valen, const cs_real_t *phi_p, const cs_real_t *phi_s, const cs_real_t *cstham, const cs_real_t *csthpp, const cs_real_t *lambda_vdw)
Definition: cs_lagr_clogging.c:113
cs_lnum_t
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
cs_lagr_clogging_param_t
Definition: cs_lagr_clogging.h:45
cs_lagr_clogging_param_t::phi_p
cs_real_t phi_p
Definition: cs_lagr_clogging.h:53
cs_lagr_clogging_param_t::min_porosity
cs_real_t min_porosity
Definition: cs_lagr_clogging.h:50
cs_lagr_clogging_param_t::csthpp
cs_real_t csthpp
Definition: cs_lagr_clogging.h:59
cs_lagr_clogging_param_t::valen
cs_real_t valen
Definition: cs_lagr_clogging.h:52
cs_lagr_clogging_param_t::lambda_vdw
cs_real_t lambda_vdw
Definition: cs_lagr_clogging.h:60