FickianEddyDiffusivity.C
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 \*---------------------------------------------------------------------------*/
25 
26 #include "FickianEddyDiffusivity.H"
27 
28 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
29 
30 namespace Foam
31 {
32 namespace turbulenceThermophysicalTransportModels
33 {
34 
35 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
36 
37 template<class TurbulenceThermophysicalTransportModel>
40 (
41  const momentumTransportModel& momentumTransport,
42  const thermoModel& thermo
43 )
44 :
45  Fickian<unityLewisEddyDiffusivity<TurbulenceThermophysicalTransportModel>>
46  (
47  typeName,
48  momentumTransport,
49  thermo
50  ),
51 
52  Sct_("Sct", dimless, this->coeffDict())
53 {
54  read();
55 }
56 
57 
58 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
59 
60 template<class TurbulenceThermophysicalTransportModel>
61 bool
63 {
64  if
65  (
66  Fickian
67  <
69  >::read()
70  )
71  {
72  Sct_.read(this->coeffDict());
73 
74  return true;
75  }
76  else
77  {
78  return false;
79  }
80 }
81 
82 
83 template<class TurbulenceThermophysicalTransportModel>
86 (
87  const volScalarField& Yi
88 ) const
89 {
90  return volScalarField::New
91  (
92  "DEff",
93  Fickian
94  <
96  >::DEff(Yi)
97  + (this->Prt_/Sct_)*this->alphat()
98  );
99 }
100 
101 
102 template<class TurbulenceThermophysicalTransportModel>
105 (
106  const volScalarField& Yi,
107  const label patchi
108 ) const
109 {
110  return
111  Fickian
112  <
114  >::DEff(Yi, patchi)
115  + this->Prt_.value()/Sct_.value()*this->alphat(patchi);
116 }
117 
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 } // End namespace turbulenceThermophysicalTransportModels
122 } // End namespace Foam
123 
124 // ************************************************************************* //
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,.
A class for managing temporary objects.
Definition: tmp.H:55
virtual tmp< volScalarField > DEff(const volScalarField &Yi) const
Effective mass diffusion coefficient.
TurbulenceThermophysicalTransportModel::thermoModel thermoModel
TurbulenceThermophysicalTransportModel::momentumTransportModel momentumTransportModel
FickianEddyDiffusivity(const momentumTransportModel &momentumTransport, const thermoModel &thermo)
Construct from a momentum transport model and a thermo model.
virtual bool read()
Read thermophysicalTransport dictionary.
Eddy-diffusivity based energy gradient heat flux model for RAS or LES of turbulent flow....
label patchi
Namespace for OpenFOAM.
bool read(const char *, int32_t &)
Definition: int32IO.C:85
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
const dimensionSet dimless
fluidMulticomponentThermo & thermo
Definition: createFields.H:31