mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -35,11 +35,8 @@ Foam::chemistryModel<CompType, ThermoType>::chemistryModel
|
||||
)
|
||||
:
|
||||
CompType(mesh),
|
||||
|
||||
ODE(),
|
||||
|
||||
Y_(this->thermo().composition().Y()),
|
||||
|
||||
reactions_
|
||||
(
|
||||
dynamic_cast<const reactingMixture<ThermoType>&>(this->thermo())
|
||||
|
||||
@ -37,7 +37,7 @@ ODESolidChemistryModel
|
||||
:
|
||||
CompType(mesh),
|
||||
ODE(),
|
||||
Ys_(this->solid().composition().Y()),
|
||||
Ys_(this->solidThermo().composition().Y()),
|
||||
pyrolisisGases_
|
||||
(
|
||||
mesh.lookupObject<dictionary>
|
||||
@ -45,12 +45,17 @@ ODESolidChemistryModel
|
||||
),
|
||||
reactions_
|
||||
(
|
||||
dynamic_cast<const reactingSolidMixture<SolidThermo>& >(this->solid())
|
||||
dynamic_cast<const reactingSolidMixture<SolidThermo>& >
|
||||
(
|
||||
this->solidThermo()
|
||||
)
|
||||
),
|
||||
solidThermo_
|
||||
(
|
||||
dynamic_cast<const reactingSolidMixture<SolidThermo>& >
|
||||
(this->solid()).solidData()
|
||||
(
|
||||
this->solidThermo()
|
||||
).solidData()
|
||||
),
|
||||
gasThermo_(pyrolisisGases_.size()),
|
||||
nGases_(pyrolisisGases_.size()),
|
||||
@ -147,7 +152,7 @@ ODESolidChemistryModel
|
||||
|
||||
// Calculate inital values of Ysi0 = rho*delta*Yi
|
||||
Ys0_[fieldI].internalField() =
|
||||
this->solid().rho()
|
||||
this->solidThermo().rho()
|
||||
*max(Ys_[fieldI], scalar(0.001))*mesh.V();
|
||||
}
|
||||
}
|
||||
@ -564,7 +569,7 @@ void Foam::ODESolidChemistryModel<CompType, SolidThermo, GasThermo>::calculate()
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
this->solid().rho()
|
||||
this->solidThermo().rho()
|
||||
);
|
||||
|
||||
forAll(RRs_, i)
|
||||
@ -585,8 +590,8 @@ void Foam::ODESolidChemistryModel<CompType, SolidThermo, GasThermo>::calculate()
|
||||
if (reactingCells_[celli])
|
||||
{
|
||||
scalar rhoi = rho[celli];
|
||||
scalar Ti = this->solid().T()[celli];
|
||||
scalar pi = this->solid().p()[celli];
|
||||
scalar Ti = this->solidThermo().T()[celli];
|
||||
scalar pi = this->solidThermo().p()[celli];
|
||||
|
||||
scalarField c(nSpecie_, 0.0);
|
||||
for (label i=0; i<nSolids_; i++)
|
||||
@ -636,7 +641,7 @@ Foam::ODESolidChemistryModel<CompType, SolidThermo, GasThermo>::solve
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
this->solid().rho()
|
||||
this->solidThermo().rho()
|
||||
);
|
||||
|
||||
forAll(RRs_, i)
|
||||
@ -656,8 +661,8 @@ Foam::ODESolidChemistryModel<CompType, SolidThermo, GasThermo>::solve
|
||||
cellCounter_ = celli;
|
||||
|
||||
scalar rhoi = rho[celli];
|
||||
scalar Ti = this->solid().T()[celli];
|
||||
scalar pi = this->solid().p()[celli];
|
||||
scalar Ti = this->solidThermo().T()[celli];
|
||||
scalar pi = this->solidThermo().p()[celli];
|
||||
|
||||
scalarField c(nSpecie_, 0.0);
|
||||
scalarField c0(nSpecie_, 0.0);
|
||||
|
||||
@ -110,10 +110,10 @@ public:
|
||||
// Member Functions
|
||||
|
||||
//- Return access to the solid thermo package
|
||||
inline solidReactionThermo& solid();
|
||||
inline solidReactionThermo& solidThermo();
|
||||
|
||||
//- Return const access to the solid thermo package
|
||||
inline const solidReactionThermo& solid() const;
|
||||
inline const solidReactionThermo& solidThermo() const;
|
||||
|
||||
//- Return total gases mass source term [kg/m3/s]
|
||||
virtual tmp<DimensionedField<scalar, volMesh> > RRg() const = 0;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,14 +25,14 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
inline Foam::solidReactionThermo& Foam::solidChemistryModel::solid()
|
||||
inline Foam::solidReactionThermo& Foam::solidChemistryModel::solidThermo()
|
||||
{
|
||||
return solidThermo_();
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::solidReactionThermo&
|
||||
Foam::solidChemistryModel::solid() const
|
||||
Foam::solidChemistryModel::solidThermo() const
|
||||
{
|
||||
return solidThermo_();
|
||||
}
|
||||
|
||||
@ -39,7 +39,6 @@ Description
|
||||
#include "constIsoSolidTransport.H"
|
||||
#include "constAnIsoSolidTransport.H"
|
||||
#include "exponentialSolidTransport.H"
|
||||
#include "constSolidRad.H"
|
||||
#include "sensibleEnthalpy.H"
|
||||
#include "thermo.H"
|
||||
|
||||
@ -50,16 +49,13 @@ namespace Foam
|
||||
typedef
|
||||
constIsoSolidTransport
|
||||
<
|
||||
constSolidRad
|
||||
species::thermo
|
||||
<
|
||||
species::thermo
|
||||
hConstThermo
|
||||
<
|
||||
hConstThermo
|
||||
<
|
||||
rhoConst<specie>
|
||||
>,
|
||||
sensibleEnthalpy
|
||||
>
|
||||
rhoConst<specie>
|
||||
>,
|
||||
sensibleEnthalpy
|
||||
>
|
||||
>
|
||||
hConstSolidThermoPhysics;
|
||||
@ -67,16 +63,13 @@ namespace Foam
|
||||
typedef
|
||||
exponentialSolidTransport
|
||||
<
|
||||
constSolidRad
|
||||
species::thermo
|
||||
<
|
||||
species::thermo
|
||||
hExponentialThermo
|
||||
<
|
||||
hExponentialThermo
|
||||
<
|
||||
rhoConst<specie>
|
||||
>,
|
||||
sensibleEnthalpy
|
||||
>
|
||||
rhoConst<specie>
|
||||
>,
|
||||
sensibleEnthalpy
|
||||
>
|
||||
>
|
||||
hExponentialSolidThermoPhysics;
|
||||
|
||||
@ -1,78 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "constSolidRad.H"
|
||||
#include "IOstreams.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class thermo>
|
||||
constSolidRad<thermo>::constSolidRad(const dictionary& dict)
|
||||
:
|
||||
thermo(dict),
|
||||
kappaRad_(readScalar(dict.subDict("radiation").lookup("kappaRad"))),
|
||||
sigmaS_(readScalar(dict.subDict("radiation").lookup("sigmaS"))),
|
||||
emissivity_(readScalar(dict.subDict("radiation").lookup("emissivity")))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class thermo>
|
||||
void Foam::constSolidRad<thermo>::constSolidRad::write(Ostream& os) const
|
||||
{
|
||||
thermo::write(os);
|
||||
|
||||
dictionary dict("radiation");
|
||||
dict.add("kappaRad", kappaRad_);
|
||||
dict.add("sigmaS", sigmaS_);
|
||||
dict.add("emissivity", emissivity_);
|
||||
os << indent << dict.dictName() << dict;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
||||
|
||||
template<class thermo>
|
||||
Ostream& operator<<(Ostream& os, const constSolidRad<thermo>& pg)
|
||||
{
|
||||
os << static_cast<const thermo&>(pg);
|
||||
os << tab << pg.kappaRad_ << tab << pg.sigmaS_ << tab << pg.emissivity_;
|
||||
|
||||
os.check("Ostream& operator<<(Ostream& os, const constSolidRad& st)");
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,171 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::constSolidRad
|
||||
|
||||
Description
|
||||
Constant radiative properties
|
||||
|
||||
SourceFiles
|
||||
constSolidRadI.H
|
||||
constSolidRad.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef constSolidRad_H
|
||||
#define constSolidRad_H
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
template<class Thermo> class constSolidRad;
|
||||
|
||||
template<class Thermo>
|
||||
inline constSolidRad<Thermo> operator*
|
||||
(
|
||||
const scalar,
|
||||
const constSolidRad<Thermo>&
|
||||
);
|
||||
|
||||
template<class Thermo>
|
||||
Ostream& operator<<
|
||||
(
|
||||
Ostream&,
|
||||
const constSolidRad<Thermo>&
|
||||
);
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class constSolidRad Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Thermo>
|
||||
class constSolidRad
|
||||
:
|
||||
public Thermo
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Absorption coefficient
|
||||
scalar kappaRad_;
|
||||
|
||||
//- Scattering coefficient
|
||||
scalar sigmaS_;
|
||||
|
||||
//- Emissivity coefficient
|
||||
scalar emissivity_;
|
||||
|
||||
|
||||
//- Construct from components
|
||||
inline constSolidRad
|
||||
(
|
||||
const Thermo& t,
|
||||
const scalar kappaRad,
|
||||
const scalar sigmaS,
|
||||
const scalar emissivity
|
||||
);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from Istream
|
||||
constSolidRad(const dictionary&);
|
||||
|
||||
//- Construct as named copy
|
||||
inline constSolidRad(const word& name, const constSolidRad&);
|
||||
|
||||
//- Construct and return a clone
|
||||
inline autoPtr<constSolidRad> clone() const;
|
||||
|
||||
// Selector from Istream
|
||||
inline static autoPtr<constSolidRad> New(Istream& is);
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Return the instantiated type name
|
||||
static word typeName()
|
||||
{
|
||||
return "const<" + Thermo::typeName() + '>';
|
||||
}
|
||||
|
||||
//- Return absorption coefficient [1/m]
|
||||
inline scalar kappaRad(scalar T) const;
|
||||
|
||||
//- Return scattering [1/m]
|
||||
inline scalar sigmaS(scalar T) const;
|
||||
|
||||
//- Return emissivity[]
|
||||
inline scalar emissivity(scalar T) const;
|
||||
|
||||
//- Write to Ostream
|
||||
void write(Ostream& os) const;
|
||||
|
||||
|
||||
// Member operators
|
||||
|
||||
inline constSolidRad& operator=(const constSolidRad&);
|
||||
inline void operator+=(const constSolidRad&);
|
||||
inline void operator-=(const constSolidRad&);
|
||||
|
||||
|
||||
// Friend operators
|
||||
|
||||
friend constSolidRad operator* <Thermo>
|
||||
(
|
||||
const scalar,
|
||||
const constSolidRad&
|
||||
);
|
||||
|
||||
|
||||
// Ostream Operator
|
||||
|
||||
friend Ostream& operator<< <Thermo>
|
||||
(
|
||||
Ostream&,
|
||||
const constSolidRad&
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "constSolidRadI.H"
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "constSolidRad.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,179 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "constSolidRad.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class thermo>
|
||||
inline Foam::constSolidRad<thermo>::constSolidRad
|
||||
(
|
||||
const thermo& t,
|
||||
const scalar kappaRad,
|
||||
const scalar sigmaS,
|
||||
const scalar emissivity
|
||||
)
|
||||
:
|
||||
thermo(t),
|
||||
kappaRad_(kappaRad),
|
||||
sigmaS_(sigmaS),
|
||||
emissivity_(emissivity)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
template<class thermo>
|
||||
inline Foam::constSolidRad<thermo>::constSolidRad
|
||||
(
|
||||
const word& name,
|
||||
const constSolidRad& pg
|
||||
)
|
||||
:
|
||||
thermo(name, pg),
|
||||
kappaRad_(pg.kappaRad_),
|
||||
sigmaS_(pg.sigmaS_),
|
||||
emissivity_(pg.emissivity_)
|
||||
{}
|
||||
|
||||
|
||||
template<class thermo>
|
||||
inline Foam::autoPtr<Foam::constSolidRad<thermo> >
|
||||
Foam::constSolidRad<thermo>::clone() const
|
||||
{
|
||||
return autoPtr<constSolidRad<thermo> >(new constSolidRad<thermo>(*this));
|
||||
}
|
||||
|
||||
|
||||
template<class thermo>
|
||||
inline Foam::autoPtr<Foam::constSolidRad<thermo> >
|
||||
Foam::constSolidRad<thermo>::New(Istream& is)
|
||||
{
|
||||
return autoPtr<constSolidRad<thermo> >(new constSolidRad<thermo>(is));
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class thermo>
|
||||
inline Foam::scalar Foam::constSolidRad<thermo>::kappaRad(scalar) const
|
||||
{
|
||||
return kappaRad_;
|
||||
}
|
||||
|
||||
|
||||
template<class thermo>
|
||||
inline Foam::scalar Foam::constSolidRad<thermo>::sigmaS(scalar) const
|
||||
{
|
||||
return sigmaS_;
|
||||
}
|
||||
|
||||
|
||||
template<class thermo>
|
||||
inline Foam::scalar Foam::constSolidRad<thermo>::emissivity(scalar) const
|
||||
{
|
||||
return emissivity_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class thermo>
|
||||
inline Foam::constSolidRad<thermo>&
|
||||
Foam::constSolidRad<thermo>::operator=(const constSolidRad<thermo>& ct)
|
||||
{
|
||||
thermo::operator=(ct);
|
||||
|
||||
kappaRad_ = ct.kappaRad_;
|
||||
sigmaS_ = ct.sigmaS_;
|
||||
emissivity_ = ct.emissivity_;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
template<class thermo>
|
||||
inline void Foam::constSolidRad<thermo>::operator+=
|
||||
(
|
||||
const constSolidRad<thermo>& ct
|
||||
)
|
||||
{
|
||||
scalar molr1 = this->nMoles();
|
||||
|
||||
thermo::operator+=(ct);
|
||||
|
||||
molr1 /= this->nMoles();
|
||||
scalar molr2 = ct.nMoles()/this->nMoles();
|
||||
|
||||
kappaRad_ = molr1*kappaRad_ + molr2*ct.kappaRad_;
|
||||
sigmaS_ = molr1*sigmaS_ + molr2*ct.sigmaS_;
|
||||
emissivity_ = molr1*emissivity_ + molr2*ct.emissivity_;
|
||||
}
|
||||
|
||||
|
||||
template<class thermo>
|
||||
inline void Foam::constSolidRad<thermo>::operator-=
|
||||
(
|
||||
const constSolidRad<thermo>& ct
|
||||
)
|
||||
{
|
||||
scalar molr1 = this->nMoles();
|
||||
|
||||
thermo::operator-=(ct);
|
||||
|
||||
molr1 /= this->nMoles();
|
||||
scalar molr2 = ct.nMoles()/this->nMoles();
|
||||
|
||||
kappaRad_ = molr1*kappaRad_ - molr2*ct.kappaRad_;
|
||||
sigmaS_ = molr1*sigmaS_ - molr2*ct.sigmaS_;
|
||||
emissivity_ = molr1*emissivity_ - molr2*ct.emissivity_;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class thermo>
|
||||
inline Foam::constSolidRad<thermo> Foam::operator*
|
||||
(
|
||||
const scalar s,
|
||||
const constSolidRad<thermo>& ct
|
||||
)
|
||||
{
|
||||
return constSolidRad<thermo>
|
||||
(
|
||||
s*static_cast<const thermo&>(ct),
|
||||
ct.kappaRad_,
|
||||
ct.sigmaS_,
|
||||
ct.emissivity_
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,11 +1,8 @@
|
||||
solidThermo/solidThermo.C
|
||||
solidThermo/solidThermoNew.C
|
||||
solidThermo/solidThermos.C
|
||||
|
||||
mixtures/basicSolidMixture/basicSolidMixture.C
|
||||
|
||||
solidReactionThermo/solidReactionThermo.C
|
||||
solidReactionThermo/solidReactionThermoNew.C
|
||||
solidReactionThermo/solidReactionThermos.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libsolidThermo
|
||||
|
||||
@ -54,6 +54,27 @@ Foam::solidReactionThermo::solidReactionThermo
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::solidReactionThermo> Foam::solidReactionThermo::New
|
||||
(
|
||||
const fvMesh& mesh
|
||||
)
|
||||
{
|
||||
return basicThermo::New<solidReactionThermo>(mesh);
|
||||
}
|
||||
|
||||
|
||||
Foam::autoPtr<Foam::solidReactionThermo> Foam::solidReactionThermo::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
return basicThermo::New<solidReactionThermo>(mesh, dict);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::solidReactionThermo::~solidReactionThermo()
|
||||
|
||||
@ -1,107 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "solidReactionThermo.H"
|
||||
#include "fvMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::solidReactionThermo> Foam::solidReactionThermo::New
|
||||
(
|
||||
const fvMesh& mesh
|
||||
)
|
||||
{
|
||||
// get model name, but do not register the dictionary
|
||||
// otherwise it is registered in the database twice
|
||||
const word modelType
|
||||
(
|
||||
IOdictionary
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"thermophysicalProperties",
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
).lookup("thermoType")
|
||||
);
|
||||
|
||||
Info<< "Selecting thermodynamics package " << modelType << endl;
|
||||
|
||||
fvMeshConstructorTable::iterator cstrIter =
|
||||
fvMeshConstructorTablePtr_->find(modelType);
|
||||
|
||||
if (cstrIter == fvMeshConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn("solidReactionThermo::New(const fvMesh&)")
|
||||
<< "Unknown solidReactionThermo type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid solidReactionThermo types:" << nl
|
||||
<< fvMeshConstructorTablePtr_->sortedToc() << nl
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<solidReactionThermo>(cstrIter()(mesh));
|
||||
}
|
||||
|
||||
|
||||
Foam::autoPtr<Foam::solidReactionThermo> Foam::solidReactionThermo::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "solidReactionThermo::New(const fvMesh&, const dictionary&): "
|
||||
<< "constructing solidReactionThermo"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
const word thermoType = dict.lookup("thermoType");
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(thermoType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"solidReactionThermo::New(const fvMesh&, const dictionary&)"
|
||||
) << "Unknown solidReactionThermo type " << thermoType
|
||||
<< endl << endl
|
||||
<< "Valid solidReactionThermo types are :" << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<solidReactionThermo>(cstrIter()(mesh, dict));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -81,6 +81,27 @@ Foam::solidThermo::solidThermo
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::solidThermo> Foam::solidThermo::New
|
||||
(
|
||||
const fvMesh& mesh
|
||||
)
|
||||
{
|
||||
return basicThermo::New<solidThermo>(mesh);
|
||||
}
|
||||
|
||||
|
||||
Foam::autoPtr<Foam::solidThermo> Foam::solidThermo::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
return basicThermo::New<solidThermo>(mesh, dict);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::solidThermo::~solidThermo()
|
||||
|
||||
@ -1,84 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "solidThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::solidThermo> Foam::solidThermo::New
|
||||
(
|
||||
const fvMesh& mesh
|
||||
)
|
||||
{
|
||||
return basicThermo::New<solidThermo>(mesh);
|
||||
}
|
||||
|
||||
|
||||
Foam::autoPtr<Foam::solidThermo> Foam::solidThermo::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
return basicThermo::New<solidThermo>(mesh, dict);
|
||||
}
|
||||
|
||||
/*
|
||||
Foam::autoPtr<Foam::solidThermo> Foam::solidThermo::New
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "solidThermo::New(const fvMesh&, const dictionary&): "
|
||||
<< "constructing solidThermo"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
const word thermoType = dict.lookup("thermoType");
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(thermoType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"solidThermo::New(const fvMesh&, const dictionary&)"
|
||||
) << "Unknown solidThermo type " << thermoType
|
||||
<< endl << endl
|
||||
<< "Valid solidThermo types are :" << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<solidThermo>(cstrIter()(mesh, dict));
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
Reference in New Issue
Block a user