My Project
programmer's documentation
cs_lagr_dlvo.h
Go to the documentation of this file.
1 #ifndef __CS_LAGR_DLVO_H__
2 #define __CS_LAGR_DLVO_H__
3 
4 /*============================================================================
5  * Functions and types for the 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 
36 #include "cs_lagr_particle.h"
37 
38 /*----------------------------------------------------------------------------*/
39 
41 
42 /*============================================================================
43  * Type definitions
44  *============================================================================*/
45 
46 typedef struct {
47 
58 
60 
61 /*=============================================================================
62  * Function definitions
63  *============================================================================*/
64 
65 /*----------------------------------------------------------------------------
66  * DLVO initialization
67  *----------------------------------------------------------------------------*/
68 
69 void
70 cs_lagr_dlvo_init(const cs_real_t water_permit,
71  const cs_real_t ionic_strength,
72  const cs_real_t temperature[],
73  const cs_real_t valen,
74  const cs_real_t phi_p,
75  const cs_real_t phi_s,
76  const cs_real_t cstham,
77  const cs_real_t csthpp,
78  const cs_real_t lambda_vdw);
79 
80 /*----------------------------------------------------------------------------
81  * Deallocate the arrays storing temperature and Debye length.
82  *----------------------------------------------------------------------------*/
83 
84 void
86 
87 /*----------------------------------------------------------------------------
88  * Compute the energy barrier for a smooth wall.
89  *----------------------------------------------------------------------------*/
90 
91 void
92 cs_lagr_barrier(const void *particle,
93  const cs_lagr_attribute_map_t *attr_map,
94  cs_lnum_t iel,
95  cs_real_t *energy_barrier);
96 
97 /*----------------------------------------------------------------------------
98  * Compute the energy barrier for two spheres.
99  *----------------------------------------------------------------------------*/
100 
101 void
103  cs_lnum_t iel,
104  cs_real_t *energy_barrier);
105 
106 /*----------------------------------------------------------------------------
107  * Van der Waals interaction between a sphere and a plane
108  * using formulas from Czarnecki (large distances)
109  * and Gregory (small distances)
110  *----------------------------------------------------------------------------*/
111 
112 cs_real_t
114  cs_real_t rpart,
115  cs_real_t lambda_vdw,
116  cs_real_t cstham);
117 
118 /*----------------------------------------------------------------------------
119  * Calculation of the Van der Waals interaction between two spheres
120  * following the formula from Gregory (1981a)
121  *----------------------------------------------------------------------------*/
122 
123 cs_real_t
125  cs_real_t rpart1,
126  cs_real_t rpart2,
127  cs_real_t lambda_vdw,
128  cs_real_t cstham);
129 
130 /*----------------------------------------------------------------------------
131  * Electric Double Layer (EDL) interaction between a sphere and a plane
132  * using the formula from Bell & al (1970)
133  * based on the McCartney & Levine method
134  *----------------------------------------------------------------------------*/
135 
136 cs_real_t
138  cs_real_t rpart,
139  cs_real_t valen,
140  cs_real_t phi1,
141  cs_real_t phi2,
142  cs_real_t temp,
143  cs_real_t debye_length,
144  cs_real_t water_permit);
145 
146 /*----------------------------------------------------------------------------
147  * Calculation of the EDL interaction between two spheres
148  * using the formula from Bell & al (1970)
149  * based on the McCartney & Levine method
150  *----------------------------------------------------------------------------*/
151 
152 cs_real_t
154  cs_real_t rpart1,
155  cs_real_t rpart2,
156  cs_real_t valen,
157  cs_real_t phi1,
158  cs_real_t phi2,
159  cs_real_t temp,
160  cs_real_t debye_length,
161  cs_real_t water_permit);
162 
163 /*----------------------------------------------------------------------------*/
164 
166 
167 #endif /* __CS_LAGR_DLVO_H__ */
168 
cs_lagr_attribute_map_t
Definition: cs_lagr_particle.h:176
cs_lagr_dlvo_param_t::water_permit
cs_real_t water_permit
Definition: cs_lagr_dlvo.h:48
cs_defs.h
cs_lagr_barrier
void cs_lagr_barrier(const void *particle, const cs_lagr_attribute_map_t *attr_map, cs_lnum_t iel, cs_real_t *energy_barrier)
Definition: cs_lagr_dlvo.c:201
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:468
cs_lagr_dlvo_param_t::csthpp
cs_real_t csthpp
Definition: cs_lagr_dlvo.h:56
cs_lagr_dlvo_init
void cs_lagr_dlvo_init(const cs_real_t water_permit, const cs_real_t ionic_strength, 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_dlvo.c:119
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_barrier_pp
void cs_lagr_barrier_pp(cs_real_t dpart, cs_lnum_t iel, cs_real_t *energy_barrier)
Definition: cs_lagr_dlvo.c:257
cs_lagr_dlvo_param_t::lambda_vdw
cs_real_t lambda_vdw
Definition: cs_lagr_dlvo.h:57
cs_lagr_dlvo_param_t::ionic_strength
cs_real_t ionic_strength
Definition: cs_lagr_dlvo.h:49
cs_lagr_particle.h
temp
void cs_real_t cs_real_t cs_real_t * temp
Definition: cs_elec_model.h:142
cs_lagr_dlvo_param_t::phi_p
cs_real_t phi_p
Definition: cs_lagr_dlvo.h:50
cs_lagr_dlvo_param_t::debye_length
cs_real_t * debye_length
Definition: cs_lagr_dlvo.h:54
cs_lagr_dlvo_param_t::temperature
cs_real_t * temperature
Definition: cs_lagr_dlvo.h:52
cs_lnum_t
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
cs_lagr_van_der_waals_sphere_plane
cs_real_t cs_lagr_van_der_waals_sphere_plane(cs_real_t distp, cs_real_t rpart, cs_real_t lambda_vdw, cs_real_t cstham)
Definition: cs_lagr_dlvo.c:311
cs_lagr_dlvo_param_t
Definition: cs_lagr_dlvo.h:46
cs_lagr_edl_sphere_sphere
cs_real_t cs_lagr_edl_sphere_sphere(cs_real_t distcc, cs_real_t rpart1, cs_real_t rpart2, cs_real_t valen, cs_real_t phi1, cs_real_t phi2, cs_real_t temp, cs_real_t debye_length, cs_real_t water_permit)
Definition: cs_lagr_dlvo.c:411
cs_lagr_dlvo_param_t::phi_s
cs_real_t phi_s
Definition: cs_lagr_dlvo.h:51
cs_lagr_edl_sphere_plane
cs_real_t cs_lagr_edl_sphere_plane(cs_real_t distp, cs_real_t rpart, cs_real_t valen, cs_real_t phi1, cs_real_t phi2, cs_real_t temp, cs_real_t debye_length, cs_real_t water_permit)
Definition: cs_lagr_dlvo.c:364
cs_lagr_dlvo_param_t::valen
cs_real_t valen
Definition: cs_lagr_dlvo.h:53
cs_lagr_dlvo_param_t::cstham
cs_real_t cstham
Definition: cs_lagr_dlvo.h:55
cs_lagr_van_der_waals_sphere_sphere
cs_real_t cs_lagr_van_der_waals_sphere_sphere(cs_real_t distcc, cs_real_t rpart1, cs_real_t rpart2, cs_real_t lambda_vdw, cs_real_t cstham)
Definition: cs_lagr_dlvo.c:344
cs_lagr_dlvo_finalize
void cs_lagr_dlvo_finalize(void)
Definition: cs_lagr_dlvo.c:190