FickianEddyDiffusivity.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::FickianEddyDiffusivity
26 
27 Description
28  Multi-component Fickian and eddy-diffusivity turbulent based temperature
29  gradient heat flux model for RAS or LES of turbulent flow with optional
30  Soret thermal diffusion of species.
31 
32  The mixture diffusion coefficients are specified as Function2<scalar>s of
33  pressure and temperature but independent of composition.
34 
35  The heat flux source is implemented as an implicit energy correction to the
36  temperature gradient based flux source. At convergence the energy
37  correction is 0.
38 
39 Usage
40  \verbatim
41  RAS
42  {
43  model FickianEddyDiffusivity;
44 
45  mixtureDiffusionCoefficients yes;
46 
47  Prt 0.85;
48  Sct 0.7;
49 
50  Dm // [m^2/s]
51  {
52  O2 1e-2;
53  O3 5e-2;
54  N2 1e-2;
55  }
56 
57  DT // [kg/m/s] Optional
58  {
59  O2 1e-2;
60  O3 5e-2;
61  N2 1e-2;
62  }
63  }
64  \endverbatim
65 
66  or if binary mass diffusion coefficient functions are available they can be
67  mixed to form the mass diffusion coefficients w.r.t. the mixture:
68 
69  \verbatim
70  RAS
71  {
72  model FickianEddyDiffusivity;
73 
74  mixtureDiffusionCoefficients no;
75 
76  Prt 0.85;
77  Sct 0.7;
78 
79  D // [m^2/s]
80  {
81  O2-O2 1e-2;
82  O3-O3 5e-2;
83  N2-N2 1e-2;
84  O3-O2 5e-2;
85  O3-N2 5e-2;
86  O2-N2 1e-2;
87  }
88 
89  DT // [kg/m/s] Optional
90  {
91  O2 1e-2;
92  O3 5e-2;
93  N2 1e-2;
94  }
95  }
96  \endverbatim
97 
98 SourceFiles
99  FickianEddyDiffusivity.C
100 
101 \*---------------------------------------------------------------------------*/
102 
103 #include "Fickian.H"
105 
106 #ifndef FickianEddyDiffusivity_H
107 #define FickianEddyDiffusivity_H
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 namespace Foam
112 {
113 namespace turbulenceThermophysicalTransportModels
114 {
115 
116 /*---------------------------------------------------------------------------*\
117  Class FickianEddyDiffusivity Declaration
118 \*---------------------------------------------------------------------------*/
119 
120 template<class TurbulenceThermophysicalTransportModel>
122 :
123  public Fickian
124  <
125  unityLewisEddyDiffusivity<TurbulenceThermophysicalTransportModel>
126  >
127 {
128 
129 protected:
130 
131  // Protected data
132 
133  // Model coefficients
134 
135  //- Turbulent Schmidt number []
137 
138 
139 public:
140 
141  typedef typename TurbulenceThermophysicalTransportModel::alphaField
142  alphaField;
143 
144  typedef typename
147 
148  typedef typename TurbulenceThermophysicalTransportModel::thermoModel
149  thermoModel;
150 
151 
152  //- Runtime type information
153  TypeName("FickianEddyDiffusivity");
154 
155 
156  // Constructors
157 
158  //- Construct from a momentum transport model and a thermo model
160  (
161  const momentumTransportModel& momentumTransport,
162  const thermoModel& thermo
163  );
164 
165 
166  //- Destructor
167  virtual ~FickianEddyDiffusivity()
168  {}
169 
170 
171  // Member Functions
172 
173  //- Read thermophysicalTransport dictionary
174  virtual bool read();
175 
176  //- Effective mass diffusion coefficient
177  // for a given specie mass-fraction [kg/m/s]
178  virtual tmp<volScalarField> DEff(const volScalarField& Yi) const;
179 
180  //- Effective mass diffusion coefficient
181  // for a given specie mass-fraction for patch [kg/m/s]
182  virtual tmp<scalarField> DEff
183  (
184  const volScalarField& Yi,
185  const label patchi
186  ) const;
187 };
188 
189 
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 
192 } // End namespace turbulenceThermophysicalTransportModels
193 } // End namespace Foam
194 
195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196 
197 #ifdef NoRepository
198  #include "FickianEddyDiffusivity.C"
199 #endif
200 
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 
203 #endif
204 
205 // ************************************************************************* //
Generic GeometricField class.
A class for managing temporary objects.
Definition: tmp.H:55
Multi-component Fickian and eddy-diffusivity turbulent based temperature gradient heat flux model for...
virtual tmp< volScalarField > DEff(const volScalarField &Yi) const
Effective mass diffusion coefficient.
TurbulenceThermophysicalTransportModel::thermoModel thermoModel
TypeName("FickianEddyDiffusivity")
Runtime type information.
TurbulenceThermophysicalTransportModel::momentumTransportModel momentumTransportModel
TurbulenceThermophysicalTransportModel::alphaField alphaField
FickianEddyDiffusivity(const momentumTransportModel &momentumTransport, const thermoModel &thermo)
Construct from a momentum transport model and a thermo model.
virtual bool read()
Read thermophysicalTransport dictionary.
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
fluidMulticomponentThermo & thermo
Definition: createFields.H:31