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-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::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  //- Const access to the coefficients dictionary
104  virtual const dictionary& coeffDict() const;
105 
106  //- Read thermophysicalTransport dictionary
107  virtual bool read();
108 
109  //- Effective mass diffusion coefficient
110  // for a given specie mass-fraction [kg/m/s]
111  virtual tmp<volScalarField> DEff(const volScalarField& Yi) const
112  {
113  return volScalarField::New
114  (
115  "DEff",
116  this->thermo().kappa()/this->thermo().Cp()
117  );
118  }
119 
120  //- Effective mass diffusion coefficient
121  // for a given specie mass-fraction for patch [kg/m/s]
122  virtual tmp<scalarField> DEff
123  (
124  const volScalarField& Yi,
125  const label patchi
126  ) const
127  {
128  return
129  this->thermo().kappa().boundaryField()[patchi]
130  /this->thermo().Cp().boundaryField()[patchi];
131  }
132 
133  //- Return the heat flux [W/m^2]
134  virtual tmp<surfaceScalarField> q() 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 source term for the given specie mass-fraction equation
143  virtual tmp<fvScalarMatrix> divj(volScalarField& Yi) const;
144 
145  //- Correct the unityLewisFourier viscosity
146  virtual void predict();
147 };
148 
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 } // End namespace laminarThermophysicalTransportModels
153 } // End namespace Foam
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 #ifdef NoRepository
158  #include "unityLewisFourier.C"
159 #endif
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 #endif
164 
165 // ************************************************************************* //
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,.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
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 const dictionary & coeffDict() const
Const access to the coefficients dictionary.
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