SolidThermoPhaseModel.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) 2023 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::SolidThermoPhaseModel
26 
27 Description
28  Class which represents a solid phase with a thermodynamic model. Provides
29  access to the thermodynamic variables. Note that the thermo model itself is
30  not returned as this class could be substituted in the hierarchy for one
31  which mirrors the functionality, but does not include a thermo model; an
32  incompressible phase model, for example.
33 
34 SourceFiles
35  SolidThermoPhaseModel.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef SolidThermoPhaseModel_H
40 #define SolidThermoPhaseModel_H
41 
42 #include "phaseModel.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 class rhoThermo;
50 class rhoFluidThermo;
51 
52 /*---------------------------------------------------------------------------*\
53  Class SolidThermoPhaseModel Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 template<class BasePhaseModel, class ThermoModel>
58 :
59  public BasePhaseModel,
60  public viscosity
61 {
62 protected:
63 
64  // Protected data
65 
66  //- Thermophysical model
68 
69 
70 public:
71 
72  typedef ThermoModel thermoModel;
73 
74 
75  // Constructors
76 
78  (
79  const phaseSystem& fluid,
80  const word& phaseName,
81  const bool referencePhase,
82  const label index
83  );
84 
85 
86  //- Destructor
87  virtual ~SolidThermoPhaseModel();
88 
89 
90  // Member Functions
91 
92  // Thermo
93 
94  //- Return whether the phase is incompressible
95  virtual bool incompressible() const;
96 
97  //- Return whether the phase is constant density
98  virtual bool isochoric() const;
99 
100  //- Return the thermophysical model
101  virtual const rhoThermo& thermo() const;
102 
103  //- Access the thermophysical model
104  virtual rhoThermo& thermo();
105 
106  //- Return the thermophysical model
107  virtual const rhoFluidThermo& fluidThermo() const;
108 
109  //- Access the thermophysical model
110  virtual rhoFluidThermo& fluidThermo();
111 
112  //- Return the density field
113  virtual const volScalarField& rho() const;
114 
115  //- Access the the density field
116  virtual volScalarField& rho();
117 
118 
119  // Transport
120 
121  //- Return the laminar dynamic viscosity
122  virtual tmp<volScalarField> mu() const;
123 
124  //- Return the laminar dynamic viscosity on a patch
125  virtual tmp<scalarField> mu(const label patchi) const;
126 
127  //- Return the laminar kinematic viscosity
128  virtual tmp<volScalarField> nu() const;
129 
130  //- Return the laminar kinematic viscosity on a patch
131  virtual tmp<scalarField> nu(const label patchi) const;
132 };
133 
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 } // End namespace Foam
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 #ifdef NoRepository
142  #include "SolidThermoPhaseModel.C"
143 #endif
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 #endif
148 
149 // ************************************************************************* //
Generic GeometricField class.
Class which represents a solid phase with a thermodynamic model. Provides access to the thermodynamic...
virtual const rhoThermo & thermo() const
Return the thermophysical model.
virtual const volScalarField & rho() const
Return the density field.
virtual ~SolidThermoPhaseModel()
Destructor.
virtual tmp< volScalarField > mu() const
Return the laminar dynamic viscosity.
virtual tmp< volScalarField > nu() const
Return the laminar kinematic viscosity.
SolidThermoPhaseModel(const phaseSystem &fluid, const word &phaseName, const bool referencePhase, const label index)
virtual const rhoFluidThermo & fluidThermo() const
Return the thermophysical model.
autoPtr< ThermoModel > thermo_
Thermophysical model.
virtual bool isochoric() const
Return whether the phase is constant density.
virtual bool incompressible() const
Return whether the phase is incompressible.
Class to represent a system of phases and model interfacial transfers between them.
Definition: phaseSystem.H:73
Base-class for fluid thermodynamic properties based on density.
Base-class for thermodynamic properties based on density.
Definition: rhoThermo.H:54
A class for managing temporary objects.
Definition: tmp.H:55
Abstract base class for all fluid physical properties.
Definition: viscosity.H:50
A class for handling words, derived from string.
Definition: word.H:62
label patchi
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