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-2022 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 
53 
54 #ifndef nonUnityLewisEddyDiffusivity_H
55 #define nonUnityLewisEddyDiffusivity_H
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  );
109 
110 
111  //- Destructor
113  {}
114 
115 
116  // Member Functions
117 
118  //- Read thermophysicalTransport dictionary
119  virtual bool read();
120 
121  //- Effective mass diffusion coefficient
122  // for a given specie mass-fraction [kg/m/s]
123  virtual tmp<volScalarField> DEff(const volScalarField& Yi) const
124  {
125  return volScalarField::New
126  (
127  "DEff",
128  this->thermo().kappa()/this->thermo().Cp()
129  + (this->Prt_/Sct_)*this->alphat()
130  );
131  }
132 
133  //- Effective mass diffusion coefficient
134  // for a given specie mass-fraction for patch [kg/m/s]
135  virtual tmp<scalarField> DEff
136  (
137  const volScalarField& Yi,
138  const label patchi
139  ) const
140  {
141  return
142  this->thermo().kappa().boundaryField()[patchi]
143  /this->thermo().Cp().boundaryField()[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 source term for the energy equation
151  virtual tmp<fvScalarMatrix> divq(volScalarField& he) const;
152 };
153 
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 } // End namespace turbulenceThermophysicalTransportModels
158 } // End namespace Foam
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 #ifdef NoRepository
164 #endif
165 
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 
168 #endif
169 
170 // ************************************************************************* //
scalar Cp(const scalar p, const scalar T) const
Definition: EtoHthermo.H:2
Generic GeometricField class.
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, const Internal &, const PtrList< PatchField< Type >> &)
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...
nonUnityLewisEddyDiffusivity(const momentumTransportModel &momentumTransport, const thermoModel &thermo)
Construct from a momentum transport model and a thermo model.
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].
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].
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
thermo he()
fluidMulticomponentThermo & thermo
Definition: createFields.H:31