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-2015 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_tracking.h"
36 
37 /*----------------------------------------------------------------------------*/
38 
40 
41 /*============================================================================
42  * Type definitions
43  *============================================================================*/
44 
45 typedef struct {
46 
56 
64 
66 
67 /*============================================================================
68  * Public function definitions for Fortran API
69  *============================================================================*/
70 
71 /*----------------------------------------------------------------------------
72  * Clogging initialization.
73  *
74  * - Retrieve various parameters for storing in global structure.
75  * - Compute and store the Debye screening length
76  *----------------------------------------------------------------------------*/
77 
78 void
79 CS_PROCF (cloginit, CLOGINIT)(const cs_real_t *faraday_cst,
80  const cs_real_t *free_space_permit,
81  const cs_real_t *water_permit,
82  const cs_real_t *ionic_strength,
83  const cs_real_t *jamming_limit,
84  const cs_real_t *min_porosity,
85  const cs_real_t temperature[],
86  const cs_real_t *valen,
87  const cs_real_t *phi_p,
88  const cs_real_t *phi_s,
89  const cs_real_t *cstham,
90  const cs_real_t *csthpp,
91  const cs_real_t *dcutof,
92  const cs_real_t *lambwl,
93  const cs_real_t *kboltz
94 );
95 
96 /*============================================================================
97  * Public function definitions
98  *============================================================================*/
99 
100 /*----------------------------------------------------------------------------
101  * Clogging finalization.
102  *
103  * Deallocate the arrays storing temperature and Debye length.
104  *----------------------------------------------------------------------------*/
105 
106 void
108 
109 /*----------------------------------------------------------------------------
110  * Clogging:
111  *
112  * - Compute the number of deposited particles in contact with the depositing
113  * particle
114  * - Re-compute the energy barrier if this number is greater than zero
115  *
116  * parameters:
117  * particle <-- pointer to particle data
118  * attr_map <-- pointer to attribute map
119  * face_id <-- id of face neighboring particle
120  * face_area <-- area of face
121  * energy_barrier <-> energy barrier
122  * surface_coverage <-> surface coverage
123  * limit <-> jamming limit
124  * mporos <-> minimum porosity
125  *
126  * returns:
127  * number of deposited particles in contact with the depositing particle
128  *----------------------------------------------------------------------------*/
129 
130 int
131 cs_lagr_clogging_barrier(const void *particle,
132  const cs_lagr_attribute_map_t *attr_map,
133  cs_lnum_t face_id,
134  cs_real_t *energy_barrier,
135  cs_real_t *surface_coverage,
136  cs_real_t *limit,
137  cs_real_t *mporos);
138 
139 /*----------------------------------------------------------------------------*/
140 
142 
143 #endif /* __CS_LAGR_CLOGGING_H__ */
144 
void cs_lagr_clogging_finalize(void)
Definition: cs_lagr_clogging.c:191
cs_real_t min_porosity
Definition: cs_lagr_clogging.h:52
cs_real_t kboltz
Definition: cs_lagr_clogging.h:63
double precision kboltz
Boltzmann constant (J/K)
Definition: lagran.f90:1076
double precision, save cstham
Hamaker constant for the particle/fluid/substrate system.
Definition: lagran.f90:1050
cs_real_t valen
Definition: cs_lagr_clogging.h:53
double precision, save csthpp
Definition: lagran.f90:357
#define BEGIN_C_DECLS
Definition: cs_defs.h:429
cs_real_t free_space_permit
Definition: cs_lagr_clogging.h:48
cs_real_t jamming_limit
Definition: cs_lagr_clogging.h:51
double precision, save valen
Valency of ions in the solution (used for EDL forces)
Definition: lagran.f90:1062
double precision, save phi_p
Electrokinetic potential of the first solid - particle.
Definition: lagran.f90:1056
cs_real_t lambwl
Definition: cs_lagr_clogging.h:62
void cloginit(const cs_real_t *faraday_cst, const cs_real_t *free_space_permit, 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 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 *dcutof, const cs_real_t *lambwl, const cs_real_t *kboltz)
Definition: cs_lagr_clogging.c:102
int cs_lagr_clogging_barrier(const void *particle, const cs_lagr_attribute_map_t *attr_map, cs_lnum_t face_id, cs_real_t *energy_barrier, cs_real_t *surface_coverage, cs_real_t *limit, cs_real_t *mporos)
Definition: cs_lagr_clogging.c:218
cs_real_t ionic_strength
Definition: cs_lagr_clogging.h:50
cs_real_t phi_s
Definition: cs_lagr_clogging.h:55
cs_real_t water_permit
Definition: cs_lagr_clogging.h:49
double precision lambwl
Characteristic retardation wavelength (m) for Hamaker constant.
Definition: lagran.f90:1084
cs_real_t cstham
Definition: cs_lagr_clogging.h:59
double precision, save mporos
Definition: lagran.f90:356
Definition: cs_lagr_clogging.h:45
cs_real_t csthpp
Definition: cs_lagr_clogging.h:60
double precision, save phi_s
Electrokinetic potential of the second solid - surface.
Definition: lagran.f90:1059
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:292
#define END_C_DECLS
Definition: cs_defs.h:430
cs_real_t dcutof
Definition: cs_lagr_clogging.h:61
double cs_real_t
Definition: cs_defs.h:296
double precision dcutof
Cut-off distance for adhesion forces (assumed to be the Born distance) (m)
Definition: lagran.f90:1080
#define CS_PROCF(x, y)
Definition: cs_defs.h:453
cs_real_t * temperature
Definition: cs_lagr_clogging.h:57
cs_real_t * debye_length
Definition: cs_lagr_clogging.h:58
Definition: cs_lagr_tracking.h:132
cs_real_t phi_p
Definition: cs_lagr_clogging.h:54
cs_real_t faraday_cst
Definition: cs_lagr_clogging.h:47