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-2016 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 
57 
59 
60 /*=============================================================================
61  * Function definitions
62  *============================================================================*/
63 
64 /*----------------------------------------------------------------------------
65  * DLVO initialization
66  *----------------------------------------------------------------------------*/
67 
68 void
69 cs_lagr_dlvo_init(const cs_real_t water_permit,
70  const cs_real_t ionic_strength,
71  const cs_real_t temperature[],
72  const cs_real_t valen,
73  const cs_real_t phi_p,
74  const cs_real_t phi_s,
75  const cs_real_t cstham,
76  const cs_real_t lambda_vdw);
77 
78 /*----------------------------------------------------------------------------
79  * Deallocate the arrays storing temperature and Debye length.
80  *----------------------------------------------------------------------------*/
81 
82 void
84 
85 /*----------------------------------------------------------------------------
86  * Compute the energy barrier for a smooth wall.
87  *----------------------------------------------------------------------------*/
88 
89 void
90 cs_lagr_barrier(const void *particle,
91  const cs_lagr_attribute_map_t *attr_map,
92  cs_lnum_t iel,
93  cs_real_t *energy_barrier);
94 
95 /*----------------------------------------------------------------------------
96  * Van der Waals interaction between a sphere and a plane
97  * using formulas from Czarnecki (large distances)
98  * and Gregory (small distances)
99  *----------------------------------------------------------------------------*/
100 
101 cs_real_t
103  cs_real_t rpart,
104  cs_real_t lambda_vdw,
105  cs_real_t cstham);
106 
107 /*----------------------------------------------------------------------------
108  * Calculation of the Van der Waals interaction between two spheres
109  * following the formula from Gregory (1981a)
110  *----------------------------------------------------------------------------*/
111 
112 cs_real_t
114  cs_real_t rpart1,
115  cs_real_t rpart2,
116  cs_real_t lambda_vdw,
117  cs_real_t cstham);
118 
119 /*----------------------------------------------------------------------------
120  * Electric Double Layer (EDL) interaction between a sphere and a plane
121  * using the formula from Bell & al (1970)
122  * based on the McCartney & Levine method
123  *----------------------------------------------------------------------------*/
124 
125 cs_real_t
127  cs_real_t rpart,
128  cs_real_t valen,
129  cs_real_t phi1,
130  cs_real_t phi2,
131  cs_real_t temp,
132  cs_real_t debye_length,
133  cs_real_t water_permit);
134 
135 /*----------------------------------------------------------------------------
136  * Calculation of the EDL interaction between two spheres
137  * using the formula from Bell & al (1970)
138  * based on the McCartney & Levine method
139  *----------------------------------------------------------------------------*/
140 
141 cs_real_t
143  cs_real_t rpart1,
144  cs_real_t rpart2,
145  cs_real_t valen,
146  cs_real_t phi1,
147  cs_real_t phi2,
148  cs_real_t temp,
149  cs_real_t debye_length,
150  cs_real_t water_permit);
151 
152 /*----------------------------------------------------------------------------*/
153 
155 
156 #endif /* __CS_LAGR_DLVO_H__ */
157 
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:258
cs_real_t valen
Definition: cs_lagr_dlvo.h:53
cs_real_t ionic_strength
Definition: cs_lagr_dlvo.h:49
void cs_lagr_dlvo_finalize(void)
Definition: cs_lagr_dlvo.c:189
#define BEGIN_C_DECLS
Definition: cs_defs.h:448
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:358
cs_real_t phi_s
Definition: cs_lagr_dlvo.h:51
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:311
cs_real_t phi_p
Definition: cs_lagr_dlvo.h:50
cs_real_t * temperature
Definition: cs_lagr_dlvo.h:52
cs_real_t water_permit
Definition: cs_lagr_dlvo.h:48
Definition: cs_lagr_dlvo.h:46
double cs_real_t
Floating-point value.
Definition: cs_defs.h:296
cs_real_t * debye_length
Definition: cs_lagr_dlvo.h:54
cs_real_t cstham
Definition: cs_lagr_dlvo.h:55
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:200
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:292
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 lambda_vdw)
Definition: cs_lagr_dlvo.c:120
#define END_C_DECLS
Definition: cs_defs.h:449
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:291
cs_real_t lambda_vdw
Definition: cs_lagr_dlvo.h:56
Definition: cs_lagr_particle.h:138