ThermophysicalTransportPhaseModel.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2015-2025 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::ThermophysicalTransportPhaseModel
26 
27 Description
28  Class which makes thermophysical transport modelling available to derived
29  classes
30 
31 SourceFiles
32  ThermophysicalTransportPhaseModel.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef ThermophysicalTransportPhaseModel_H
37 #define ThermophysicalTransportPhaseModel_H
38 
39 #include "phaseModel.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 class fluidThermo;
49 class rhoFluidThermo;
50 class fluidMulticomponentThermo;
51 class rhoFluidMulticomponentThermo;
52 
53 // Trait for converting the ThermoModel's thermo type to the thermo type needed
54 // for the thermophysical transport model type; i.e., from rho-type thermo to
55 // fluid-type thermo.
56 
57 template<class ThermoModel>
59 
60 template<>
62 {
63  typedef fluidThermo type;
64 };
65 
66 template<>
68 {
70 };
71 
72 
73 /*---------------------------------------------------------------------------*\
74  Class ThermophysicalTransportPhaseModel Declaration
75 \*---------------------------------------------------------------------------*/
76 
77 template<class BasePhaseModel>
79 :
80  public BasePhaseModel
81 {
82  // Private Member Data
83 
84  //- Thermophysical transport model type
85  typedef
87  <
90  <
91  typename BasePhaseModel::thermoModel
92  >::type
93  >
95 
96  //- Thermophysical transport model
97  autoPtr<thermophysicalTransportModel> thermophysicalTransport_;
98 
99 
100 public:
101 
102  // Constructors
103 
105  (
106  const phaseSystem& fluid,
107  const word& phaseName,
108  const bool referencePhase,
109  const label index
110  );
111 
112 
113  //- Destructor
115 
116 
117  // Member Functions
118 
119  //- Predict the energy transport e.g. alphat
120  virtual void predictThermophysicalTransport();
121 
122  //- Correct the energy transport e.g. alphat
123  virtual void correctThermophysicalTransport();
124 
125  //- Return the effective thermal conductivity on a patch
126  virtual tmp<scalarField> kappaEff(const label patchi) const;
127 
128  //- Return the source term for the energy equation
129  virtual tmp<fvScalarMatrix> divq(volScalarField& he) const;
130 
131  //- Return the source term for a specie mass-fraction equation
132  virtual tmp<fvScalarMatrix> divj(volScalarField& Yi) const;
133 };
134 
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 } // End namespace Foam
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 #ifdef NoRepository
144 #endif
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #endif
149 
150 // ************************************************************************* //
Generic GeometricField class.
Templated base class for multiphase thermophysical transport models.
Class which makes thermophysical transport modelling available to derived classes.
ThermophysicalTransportPhaseModel(const phaseSystem &fluid, const word &phaseName, const bool referencePhase, const label index)
virtual void predictThermophysicalTransport()
Predict the energy transport e.g. alphat.
virtual tmp< fvScalarMatrix > divj(volScalarField &Yi) const
Return the source term for a specie mass-fraction equation.
virtual void correctThermophysicalTransport()
Correct the energy transport e.g. alphat.
virtual tmp< scalarField > kappaEff(const label patchi) const
Return the effective thermal conductivity on a patch.
virtual tmp< fvScalarMatrix > divq(volScalarField &he) const
Return the source term for the energy equation.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Base-class for multi-component fluid thermodynamic properties.
Base-class for fluid thermodynamic properties.
Definition: fluidThermo.H:56
Class to represent a system of phases.
Definition: phaseSystem.H:74
Base-class for multi-component fluid thermodynamic properties based on density.
Base-class for fluid thermodynamic properties based on density.
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
label patchi
phaseCompressibleMomentumTransportModel momentumTransportModel
Namespace for OpenFOAM.
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:59
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
thermo he()