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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::PurePhaseModel
28
29Description
30 Class which represents pure phases, i.e. without any species. Returns an
31 empty list of mass fractions.
32
33SourceFiles
34 PurePhaseModel.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef PurePhaseModel_H
39#define PurePhaseModel_H
40
41#include "phaseModel.H"
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47
48/*---------------------------------------------------------------------------*\
49 Class PurePhaseModel Declaration
50\*---------------------------------------------------------------------------*/
51
52template<class BasePhaseModel>
53class PurePhaseModel
54:
55 public BasePhaseModel
56{
57protected:
58
59 // Protected data
60
61 //- Empty mass fraction field list
62 PtrList<volScalarField> Y_;
63
64
65public:
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
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// ************************************************************************* //
twoPhaseSystem & fluid
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: PtrList.H:73
PurePhaseModel(const multiphaseInterSystem &fluid, const word &phaseName)
virtual ~PurePhaseModel()=default
Destructor.
virtual const PtrList< volScalarField > & Y() const
Return the species mass fractions.
virtual const UPtrList< volScalarField > & YActive() const
Return the active species mass fractions.
virtual PtrList< volScalarField > & YRef()
Access the species mass fractions.
virtual tmp< fvScalarMatrix > YiEqn(volScalarField &Yi)
Return the species fraction equation.
virtual ~PurePhaseModel()
Destructor.
virtual bool pure() const
Return whether the phase is pure (i.e., not multi-component)
PtrList< volScalarField > Y_
Empty mass fraction field list.
virtual UPtrList< volScalarField > & YActiveRef()
Access the active species mass fractions.
virtual const PtrList< volScalarField > & Y() const
Return the species mass fractions.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Definition: UPtrList.H:71
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59