FullerDiffusionCoefficient.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2025-2026 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::Function2s::FullerDiffusionCoefficient
26 
27 Description
28  Fuller et al. correlation for vapour mass diffusivity.
29 
30  \verbatim
31  E. N. Fuller, E. N., Schettler P. D., Giddings, J. C. (1966).
32  A New Method For Prediction Of Binary Gas-Phase Diffusion Coefficients
33  Ind. Eng. Chem. 58(5), 19.
34  \endverbatim
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef FullerDiffusionCoefficient_H
39 #define FullerDiffusionCoefficient_H
40 
41 #include "Function2.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 namespace Function2s
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class FullerDiffusionCoefficient Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 :
56  public FieldFunction2<scalar, FullerDiffusionCoefficient>
57 {
58  // Private Data
59 
60  // Vapour mass diffusivity function coefficients
61  scalar Va_, Vb_, Ma_, Mb_;
62 
63  // Helper variables
64  scalar alpha_, beta_;
65 
66 
67 public:
68 
69  //- Runtime type information
70  TypeName("FullerDiffusionCoefficient");
71 
72 
73  // Constructors
74 
75  //- Construct from name and dictionary
77  (
78  const word& name,
79  const unitSets& units,
80  const dictionary& dict
81  );
82 
83  //- Construct and return a clone
84  virtual tmp<Function2<scalar>> clone() const
85  {
86  return tmp<Function2<scalar>>
87  (
89  );
90  }
91 
92 
93  // Member Functions
94 
95  //- Inherit base class value methods to prevent clang warnings
97 
98  //- Vapour mass diffusivity function
99  virtual scalar value(scalar p, scalar T) const
100  {
101  return 101325e-7*(pow(T, 1.75))*alpha_/(p*beta_);
102  }
103 
104  //- Write the function coefficients
105  virtual void write(Ostream& os, const unitSets& units) const;
106 };
107 
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 } // End namespace Function2s
112 } // End namespace Foam
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 #endif
117 
118 // ************************************************************************* //
const word & name() const
Return the name of the entry.
Definition: Function2.C:78
Fuller et al. correlation for vapour mass diffusivity.
virtual scalar value(scalar p, scalar T) const
Vapour mass diffusivity function.
virtual void write(Ostream &os, const unitSets &units) const
Write the function coefficients.
virtual tmp< Function2< scalar > > clone() const
Construct and return a clone.
FullerDiffusionCoefficient(const word &name, const unitSets &units, const dictionary &dict)
Construct from name and dictionary.
TypeName("FullerDiffusionCoefficient")
Runtime type information.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:63
Namespace for OpenFOAM.
const doubleScalar e
Definition: doubleScalar.H:106
tmp< DimensionedField< typename powProduct< Type, r >::type, GeoMesh, Field > > pow(const DimensionedField< Type, GeoMesh, PrimitiveField > &df, typename powProduct< Type, r >::type)
void T(GeometricField< Type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type, GeoMesh, PrimitiveField2 > &gf1)
dictionary dict
volScalarField & p