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 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::AnisothermalPhaseModel
29 
30 Description
31  Class which represents a phase for which the temperature (strictly energy)
32  varies. Returns the energy equation and corrects the thermodynamic model.
33 
34 SourceFiles
35  AnisothermalPhaseModel.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef AnisothermalPhaseModel_H
40 #define AnisothermalPhaseModel_H
41 
42 #include "phaseModel.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class AnisothermalPhaseModel Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 template<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 
67 public:
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 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::AnisothermalPhaseModel::AnisothermalPhaseModel
AnisothermalPhaseModel(const phaseSystem &fluid, const word &phaseName, const label index)
Construct from phase system and phase name.
Definition: AnisothermalPhaseModel.C:63
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::AnisothermalPhaseModel::correctThermo
virtual void correctThermo()
Correct the thermodynamics.
Definition: AnisothermalPhaseModel.C:76
fluid
twoPhaseSystem & fluid
Definition: setRegionFluidFields.H:3
AnisothermalPhaseModel.C
Foam::AnisothermalPhaseModel::heEqn
virtual tmp< fvScalarMatrix > heEqn()
Return the enthalpy equation.
Definition: AnisothermalPhaseModel.C:93
Foam::AnisothermalPhaseModel
Class which represents a phase for which the temperature (strictly energy) varies....
Definition: AnisothermalPhaseModel.H:53
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::AnisothermalPhaseModel::~AnisothermalPhaseModel
virtual ~AnisothermalPhaseModel()=default
Destructor.
Foam::AnisothermalPhaseModel::isothermal
virtual bool isothermal() const
Return whether the phase is isothermal.
Definition: AnisothermalPhaseModel.C:85
Foam::phaseSystem
Class to represent a system of phases and model interfacial transfers between them.
Definition: phaseSystem.H:66