PurePhaseModel.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) 2017 OpenCFD Ltd.
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  Foam::PurePhaseModel
28 
29 Description
30  Class which represents pure phases, i.e. without any species. Returns an
31  empty list of mass fractions.
32 
33 SourceFiles
34  PurePhaseModel.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef PurePhaseModel_H
39 #define PurePhaseModel_H
40 
41 #include "PtrList.H"
42 #include "volFields.H"
43 #include "fvMatricesFwd.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 class phaseSystem;
51 
52 /*---------------------------------------------------------------------------*\
53  Class PurePhaseModel Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 template<class BasePhaseModel, class phaseThermo>
57 class PurePhaseModel
58 :
59  public BasePhaseModel
60 {
61 protected:
62 
63  // Protected data
64 
65  //- Empty mass fraction field list
67 
68  //- Empty thermophysical model Ptr
70 
71 
72 public:
73 
74  // Constructors
75 
77  (
78  const phaseSystem& fluid,
79  const word& phaseName
80  );
81 
82 
83  //- Destructor
84  virtual ~PurePhaseModel() = default;
85 
86 
87  // Member Functions
88 
89  // Thermo
90 
91  //- Return the species mass fractions
92  virtual const PtrList<volScalarField>& Y() const;
93 
94  //- Access the species mass fractions
95  virtual PtrList<volScalarField>& Y();
96 
97  //- Solve species fraction equation
98  virtual void solveYi
99  (
102  );
103 
104  //- Access to const thermo
105  virtual const phaseThermo& thermo() const;
106 
107  //- Access non-const thermo
108  virtual phaseThermo& thermo();
109 };
110 
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 } // End namespace Foam
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 #ifdef NoRepository
119 # include "PurePhaseModel.C"
120 #endif
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 #endif
125 
126 // ************************************************************************* //
volFields.H
Foam::PurePhaseModel::thermoPtr_
autoPtr< phaseThermo > thermoPtr_
Empty thermophysical model Ptr.
Definition: PurePhaseModel.H:68
Foam::PurePhaseModel::PurePhaseModel
PurePhaseModel(const phaseSystem &fluid, const word &phaseName)
Definition: PurePhaseModel.C:36
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::PurePhaseModel::Y_
PtrList< volScalarField > Y_
Empty mass fraction field list.
Definition: PurePhaseModel.H:65
Foam::PurePhaseModel::solveYi
virtual void solveYi(PtrList< volScalarField::Internal > &, PtrList< volScalarField::Internal > &)
Solve species fraction equation.
Definition: PurePhaseModel.C:60
fvMatricesFwd.H
Forward declarations of fvMatrix specializations.
fluid
twoPhaseSystem & fluid
Definition: setRegionFluidFields.H:3
Foam::PurePhaseModel::thermo
virtual const phaseThermo & thermo() const
Access to const thermo.
Definition: PurePhaseModel.C:87
Foam::PurePhaseModel::Y
virtual const PtrList< volScalarField > & Y() const
Return the species mass fractions.
Definition: PurePhaseModel.C:71
Foam::PurePhaseModel::~PurePhaseModel
virtual ~PurePhaseModel()=default
Destructor.
Definition: PurePhaseModel.C:48
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:59
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr< phaseThermo >
PtrList.H
Foam::phaseSystem
Class to represent a system of phases and model interfacial transfers between them.
Definition: phaseSystem.H:66
Foam::PurePhaseModel
Class which represents pure phases, i.e. without any species. Returns an empty list of mass fractions...
Definition: PurePhaseModel.H:56