constAnIsoSolidTransportI.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 | Copyright (C) 2011-2015 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 vector kappa
33 )
34 :
35  Thermo(t),
36  kappa_(kappa)
37 {}
38 
39 
40 template<class Thermo>
42 (
43  const word& name,
44  const constAnIsoSolidTransport& ct
45 )
46 :
47  Thermo(name, ct),
48  kappa_(ct.kappa_)
49 {}
50 
51 
52 template<class Thermo>
55 (
56  const dictionary& dict
57 )
58 {
60  (
62  );
63 }
64 
65 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
66 
67 template<class Thermo>
69 kappa(const scalar p, const scalar T) const
70 {
71  return mag(kappa_);
72 }
73 
74 template<class Thermo>
76 Kappa(const scalar p, const scalar T) const
77 {
78  return kappa_;
79 }
80 
81 
82 template<class Thermo>
84 mu(const scalar p, const scalar T) const
85 {
87  return scalar(0);
88 }
89 
90 
91 template<class Thermo>
93 alphah(const scalar p, const scalar T) const
94 {
95  return kappa_/this->Cpv(p, T);
96 }
97 
98 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
99 
100 template<class Thermo>
103 (
105 )
106 {
107  kappa_ = ct.kappa_;
108 
109  return *this;
110 }
111 
112 
113 template<class Thermo>
115 (
117 )
118 {
119  scalar molr1 = this->nMoles();
120 
121  molr1 /= this->nMoles();
122  scalar molr2 = ct.nMoles()/this->nMoles();
123 
124  kappa_ = molr1*kappa_ + molr2*ct.kappa_;
125 }
126 
127 
128 template<class Thermo>
130 (
132 )
133 {
134  scalar molr1 = this->nMoles();
135 
136  molr1 /= this->nMoles();
137  scalar molr2 = ct.nMoles()/this->nMoles();
138 
139  kappa_ = molr1*kappa_ - molr2*ct.kappa_;
140 }
141 
142 
143 // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
144 
145 
146 template<class Thermo>
147 inline Foam::constAnIsoSolidTransport<Thermo> Foam::operator*
148 (
149  const scalar s,
151 )
152 {
154  (
155  s*static_cast<const Thermo&>(ct),
156  ct.kappa_
157  );
158 }
159 
160 // ************************************************************************* //
p
p
Definition: pEqn.H:62
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::constAnIsoSolidTransport
Constant properties Transport package. Templated into a given Thermodynamics package (needed for ther...
Definition: constAnIsoSolidTransport.H:46
Foam::mag
dimensioned< scalar > mag(const dimensioned< Type > &)
Foam::constant::electromagnetic::kappa
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
Foam::constAnIsoSolidTransport::kappa_
vector kappa_
Constant anisotropic thermal conductivity.
Definition: constAnIsoSolidTransport.H:75
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:365
Foam::constAnIsoSolidTransport::alphah
vector alphah(const scalar p, const scalar T) const
Thermal diffusivity of enthalpy [kg/ms].
Definition: constAnIsoSolidTransportI.H:93
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:55
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::constAnIsoSolidTransport::New
static autoPtr< constAnIsoSolidTransport > New(const dictionary &dict)
Definition: constAnIsoSolidTransportI.H:55
s
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.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Foam::constAnIsoSolidTransport::mu
scalar mu(const scalar p, const scalar T) const
Dynamic viscosity [kg/ms].
Definition: constAnIsoSolidTransportI.H:84
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::constAnIsoSolidTransport::Kappa
vector Kappa(const scalar p, const scalar T) const
Un-isotropic thermal conductivity [W/mK].
Definition: constAnIsoSolidTransportI.H:76
Foam::constAnIsoSolidTransport::constAnIsoSolidTransport
constAnIsoSolidTransport(const Thermo &t, const vector kappa)
Construct from components.
Definition: constAnIsoSolidTransportI.H:30
Foam::Vector< scalar >
Foam::constAnIsoSolidTransport::kappa
scalar kappa(const scalar p, const scalar T) const
Isotropic thermal conductivity [W/mK].
Definition: constAnIsoSolidTransportI.H:69
Foam::name
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47