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-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 
36 #include "cs_lagr_tracking.h"
37 
38 /*----------------------------------------------------------------------------*/
39 
41 
42 /*============================================================================
43  * Type definitions
44  *============================================================================*/
45 
46 typedef struct {
47 
61 
63 
64 
65 /*=============================================================================
66  * Function definitions
67  *============================================================================*/
68 
69 /*----------------------------------------------------------------------------
70  * DLVO initialization
71  *----------------------------------------------------------------------------*/
72 void
73 CS_PROCF (dlvo_init, DLVO_INIT)(const cs_real_t *faraday_cst,
74  const cs_real_t *free_space_permit,
75  const cs_real_t *water_permit,
76  const cs_real_t *ionic_strength,
77  const cs_real_t temperature[],
78  const cs_real_t *valen,
79  const cs_real_t *phi_p,
80  const cs_real_t *phi_s,
81  const cs_real_t *cstham,
82  const cs_real_t *dcutof,
83  const cs_real_t *lambwl,
84  const cs_real_t *kboltz
85  );
86 
87 
88 /*----------------------------------------------------------------------------
89  * Deallocate the arrays storing temperature and Debye length.
90  *----------------------------------------------------------------------------*/
91 
92 void
94 
95 /*----------------------------------------------------------------------------
96  * Compute the energy barrier for a smooth wall.
97  *----------------------------------------------------------------------------*/
98 
99 void
100 cs_lagr_barrier(const void *particle,
101  const cs_lagr_attribute_map_t *attr_map,
102  cs_lnum_t face_id,
103  cs_real_t *energy_barrier);
104 
105 /*----------------------------------------------------------------------------
106  * Van der Waals interaction between a sphere and a plane
107  * using formulas from Czarnecki (large distances)
108  * and Gregory (small distances)
109  *----------------------------------------------------------------------------*/
110 
111 cs_real_t
113  cs_real_t rpart,
115  cs_real_t cstham);
116 
117 /*----------------------------------------------------------------------------
118  * Calculation of the Van der Waals interaction between two spheres
119  * following the formula from Gregory (1981a)
120  *----------------------------------------------------------------------------*/
121 
122 cs_real_t
124  cs_real_t rpart1,
125  cs_real_t rpart2,
127  cs_real_t cstham);
128 
129 /*----------------------------------------------------------------------------
130  * Electric Double Layer (EDL) interaction between a sphere and a plane
131  * using the formula from Bell & al (1970)
132  * based on the McCartney & Levine method
133  *----------------------------------------------------------------------------*/
134 
135 cs_real_t
137  cs_real_t rpart,
139  cs_real_t phi1,
140  cs_real_t phi2,
142  cs_real_t temp,
143  cs_real_t debye_length,
144  cs_real_t free_space_permit,
145  cs_real_t water_permit);
146 
147 /*----------------------------------------------------------------------------
148  * Calculation of the EDL interaction between two spheres
149  * using the formula from Bell & al (1970)
150  * based on the McCartney & Levine method
151  *----------------------------------------------------------------------------*/
152 
153 cs_real_t
155  cs_real_t rpart1,
156  cs_real_t rpart2,
158  cs_real_t phi1,
159  cs_real_t phi2,
161  cs_real_t temp,
162  cs_real_t debye_length,
163  cs_real_t free_space_permit,
164  cs_real_t water_permit);
165 
166 /*----------------------------------------------------------------------------*/
167 
169 
170 #endif /* __CS_LAGR_DLVO_H__ */
171 
cs_real_t lambwl
Definition: cs_lagr_dlvo.h:59
void dlvo_init(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 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 *dcutof, const cs_real_t *lambwl, const cs_real_t *kboltz)
Definition: cs_lagr_dlvo.c:106
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_dlvo.h:55
cs_real_t ionic_strength
Definition: cs_lagr_dlvo.h:51
cs_real_t faraday_cst
Definition: cs_lagr_dlvo.h:48
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 kboltz, cs_real_t temp, cs_real_t debye_length, cs_real_t free_space_permit, cs_real_t water_permit)
Definition: cs_lagr_dlvo.c:309
void cs_lagr_dlvo_finalize(void)
Definition: cs_lagr_dlvo.c:185
#define BEGIN_C_DECLS
Definition: cs_defs.h:429
cs_real_t phi_s
Definition: cs_lagr_dlvo.h:53
cs_real_t phi_p
Definition: cs_lagr_dlvo.h:52
cs_real_t * temperature
Definition: cs_lagr_dlvo.h:54
cs_real_t water_permit
Definition: cs_lagr_dlvo.h:50
cs_real_t dcutof
Definition: cs_lagr_dlvo.h:58
Definition: cs_lagr_dlvo.h:46
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 * debye_length
Definition: cs_lagr_dlvo.h:56
cs_real_t cstham
Definition: cs_lagr_dlvo.h:57
double precision lambwl
Characteristic retardation wavelength (m) for Hamaker constant.
Definition: lagran.f90:1084
cs_real_t cs_lagr_van_der_waals_sphere_plane(cs_real_t distp, cs_real_t rpart, cs_real_t lambwl, cs_real_t cstham)
Definition: cs_lagr_dlvo.c:256
double precision, save phi_s
Electrokinetic potential of the second solid - surface.
Definition: lagran.f90:1059
cs_real_t free_space_permit
Definition: cs_lagr_dlvo.h:49
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:292
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 kboltz, cs_real_t temp, cs_real_t debye_length, cs_real_t free_space_permit, cs_real_t water_permit)
Definition: cs_lagr_dlvo.c:358
#define END_C_DECLS
Definition: cs_defs.h:430
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
void cs_lagr_barrier(const void *particle, const cs_lagr_attribute_map_t *attr_map, cs_lnum_t face_id, cs_real_t *energy_barrier)
Definition: cs_lagr_dlvo.c:196
cs_real_t kboltz
Definition: cs_lagr_dlvo.h:60
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 lambwl, cs_real_t cstham)
Definition: cs_lagr_dlvo.c:289
Definition: cs_lagr_tracking.h:132