exponentialSolidTransportI.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) 2011-2023 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 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
27 
28 template<class Thermo>
30 (
31  const Thermo& t,
32  const scalar kappa0,
33  const scalar n0,
34  const scalar Tref
35 )
36 :
37  Thermo(t),
38  kappa0_(kappa0),
39  n0_(n0),
40  Tref_(Tref)
41 {}
42 
43 
44 template<class Thermo>
46 (
47  const word& name,
49 )
50 :
51  Thermo(name, ct),
52  kappa0_(ct.kappa0_),
53  n0_(ct.n0_),
54  Tref_(ct.Tref_)
55 {}
56 
57 
58 template<class Thermo>
61 {
63  (
65  );
66 }
67 
68 
69 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
70 
71 template<class Thermo>
73 (
74  const scalar p, const scalar T
75 ) const
76 {
77  return (kappa0_*pow(T/Tref_, n0_));
78 }
79 
80 
81 template<class Thermo>
83 (
84  const scalar p, const scalar T
85 ) const
86 {
88  const scalar kappa(kappa0_*pow(T/Tref_, n0_));
89  return vector(kappa, kappa, kappa);
90 }
91 
92 
93 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
94 
95 template<class Thermo>
97 (
99 )
100 {
101  scalar Y1 = this->Y();
102 
103  Y1 /= this->Y();
104  scalar Y2 = ct.Y()/this->Y();
105 
106  kappa0_ = Y1*kappa0_ + Y2*ct.kappa0_;
107  n0_ = (Y1*n0_ + Y2*ct.n0_);
108  Tref_ = (Y1*Tref_ + Y2*ct.Tref_);
109 }
110 
111 
112 // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
113 
114 template<class Thermo>
115 inline Foam::exponentialSolidTransport<Thermo> Foam::operator*
116 (
117  const scalar s,
119 )
120 {
122  (
123  s*static_cast<const Thermo&>(ct),
124  ct.kappa0_,
125  ct.n0_,
126  ct.Tref_
127  );
128 }
129 
130 // ************************************************************************* //
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Exponential properties for solid heat transport Templated into a given thermodynamics package.
vector Kappa(const scalar p, const scalar T) const
Anisotropic thermal conductivity [W/m/K].
exponentialSolidTransport(const Thermo &t, const scalar kappa0, const scalar n0, const scalar Tref)
Construct from components.
scalar kappa(const scalar p, const scalar T) const
Isotropic thermal conductivity [W/m/K].
autoPtr< exponentialSolidTransport > clone() const
Construct and return a clone.
A class for handling words, derived from string.
Definition: word.H:62
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:381
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
word name(const bool)
Return a word representation of a bool.
Definition: boolIO.C:39
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:49
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
volScalarField & p
PtrList< volScalarField > & Y