unityLewisFourier.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) 2020-2024 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::laminarThermophysicalTransportModels::unityLewisFourier
26 
27 Description
28  unityLewisFourier's energy gradient heat flux model for laminar flow.
29  Specie fluxes are computed assuming a unity turbulent Lewis number.
30 
31 SourceFiles
32  unityLewisFourier.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef unityLewisFourier_H
37 #define unityLewisFourier_H
38 
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 namespace laminarThermophysicalTransportModels
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class unityLewisFourier Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 template<class BasicThermophysicalTransportModel>
54 :
56  <
57  BasicThermophysicalTransportModel
58  >
59 {
60 
61 public:
62 
63  typedef typename BasicThermophysicalTransportModel::alphaField
64  alphaField;
65 
68 
69  typedef typename BasicThermophysicalTransportModel::thermoModel
71 
72 
73  //- Runtime type information
74  TypeName("unityLewisFourier");
75 
76 
77  // Constructors
78 
79  //- Construct from a momentum transport model and a thermo model
81  (
82  const momentumTransportModel& momentumTransport,
83  const thermoModel& thermo
84  );
85 
86  //- Construct from a type name, a momentum transport model and a thermo
87  // model
89  (
90  const word& type,
91  const momentumTransportModel& momentumTransport,
92  const thermoModel& thermo
93  );
94 
95 
96  //- Destructor
97  virtual ~unityLewisFourier()
98  {}
99 
100 
101  // Member Functions
102 
103  //- Read thermophysicalTransport dictionary
104  virtual bool read();
105 
106  //- Effective mass diffusion coefficient
107  // for a given specie mass-fraction [kg/m/s]
108  virtual tmp<volScalarField> DEff(const volScalarField& Yi) const
109  {
110  return volScalarField::New
111  (
112  "DEff",
113  this->thermo().kappa()/this->thermo().Cp()
114  );
115  }
116 
117  //- Effective mass diffusion coefficient
118  // for a given specie mass-fraction for patch [kg/m/s]
119  virtual tmp<scalarField> DEff
120  (
121  const volScalarField& Yi,
122  const label patchi
123  ) const
124  {
125  return
126  this->thermo().kappa().boundaryField()[patchi]
127  /this->thermo().Cp().boundaryField()[patchi];
128  }
129 
130  //- Return the heat flux [W/m^2]
131  virtual tmp<surfaceScalarField> q() const;
132 
133  //- Return the patch heat flux [W/m^2]
134  virtual tmp<scalarField> q(const label patchi) const;
135 
136  //- Return the source term for the energy equation
137  virtual tmp<fvScalarMatrix> divq(volScalarField& he) const;
138 
139  //- Return the specie flux for the given specie mass-fraction [kg/m^2/s]
140  virtual tmp<surfaceScalarField> j(const volScalarField& Yi) const;
141 
142  //- Return the specie flux
143  // for the given specie mass-fraction for patch [kg/m^2/s]
144  virtual tmp<scalarField> j
145  (
146  const volScalarField& Yi,
147  const label patchi
148  ) const;
149 
150  //- Return the source term for the given specie mass-fraction equation
151  virtual tmp<fvScalarMatrix> divj(volScalarField& Yi) const;
152 
153  //- Correct the unityLewisFourier viscosity
154  virtual void predict();
155 };
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 } // End namespace laminarThermophysicalTransportModels
161 } // End namespace Foam
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #ifdef NoRepository
166  #include "unityLewisFourier.C"
167 #endif
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
scalar Cp(const scalar p, const scalar T) const
Definition: EtoHthermo.H:2
Generic GeometricField class.
static tmp< GeometricField< Type, GeoMesh, PrimitiveField > > New(const word &name, const Internal &, const PtrList< Patch > &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
Templated abstract base class for laminar thermophysical transport models.
BasicThermophysicalTransportModel::thermoModel thermoModel
BasicThermophysicalTransportModel::momentumTransportModel momentumTransportModel
unityLewisFourier's energy gradient heat flux model for laminar flow. Specie fluxes are computed assu...
BasicThermophysicalTransportModel::alphaField alphaField
virtual tmp< fvScalarMatrix > divq(volScalarField &he) const
Return the source term for the energy equation.
TypeName("unityLewisFourier")
Runtime type information.
virtual tmp< fvScalarMatrix > divj(volScalarField &Yi) const
Return the source term for the given specie mass-fraction equation.
virtual void predict()
Correct the unityLewisFourier viscosity.
unityLewisFourier(const momentumTransportModel &momentumTransport, const thermoModel &thermo)
Construct from a momentum transport model and a thermo model.
virtual tmp< surfaceScalarField > j(const volScalarField &Yi) const
Return the specie flux for the given specie mass-fraction [kg/m^2/s].
virtual tmp< volScalarField > DEff(const volScalarField &Yi) const
Effective mass diffusion coefficient.
virtual tmp< surfaceScalarField > q() const
Return the heat flux [W/m^2].
BasicThermophysicalTransportModel::thermoModel thermoModel
BasicThermophysicalTransportModel::momentumTransportModel momentumTransportModel
virtual bool read()
Read thermophysicalTransport dictionary.
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
label patchi
compressibleMomentumTransportModel momentumTransportModel
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
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()
fluidMulticomponentThermo & thermo
Definition: createFields.H:31