homogeneousLiquidPhaseSeparation.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) 2024-2025 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::fv::homogeneousLiquidPhaseSeparation
26 
27 Description
28  Model for the homogeneous nucleation of a solid or liquid phase separating
29  out of a liquid solution
30 
31 Usage
32  Example usage:
33  \verbatim
34  homogeneousLiquidPhaseSeparation
35  {
36  type homogeneousLiquidPhaseSeparation;
37  libs ("libmultiphaseEulerFvModels.so");
38 
39  // Phases between which the transfer occurs. The first phase is the
40  // solution, and the second is the precipitate.
41  phases (liquid sugar);
42 
43  // The specie that is condensing
44  specie C6H12O6;
45 
46  // Linearise the latent heat contribution into the energy equation?
47  energySemiImplicit no;
48 
49  // Solubility given in mass of solute per mass of solvent
50  solubility constant 0.9;
51  }
52  \endverbatim
53 
54 SourceFiles
55  homogeneousLiquidPhaseSeparation.C
56 
57 \*---------------------------------------------------------------------------*/
58 
59 #ifndef homogeneousLiquidPhaseSeparation_H
60 #define homogeneousLiquidPhaseSeparation_H
61 
62 #include "homogeneousNucleation.H"
63 
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 
66 namespace Foam
67 {
68 namespace fv
69 {
70 
71 /*---------------------------------------------------------------------------*\
72  Class homogeneousLiquidPhaseSeparation Declaration
73 \*---------------------------------------------------------------------------*/
74 
76 :
78 {
79 private:
80 
81  // Private Data
82 
83  //- Solubility curve
84  autoPtr<Function1<scalar>> solubilityCurve_;
85 
86 
87  // Private Member Functions
88 
89  //- Non-virtual read
90  void readCoeffs(const dictionary& dict);
91 
92  //- Calculate and return the diameter of nucleates and the phase change
93  // rate per quantity of the solution phase
95  dAndMDotByAlphaSolution() const;
96 
97 
98 public:
99 
100  //- Runtime type information
101  TypeName("homogeneousLiquidPhaseSeparation");
102 
103 
104  // Constructors
105 
106  //- Construct from explicit source name and mesh
108  (
109  const word& name,
110  const word& modelType,
111  const fvMesh& mesh,
112  const dictionary& dict
113  );
114 
115 
116  // Member Functions
117 
118  // IO
119 
120  //- Read source dictionary
121  virtual bool read(const dictionary& dict);
122 };
123 
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 } // End namespace fv
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #endif
133 
134 // ************************************************************************* //
An ordered pair of two objects of type <Type> with first() and second() elements.
Definition: Pair.H:67
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:98
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvModelI.H:69
const word & name() const
Return const access to the source name.
Definition: fvModelI.H:57
Model for the homogeneous nucleation of a solid or liquid phase separating out of a liquid solution.
homogeneousLiquidPhaseSeparation(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
virtual bool read(const dictionary &dict)
Read source dictionary.
TypeName("homogeneousLiquidPhaseSeparation")
Runtime type information.
Base class for homogeneous nucleation models based on classical nucleation theory.
A class for handling words, derived from string.
Definition: word.H:63
Namespace for OpenFOAM.
labelList fv(nPoints)
dictionary dict