surfactantProperties.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2019 Zeljko Tukovic, FSB Zagreb.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 surfactantProperties
28
29Description
30
31SourceFiles
32 surfactantProperties.H
33
34\*---------------------------------------------------------------------------*/
35
36#ifndef surfactantProperties_H
37#define surfactantProperties_H
38
39#include "fvCFD.H"
40#include "faCFD.H"
41
42// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44namespace Foam
45{
46
47/*---------------------------------------------------------------------------*\
48 Class surfactantProperties Declaration
49\*---------------------------------------------------------------------------*/
52{
53 // Private data
54
55 //- Surfactant concentration in the bulk of fluid
56 dimensionedScalar bulkConc_;
57
58 //- Saturated surfactant concentration on the free-surface
59 dimensionedScalar saturatedConc_;
60
61 //- Adsorption coefficient of surfactant
62 dimensionedScalar adsorptionCoeff_;
63
64 //- Desorption coefficient of surfactant
65 dimensionedScalar desorptionCoeff_;
66
67 //- Diffusion coefficient of surfactant in the bulk of fluid
68 dimensionedScalar bulkDiffusion_;
69
70 //- Diffusion coefficient of surfactant at the free-surface
71 dimensionedScalar diffusion_;
72
73 //- Temperature of surfactant at the free-surface
75
76 //- Universal gas constant
78
79 //- Equilibrium surfactant concentration at the free-surface
80 dimensionedScalar equilibriumConc_;
81
82 //- Is the surfactant soluble?
83 Switch soluble_;
84
85
86public:
87
88 // Constructors
90 explicit surfactantProperties(const dictionary& dict)
91 :
92 bulkConc_("bulkConc", dict),
93 saturatedConc_("saturatedConc", dict),
94 adsorptionCoeff_("adsorptionCoeff", dict),
95 desorptionCoeff_("desorptionCoeff", dict),
96 bulkDiffusion_("bulkDiffusion", dict),
97 diffusion_("diffusion", dict),
98 T_("temperature", dict),
99 R_("R", dimGasConstant*dimMass/dimMoles, 8.3144),
100 equilibriumConc_
101 (
102 saturatedConc_
103 /(
104 1.0
105 + desorptionCoeff_
106 /bulkConc_
107 )
108 ),
109 soluble_(dict.get<bool>("soluble"))
110 {}
111
112
113 // Member Functions
114
115 //- Return surfactant concentration in the bulk of fluid
116 const dimensionedScalar& bulkConc() const
117 {
118 return bulkConc_;
119 }
120
121 //- Return saturated surfactant concentration at the free-surface
122 const dimensionedScalar& saturatedConc() const
123 {
124 return saturatedConc_;
125 }
126
127 //- Return surfactant adsorption coefficient
129 {
130 return adsorptionCoeff_;
131 }
132
133 //- Return surfactant desorption coefficient
135 {
136 return desorptionCoeff_;
137 }
138
139 //- Return diffusion coefficient of the surfactant in the bulk of fluid
140 const dimensionedScalar& bulkDiffusion() const
141 {
142 return bulkDiffusion_;
143 }
144
145 //- Return diffusion coefficient of the surfactant at the free-surface
146 const dimensionedScalar& diffusion() const
147 {
148 return diffusion_;
149 }
150
151 //- Return surfactant temeprature
152 const dimensionedScalar& T() const
153 {
154 return T_;
155 }
156
157 //- Return universal gas constant
158 const dimensionedScalar& R() const
159 {
160 return R_;
161 }
162
163 //- Return equilibrium surfactant concentration at the free-surface
165 {
166 return equilibriumConc_;
167 }
168
169 //- Is the surfactant soluble
170 Switch soluble() const
171 {
172 return soluble_;
173 }
174
175 //- Surface tension change due to presence of surfactants
177 (
178 const areaScalarField& surfactConc
179 ) const
180 {
182 (
184 (
185 "dSigma",
186 surfactConc.mesh().time().timeName(),
187 surfactConc.mesh().mesh(),
190 ),
191 (
192 R()*T()*saturatedConc()
193 * log(1.0 - surfactConc/saturatedConc())
194 )
195 );
196 }
197};
198
199
200// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201
202} // End namespace Foam
203
204// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205
206#endif
207
208// ************************************************************************* //
const Mesh & mesh() const
Return mesh.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:170
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:78
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Definition: Time.C:717
static word timeName(const scalar t, const int precision=precision_)
Definition: Time.C:780
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const Time & time() const
Return reference to time.
Definition: faMesh.C:673
const polyMesh & mesh() const
Return access to polyMesh.
Definition: faMeshI.H:31
tmp< areaScalarField > dSigma(const areaScalarField &surfactConc) const
Surface tension change due to presence of surfactants.
const dimensionedScalar & equilibriumConc() const
Return equilibrium surfactant concentration at the free-surface.
const dimensionedScalar & desorptionCoeff() const
Return surfactant desorption coefficient.
Switch soluble() const
Is the surfactant soluble.
const dimensionedScalar & diffusion() const
Return diffusion coefficient of the surfactant at the free-surface.
const dimensionedScalar & R() const
Return universal gas constant.
const dimensionedScalar & bulkConc() const
Return surfactant concentration in the bulk of fluid.
const dimensionedScalar & adsorptionCoeff() const
Return surfactant adsorption coefficient.
surfactantProperties(const dictionary &dict)
const dimensionedScalar & bulkDiffusion() const
Return diffusion coefficient of the surfactant in the bulk of fluid.
const dimensionedScalar & T() const
Return surfactant temeprature.
const dimensionedScalar & saturatedConc() const
Return saturated surfactant concentration at the free-surface.
A class for managing temporary objects.
Definition: tmp.H:65
bool
Definition: EEqn.H:20
Namespace for OpenFOAM.
const dimensionSet dimMoles(0, 0, 0, 0, 1, 0, 0)
Definition: dimensionSets.H:55
const dimensionSet dimGasConstant
dimensionedScalar log(const dimensionedScalar &ds)
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:51
dictionary dict