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) 2015-2018 OpenFOAM Foundation
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 "phaseModel.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class PurePhaseModel Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 template<class BasePhaseModel>
53 class PurePhaseModel
54 :
55  public BasePhaseModel
56 {
57 protected:
58 
59  // Protected data
60 
61  //- Empty mass fraction field list
63 
64 
65 public:
66 
67  // Constructors
68 
70  (
71  const phaseSystem& fluid,
72  const word& phaseName,
73  const label index
74  );
75 
76 
77  //- Destructor
78  virtual ~PurePhaseModel();
79 
80 
81  // Member Functions
82 
83  // Species
84 
85  //- Return whether the phase is pure (i.e., not multi-component)
86  virtual bool pure() const;
87 
88  //- Return the species fraction equation
90 
91  //- Return the species mass fractions
92  virtual const PtrList<volScalarField>& Y() const;
93 
94  //- Return a species mass fraction by name
95  virtual const volScalarField& Y(const word& name) const;
96 
97  //- Access the species mass fractions
98  virtual PtrList<volScalarField>& YRef();
99 
100  //- Return the active species mass fractions
101  virtual const UPtrList<volScalarField>& YActive() const;
102 
103  //- Access the active species mass fractions
105 };
106 
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 } // End namespace Foam
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 #ifdef NoRepository
115  #include "PurePhaseModel.C"
116 #endif
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 #endif
121 
122 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::PurePhaseModel::Y_
PtrList< volScalarField > Y_
Empty mass fraction field list.
Definition: PurePhaseModel.H:61
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
Foam::PurePhaseModel::YRef
virtual PtrList< volScalarField > & YRef()
Access the species mass fractions.
Definition: PurePhaseModel.C:97
Foam::PurePhaseModel::~PurePhaseModel
virtual ~PurePhaseModel()
Destructor.
Definition: PurePhaseModel.C:48
fluid
twoPhaseSystem & fluid
Definition: setRegionFluidFields.H:3
Foam::PurePhaseModel::Y
virtual const PtrList< volScalarField > & Y() const
Return the species mass fractions.
Definition: PurePhaseModel.C:75
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:62
Foam::name
word name(const complex &c)
Return string representation of complex.
Definition: complex.C:76
Foam::UPtrList
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Definition: UPtrList.H:63
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:65
Foam::PurePhaseModel::PurePhaseModel
PurePhaseModel(const phaseSystem &fluid, const word &phaseName, const label index)
Definition: PurePhaseModel.C:35
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::PurePhaseModel::pure
virtual bool pure() const
Return whether the phase is pure (i.e., not multi-component)
Definition: PurePhaseModel.C:55
Foam::PurePhaseModel::YiEqn
virtual tmp< fvScalarMatrix > YiEqn(volScalarField &Yi)
Return the species fraction equation.
Definition: PurePhaseModel.C:63
Foam::phaseSystem
Class to represent a system of phases and model interfacial transfers between them.
Definition: phaseSystem.H:69
Foam::PurePhaseModel::YActiveRef
virtual UPtrList< volScalarField > & YActiveRef()
Access the active species mass fractions.
Definition: PurePhaseModel.C:119
Foam::GeometricField
Generic GeometricField class.
Definition: areaFieldsFwd.H:53
Foam::PurePhaseModel
Class which represents pure phases, i.e. without any species. Returns an empty list of mass fractions...
Definition: PurePhaseModel.H:52
Foam::PurePhaseModel::YActive
virtual const UPtrList< volScalarField > & YActive() const
Return the active species mass fractions.
Definition: PurePhaseModel.C:109