heheuPsiThermo.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) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2017 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::heheuReactionThermo
29 
30 Description
31  Foam::heheuReactionThermo
32 
33 SourceFiles
34  heheuReactionThermo.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef heheuPsiThermo_H
39 #define heheuPsiThermo_H
40 
41 #include "heThermo.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class heheuPsiThermo Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 template<class BasicPsiThermo, class MixtureType>
53 class heheuPsiThermo
54 :
55  public heThermo<BasicPsiThermo, MixtureType>
56 {
57  // Private Member Functions
58 
59  volScalarField Tu_;
60  volScalarField heu_;
61 
62 
63  // Private Member Functions
64 
65  //- Calculate thermo based on he
66  void calculate();
67 
68  //- Calculate thermo based on T
69  //void calculateT();
70 
71  //- Construct as copy (not implemented)
73  (
75  );
76 
77 
78 public:
79 
80  //- Runtime type information
81  TypeName("heheuPsiThermo");
82 
83 
84  // Constructors
85 
86  //- Construct from mesh and phase name
88  (
89  const fvMesh&,
90  const word& phaseName
91  );
92 
93 
94  //- Construct from mesh,dictionary,phase name with a single temperature
96  (
97  const fvMesh&,
98  const word& phaseName,
99  const word& dictName
100  );
101 
102 
103  //- Destructor
104  virtual ~heheuPsiThermo();
105 
106 
107  // Member functions
108 
109  //- Update properties
110  virtual void correct();
111 
112 
113  //- Update properties based on T
114  //virtual void correctT();
115 
116  // Access to thermodynamic state variables.
117 
118  //- Unburnt gas enthalpy [J/kg]
119  // Non-const access allowed for transport equations
120  virtual volScalarField& heu()
121  {
122  return heu_;
123  }
124 
125  //- Unburnt gas enthalpy [J/kg]
126  virtual const volScalarField& heu() const
127  {
128  return heu_;
129  }
130 
131  //- Unburnt gas temperature [K]
132  virtual const volScalarField& Tu() const
133  {
134  return Tu_;
135  }
136 
137 
138  // Fields derived from thermodynamic state variables
139 
140  //- Unburnt gas enthalpy for cell-set [J/kg]
141  virtual tmp<scalarField> heu
142  (
143  const scalarField& p,
144  const scalarField& T,
145  const labelList& cells
146  ) const;
147 
148  //- Unburnt gas enthalpy for patch [J/kg]
149  virtual tmp<scalarField> heu
150  (
151  const scalarField& p,
152  const scalarField& T,
153  const label patchi
154  ) const;
155 
156 
157  //- Burnt gas temperature [K]
158  virtual tmp<volScalarField> Tb() const;
159 
160  //- Unburnt gas compressibility [s^2/m^2]
161  virtual tmp<volScalarField> psiu() const;
162 
163  //- Burnt gas compressibility [s^2/m^2]
164  virtual tmp<volScalarField> psib() const;
165 
166 
167  // Access to transport variables
168 
169  //- Dynamic viscosity of unburnt gas [kg/ms]
170  virtual tmp<volScalarField> muu() const;
171 
172  //- Dynamic viscosity of burnt gas [kg/ms]
173  virtual tmp<volScalarField> mub() const;
174 };
175 
176 
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 
179 } // End namespace Foam
180 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
182 
183 #ifdef NoRepository
184  #include "heheuPsiThermo.C"
185 #endif
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 #endif
190 
191 // ************************************************************************* //
Foam::heheuPsiThermo::TypeName
TypeName("heheuPsiThermo")
Runtime type information.
Foam::heThermo
Enthalpy/Internal energy for a mixture.
Definition: heThermo.H:52
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
dictName
const word dictName("faMeshDefinition")
Foam::heheuPsiThermo::correct
virtual void correct()
Update properties.
Definition: heheuPsiThermo.C:399
Foam::heheuPsiThermo::Tu
virtual const volScalarField & Tu() const
Unburnt gas temperature [K].
Definition: heheuPsiThermo.H:131
Foam::heheuPsiThermo
Definition: heheuPsiThermo.H:52
Foam::heheuPsiThermo::mub
virtual tmp< volScalarField > mub() const
Dynamic viscosity of burnt gas [kg/ms].
Definition: heheuPsiThermo.C:694
Foam::heheuPsiThermo::psiu
virtual tmp< volScalarField > psiu() const
Unburnt gas compressibility [s^2/m^2].
Definition: heheuPsiThermo.C:527
Foam::Field< scalar >
Foam::heheuPsiThermo::Tb
virtual tmp< volScalarField > Tb() const
Burnt gas temperature [K].
Definition: heheuPsiThermo.C:468
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::heheuPsiThermo::heu
virtual const volScalarField & heu() const
Unburnt gas enthalpy [J/kg].
Definition: heheuPsiThermo.H:125
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::heheuPsiThermo::heu
virtual volScalarField & heu()
Update properties based on T.
Definition: heheuPsiThermo.H:119
heheuPsiThermo.C
Foam::heheuPsiThermo::muu
virtual tmp< volScalarField > muu() const
Dynamic viscosity of unburnt gas [kg/ms].
Definition: heheuPsiThermo.C:636
Foam::List< label >
cells
const cellShapeList & cells
Definition: gmvOutputHeader.H:3
Foam::heheuPsiThermo::~heheuPsiThermo
virtual ~heheuPsiThermo()
Destructor.
Definition: heheuPsiThermo.C:392
Foam::GeometricField< scalar, fvPatchField, volMesh >
heThermo.H
Foam::heheuPsiThermo::psib
virtual tmp< volScalarField > psib() const
Burnt gas compressibility [s^2/m^2].
Definition: heheuPsiThermo.C:581