9.2
general 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-2026 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 "base/cs_defs.h"
35
37
38/*============================================================================
39 * Type definitions
40 *============================================================================*/
41
42typedef struct {
43
54
56
57/*=============================================================================
58 * Function definitions
59 *============================================================================*/
60
61/*----------------------------------------------------------------------------
62 * DLVO initialization
63 *----------------------------------------------------------------------------*/
64
65void
66cs_lagr_dlvo_init(const cs_real_t water_permit,
67 const cs_real_t ionic_strength,
68 const cs_real_t temperature[],
69 const cs_real_t valen,
70 const cs_real_t phi_p,
71 const cs_real_t phi_s,
72 const cs_real_t cstham,
73 const cs_real_t csthpp,
74 const cs_real_t lambda_vdw);
75
76/*----------------------------------------------------------------------------
77 * Deallocate the arrays storing temperature and Debye length.
78 *----------------------------------------------------------------------------*/
79
80void
82
83/*----------------------------------------------------------------------------
84 * Compute the energy barrier for two spheres.
85 *----------------------------------------------------------------------------*/
86
87void
89 cs_lnum_t iel,
90 cs_real_t *energy_barrier);
91
92/*----------------------------------------------------------------------------
93 * Van der Waals interaction between a sphere and a plane
94 * using formulas from Czarnecki (large distances)
95 * and Gregory (small distances)
96 *----------------------------------------------------------------------------*/
97
100 cs_real_t rpart,
101 cs_real_t lambda_vdw,
102 cs_real_t cstham);
103
104/*----------------------------------------------------------------------------
105 * Calculation of the Van der Waals interaction between two spheres
106 * following the formula from Gregory (1981a)
107 *----------------------------------------------------------------------------*/
108
111 cs_real_t rpart1,
112 cs_real_t rpart2,
113 cs_real_t lambda_vdw,
114 cs_real_t cstham);
115
116/*----------------------------------------------------------------------------
117 * Electric Double Layer (EDL) interaction between a sphere and a plane
118 * using the formula from Bell & al (1970)
119 * based on the McCartney & Levine method
120 *----------------------------------------------------------------------------*/
121
124 cs_real_t rpart,
125 cs_real_t valen,
126 cs_real_t phi1,
127 cs_real_t phi2,
128 cs_real_t temp,
129 cs_real_t debye_length,
130 cs_real_t water_permit);
131
132/*----------------------------------------------------------------------------
133 * Calculation of the EDL interaction between two spheres
134 * using the formula from Bell & al (1970)
135 * based on the McCartney & Levine method
136 *----------------------------------------------------------------------------*/
137
140 cs_real_t rpart1,
141 cs_real_t rpart2,
142 cs_real_t valen,
143 cs_real_t phi1,
144 cs_real_t phi2,
145 cs_real_t temp,
146 cs_real_t debye_length,
147 cs_real_t water_permit);
148
149/*=============================================================================
150 * C++ Function definitions
151 *============================================================================*/
152
153#if defined(__cplusplus)
154
155/*----------------------------------------------------------------------------
156 * Compute the energy barrier for a smooth wall.
157 *----------------------------------------------------------------------------*/
158
159void
161 cs_lnum_t p_id,
162 cs_lnum_t iel,
163 cs_real_t *energy_barrier);
164
165#endif /* __cplusplus */
166
167/*----------------------------------------------------------------------------*/
168
169#endif /* CS_LAGR_DLVO_H */
170
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:325
void cs_lagr_barrier(cs_lagr_particle_set_t &p_set, cs_lnum_t p_id, cs_lnum_t iel, cs_real_t *energy_barrier)
Definition: cs_lagr_dlvo.cpp:199
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.cpp:342
void cs_lagr_dlvo_finalize(void)
Definition: cs_lagr_dlvo.cpp:184
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.cpp:309
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.cpp:409
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.cpp:362
void cs_lagr_barrier_pp(cs_real_t dpart, cs_lnum_t iel, cs_real_t *energy_barrier)
Definition: cs_lagr_dlvo.cpp:255
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.cpp:113
Definition: cs_lagr_dlvo.h:42
cs_real_t ionic_strength
Definition: cs_lagr_dlvo.h:45
cs_real_t cstham
Definition: cs_lagr_dlvo.h:51
cs_real_t * temperature
Definition: cs_lagr_dlvo.h:48
cs_real_t * debye_length
Definition: cs_lagr_dlvo.h:50
cs_real_t phi_s
Definition: cs_lagr_dlvo.h:47
cs_real_t lambda_vdw
Definition: cs_lagr_dlvo.h:53
cs_real_t water_permit
Definition: cs_lagr_dlvo.h:44
cs_real_t csthpp
Definition: cs_lagr_dlvo.h:52
cs_real_t phi_p
Definition: cs_lagr_dlvo.h:46
cs_real_t valen
Definition: cs_lagr_dlvo.h:49
Definition: cs_lagr_particle.h:324