Fourier.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::laminarThermophysicalTransportModels::Fourier
26 
27 Description
28  Fourier's temperature gradient heat flux model
29  for single specie laminar flow.
30 
31  The heat flux source is implemented as an implicit energy correction to the
32  temperature gradient based flux source. At convergence the energy
33  correction is 0.
34 
35 SourceFiles
36  Fourier.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef Fourier_H
41 #define Fourier_H
42 
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 namespace laminarThermophysicalTransportModels
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class Fourier Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 template<class BasicThermophysicalTransportModel>
57 class Fourier
58 :
60  <
61  BasicThermophysicalTransportModel
62  >
63 {
64 
65 public:
66 
67  typedef typename BasicThermophysicalTransportModel::alphaField
68  alphaField;
69 
72 
73  typedef typename BasicThermophysicalTransportModel::thermoModel
75 
76 
77  //- Runtime type information
78  TypeName("Fourier");
79 
80 
81  // Constructors
82 
83  //- Construct from components
84  Fourier
85  (
86  const momentumTransportModel& momentumTransport,
87  const thermoModel& thermo
88  );
89 
90 
91  //- Destructor
92  virtual ~Fourier()
93  {}
94 
95 
96  // Member Functions
97 
98  //- Read thermophysicalTransport dictionary
99  virtual bool read();
100 
101  //- Mass diffusivity
102  // for a given specie mass-fraction [kg/m/s]
103  virtual tmp<volScalarField> D(const volScalarField& Yi) const;
104 
105  //- Mass diffusivity
106  // for a given specie mass-fraction for patch [kg/m/s]
107  virtual tmp<scalarField> D
108  (
109  const volScalarField& Yi,
110  const label patchi
111  ) const;
112 
113  //- Effective mass diffusion coefficient
114  // for a given specie mass-fraction [kg/m/s]
115  virtual tmp<volScalarField> DEff(const volScalarField& Yi) const;
116 
117  //- Effective mass diffusion coefficient
118  // for a given specie mass-fraction for patch [kg/m/s]
119  virtual tmp<scalarField> DEff
120  (
121  const volScalarField& Yi,
122  const label patchi
123  ) const;
124 
125  //- Return the heat flux [W/m^2]
126  virtual tmp<surfaceScalarField> q() const;
127 
128  //- Return the patch heat flux [W/m^2]
129  virtual tmp<scalarField> q(const label patchi) const;
130 
131  //- Return the source term for the energy equation
132  virtual tmp<fvScalarMatrix> divq(volScalarField& he) const;
133 
134  //- Return the specie flux for the given specie mass-fraction [kg/m^2/s]
135  virtual tmp<surfaceScalarField> j(const volScalarField& Yi) const;
136 
137  //- Return the specie flux
138  // for the given specie mass-fraction for patch [kg/m^2/s]
139  virtual tmp<scalarField> j
140  (
141  const volScalarField& Yi,
142  const label patchi
143  ) const;
144 
145  //- Return the source term for the given specie mass-fraction equation
146  virtual tmp<fvScalarMatrix> divj(volScalarField& Yi) const;
147 
148  //- Correct the Fourier viscosity
149  virtual void predict();
150 };
151 
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 } // End namespace laminarThermophysicalTransportModels
156 } // End namespace Foam
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 #ifdef NoRepository
161  #include "Fourier.C"
162 #endif
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 #endif
167 
168 // ************************************************************************* //
Generic GeometricField class.
Templated abstract base class for laminar thermophysical transport models.
Fourier's temperature gradient heat flux model for single specie laminar flow.
Definition: Fourier.H:62
Fourier(const momentumTransportModel &momentumTransport, const thermoModel &thermo)
Construct from components.
Definition: Fourier.C:41
virtual tmp< volScalarField > DEff(const volScalarField &Yi) const
Effective mass diffusion coefficient.
Definition: Fourier.C:102
TypeName("Fourier")
Runtime type information.
BasicThermophysicalTransportModel::alphaField alphaField
Definition: Fourier.H:67
virtual tmp< fvScalarMatrix > divq(volScalarField &he) const
Return the source term for the energy equation.
Definition: Fourier.C:168
virtual tmp< fvScalarMatrix > divj(volScalarField &Yi) const
Return the source term for the given specie mass-fraction equation.
Definition: Fourier.C:219
virtual void predict()
Correct the Fourier viscosity.
Definition: Fourier.C:232
virtual tmp< surfaceScalarField > j(const volScalarField &Yi) const
Return the specie flux for the given specie mass-fraction [kg/m^2/s].
Definition: Fourier.C:186
virtual tmp< surfaceScalarField > q() const
Return the heat flux [W/m^2].
Definition: Fourier.C:135
BasicThermophysicalTransportModel::thermoModel thermoModel
Definition: Fourier.H:73
virtual tmp< volScalarField > D(const volScalarField &Yi) const
Mass diffusivity.
Definition: Fourier.C:67
BasicThermophysicalTransportModel::momentumTransportModel momentumTransportModel
Definition: Fourier.H:70
virtual bool read()
Read thermophysicalTransport dictionary.
Definition: Fourier.C:58
A class for managing temporary objects.
Definition: tmp.H:55
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:15