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,
134  const exponentialSolidTransport<Thermo>& ct
135 )
136 {
137  return exponentialSolidTransport<Thermo>
138  (
139  s*static_cast<const Thermo&>(ct),
140  ct.kappa0_,
141  ct.n0_,
142  ct.Tref_
143  );
144 }
145 
146 // ************************************************************************* //
dictionary dict
Exponential properties for solid heat transport Templated into a given thermodynamics package...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
scalar kappa(const scalar p, const scalar T) const
Thermal conductivity [W/mK].
scalar alphah(const scalar p, const scalar T) const
Thermal diffusivity of enthalpy [kg/ms].
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
static autoPtr< exponentialSolidTransport > New(const dictionary &dict)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition: exprTraits.C:127
A class for handling words, derived from Foam::string.
Definition: word.H:63
Vector< scalar > vector
Definition: vector.H:57
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
const volScalarField & Cp
Definition: EEqn.H:7
const volScalarField & T
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
PtrList< volScalarField > & Y
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
volScalarField & p
scalar mu(const scalar p, const scalar T) const
Dynamic viscosity [kg/ms].
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))
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:686
vector Kappa(const scalar p, const scalar T) const
Thermal conductivity [W/mK].