AndradeTransportI.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) 2021 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 "specie.H"
27 
28 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
29 
30 template<class Thermo>
32 (
33  const Thermo& t,
34  const coeffList& muCoeffs,
35  const coeffList& kappaCoeffs
36 )
37 :
38  Thermo(t),
39  muCoeffs_(muCoeffs),
40  kappaCoeffs_(kappaCoeffs)
41 {}
42 
43 
44 template<class Thermo>
46 (
47  const word& name,
48  const AndradeTransport& pt
49 )
50 :
51  Thermo(name, pt),
52  muCoeffs_(pt.muCoeffs_),
53  kappaCoeffs_(pt.kappaCoeffs_)
54 {}
55 
56 
57 template<class Thermo>
60 {
62  (
63  new AndradeTransport<Thermo>(*this)
64  );
65 }
66 
67 
68 template<class Thermo>
71 {
73  (
75  );
76 }
77 
78 
79 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
80 
81 template<class Thermo>
82 inline Foam::scalar Foam::AndradeTransport<Thermo>::mu
83 (
84  const scalar p,
85  const scalar T
86 ) const
87 {
88  return exp
89  (
90  muCoeffs_[0]
91  + muCoeffs_[1]*T
92  + muCoeffs_[2]*sqr(T)
93  + muCoeffs_[3]/(muCoeffs_[4] + T)
94  );
95 }
96 
97 
98 template<class Thermo>
99 inline Foam::scalar Foam::AndradeTransport<Thermo>::kappa
100 (
101  const scalar p,
102  const scalar T
103 ) const
104 {
105  return exp
106  (
107  kappaCoeffs_[0]
108  + kappaCoeffs_[1]*T
109  + kappaCoeffs_[2]*sqr(T)
110  + kappaCoeffs_[3]/(kappaCoeffs_[4] + T)
111  );
112 }
113 
114 
115 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
dimensionedSymmTensor sqr(const dimensionedVector &dv)
static autoPtr< AndradeTransport > New(const dictionary &dict)
Transport package using the Andrade function for the natural logarithm of dynamic viscosity and therm...
scalar mu(const scalar p, const scalar T) const
Dynamic viscosity [kg/m/s].
dimensionedScalar exp(const dimensionedScalar &ds)
A class for handling words, derived from string.
Definition: word.H:59
scalar kappa(const scalar p, const scalar T) const
Thermal conductivity [W/m/K].
autoPtr< AndradeTransport > clone() const
Construct and return a clone.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52