AnisothermalPhaseModel.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 Copyright (C) 2021 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::AnisothermalPhaseModel
29
30Description
31 Class which represents a phase for which the temperature (strictly energy)
32 varies. Returns the energy equation and corrects the thermodynamic model.
33
34SourceFiles
35 AnisothermalPhaseModel.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef AnisothermalPhaseModel_H
40#define AnisothermalPhaseModel_H
41
42#include "phaseModel.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
48
49/*---------------------------------------------------------------------------*\
50 Class AnisothermalPhaseModel Declaration
51\*---------------------------------------------------------------------------*/
52
53template<class BasePhaseModel>
55:
56 public BasePhaseModel
57{
58 // Private Member Functions
59
60 //- Optionally filter the pressure work term as the phase-fraction -> 0
61 tmp<volScalarField> filterPressureWork
62 (
63 const tmp<volScalarField>& pressureWork
64 ) const;
65
66
67public:
68
69 // Constructors
70
71 //- Construct from phase system and phase name
73 (
74 const phaseSystem& fluid,
75 const word& phaseName,
76 const label index
77 );
78
79
80 //- Destructor
81 virtual ~AnisothermalPhaseModel() = default;
82
83
84 // Member Functions
85
86 //- Correct the thermodynamics
87 virtual void correctThermo();
88
89 //- Return whether the phase is isothermal
90 virtual bool isothermal() const;
91
92 //- Return the enthalpy equation
93 virtual tmp<fvScalarMatrix> heEqn();
94};
95
96
97// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
98
99} // End namespace Foam
100
101// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
102
103#ifdef NoRepository
104 #include "AnisothermalPhaseModel.C"
105#endif
106
107// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108
109#endif
110
111// ************************************************************************* //
twoPhaseSystem & fluid
Class which represents a phase for which the temperature (strictly energy) varies....
virtual void correctThermo()
Correct the thermodynamics.
virtual ~AnisothermalPhaseModel()=default
Destructor.
virtual bool isothermal() const
Return whether the phase is isothermal.
virtual tmp< fvScalarMatrix > heEqn()
Return the enthalpy equation.
Class to represent a system of phases and model interfacial transfers between them.
Definition: phaseSystem.H:76
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.