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 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  surfactantProperties
28 
29 Description
30 
31 SourceFiles
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 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class surfactantProperties Declaration
49 \*---------------------------------------------------------------------------*/
50 
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 
86 public:
87 
88  // Constructors
89 
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
128  const dimensionedScalar& adsorptionCoeff() const
129  {
130  return adsorptionCoeff_;
131  }
132 
133  //- Return surfactant desorption coefficient
134  const dimensionedScalar& desorptionCoeff() const
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
164  const dimensionedScalar& equilibriumConc() const
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  (
183  IOobject
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 // ************************************************************************* //
Foam::surfactantProperties::saturatedConc
const dimensionedScalar & saturatedConc() const
Return saturated surfactant concentration at the free-surface.
Definition: surfactantProperties.H:121
Foam::IOobject::NO_WRITE
Definition: IOobject.H:195
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:169
Foam::Switch
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:77
Foam::surfactantProperties::R
const dimensionedScalar & R() const
Return universal gas constant.
Definition: surfactantProperties.H:157
Foam::dimGasConstant
const dimensionSet dimGasConstant
faCFD.H
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::surfactantProperties::bulkDiffusion
const dimensionedScalar & bulkDiffusion() const
Return diffusion coefficient of the surfactant in the bulk of fluid.
Definition: surfactantProperties.H:139
Foam::dimMoles
const dimensionSet dimMoles(0, 0, 0, 0, 1, 0, 0)
Definition: dimensionSets.H:55
Foam::surfactantProperties::surfactantProperties
surfactantProperties(const dictionary &dict)
Definition: surfactantProperties.H:89
Foam::surfactantProperties::equilibriumConc
const dimensionedScalar & equilibriumConc() const
Return equilibrium surfactant concentration at the free-surface.
Definition: surfactantProperties.H:163
Foam::surfactantProperties::diffusion
const dimensionedScalar & diffusion() const
Return diffusion coefficient of the surfactant at the free-surface.
Definition: surfactantProperties.H:145
Foam::surfactantProperties::desorptionCoeff
const dimensionedScalar & desorptionCoeff() const
Return surfactant desorption coefficient.
Definition: surfactantProperties.H:133
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::log
dimensionedScalar log(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:262
Foam::dimensioned< scalar >
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::surfactantProperties
Definition: surfactantProperties.H:50
Foam::surfactantProperties::dSigma
tmp< areaScalarField > dSigma(const areaScalarField &surfactConc) const
Surface tension change due to presence of surfactants.
Definition: surfactantProperties.H:176
Foam::dimMass
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:51
Foam::surfactantProperties::bulkConc
const dimensionedScalar & bulkConc() const
Return surfactant concentration in the bulk of fluid.
Definition: surfactantProperties.H:115
Foam::surfactantProperties::adsorptionCoeff
const dimensionedScalar & adsorptionCoeff() const
Return surfactant adsorption coefficient.
Definition: surfactantProperties.H:127
Foam::surfactantProperties::T
const dimensionedScalar & T() const
Return surfactant temeprature.
Definition: surfactantProperties.H:151
Foam::tmp::New
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
bool
bool
Definition: EEqn.H:20
Foam::PtrListOps::get
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
fvCFD.H
Foam::GeometricField< scalar, faPatchField, areaMesh >
Foam::IOobject::NO_READ
Definition: IOobject.H:188
Foam::surfactantProperties::soluble
Switch soluble() const
Is the surfactant soluble.
Definition: surfactantProperties.H:169