twoPhaseMixture.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) 2011-2021 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::twoPhaseMixture
26 
27 Description
28  A two-phase mixture model
29 
30 SourceFiles
31  twoPhaseMixture.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef twoPhaseMixture_H
36 #define twoPhaseMixture_H
37 
38 #include "IOdictionary.H"
39 #include "volFields.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class twoPhaseMixture Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 class twoPhaseMixture
51 :
52  public IOdictionary
53 {
54  // Private data
55 
56  word phase1Name_;
57  word phase2Name_;
58 
59  volScalarField alpha1_;
60  volScalarField alpha2_;
61 
62 
63  // Private Member Functions
64 
65  static typeIOobject<IOdictionary> readPhasePropertiesDict
66  (
67  const objectRegistry& obr
68  );
69 
70 
71 public:
72 
73  TypeName("twoPhaseMixture");
74 
75 
76  // Constructors
77 
78  //- Construct from components
79  twoPhaseMixture(const fvMesh& mesh);
80 
81 
82  //- Destructor
84  {}
85 
86 
87  // Member Functions
88 
89  const word& phase1Name() const
90  {
91  return phase1Name_;
92  }
93 
94  const word& phase2Name() const
95  {
96  return phase2Name_;
97  }
98 
99  //- Return the phase-fraction of phase 1
100  const volScalarField& alpha1() const
101  {
102  return alpha1_;
103  }
104 
105  //- Return the phase-fraction of phase 1
107  {
108  return alpha1_;
109  }
110 
111  //- Return the phase-fraction of phase 2
112  const volScalarField& alpha2() const
113  {
114  return alpha2_;
115  }
116 
117  //- Return the phase-fraction of phase 2
119  {
120  return alpha2_;
121  }
122 
123  //- Read base phaseProperties dictionary
124  virtual bool read() = 0;
125 };
126 
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 } // End namespace Foam
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #endif
135 
136 // ************************************************************************* //
const word & phase1Name() const
const volScalarField & alpha2() const
Return the phase-fraction of phase 2.
Templated form of IOobject providing type information for file reading and header type checking...
Definition: IOobject.H:537
fvMesh & mesh
const volScalarField & alpha1() const
Return the phase-fraction of phase 1.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:53
TypeName("twoPhaseMixture")
A class for handling words, derived from string.
Definition: word.H:59
twoPhaseMixture(const fvMesh &mesh)
Construct from components.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:95
A two-phase mixture model.
virtual bool read()=0
Read base phaseProperties dictionary.
Registry of regIOobjects.
const word & phase2Name() const
Namespace for OpenFOAM.
~twoPhaseMixture()
Destructor.