exponentialSolidTransportI.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
29 
30 template<class Thermo>
32 (
33  const Thermo& t,
34  const scalar kappa0,
35  const scalar n0,
36  const scalar Tref
37 )
38 :
39  Thermo(t),
40  kappa0_(kappa0),
41  n0_(n0),
42  Tref_(Tref)
43 {}
44 
45 
46 template<class Thermo>
48 (
49  const word& name,
51 )
52 :
53  Thermo(name, ct),
54  kappa0_(ct.kappa0_),
55  n0_(ct.n0_),
56  Tref_(ct.Tref_)
57 {}
58 
59 
60 template<class Thermo>
63 (
64  const dictionary& dict
65 )
66 {
68 }
69 
70 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
71 
72 template<class Thermo>
74 (
75  const scalar p, const scalar T
76 ) const
77 {
78  return (kappa0_*pow(T/Tref_, n0_));
79 }
80 
81 
82 template<class Thermo>
84 (
85  const scalar p, const scalar T
86 ) const
87 {
88  const scalar kappa(kappa0_*pow(T/Tref_, n0_));
89  return vector(kappa, kappa, kappa);
90 }
91 
92 
93 template<class Thermo>
95 mu(const scalar p, const scalar T) const
96 {
98  return 0;
99 }
100 
101 
102 template<class Thermo>
104 alphah(const scalar p, const scalar T) const
105 {
106  return kappa(p, T)/this->Cp(p, T);
107 }
108 
109 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
110 
111 template<class Thermo>
113 (
115 )
116 {
117  scalar Y1 = this->Y();
118 
119  Y1 /= this->Y();
120  scalar Y2 = ct.Y()/this->Y();
121 
122  kappa0_ = Y1*kappa0_ + Y2*ct.kappa0_;
123  n0_ = (Y1*n0_ + Y2*ct.n0_);
124  Tref_ = (Y1*Tref_ + Y2*ct.Tref_);
125 }
126 
127 
128 // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
129 
130 template<class Thermo>
131 inline Foam::exponentialSolidTransport<Thermo> Foam::operator*
132 (
133  const scalar s,
135 )
136 {
138  (
139  s*static_cast<const Thermo&>(ct),
140  ct.kappa0_,
141  ct.n0_,
142  ct.Tref_
143  );
144 }
145 
146 // ************************************************************************* //
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
s
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Definition: gmvOutputSpray.H:25
Foam::exponentialSolidTransport
Exponential properties for solid heat transport Templated into a given thermodynamics package.
Definition: exponentialSolidTransport.H:49
Foam::exponentialSolidTransport::Kappa
vector Kappa(const scalar p, const scalar T) const
Thermal conductivity [W/mK].
Definition: exponentialSolidTransportI.H:84
Foam::constant::electromagnetic::kappa
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
Foam::exponentialSolidTransport::New
static autoPtr< exponentialSolidTransport > New(const dictionary &dict)
Definition: exponentialSolidTransportI.H:63
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
Foam::exponentialSolidTransport::kappa
scalar kappa(const scalar p, const scalar T) const
Thermal conductivity [W/mK].
Definition: exponentialSolidTransportI.H:74
Foam::exponentialSolidTransport::mu
scalar mu(const scalar p, const scalar T) const
Dynamic viscosity [kg/ms].
Definition: exponentialSolidTransportI.H:95
Foam::exponentialSolidTransport::alphah
scalar alphah(const scalar p, const scalar T) const
Thermal diffusivity of enthalpy [kg/ms].
Definition: exponentialSolidTransportI.H:104
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::pow
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Definition: dimensionedScalar.C:75
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::vector
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:51
Y
PtrList< volScalarField > & Y
Definition: createFieldRefs.H:7
Foam::New
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Definition: DimensionedFieldReuseFunctions.H:105
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::Vector< scalar >
Cp
const volScalarField & Cp
Definition: EEqn.H:7
Foam::name
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59