nonUnityLewisEddyDiffusivity.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-2026 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::turbulenceThermophysicalTransportModels::nonUnityLewisEddyDiffusivity
26 
27 Description
28  Non-unity-Lewis-Eddy-diffusivity based temperature gradient heat flux model
29  for RAS or LES of turbulent flow. Allows independent specification of
30  turbulent Prandtl and Schmidt numbers. Unity laminar Lewis number is
31  assumed.
32 
33  The heat flux source is implemented as an implicit energy correction to the
34  temperature gradient based flux source. At convergence the energy
35  correction is 0.
36 
37 Usage
38  \verbatim
39  LES
40  {
41  model nonUnityLewisEddyDiffusivity;
42  Prt 0.85;
43  Sct 0.7;
44  }
45  \endverbatim
46 
47 SourceFiles
48  nonUnityLewisEddyDiffusivity.C
49 
50 \*---------------------------------------------------------------------------*/
51 
52 #ifndef nonUnityLewisEddyDiffusivity_H
53 #define nonUnityLewisEddyDiffusivity_H
54 
56 
57 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 
59 namespace Foam
60 {
61 namespace turbulenceThermophysicalTransportModels
62 {
63 
64 /*---------------------------------------------------------------------------*\
65  Class nonUnityLewisEddyDiffusivity Declaration
66 \*---------------------------------------------------------------------------*/
67 
68 template<class TurbulenceThermophysicalTransportModel>
70 :
71  public unityLewisEddyDiffusivity<TurbulenceThermophysicalTransportModel>
72 {
73 
74 protected:
75 
76  // Protected data
77 
78  // Model coefficients
79 
80  //- Turbulent Schmidt number []
82 
83 
84 public:
85 
86  typedef typename TurbulenceThermophysicalTransportModel::alphaField
87  alphaField;
88 
89  typedef typename
92 
93  typedef typename TurbulenceThermophysicalTransportModel::thermoModel
95 
96 
97  //- Runtime type information
98  TypeName("nonUnityLewisEddyDiffusivity");
99 
100 
101  // Constructors
102 
103  //- Construct from a momentum transport model and a thermo model
105  (
106  const momentumTransportModel& momentumTransport,
107  const thermoModel& thermo,
108  const word& type = typeName
109  );
110 
111 
112  //- Destructor
114  {}
115 
116 
117  // Member Functions
118 
119  //- Read thermophysicalTransport dictionary
120  virtual bool read();
121 
122  //- Effective mass diffusion coefficient
123  // for a given specie mass-fraction [kg/m/s]
124  virtual tmp<volScalarField> DEff(const volScalarField& Yi) const
125  {
126  return volScalarField::New
127  (
128  "DEff",
129  this->D(Yi)
130  + this->Prt_/Sct_*this->alphat()
131  );
132  }
133 
134  //- Effective mass diffusion coefficient
135  // for a given specie mass-fraction for patch [kg/m/s]
136  virtual tmp<scalarField> DEff
137  (
138  const volScalarField& Yi,
139  const label patchi
140  ) const
141  {
142  return
143  this->D(Yi, patchi)
144  + this->Prt_.value()/Sct_.value()*this->alphat(patchi);
145  }
146 
147  //- Return the heat flux [W/m^2]
148  virtual tmp<surfaceScalarField> q() const;
149 
150  //- Return the patch heat flux [W/m^2]
151  virtual tmp<scalarField> q(const label patchi) const;
152 
153  //- Return the source term for the energy equation
154  virtual tmp<fvScalarMatrix> divq(volScalarField& he) const;
155 };
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 } // End namespace turbulenceThermophysicalTransportModels
161 } // End namespace Foam
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #ifdef NoRepository
167 #endif
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
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,.
const Type & value() const
Return const reference to value.
A class for managing temporary objects.
Definition: tmp.H:55
Non-unity-Lewis-Eddy-diffusivity based temperature gradient heat flux model for RAS or LES of turbule...
virtual tmp< fvScalarMatrix > divq(volScalarField &he) const
Return the source term for the energy equation.
TypeName("nonUnityLewisEddyDiffusivity")
Runtime type information.
virtual tmp< volScalarField > DEff(const volScalarField &Yi) const
Effective mass diffusion coefficient.
TurbulenceThermophysicalTransportModel::momentumTransportModel momentumTransportModel
virtual tmp< surfaceScalarField > q() const
Return the heat flux [W/m^2].
nonUnityLewisEddyDiffusivity(const momentumTransportModel &momentumTransport, const thermoModel &thermo, const word &type=typeName)
Construct from a momentum transport model and a thermo model.
Eddy-diffusivity based energy gradient heat flux model for RAS or LES of turbulent flow....
virtual tmp< volScalarField > alphat() const
Turbulent thermal diffusivity for enthalpy [kg/m/s].
virtual tmp< volScalarField > D(const volScalarField &Yi) const
Mass diffusivity.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
A class for handling words, derived from string.
Definition: word.H:63
label patchi
compressibleMomentumTransportModel 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
fluidMulticomponentThermo & thermo
Definition: createFields.H:15