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-------------------------------------------------------------------------------
10License
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
30template<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
46template<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
60template<class Thermo>
63(
64 const dictionary& dict
65)
66{
68}
69
70// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
71
72template<class Thermo>
74(
75 const scalar p, const scalar T
76) const
77{
78 return (kappa0_*pow(T/Tref_, n0_));
79}
80
81
82template<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
93template<class Thermo>
95mu(const scalar p, const scalar T) const
96{
98 return 0;
99}
100
101
102template<class Thermo>
104alphah(const scalar p, const scalar T) const
105{
106 return kappa(p, T)/this->Cp(p, T);
107}
108
109// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
110
111template<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
130template<class Thermo>
131inline 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// ************************************************************************* //
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Definition: Time.C:717
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Exponential properties for solid heat transport Templated into a given thermodynamics package.
scalar alphah(const scalar p, const scalar T) const
Thermal diffusivity of enthalpy [kg/ms].
virtual tmp< volVectorField > Kappa() const
Anisotropic thermal conductivity [W/m/K].
A class for handling words, derived from Foam::string.
Definition: word.H:68
volScalarField & p
PtrList< volScalarField > & Y
const volScalarField & T
const volScalarField & Cp
Definition: EEqn.H:7
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
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))
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
const dimensionedScalar mu
Atomic mass unit.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
Vector< scalar > vector
Definition: vector.H:61
dictionary dict