mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
Merge branch 'master' into dsmc
This commit is contained in:
@ -60,6 +60,10 @@ $(sha1)/SHA1Digest.C
|
||||
|
||||
primitives/random/Random.C
|
||||
|
||||
functions = primitives/functions
|
||||
$(functions)/Polynomial/makePolynomialsOrder7.C
|
||||
|
||||
|
||||
containers/HashTables/HashTable/HashTableName.C
|
||||
containers/HashTables/StaticHashTable/StaticHashTableName.C
|
||||
containers/Lists/SortableList/ParSortableListName.C
|
||||
|
||||
@ -73,7 +73,7 @@ void inplaceReorder(const UList<label>& oldToNew, ListType&);
|
||||
template<class Container>
|
||||
void inplaceMapValue(const UList<label>& oldToNew, Container&);
|
||||
|
||||
//- Recreate with mapped keys. Remove elements with negative key.
|
||||
//- Recreate with mapped keys. Do not map elements with negative key.
|
||||
template<class Container>
|
||||
void inplaceMapKey(const UList<label>& oldToNew, Container&);
|
||||
|
||||
|
||||
@ -147,7 +147,7 @@ void Foam::inplaceMapKey
|
||||
Container& lst
|
||||
)
|
||||
{
|
||||
Container newLst(lst);
|
||||
Container newLst(lst.size());
|
||||
|
||||
for
|
||||
(
|
||||
|
||||
@ -134,14 +134,26 @@ bool Foam::regIOobject::checkIn()
|
||||
// any mapping
|
||||
registered_ = db().checkIn(*this);
|
||||
|
||||
// checkin on defaultRegion is allowed to fail, since subsetted meshes
|
||||
// check-in on defaultRegion is allowed to fail, since subsetted meshes
|
||||
// are created with the same name as their originating mesh
|
||||
if (!registered_ && debug && name() != polyMesh::defaultRegion)
|
||||
{
|
||||
WarningIn("regIOobject::checkIn()")
|
||||
<< "failed to register object " << objectPath()
|
||||
<< " the name already exists in the objectRegistry"
|
||||
<< endl;
|
||||
if (debug == 2)
|
||||
{
|
||||
// for ease of finding where attempted duplicate check-in
|
||||
// originated
|
||||
FatalErrorIn("regIOobject::checkIn()")
|
||||
<< "failed to register object " << objectPath()
|
||||
<< " the name already exists in the objectRegistry"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
else
|
||||
{
|
||||
WarningIn("regIOobject::checkIn()")
|
||||
<< "failed to register object " << objectPath()
|
||||
<< " the name already exists in the objectRegistry"
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -75,15 +75,15 @@ public:
|
||||
//- The default cloud name: %defaultCloud
|
||||
static word defaultName;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct for the given objectRegistry and named cloud instance
|
||||
cloud(const objectRegistry&, const word& cloudName = "");
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~cloud();
|
||||
//- Destructor
|
||||
virtual ~cloud();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
225
src/OpenFOAM/primitives/functions/Polynomial/Polynomial.C
Normal file
225
src/OpenFOAM/primitives/functions/Polynomial/Polynomial.C
Normal file
@ -0,0 +1,225 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\/ 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 2 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "Polynomial.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<int PolySize>
|
||||
Foam::Polynomial<PolySize>::Polynomial()
|
||||
:
|
||||
VectorSpace<Polynomial<PolySize>, scalar, PolySize>(),
|
||||
name_("unknownPolynomialName"),
|
||||
logActive_(false),
|
||||
logCoeff_(0.0)
|
||||
{}
|
||||
|
||||
|
||||
template<int PolySize>
|
||||
Foam::Polynomial<PolySize>::Polynomial(const word& name, Istream& is)
|
||||
:
|
||||
VectorSpace<Polynomial<PolySize>, scalar, PolySize>(),
|
||||
name_(is),
|
||||
logActive_(false),
|
||||
logCoeff_(0.0)
|
||||
{
|
||||
if (name_ != name)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Polynomial<PolySize>::Polynomial(const word&, Istream&)"
|
||||
) << "Expected polynomial name " << name << " but read " << name_
|
||||
<< nl << exit(FatalError);
|
||||
}
|
||||
|
||||
VectorSpace<Polynomial<PolySize>, scalar, PolySize>::
|
||||
operator=(VectorSpace<Polynomial<PolySize>, scalar, PolySize>(is));
|
||||
|
||||
if (this->size() == 0)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"Polynomial<PolySize>::Polynomial(const word&, Istream&)"
|
||||
) << "Polynomial coefficients for entry " << name_
|
||||
<< " are invalid (empty)" << nl << exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<int PolySize>
|
||||
Foam::Polynomial<PolySize>::Polynomial(const Polynomial<PolySize>& poly)
|
||||
:
|
||||
VectorSpace<Polynomial<PolySize>, scalar, PolySize>(poly),
|
||||
name_(poly.name_),
|
||||
logActive_(poly.logActive_),
|
||||
logCoeff_(poly.logCoeff_)
|
||||
{}
|
||||
|
||||
|
||||
template<int PolySize>
|
||||
Foam::Polynomial<PolySize>::Polynomial
|
||||
(
|
||||
const word& name,
|
||||
const Polynomial<PolySize>& poly
|
||||
)
|
||||
:
|
||||
VectorSpace<Polynomial<PolySize>, scalar, PolySize>(poly),
|
||||
name_(name),
|
||||
logActive_(poly.logActive_),
|
||||
logCoeff_(poly.logCoeff_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<int PolySize>
|
||||
Foam::Polynomial<PolySize>::~Polynomial()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<int PolySize>
|
||||
const Foam::word& Foam::Polynomial<PolySize>::name() const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
|
||||
template<int PolySize>
|
||||
bool& Foam::Polynomial<PolySize>::logActive()
|
||||
{
|
||||
return logActive_;
|
||||
}
|
||||
|
||||
|
||||
template<int PolySize>
|
||||
Foam::scalar& Foam::Polynomial<PolySize>::logCoeff()
|
||||
{
|
||||
return logCoeff_;
|
||||
}
|
||||
|
||||
|
||||
template<int PolySize>
|
||||
Foam::scalar Foam::Polynomial<PolySize>::evaluate(const scalar x) const
|
||||
{
|
||||
scalar y = this->v_[0];
|
||||
|
||||
for (label i=1; i<PolySize; i++)
|
||||
{
|
||||
y += this->v_[i]*pow(x, i);
|
||||
}
|
||||
|
||||
if (logActive_)
|
||||
{
|
||||
y += logCoeff_*log(x);
|
||||
}
|
||||
|
||||
return y;
|
||||
}
|
||||
|
||||
|
||||
template<int PolySize>
|
||||
Foam::scalar Foam::Polynomial<PolySize>::integrateLimits
|
||||
(
|
||||
const scalar x1,
|
||||
const scalar x2
|
||||
) const
|
||||
{
|
||||
if (logActive_)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"scalar Polynomial<PolySize>::integrateLimits"
|
||||
"("
|
||||
"const scalar, "
|
||||
"const scalar"
|
||||
") const"
|
||||
) << "Cannot integrate polynomial with logarithmic coefficients"
|
||||
<< nl << abort(FatalError);
|
||||
}
|
||||
|
||||
intPolyType poly = this->integrate();
|
||||
|
||||
return poly.evaluate(x2) - poly.evaluate(x1);
|
||||
}
|
||||
|
||||
|
||||
template<int PolySize>
|
||||
typename Foam::Polynomial<PolySize>::intPolyType
|
||||
Foam::Polynomial<PolySize>::integrate(const scalar intConstant)
|
||||
{
|
||||
intPolyType newCoeffs;
|
||||
|
||||
newCoeffs[0] = intConstant;
|
||||
forAll(*this, i)
|
||||
{
|
||||
newCoeffs[i + 1] = this->v_[i]/(i + 1);
|
||||
}
|
||||
|
||||
return newCoeffs;
|
||||
}
|
||||
|
||||
|
||||
template<int PolySize>
|
||||
typename Foam::Polynomial<PolySize>::polyType
|
||||
Foam::Polynomial<PolySize>::integrateMinus1(const scalar intConstant)
|
||||
{
|
||||
polyType newCoeffs;
|
||||
|
||||
if (this->v_[0] > VSMALL)
|
||||
{
|
||||
newCoeffs.logActive() = true;
|
||||
newCoeffs.logCoeff() = this->v_[0];
|
||||
}
|
||||
|
||||
newCoeffs[0] = intConstant;
|
||||
|
||||
if (PolySize > 0)
|
||||
{
|
||||
for (label i=1; i<PolySize; i++)
|
||||
{
|
||||
newCoeffs[i] = this->v_[i]/i;
|
||||
}
|
||||
}
|
||||
|
||||
return newCoeffs;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<int PolySize>
|
||||
void Foam::Polynomial<PolySize>::operator=(const Polynomial<PolySize>& poly)
|
||||
{
|
||||
name_ = poly.name_;
|
||||
VectorSpace<Polynomial<PolySize>, scalar, PolySize>::operator=(poly);
|
||||
logActive_ = poly.logActive_;
|
||||
logCoeff_ = poly.logCoeff_;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
198
src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H
Normal file
198
src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H
Normal file
@ -0,0 +1,198 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\/ 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 2 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::Polynomial
|
||||
|
||||
Description
|
||||
Polynomial templated on size (order):
|
||||
|
||||
poly = logCoeff*log(x) + sum(coeff_[i]*x^i)
|
||||
|
||||
where 0 <= i <= n
|
||||
|
||||
- integer powers, starting at zero
|
||||
- evaluate(x) to evaluate the poly for a given value
|
||||
- integrate(x1, x2) between two scalar values
|
||||
- integrate() to return a new, intergated coeff polynomial
|
||||
- increases the size (order)
|
||||
- integrateMinus1() to return a new, integrated coeff polynomial where
|
||||
the base poly starts at order -1
|
||||
|
||||
SourceFiles
|
||||
Polynomial.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Polynomial_H
|
||||
#define Polynomial_H
|
||||
|
||||
#include "word.H"
|
||||
#include "scalar.H"
|
||||
#include "Ostream.H"
|
||||
#include "VectorSpace.H"
|
||||
#include "Vector.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
template<int PolySize>
|
||||
class Polynomial;
|
||||
|
||||
// Forward declaration of friend functions
|
||||
template<int PolySize>
|
||||
Ostream& operator<<
|
||||
(
|
||||
Ostream&,
|
||||
const Polynomial<PolySize>&
|
||||
);
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Polynomial Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<int PolySize>
|
||||
class Polynomial
|
||||
:
|
||||
public VectorSpace<Polynomial<PolySize>, scalar, PolySize>
|
||||
{
|
||||
private:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Polynomial name
|
||||
word name_;
|
||||
|
||||
//- Include the log term? - only activated using integrateMinus1()
|
||||
bool logActive_;
|
||||
|
||||
//- Log coefficient - only activated using integrateMinus1()
|
||||
scalar logCoeff_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
typedef Polynomial<PolySize> polyType;
|
||||
|
||||
typedef Polynomial<PolySize+1> intPolyType;
|
||||
|
||||
//- Run-time type information
|
||||
TypeName("Polynomial")
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
Polynomial();
|
||||
|
||||
//- Construct from name and Istream
|
||||
Polynomial(const word& name, Istream& is);
|
||||
|
||||
//- Copy constructor
|
||||
Polynomial(const Polynomial& poly);
|
||||
|
||||
//- Copy constructor with name
|
||||
Polynomial(const word& name, const Polynomial& poly);
|
||||
|
||||
|
||||
//- Destructor
|
||||
~Polynomial();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Return const access to the polynomial name
|
||||
const word& name() const;
|
||||
|
||||
//- Return access to the log term active flag
|
||||
bool& logActive();
|
||||
|
||||
//- Return access to the log coefficient
|
||||
scalar& logCoeff();
|
||||
|
||||
|
||||
// Evaluation
|
||||
|
||||
//- Return polynomial value
|
||||
scalar evaluate(const scalar x) const;
|
||||
|
||||
//- Return integrated polynomial coefficients
|
||||
// argument becomes zeroth element (constant of integration)
|
||||
intPolyType integrate(const scalar intConstant = 0.0);
|
||||
|
||||
//- Return integrated polynomial coefficients when lowest order
|
||||
// is -1. Argument added to zeroth element
|
||||
polyType integrateMinus1(const scalar intConstant = 0.0);
|
||||
|
||||
//- Integrate between two values
|
||||
scalar integrateLimits(const scalar x1, const scalar x2) const;
|
||||
|
||||
|
||||
// Member operators
|
||||
|
||||
void operator=(const Polynomial& poly);
|
||||
|
||||
|
||||
//- Ostream Operator
|
||||
friend Ostream& operator<< <PolySize>
|
||||
(
|
||||
Ostream&,
|
||||
const Polynomial&
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#define makePolynomial(PolySize) \
|
||||
\
|
||||
defineTemplateTypeNameAndDebugWithName \
|
||||
( \
|
||||
Polynomial<PolySize>, \
|
||||
"Polynomial<"#PolySize">", \
|
||||
0 \
|
||||
)
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "Polynomial.C"
|
||||
# include "PolynomialIO.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
52
src/OpenFOAM/primitives/functions/Polynomial/PolynomialIO.C
Normal file
52
src/OpenFOAM/primitives/functions/Polynomial/PolynomialIO.C
Normal file
@ -0,0 +1,52 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\/ 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 2 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "Polynomial.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||
|
||||
template<int PolySize>
|
||||
Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const Polynomial<PolySize>& poly
|
||||
)
|
||||
{
|
||||
os << poly.name_ << token::SPACE
|
||||
<< static_cast
|
||||
<VectorSpace<Polynomial<PolySize>, scalar, PolySize> >(poly);
|
||||
|
||||
// Check state of Ostream
|
||||
os.check
|
||||
(
|
||||
"Ostream& operator<<(Ostream&, const Polynomial<PolySize>&)"
|
||||
);
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -24,24 +24,28 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "TrackedReactingParcel.H"
|
||||
#include "Polynomial.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template <class ParcelType>
|
||||
Foam::TrackedReactingParcel<ParcelType>::TrackedReactingParcel
|
||||
(
|
||||
const TrackedReactingParcel<ParcelType>& p
|
||||
)
|
||||
:
|
||||
ReactingParcel<ParcelType>(p),
|
||||
ParticleTrackingData<ParcelType>(p)
|
||||
{}
|
||||
namespace Foam
|
||||
{
|
||||
makePolynomial(2);
|
||||
makePolynomial(3);
|
||||
makePolynomial(4);
|
||||
makePolynomial(5);
|
||||
makePolynomial(6);
|
||||
makePolynomial(7);
|
||||
makePolynomial(8);
|
||||
|
||||
// explicitly define max order + 1 to define the integrated form
|
||||
defineTemplateTypeNameAndDebugWithName
|
||||
(
|
||||
Polynomial<9>,
|
||||
"Polynomial<9>",
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * //
|
||||
|
||||
#include "TrackedReactingParcelIO.C"
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -35,9 +35,11 @@ License
|
||||
#include "plane.H"
|
||||
#include "polyTopoChanger.H"
|
||||
#include "polyAddPoint.H"
|
||||
#include "polyRemovePoint.H"
|
||||
#include "polyAddFace.H"
|
||||
#include "polyModifyPoint.H"
|
||||
#include "polyModifyFace.H"
|
||||
#include "polyRemoveFace.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
@ -765,6 +767,9 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
|
||||
projectedSlavePoints
|
||||
);
|
||||
|
||||
// Demand driven calculate the cut faces. Apart from the
|
||||
// cutFaces/cutFaceMaster/cutFaceSlave no information from the cutPatch
|
||||
// is used anymore!
|
||||
const faceList& cutFaces = cutPatch.cutFaces();
|
||||
const labelList& cutFaceMaster = cutPatch.cutFaceMaster();
|
||||
const labelList& cutFaceSlave = cutPatch.cutFaceSlave();
|
||||
@ -1109,22 +1114,26 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
|
||||
{
|
||||
nOrphanedMasters++;
|
||||
|
||||
// Recover original orientation
|
||||
ref.setAction
|
||||
(
|
||||
polyModifyFace
|
||||
(
|
||||
masterPatch[faceI], // new face
|
||||
masterPatchAddr[faceI], // master face index
|
||||
-1, // owner
|
||||
-1, // neighbour
|
||||
false, // flux flip
|
||||
-1, // patch ID
|
||||
false, // remove from zone
|
||||
masterFaceZoneID_.index(), // zone ID
|
||||
false // zone flip
|
||||
)
|
||||
);
|
||||
//// Recover original orientation
|
||||
//ref.setAction
|
||||
//(
|
||||
// polyModifyFace
|
||||
// (
|
||||
// masterPatch[faceI], // new face
|
||||
// masterPatchAddr[faceI], // master face index
|
||||
// -1, // owner
|
||||
// -1, // neighbour
|
||||
// false, // flux flip
|
||||
// -1, // patch ID
|
||||
// false, // remove from zone
|
||||
// masterFaceZoneID_.index(), // zone ID
|
||||
// false // zone flip
|
||||
// )
|
||||
//);
|
||||
|
||||
//Pout<< "**MJ:deleting master face " << masterPatchAddr[faceI]
|
||||
// << " old verts:" << masterPatch[faceI] << endl;
|
||||
ref.setAction(polyRemoveFace(masterPatchAddr[faceI]));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1136,22 +1145,26 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
|
||||
{
|
||||
nOrphanedSlaves++;
|
||||
|
||||
// Recover original orientation
|
||||
ref.setAction
|
||||
(
|
||||
polyModifyFace
|
||||
(
|
||||
slavePatch[faceI], // new face
|
||||
slavePatchAddr[faceI], // slave face index
|
||||
-1, // owner
|
||||
-1, // neighbour
|
||||
false, // flux flip
|
||||
-1, // patch ID
|
||||
false, // remove from zone
|
||||
slaveFaceZoneID_.index(), // zone ID
|
||||
false // zone flip
|
||||
)
|
||||
);
|
||||
//// Recover original orientation
|
||||
//ref.setAction
|
||||
//(
|
||||
// polyModifyFace
|
||||
// (
|
||||
// slavePatch[faceI], // new face
|
||||
// slavePatchAddr[faceI], // slave face index
|
||||
// -1, // owner
|
||||
// -1, // neighbour
|
||||
// false, // flux flip
|
||||
// -1, // patch ID
|
||||
// false, // remove from zone
|
||||
// slaveFaceZoneID_.index(), // zone ID
|
||||
// false // zone flip
|
||||
// )
|
||||
//);
|
||||
|
||||
//Pout<< "**MJ:deleting slave face " << slavePatchAddr[faceI]
|
||||
// << " old verts:" << slavePatch[faceI] << endl;
|
||||
ref.setAction(polyRemoveFace(slavePatchAddr[faceI]));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1400,24 +1413,46 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
|
||||
face newFace;
|
||||
newFace.transfer(newFaceLabels);
|
||||
|
||||
// Pout << "Modifying master stick-out face " << curFaceID << " old face: " << oldFace << " new face: " << newFace << endl;
|
||||
//Pout << "Modifying master stick-out face " << curFaceID
|
||||
// << " old face: " << oldFace << " new face: " << newFace << endl;
|
||||
|
||||
// Modify the face
|
||||
ref.setAction
|
||||
(
|
||||
polyModifyFace
|
||||
if (mesh.isInternalFace(curFaceID))
|
||||
{
|
||||
ref.setAction
|
||||
(
|
||||
newFace, // modified face
|
||||
curFaceID, // label of face being modified
|
||||
own[curFaceID], // owner
|
||||
nei[curFaceID], // neighbour
|
||||
false, // face flip
|
||||
mesh.boundaryMesh().whichPatch(curFaceID), // patch for face
|
||||
false, // remove from zone
|
||||
modifiedFaceZone, // zone for face
|
||||
modifiedFaceZoneFlip // face flip in zone
|
||||
)
|
||||
);
|
||||
polyModifyFace
|
||||
(
|
||||
newFace, // modified face
|
||||
curFaceID, // label of face being modified
|
||||
own[curFaceID], // owner
|
||||
nei[curFaceID], // neighbour
|
||||
false, // face flip
|
||||
-1, // patch for face
|
||||
false, // remove from zone
|
||||
modifiedFaceZone, // zone for face
|
||||
modifiedFaceZoneFlip // face flip in zone
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
ref.setAction
|
||||
(
|
||||
polyModifyFace
|
||||
(
|
||||
newFace, // modified face
|
||||
curFaceID, // label of face being modified
|
||||
own[curFaceID], // owner
|
||||
-1, // neighbour
|
||||
false, // face flip
|
||||
mesh.boundaryMesh().whichPatch(curFaceID), // patch for face
|
||||
false, // remove from zone
|
||||
modifiedFaceZone, // zone for face
|
||||
modifiedFaceZoneFlip // face flip in zone
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1688,21 +1723,42 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
|
||||
// Pout << "Modifying slave stick-out face " << curFaceID << " old face: " << oldFace << " new face: " << newFace << endl;
|
||||
|
||||
// Modify the face
|
||||
ref.setAction
|
||||
(
|
||||
polyModifyFace
|
||||
if (mesh.isInternalFace(curFaceID))
|
||||
{
|
||||
ref.setAction
|
||||
(
|
||||
newFace, // modified face
|
||||
curFaceID, // label of face being modified
|
||||
own[curFaceID], // owner
|
||||
nei[curFaceID], // neighbour
|
||||
false, // face flip
|
||||
mesh.boundaryMesh().whichPatch(curFaceID), // patch for face
|
||||
false, // remove from zone
|
||||
modifiedFaceZone, // zone for face
|
||||
modifiedFaceZoneFlip // face flip in zone
|
||||
)
|
||||
);
|
||||
polyModifyFace
|
||||
(
|
||||
newFace, // modified face
|
||||
curFaceID, // label of face being modified
|
||||
own[curFaceID], // owner
|
||||
nei[curFaceID], // neighbour
|
||||
false, // face flip
|
||||
-1, // patch for face
|
||||
false, // remove from zone
|
||||
modifiedFaceZone, // zone for face
|
||||
modifiedFaceZoneFlip // face flip in zone
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
ref.setAction
|
||||
(
|
||||
polyModifyFace
|
||||
(
|
||||
newFace, // modified face
|
||||
curFaceID, // label of face being modified
|
||||
own[curFaceID], // owner
|
||||
-1, // neighbour
|
||||
false, // face flip
|
||||
mesh.boundaryMesh().whichPatch(curFaceID), // patch for face
|
||||
false, // remove from zone
|
||||
modifiedFaceZone, // zone for face
|
||||
modifiedFaceZoneFlip // face flip in zone
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1735,15 +1791,25 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
|
||||
// slave patch
|
||||
nRetiredPoints++;
|
||||
|
||||
//ref.setAction
|
||||
//(
|
||||
// polyModifyPoint
|
||||
// (
|
||||
// slaveMeshPoints[pointI], // point ID
|
||||
// points[slaveMeshPoints[pointI]], // point
|
||||
// false, // remove from zone
|
||||
// mesh.pointZones().whichZone(slaveMeshPoints[pointI]),// zone
|
||||
// false // in a cell
|
||||
// )
|
||||
//);
|
||||
//Pout<< "MJ retire slave point " << slaveMeshPoints[pointI]
|
||||
// << " coord " << points[slaveMeshPoints[pointI]]
|
||||
// << endl;
|
||||
ref.setAction
|
||||
(
|
||||
polyModifyPoint
|
||||
polyRemovePoint
|
||||
(
|
||||
slaveMeshPoints[pointI], // point ID
|
||||
points[slaveMeshPoints[pointI]], // point
|
||||
false, // remove from zone
|
||||
mesh.pointZones().whichZone(slaveMeshPoints[pointI]),// zone
|
||||
false // in a cell
|
||||
slaveMeshPoints[pointI]
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -28,6 +28,8 @@ Description
|
||||
|
||||
#include "enrichedPatch.H"
|
||||
#include "demandDrivenData.H"
|
||||
#include "OFstream.H"
|
||||
#include "meshTools.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
@ -249,6 +251,33 @@ bool Foam::enrichedPatch::checkSupport() const
|
||||
}
|
||||
|
||||
|
||||
void Foam::enrichedPatch::writeOBJ(const fileName& fName) const
|
||||
{
|
||||
OFstream str(fName);
|
||||
|
||||
const pointField& lp = localPoints();
|
||||
|
||||
forAll(lp, pointI)
|
||||
{
|
||||
meshTools::writeOBJ(str, lp[pointI]);
|
||||
}
|
||||
|
||||
const faceList& faces = localFaces();
|
||||
|
||||
forAll(faces, faceI)
|
||||
{
|
||||
const face& f = faces[faceI];
|
||||
|
||||
str << 'f';
|
||||
forAll(f, fp)
|
||||
{
|
||||
str << ' ' << f[fp]+1;
|
||||
}
|
||||
str << nl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
|
||||
@ -199,9 +199,9 @@ public:
|
||||
(
|
||||
const primitiveFacePatch& masterPatch,
|
||||
const primitiveFacePatch& slavePatch,
|
||||
const labelList& slavePointPointHits,
|
||||
const labelList& slavePointEdgeHits,
|
||||
const List<objectHit>& slavePointFaceHits
|
||||
const labelList& slavePointPointHits,// -1 or common point snapped to
|
||||
const labelList& slavePointEdgeHits, // -1 or common edge snapped to
|
||||
const List<objectHit>& slavePointFaceHits // master face snapped to
|
||||
);
|
||||
|
||||
|
||||
@ -276,6 +276,10 @@ public:
|
||||
|
||||
//- Check if the patch is fully supported
|
||||
bool checkSupport() const;
|
||||
|
||||
|
||||
//- Debugging: dump graphical representation to obj format file
|
||||
void writeOBJ(const fileName&) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -664,14 +664,15 @@ void Foam::slidingInterface::updateMesh(const mapPolyMesh& m)
|
||||
masterPatchID_.update(mesh.boundaryMesh());
|
||||
slavePatchID_.update(mesh.boundaryMesh());
|
||||
|
||||
if (!attached())
|
||||
{
|
||||
calcAttachedAddressing();
|
||||
}
|
||||
else
|
||||
{
|
||||
renumberAttachedAddressing(m);
|
||||
}
|
||||
//MJ:Disabled updating
|
||||
// if (!attached())
|
||||
// {
|
||||
// calcAttachedAddressing();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// renumberAttachedAddressing(m);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -33,15 +33,11 @@ Description
|
||||
{
|
||||
dimensionedScalar totalMass = fvc::domainIntegrate(rho);
|
||||
|
||||
scalar sumLocalContErr =
|
||||
(
|
||||
fvc::domainIntegrate(mag(rho - thermo->rho()))/totalMass
|
||||
).value();
|
||||
scalar sumLocalContErr =
|
||||
(fvc::domainIntegrate(mag(rho - thermo.rho()))/totalMass).value();
|
||||
|
||||
scalar globalContErr =
|
||||
(
|
||||
fvc::domainIntegrate(rho - thermo->rho())/totalMass
|
||||
).value();
|
||||
scalar globalContErr =
|
||||
(fvc::domainIntegrate(rho - thermo.rho())/totalMass).value();
|
||||
|
||||
cumulativeContErr += globalContErr;
|
||||
|
||||
|
||||
@ -1301,7 +1301,11 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::correction
|
||||
{
|
||||
tmp<Foam::fvMatrix<Type> > tAcorr = A - (A & A.psi());
|
||||
|
||||
if ((A.hasUpper() || A.hasLower()) && A.mesh().fluxRequired(A.psi().name()))
|
||||
if
|
||||
(
|
||||
(A.hasUpper() || A.hasLower())
|
||||
&& A.psi().mesh().fluxRequired(A.psi().name())
|
||||
)
|
||||
{
|
||||
tAcorr().faceFluxCorrectionPtr() = (-A.flux()).ptr();
|
||||
}
|
||||
@ -1321,7 +1325,11 @@ Foam::tmp<Foam::fvMatrix<Type> > Foam::correction
|
||||
// Note the matrix coefficients are still that of matrix A
|
||||
const fvMatrix<Type>& A = tAcorr();
|
||||
|
||||
if ((A.hasUpper() || A.hasLower()) && A.mesh().fluxRequired(A.psi().name()))
|
||||
if
|
||||
(
|
||||
(A.hasUpper() || A.hasLower())
|
||||
&& A.psi().mesh().fluxRequired(A.psi().name())
|
||||
)
|
||||
{
|
||||
tAcorr().faceFluxCorrectionPtr() = (-A.flux()).ptr();
|
||||
}
|
||||
|
||||
@ -78,6 +78,9 @@ class Cloud
|
||||
const unallocLabelList& owner_;
|
||||
const unallocLabelList& neighbour_;
|
||||
|
||||
//- Temporary storage for addressing. Used in findFaces.
|
||||
mutable DynamicList<label> labels_;
|
||||
|
||||
|
||||
// Private member functions
|
||||
|
||||
|
||||
@ -22,12 +22,77 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "IOPosition.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::word Foam::IOPosition<ParticleType>::particlePropertiesName
|
||||
(
|
||||
"particleProperties"
|
||||
);
|
||||
|
||||
// * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
void Foam::IOPosition<ParticleType>::readParticleProperties()
|
||||
{
|
||||
IOobject propsDictHeader
|
||||
(
|
||||
particlePropertiesName,
|
||||
cloud_.db().time().timeName(),
|
||||
"uniform"/cloud::prefix/cloud_.name(),
|
||||
cloud_.db(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
);
|
||||
|
||||
if (propsDictHeader.headerOk())
|
||||
{
|
||||
const IOdictionary propsDict(propsDictHeader);
|
||||
|
||||
word procName("processor" + Foam::name(Pstream::myProcNo()));
|
||||
if (propsDict.found(procName))
|
||||
{
|
||||
propsDict.subDict(procName).lookup("particleCount")
|
||||
>> Particle<ParticleType>::particleCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
void Foam::IOPosition<ParticleType>::writeParticleProperties() const
|
||||
{
|
||||
IOdictionary propsDict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
particlePropertiesName,
|
||||
cloud_.db().time().timeName(),
|
||||
"uniform"/cloud::prefix/cloud_.name(),
|
||||
cloud_.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
word procName("processor" + Foam::name(Pstream::myProcNo()));
|
||||
propsDict.add(procName, dictionary());
|
||||
propsDict.subDict(procName).add
|
||||
(
|
||||
"particleCount",
|
||||
Particle<ParticleType>::particleCount
|
||||
);
|
||||
|
||||
propsDict.regIOobject::write();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
@ -70,6 +135,8 @@ bool Foam::IOPosition<ParticleType>::write() const
|
||||
template<class ParticleType>
|
||||
bool Foam::IOPosition<ParticleType>::writeData(Ostream& os) const
|
||||
{
|
||||
writeParticleProperties();
|
||||
|
||||
os<< cloud_.size() << nl << token::BEGIN_LIST << nl;
|
||||
|
||||
forAllConstIter(typename Cloud<ParticleType>, cloud_, iter)
|
||||
@ -90,6 +157,8 @@ void Foam::IOPosition<ParticleType>::readData
|
||||
bool checkClass
|
||||
)
|
||||
{
|
||||
readParticleProperties();
|
||||
|
||||
Istream& is = readStream(checkClass ? typeName : "");
|
||||
|
||||
token firstToken(is);
|
||||
|
||||
@ -59,30 +59,38 @@ class IOPosition
|
||||
const Cloud<ParticleType>& cloud_;
|
||||
|
||||
|
||||
// Private member functions
|
||||
|
||||
//- Read particle properties dictionary
|
||||
void readParticleProperties();
|
||||
|
||||
//- Write particle properties dictionary
|
||||
void writeParticleProperties() const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type name information
|
||||
virtual const word& type() const
|
||||
{
|
||||
return cloud_.type();
|
||||
}
|
||||
// Static data
|
||||
|
||||
//- Runtime type name information
|
||||
virtual const word& type() const
|
||||
{
|
||||
return cloud_.type();
|
||||
}
|
||||
|
||||
//- Name of particle properties dictionary
|
||||
static word particlePropertiesName;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from cloud
|
||||
IOPosition
|
||||
(
|
||||
const Cloud<ParticleType>&
|
||||
);
|
||||
IOPosition(const Cloud<ParticleType>&);
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
void readData
|
||||
(
|
||||
Cloud<ParticleType>& c,
|
||||
bool checkClass
|
||||
);
|
||||
void readData(Cloud<ParticleType>& c, bool checkClass);
|
||||
|
||||
bool write() const;
|
||||
|
||||
|
||||
@ -33,19 +33,26 @@ License
|
||||
#include "wallPolyPatch.H"
|
||||
#include "transform.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::label Foam::Particle<ParticleType>::particleCount = 0;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::labelList Foam::Particle<ParticleType>::findFaces
|
||||
void Foam::Particle<ParticleType>::findFaces
|
||||
(
|
||||
const vector& position
|
||||
const vector& position,
|
||||
DynamicList<label>& faceList
|
||||
) const
|
||||
{
|
||||
const polyMesh& mesh = cloud_.polyMesh_;
|
||||
const labelList& faces = mesh.cells()[celli_];
|
||||
const vector& C = mesh.cellCentres()[celli_];
|
||||
|
||||
DynamicList<label> faceList(10);
|
||||
faceList.clear();
|
||||
forAll(faces, i)
|
||||
{
|
||||
label facei = faces[i];
|
||||
@ -56,26 +63,23 @@ Foam::labelList Foam::Particle<ParticleType>::findFaces
|
||||
faceList.append(facei);
|
||||
}
|
||||
}
|
||||
|
||||
faceList.shrink();
|
||||
|
||||
return faceList;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::labelList Foam::Particle<ParticleType>::findFaces
|
||||
void Foam::Particle<ParticleType>::findFaces
|
||||
(
|
||||
const vector& position,
|
||||
const label celli,
|
||||
const scalar stepFraction
|
||||
const scalar stepFraction,
|
||||
DynamicList<label>& faceList
|
||||
) const
|
||||
{
|
||||
const polyMesh& mesh = cloud_.polyMesh_;
|
||||
const polyMesh& mesh = cloud_.mesh();
|
||||
const labelList& faces = mesh.cells()[celli];
|
||||
const vector& C = mesh.cellCentres()[celli];
|
||||
|
||||
DynamicList<label> faceList(10);
|
||||
faceList.clear();
|
||||
forAll(faces, i)
|
||||
{
|
||||
label facei = faces[i];
|
||||
@ -86,10 +90,6 @@ Foam::labelList Foam::Particle<ParticleType>::findFaces
|
||||
faceList.append(facei);
|
||||
}
|
||||
}
|
||||
|
||||
faceList.shrink();
|
||||
|
||||
return faceList;
|
||||
}
|
||||
|
||||
|
||||
@ -182,7 +182,9 @@ Foam::Particle<ParticleType>::Particle
|
||||
position_(position),
|
||||
celli_(celli),
|
||||
facei_(-1),
|
||||
stepFraction_(0.0)
|
||||
stepFraction_(0.0),
|
||||
origProc_(Pstream::myProcNo()),
|
||||
origId_(particleCount++)
|
||||
{}
|
||||
|
||||
|
||||
@ -193,7 +195,9 @@ Foam::Particle<ParticleType>::Particle(const Particle<ParticleType>& p)
|
||||
position_(p.position_),
|
||||
celli_(p.celli_),
|
||||
facei_(p.facei_),
|
||||
stepFraction_(p.stepFraction_)
|
||||
stepFraction_(p.stepFraction_),
|
||||
origProc_(p.origProc_),
|
||||
origId_(p.origId_)
|
||||
{}
|
||||
|
||||
|
||||
@ -237,7 +241,8 @@ Foam::scalar Foam::Particle<ParticleType>::trackToFace
|
||||
{
|
||||
const polyMesh& mesh = cloud_.polyMesh_;
|
||||
|
||||
labelList faces = findFaces(endPosition);
|
||||
DynamicList<label>& faces = cloud_.labels_;
|
||||
findFaces(endPosition, faces);
|
||||
|
||||
facei_ = -1;
|
||||
scalar trackFraction = 0.0;
|
||||
|
||||
@ -127,6 +127,12 @@ protected:
|
||||
//- Fraction of time-step completed
|
||||
scalar stepFraction_;
|
||||
|
||||
//- Originating processor id
|
||||
label origProc_;
|
||||
|
||||
//- Local particle id on originating processor
|
||||
label origId_;
|
||||
|
||||
|
||||
// Private member functions
|
||||
|
||||
@ -151,18 +157,20 @@ protected:
|
||||
const label facei
|
||||
) const;
|
||||
|
||||
//- Return the faces between position and cell centre
|
||||
labelList findFaces
|
||||
//- Find the faces between position and cell centre
|
||||
void findFaces
|
||||
(
|
||||
const vector& position
|
||||
const vector& position,
|
||||
DynamicList<label>& faceList
|
||||
) const;
|
||||
|
||||
//- Return the faces between position and cell centre
|
||||
labelList findFaces
|
||||
//- Find the faces between position and cell centre
|
||||
void findFaces
|
||||
(
|
||||
const vector& position,
|
||||
const label celli,
|
||||
const scalar stepFraction
|
||||
const scalar stepFraction,
|
||||
DynamicList<label>& faceList
|
||||
) const;
|
||||
|
||||
|
||||
@ -265,11 +273,14 @@ public:
|
||||
|
||||
// Static data members
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Particle");
|
||||
|
||||
//- String representation of properties
|
||||
static string propHeader;
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Particle");
|
||||
//- Cumulative particle count used for particle id
|
||||
static label particleCount;
|
||||
|
||||
|
||||
// Constructors
|
||||
@ -394,6 +405,12 @@ public:
|
||||
//- Return the fraction of time-step completed
|
||||
inline scalar stepFraction() const;
|
||||
|
||||
//- Return the originating processor id
|
||||
inline label origProc() const;
|
||||
|
||||
//- Return the particle id on originating processor
|
||||
inline label origId() const;
|
||||
|
||||
|
||||
// Track
|
||||
|
||||
|
||||
@ -26,15 +26,10 @@ License
|
||||
|
||||
#include "polyMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
inline scalar Particle<ParticleType>::lambda
|
||||
inline Foam::scalar Foam::Particle<ParticleType>::lambda
|
||||
(
|
||||
const vector& from,
|
||||
const vector& to,
|
||||
@ -182,7 +177,7 @@ inline scalar Particle<ParticleType>::lambda
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline scalar Particle<ParticleType>::lambda
|
||||
inline Foam::scalar Foam::Particle<ParticleType>::lambda
|
||||
(
|
||||
const vector& from,
|
||||
const vector& to,
|
||||
@ -234,23 +229,25 @@ inline scalar Particle<ParticleType>::lambda
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline bool Particle<ParticleType>::inCell() const
|
||||
inline bool Foam::Particle<ParticleType>::inCell() const
|
||||
{
|
||||
labelList faces = findFaces(position_);
|
||||
DynamicList<label>& faces = cloud_.labels_;
|
||||
findFaces(position_, faces);
|
||||
|
||||
return (!faces.size());
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline bool Particle<ParticleType>::inCell
|
||||
inline bool Foam::Particle<ParticleType>::inCell
|
||||
(
|
||||
const vector& position,
|
||||
const label celli,
|
||||
const scalar stepFraction
|
||||
) const
|
||||
{
|
||||
labelList faces = findFaces(position, celli, stepFraction);
|
||||
DynamicList<label>& faces = cloud_.labels_;
|
||||
findFaces(position, celli, stepFraction, faces);
|
||||
|
||||
return (!faces.size());
|
||||
}
|
||||
@ -259,7 +256,7 @@ inline bool Particle<ParticleType>::inCell
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
inline Particle<ParticleType>::trackData::trackData
|
||||
inline Foam::Particle<ParticleType>::trackData::trackData
|
||||
(
|
||||
Cloud<ParticleType>& cloud
|
||||
)
|
||||
@ -267,8 +264,10 @@ inline Particle<ParticleType>::trackData::trackData
|
||||
cloud_(cloud)
|
||||
{}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline Cloud<ParticleType>& Particle<ParticleType>::trackData::cloud()
|
||||
inline Foam::Cloud<ParticleType>&
|
||||
Foam::Particle<ParticleType>::trackData::cloud()
|
||||
{
|
||||
return cloud_;
|
||||
}
|
||||
@ -277,76 +276,92 @@ inline Cloud<ParticleType>& Particle<ParticleType>::trackData::cloud()
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
inline const Cloud<ParticleType>& Particle<ParticleType>::cloud() const
|
||||
inline const Foam::Cloud<ParticleType>&
|
||||
Foam::Particle<ParticleType>::cloud() const
|
||||
{
|
||||
return cloud_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline const vector& Particle<ParticleType>::position() const
|
||||
inline const Foam::vector& Foam::Particle<ParticleType>::position() const
|
||||
{
|
||||
return position_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline vector& Particle<ParticleType>::position()
|
||||
inline Foam::vector& Foam::Particle<ParticleType>::position()
|
||||
{
|
||||
return position_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline label Particle<ParticleType>::cell() const
|
||||
{
|
||||
return celli_;
|
||||
}
|
||||
|
||||
template<class ParticleType>
|
||||
inline label& Particle<ParticleType>::cell()
|
||||
inline Foam::label Foam::Particle<ParticleType>::cell() const
|
||||
{
|
||||
return celli_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline label Particle<ParticleType>::face() const
|
||||
inline Foam::label& Foam::Particle<ParticleType>::cell()
|
||||
{
|
||||
return celli_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline Foam::label Foam::Particle<ParticleType>::face() const
|
||||
{
|
||||
return facei_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline bool Particle<ParticleType>::onBoundary() const
|
||||
inline bool Foam::Particle<ParticleType>::onBoundary() const
|
||||
{
|
||||
return facei_ != -1 && facei_ >= cloud_.pMesh().nInternalFaces();
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline scalar& Particle<ParticleType>::stepFraction()
|
||||
inline Foam::scalar& Foam::Particle<ParticleType>::stepFraction()
|
||||
{
|
||||
return stepFraction_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline scalar Particle<ParticleType>::stepFraction() const
|
||||
inline Foam::scalar Foam::Particle<ParticleType>::stepFraction() const
|
||||
{
|
||||
return stepFraction_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline bool Particle<ParticleType>::softImpact() const
|
||||
inline Foam::label Foam::Particle<ParticleType>::origProc() const
|
||||
{
|
||||
return origProc_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline Foam::label Foam::Particle<ParticleType>::origId() const
|
||||
{
|
||||
return origId_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline bool Foam::Particle<ParticleType>::softImpact() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline scalar Particle<ParticleType>::currentTime() const
|
||||
inline Foam::scalar Foam::Particle<ParticleType>::currentTime() const
|
||||
{
|
||||
return
|
||||
cloud_.pMesh().time().value()
|
||||
@ -355,14 +370,14 @@ inline scalar Particle<ParticleType>::currentTime() const
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline label Particle<ParticleType>::patch(const label facei) const
|
||||
inline Foam::label Foam::Particle<ParticleType>::patch(const label facei) const
|
||||
{
|
||||
return cloud_.facePatch(facei);
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline label Particle<ParticleType>::patchFace
|
||||
inline Foam::label Foam::Particle<ParticleType>::patchFace
|
||||
(
|
||||
const label patchi,
|
||||
const label facei
|
||||
@ -373,21 +388,18 @@ inline label Particle<ParticleType>::patchFace
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline scalar Particle<ParticleType>::wallImpactDistance(const vector&) const
|
||||
inline Foam::scalar
|
||||
Foam::Particle<ParticleType>::wallImpactDistance(const vector&) const
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
||||
template<class ParticleType>
|
||||
inline label Particle<ParticleType>::faceInterpolation() const
|
||||
inline Foam::label Foam::Particle<ParticleType>::faceInterpolation() const
|
||||
{
|
||||
return facei_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -31,12 +31,11 @@ License
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParticleType>
|
||||
Foam::string Foam::Particle<ParticleType>::propHeader = "(Px Py Pz) cellI";
|
||||
|
||||
Foam::string Foam::Particle<ParticleType>::propHeader =
|
||||
"(Px Py Pz) cellI origProc origId";
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// Construct from Istream
|
||||
template<class ParticleType>
|
||||
Foam::Particle<ParticleType>::Particle
|
||||
(
|
||||
@ -47,20 +46,26 @@ Foam::Particle<ParticleType>::Particle
|
||||
:
|
||||
cloud_(cloud),
|
||||
facei_(-1),
|
||||
stepFraction_(0.0)
|
||||
stepFraction_(0.0),
|
||||
origProc_(Pstream::myProcNo()),
|
||||
origId_(-1)
|
||||
{
|
||||
if (is.format() == IOstream::ASCII)
|
||||
{
|
||||
is >> position_ >> celli_;
|
||||
is >> position_ >> celli_ >> origProc_ >> origId_;
|
||||
}
|
||||
else
|
||||
{
|
||||
// In binary read both celli_ and facei_, needed for parallel transfer
|
||||
// In binary read all particle data - needed for parallel transfer
|
||||
is.read
|
||||
(
|
||||
reinterpret_cast<char*>(&position_),
|
||||
sizeof(position_) + sizeof(celli_)
|
||||
+ sizeof(facei_) + sizeof(stepFraction_)
|
||||
sizeof(position_)
|
||||
+ sizeof(celli_)
|
||||
+ sizeof(facei_)
|
||||
+ sizeof(stepFraction_)
|
||||
+ sizeof(origProc_)
|
||||
+ sizeof(origId_)
|
||||
);
|
||||
}
|
||||
|
||||
@ -92,7 +97,9 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const Particle<ParticleType>& p)
|
||||
if (os.format() == IOstream::ASCII)
|
||||
{
|
||||
os << p.position_
|
||||
<< token::SPACE << p.celli_;
|
||||
<< token::SPACE << p.celli_
|
||||
<< token::SPACE << p.origProc_
|
||||
<< token::SPACE << p.origId_;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -100,8 +107,12 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const Particle<ParticleType>& p)
|
||||
os.write
|
||||
(
|
||||
reinterpret_cast<const char*>(&p.position_),
|
||||
sizeof(p.position_) + sizeof(p.celli_)
|
||||
+ sizeof(p.facei_) + sizeof(p.stepFraction_)
|
||||
sizeof(p.position_)
|
||||
+ sizeof(p.celli_)
|
||||
+ sizeof(p.facei_)
|
||||
+ sizeof(p.stepFraction_)
|
||||
+ sizeof(p.origProc_)
|
||||
+ sizeof(p.origId_)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -1,166 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\/ 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 2 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::ParticleTrackingData
|
||||
|
||||
Description
|
||||
Class to provide additional properties to allow construction of
|
||||
particle tracks
|
||||
|
||||
SourceFiles
|
||||
ParticleTrackingData.C
|
||||
ParticleTrackingDataIO.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef ParticleTrackingData_H
|
||||
#define ParticleTrackingData_H
|
||||
|
||||
#include "Cloud.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes and friend functions
|
||||
template<class ParcelType>
|
||||
class ParticleTrackingData;
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
Ostream& operator<<
|
||||
(
|
||||
Ostream&,
|
||||
const ParticleTrackingData<ParcelType>&
|
||||
);
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class ParticleTrackingData Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ParcelType>
|
||||
class ParticleTrackingData
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Reference to the cloud
|
||||
const Cloud<ParcelType>& cloud_;
|
||||
|
||||
//- Originating processor id
|
||||
label origProc_;
|
||||
|
||||
//- Local particle id
|
||||
label id_;
|
||||
|
||||
//- Cumulative particle count used for particle id
|
||||
static label PARTICLE_COUNT;
|
||||
|
||||
|
||||
// Private member functions
|
||||
|
||||
//- Write properties - particle count
|
||||
static void writeProperties(const Cloud<ParcelType>& cloud);
|
||||
|
||||
//- Read properties - particle count
|
||||
static void readProperties(const Cloud<ParcelType>& cloud);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from cloud
|
||||
ParticleTrackingData(const Cloud<ParcelType>& cloud);
|
||||
|
||||
//- Construct copy
|
||||
ParticleTrackingData(const ParticleTrackingData& ptd);
|
||||
|
||||
//- Construct from Istream and mesh
|
||||
ParticleTrackingData
|
||||
(
|
||||
const Cloud<ParcelType>& cloud,
|
||||
Istream& is,
|
||||
bool readFields
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
~ParticleTrackingData();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Return const access to the cloud
|
||||
inline const Cloud<ParcelType>& cloud() const;
|
||||
|
||||
//- Return const access to the originating processor id
|
||||
inline label origProc() const;
|
||||
|
||||
//- Return const access to the local particle id
|
||||
inline label id() const;
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Read fields
|
||||
static void readFields(Cloud<ParcelType>& c);
|
||||
|
||||
//- Write fields
|
||||
static void writeFields(const Cloud<ParcelType>& c);
|
||||
|
||||
|
||||
// Ostream Operator
|
||||
|
||||
friend Ostream& operator<< <ParcelType>
|
||||
(
|
||||
Ostream&,
|
||||
const ParticleTrackingData<ParcelType>&
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "ParticleTrackingDataI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "ParticleTrackingData.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,233 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\/ 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 2 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "ParticleTrackingData.H"
|
||||
|
||||
// * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ParticleTrackingData<ParcelType>::readProperties
|
||||
(
|
||||
const Cloud<ParcelType>& cloud
|
||||
)
|
||||
{
|
||||
IOobject propsDictHeader
|
||||
(
|
||||
"particleTrackingProperties",
|
||||
cloud.db().time().timeName(),
|
||||
"uniform/Lagrangian"/cloud.name(),
|
||||
cloud.db(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
);
|
||||
|
||||
if (propsDictHeader.headerOk())
|
||||
{
|
||||
const IOdictionary propsDict(propsDictHeader);
|
||||
|
||||
word procName("processor" + name(Pstream::myProcNo()));
|
||||
if (propsDict.found(procName))
|
||||
{
|
||||
propsDict.subDict(procName).lookup("particleCount") >>
|
||||
PARTICLE_COUNT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ParticleTrackingData<ParcelType>::writeProperties
|
||||
(
|
||||
const Cloud<ParcelType>& cloud
|
||||
)
|
||||
{
|
||||
if (cloud.db().time().outputTime())
|
||||
{
|
||||
IOdictionary propsDict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"particleTrackingProperties",
|
||||
cloud.db().time().timeName(),
|
||||
"uniform/Lagrangian"/cloud.name(),
|
||||
cloud.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
word procName("processor" + name(Pstream::myProcNo()));
|
||||
propsDict.add(procName, dictionary());
|
||||
propsDict.subDict(procName).add("particleCount", PARTICLE_COUNT);
|
||||
|
||||
propsDict.regIOobject::write();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::ParticleTrackingData<ParcelType>::ParticleTrackingData
|
||||
(
|
||||
const Cloud<ParcelType>& cloud,
|
||||
Istream& is,
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
cloud_(cloud),
|
||||
origProc_(-1),
|
||||
id_(-1)
|
||||
{
|
||||
if (readFields)
|
||||
{
|
||||
if (is.format() == IOstream::ASCII)
|
||||
{
|
||||
is >> origProc_ >> id_;
|
||||
}
|
||||
else
|
||||
{
|
||||
is.read
|
||||
(
|
||||
reinterpret_cast<char*>(&origProc_),
|
||||
sizeof(origProc_) + sizeof(id_)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Check state of Istream
|
||||
is.check
|
||||
(
|
||||
"ParticleTrackingData<ParcelType>::ParticleTrackingData"
|
||||
"("
|
||||
"Istream&, "
|
||||
"bool"
|
||||
")"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ParticleTrackingData<ParcelType>::readFields
|
||||
(
|
||||
Cloud<ParcelType>& c
|
||||
)
|
||||
{
|
||||
if (!c.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
readProperties(c);
|
||||
|
||||
IOField<label> origProc(c.fieldIOobject("origProc", IOobject::MUST_READ));
|
||||
c.checkFieldIOobject(c, origProc);
|
||||
|
||||
IOField<label> id(c.fieldIOobject("id", IOobject::MUST_READ));
|
||||
c.checkFieldIOobject(c, id);
|
||||
|
||||
label i = 0;
|
||||
forAllIter(typename Cloud<ParcelType>, c, iter)
|
||||
{
|
||||
ParcelType& p = iter();
|
||||
p.origProc_ = origProc[i];
|
||||
p.id_ = id[i];
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ParticleTrackingData<ParcelType>::writeFields
|
||||
(
|
||||
const Cloud<ParcelType>& c
|
||||
)
|
||||
{
|
||||
writeProperties(c);
|
||||
|
||||
const label np = c.size();
|
||||
|
||||
IOField<label> origProc
|
||||
(
|
||||
c.fieldIOobject("origProc", IOobject::NO_READ),
|
||||
np
|
||||
);
|
||||
IOField<label> id(c.fieldIOobject("id", IOobject::NO_READ), np);
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter(typename Cloud<ParcelType>, c, iter)
|
||||
{
|
||||
const ParcelType& p = iter();
|
||||
|
||||
origProc[i] = p.origProc();
|
||||
id[i] = p.id();
|
||||
i++;
|
||||
}
|
||||
|
||||
origProc.write();
|
||||
id.write();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const ParticleTrackingData<ParcelType>& p
|
||||
)
|
||||
{
|
||||
if (os.format() == IOstream::ASCII)
|
||||
{
|
||||
os << p.origProc_ << token::SPACE << p.id_ << token::SPACE;
|
||||
}
|
||||
else
|
||||
{
|
||||
os.write
|
||||
(
|
||||
reinterpret_cast<const char*>(&p.origProc_),
|
||||
sizeof(p.origProc_) + sizeof(p.id_)
|
||||
);
|
||||
}
|
||||
|
||||
// Check state of Ostream
|
||||
os.check
|
||||
(
|
||||
"Ostream& operator<<"
|
||||
"("
|
||||
"Ostream&, "
|
||||
"const ParticleTrackingData<ParcelType>&"
|
||||
")"
|
||||
);
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -35,7 +35,7 @@ Foam::CoalCloud<ThermoType>::CoalCloud
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo
|
||||
basicThermo& thermo
|
||||
)
|
||||
:
|
||||
ReactingMultiphaseCloud<CoalParcel<ThermoType> >
|
||||
|
||||
@ -76,7 +76,7 @@ public:
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo
|
||||
basicThermo& thermo
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/liquidMixture/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solids/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solidMixture/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
@ -30,6 +30,6 @@ LIB_LIBS = \
|
||||
-lliquidMixture \
|
||||
-lsolids \
|
||||
-lsolidMixture \
|
||||
-lcombustionThermophysicalModels \
|
||||
-lreactionThermophysicalModels \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels
|
||||
|
||||
@ -28,7 +28,7 @@ License
|
||||
#define createCoalParcelTypes_H
|
||||
|
||||
#include "makeParcelIOList.H"
|
||||
#include "reactingThermoTypes.H"
|
||||
#include "thermoPhysicsTypes.H"
|
||||
#include "CoalCloud.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -38,12 +38,17 @@ License
|
||||
createCoalParcelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieConstProperties \
|
||||
constGasThermoPhysics \
|
||||
); \
|
||||
createCoalParcelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieReactingProperties \
|
||||
gasThermoPhysics \
|
||||
); \
|
||||
createCoalParcelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
icoPoly8ThermoPhysics \
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "reactingThermoTypes.H"
|
||||
#include "thermoPhysicsTypes.H"
|
||||
#include "ReactingMultiphaseCloud.H"
|
||||
|
||||
#include "NoSurfaceReaction.H"
|
||||
@ -44,12 +44,17 @@ License
|
||||
makeCoalSurfaceReactionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieConstProperties \
|
||||
constGasThermoPhysics \
|
||||
); \
|
||||
makeCoalSurfaceReactionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieReactingProperties \
|
||||
gasThermoPhysics \
|
||||
); \
|
||||
makeCoalSurfaceReactionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
icoPoly8ThermoPhysics \
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -50,10 +50,10 @@ Foam::COxidationDiffusionLimitedRate<CloudType>::COxidationDiffusionLimitedRate
|
||||
CsLocalId_ = owner.composition().localId(idSolid, "C");
|
||||
|
||||
// Set local copies of thermo properties
|
||||
WO2_ = owner.composition().carrierSpecies()[O2GlobalId_].W();
|
||||
scalar WCO2 = owner.composition().carrierSpecies()[CO2GlobalId_].W();
|
||||
WO2_ = owner.mcCarrierThermo().speciesData()[O2GlobalId_].W();
|
||||
scalar WCO2 = owner.mcCarrierThermo().speciesData()[CO2GlobalId_].W();
|
||||
WC_ = WCO2 - WO2_;
|
||||
HcCO2_ = owner.composition().carrierSpecies()[CO2GlobalId_].Hc();
|
||||
HcCO2_ = owner.mcCarrierThermo().speciesData()[CO2GlobalId_].Hc();
|
||||
|
||||
if (Sb_ < 0)
|
||||
{
|
||||
@ -120,8 +120,7 @@ Foam::scalar Foam::COxidationDiffusionLimitedRate<CloudType>::calculate
|
||||
}
|
||||
|
||||
// Local mass fraction of O2 in the carrier phase
|
||||
const scalar YO2 =
|
||||
this->owner().carrierThermo().composition().Y(O2GlobalId_)[cellI];
|
||||
const scalar YO2 = this->owner().mcCarrierThermo().Y(O2GlobalId_)[cellI];
|
||||
|
||||
// Change in C mass [kg]
|
||||
scalar dmC =
|
||||
|
||||
@ -58,10 +58,10 @@ COxidationKineticDiffusionLimitedRate
|
||||
CsLocalId_ = owner.composition().localId(idSolid, "C");
|
||||
|
||||
// Set local copies of thermo properties
|
||||
WO2_ = owner.composition().carrierSpecies()[O2GlobalId_].W();
|
||||
scalar WCO2 = owner.composition().carrierSpecies()[CO2GlobalId_].W();
|
||||
WO2_ = owner.mcCarrierThermo().speciesData()[O2GlobalId_].W();
|
||||
scalar WCO2 = owner.mcCarrierThermo().speciesData()[CO2GlobalId_].W();
|
||||
WC_ = WCO2 - WO2_;
|
||||
HcCO2_ = owner.composition().carrierSpecies()[CO2GlobalId_].Hc();
|
||||
HcCO2_ = owner.mcCarrierThermo().speciesData()[CO2GlobalId_].Hc();
|
||||
|
||||
if (Sb_ < 0)
|
||||
{
|
||||
@ -128,8 +128,7 @@ Foam::scalar Foam::COxidationKineticDiffusionLimitedRate<CloudType>::calculate
|
||||
}
|
||||
|
||||
// Local mass fraction of O2 in the carrier phase
|
||||
const scalar YO2 =
|
||||
this->owner().carrierThermo().composition().Y(O2GlobalId_)[cellI];
|
||||
const scalar YO2 = this->owner().mcCarrierThermo().Y(O2GlobalId_)[cellI];
|
||||
|
||||
// Diffusion rate coefficient
|
||||
const scalar D0 = C1_/d*pow(0.5*(T + Tc), 0.75);
|
||||
|
||||
@ -69,8 +69,8 @@ Foam::COxidationMurphyShaddix<CloudType>::COxidationMurphyShaddix
|
||||
CsLocalId_ = owner.composition().localId(idSolid, "C");
|
||||
|
||||
// Set local copies of thermo properties
|
||||
WO2_ = owner.composition().carrierSpecies()[O2GlobalId_].W();
|
||||
scalar WCO2 = owner.composition().carrierSpecies()[CO2GlobalId_].W();
|
||||
WO2_ = owner.mcCarrierThermo().speciesData()[O2GlobalId_].W();
|
||||
scalar WCO2 = owner.mcCarrierThermo().speciesData()[CO2GlobalId_].W();
|
||||
WC_ = WCO2 - WO2_;
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::calculate
|
||||
|
||||
// Cell carrier phase O2 species density [kg/m^3]
|
||||
const scalar rhoO2 =
|
||||
rhoc*this->owner().carrierThermo().composition().Y(O2GlobalId_)[cellI];
|
||||
rhoc*this->owner().mcCarrierThermo().Y(O2GlobalId_)[cellI];
|
||||
|
||||
if (rhoO2 < SMALL)
|
||||
{
|
||||
@ -211,9 +211,9 @@ Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::calculate
|
||||
this->owner().composition().solids().properties()[CsLocalId_].Hf()
|
||||
+ this->owner().composition().solids().properties()[CsLocalId_].cp()*T;
|
||||
const scalar HCO2 =
|
||||
this->owner().composition().carrierSpecies()[CO2GlobalId_].H(T);
|
||||
this->owner().mcCarrierThermo().speciesData()[CO2GlobalId_].H(T);
|
||||
const scalar HO2 =
|
||||
this->owner().composition().carrierSpecies()[O2GlobalId_].H(T);
|
||||
this->owner().mcCarrierThermo().speciesData()[O2GlobalId_].H(T);
|
||||
|
||||
// Heat of reaction
|
||||
return dOmega*(WC_*HC + WO2_*HO2 - (WC_ + WO2_)*HCO2);
|
||||
|
||||
@ -11,7 +11,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/liquidMixture/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/pdfs/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
|
||||
@ -34,15 +34,14 @@ License
|
||||
#include "wallPolyPatch.H"
|
||||
#include "wedgePolyPatch.H"
|
||||
#include "processorPolyPatch.H"
|
||||
#include "combustionMixture.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
#include "basicMultiComponentMixture.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineParticleTypeNameAndDebug(parcel, 0);
|
||||
defineTemplateTypeNameAndDebug(Cloud<parcel>, 0);
|
||||
defineParticleTypeNameAndDebug(parcel, 0);
|
||||
defineTemplateTypeNameAndDebug(Cloud<parcel>, 0);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -30,7 +30,7 @@ License
|
||||
#include "dragModel.H"
|
||||
#include "evaporationModel.H"
|
||||
#include "heatTransferModel.H"
|
||||
#include "combustionMixture.H"
|
||||
#include "basicMultiComponentMixture.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -93,7 +93,7 @@ void parcel::setRelaxationTimes
|
||||
for(label i=0; i<Nf; i++)
|
||||
{
|
||||
label j = sDB.liquidToGasIndex()[i];
|
||||
scalar Y = sDB.composition().Y()[j][celli];
|
||||
scalar Y = sDB.composition().Y()[j][celli];
|
||||
scalar Wi = sDB.gasProperties()[j].W();
|
||||
Yf[i] = Y;
|
||||
Xf[i] = Y*W/Wi;
|
||||
@ -139,14 +139,14 @@ void parcel::setRelaxationTimes
|
||||
scalar Prandtl = Pr(cpMixture, muf, kMixture);
|
||||
|
||||
// calculate the characteritic times
|
||||
|
||||
|
||||
if(liquidCore_> 0.5)
|
||||
{
|
||||
// no drag for parcels in the liquid core..
|
||||
tauMomentum = GREAT;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
tauMomentum = sDB.drag().relaxationTime
|
||||
(
|
||||
Urel(Up),
|
||||
@ -218,10 +218,10 @@ void parcel::setRelaxationTimes
|
||||
{
|
||||
scalar Nusselt =
|
||||
sDB.heatTransfer().Nu(Reynolds, Prandtl);
|
||||
|
||||
|
||||
// calculating the boiling temperature of the liquid at ambient pressure
|
||||
scalar tBoilingSurface = Td;
|
||||
|
||||
|
||||
label Niter = 0;
|
||||
scalar deltaT = 10.0;
|
||||
scalar dp0 = fuels.properties()[i].pv(pressure, tBoilingSurface) - pressure;
|
||||
@ -255,16 +255,16 @@ void parcel::setRelaxationTimes
|
||||
}
|
||||
dp0 = dp;
|
||||
}
|
||||
|
||||
|
||||
scalar vapourSurfaceEnthalpy = 0.0;
|
||||
scalar vapourFarEnthalpy = 0.0;
|
||||
|
||||
|
||||
for(label k = 0; k < sDB.gasProperties().size(); k++)
|
||||
{
|
||||
vapourSurfaceEnthalpy += sDB.composition().Y()[k][celli]*sDB.gasProperties()[k].H(tBoilingSurface);
|
||||
vapourFarEnthalpy += sDB.composition().Y()[k][celli]*sDB.gasProperties()[k].H(temperature);
|
||||
}
|
||||
|
||||
|
||||
scalar kLiquid = fuels.properties()[i].K(pressure, 0.5*(tBoilingSurface+T()));
|
||||
|
||||
tauBoiling[i] = sDB.evaporation().boilingTime
|
||||
|
||||
@ -36,7 +36,7 @@ License
|
||||
#include "injectorModel.H"
|
||||
#include "wallModel.H"
|
||||
|
||||
#include "combustionMixture.H"
|
||||
#include "basicMultiComponentMixture.H"
|
||||
|
||||
#include "symmetryPolyPatch.H"
|
||||
#include "wedgePolyPatch.H"
|
||||
@ -56,8 +56,8 @@ Foam::spray::spray
|
||||
const volScalarField& rho,
|
||||
const volScalarField& p,
|
||||
const volScalarField& T,
|
||||
const combustionMixture& composition,
|
||||
const PtrList<specieProperties>& gasProperties,
|
||||
const basicMultiComponentMixture& composition,
|
||||
const PtrList<gasThermoPhysics>& gasProperties,
|
||||
const dictionary&,
|
||||
const dictionary& environmentalProperties
|
||||
)
|
||||
@ -264,7 +264,7 @@ Foam::spray::spray
|
||||
"spray::spray(const volVectorField& U, "
|
||||
"const volScalarField& rho, const volScalarField& p, "
|
||||
"const volScalarField& T, const combustionMixture& composition,"
|
||||
"const PtrList<specieProperties>& gaseousFuelProperties, "
|
||||
"const PtrList<gasThermoPhsyics>& gaseousFuelProperties, "
|
||||
"const dictionary& thermophysicalProperties, "
|
||||
"const dictionary& environmentalProperties)"
|
||||
) << "spray::(...) only one wedgePolyPatch found. "
|
||||
|
||||
@ -38,10 +38,10 @@ Description
|
||||
#include "IOPtrList.H"
|
||||
#include "interpolation.H"
|
||||
#include "liquid.H"
|
||||
#include "sprayThermoTypes.H"
|
||||
#include "autoPtr.H"
|
||||
#include "liquidMixture.H"
|
||||
#include "Random.H"
|
||||
#include "thermoPhysicsTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -58,7 +58,7 @@ class injectorModel;
|
||||
class heatTransferModel;
|
||||
class wallModel;
|
||||
|
||||
class combustionMixture;
|
||||
class basicMultiComponentMixture;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class spray Declaration
|
||||
@ -127,8 +127,8 @@ class spray
|
||||
|
||||
// Composition properties
|
||||
|
||||
const PtrList<specieProperties>& gasProperties_;
|
||||
const combustionMixture& composition_;
|
||||
const PtrList<gasThermoPhysics>& gasProperties_;
|
||||
const basicMultiComponentMixture& composition_;
|
||||
|
||||
List<label> liquidToGasIndex_;
|
||||
List<label> gasToLiquidIndex_;
|
||||
@ -192,8 +192,8 @@ public:
|
||||
const volScalarField& rho,
|
||||
const volScalarField& p,
|
||||
const volScalarField& T,
|
||||
const combustionMixture& composition,
|
||||
const PtrList<specieProperties>& gasProperties,
|
||||
const basicMultiComponentMixture& composition,
|
||||
const PtrList<gasThermoPhysics>& gasProperties,
|
||||
const dictionary& thermophysicalProperties,
|
||||
const dictionary& environmentalProperties
|
||||
);
|
||||
@ -257,8 +257,8 @@ public:
|
||||
inline const vector& g() const;
|
||||
|
||||
inline const liquidMixture& fuels() const;
|
||||
inline const PtrList<specieProperties>& gasProperties() const;
|
||||
inline const combustionMixture& composition() const;
|
||||
inline const PtrList<gasThermoPhysics>& gasProperties() const;
|
||||
inline const basicMultiComponentMixture& composition() const;
|
||||
|
||||
inline const List<label>& liquidToGasIndex() const;
|
||||
inline const List<label>& gasToLiquidIndex() const;
|
||||
|
||||
@ -36,71 +36,85 @@ inline const Time& spray::runTime() const
|
||||
return runTime_;
|
||||
}
|
||||
|
||||
|
||||
inline const fvMesh& spray::mesh() const
|
||||
{
|
||||
return mesh_;
|
||||
}
|
||||
|
||||
|
||||
inline const volVectorField& spray::U() const
|
||||
{
|
||||
return U_;
|
||||
}
|
||||
|
||||
|
||||
inline const volScalarField& spray::rho() const
|
||||
{
|
||||
return rho_;
|
||||
}
|
||||
|
||||
|
||||
inline const volScalarField& spray::p() const
|
||||
{
|
||||
return p_;
|
||||
}
|
||||
|
||||
|
||||
inline const volScalarField& spray::T() const
|
||||
{
|
||||
return T_;
|
||||
}
|
||||
|
||||
|
||||
inline PtrList<injector>& spray::injectors()
|
||||
{
|
||||
return injectors_;
|
||||
}
|
||||
|
||||
|
||||
inline const PtrList<injector>& spray::injectors() const
|
||||
{
|
||||
return injectors_;
|
||||
}
|
||||
|
||||
|
||||
inline const atomizationModel& spray::atomization() const
|
||||
{
|
||||
return atomization_;
|
||||
}
|
||||
|
||||
|
||||
inline const breakupModel& spray::breakup() const
|
||||
{
|
||||
return breakupModel_;
|
||||
}
|
||||
|
||||
|
||||
inline const collisionModel& spray::collisions() const
|
||||
{
|
||||
return collisionModel_;
|
||||
}
|
||||
|
||||
|
||||
inline const dispersionModel& spray::dispersion() const
|
||||
{
|
||||
return dispersionModel_;
|
||||
}
|
||||
|
||||
|
||||
inline const dragModel& spray::drag() const
|
||||
{
|
||||
return drag_;
|
||||
}
|
||||
|
||||
|
||||
inline const evaporationModel& spray::evaporation() const
|
||||
{
|
||||
return evaporation_;
|
||||
}
|
||||
|
||||
|
||||
inline const heatTransferModel& spray::heatTransfer() const
|
||||
{
|
||||
return heatTransfer_;
|
||||
@ -112,11 +126,13 @@ inline const injectorModel& spray::injection() const
|
||||
return injectorModel_;
|
||||
}
|
||||
|
||||
|
||||
inline const wallModel& spray::wall() const
|
||||
{
|
||||
return wall_;
|
||||
}
|
||||
|
||||
|
||||
inline tmp<volVectorField> spray::momentumSource() const
|
||||
{
|
||||
tmp<volVectorField> tsource
|
||||
@ -146,6 +162,7 @@ inline tmp<volVectorField> spray::momentumSource() const
|
||||
return tsource;
|
||||
}
|
||||
|
||||
|
||||
inline tmp<volScalarField> spray::evaporationSource(const label si) const
|
||||
{
|
||||
tmp<volScalarField> tsource
|
||||
@ -179,6 +196,7 @@ inline tmp<volScalarField> spray::evaporationSource(const label si) const
|
||||
return tsource;
|
||||
}
|
||||
|
||||
|
||||
inline tmp<volScalarField> spray::heatTransferSource() const
|
||||
{
|
||||
tmp<volScalarField> tsource
|
||||
@ -209,6 +227,7 @@ inline Random& spray::rndGen()
|
||||
return rndGen_;
|
||||
}
|
||||
|
||||
|
||||
inline label spray::subCycles() const
|
||||
{
|
||||
return subCycles_;
|
||||
@ -226,81 +245,97 @@ inline const liquidMixture& spray::fuels() const
|
||||
return fuels_;
|
||||
}
|
||||
|
||||
inline const PtrList<specieProperties>& spray::gasProperties() const
|
||||
|
||||
inline const PtrList<gasThermoPhysics>& spray::gasProperties() const
|
||||
{
|
||||
return gasProperties_;
|
||||
}
|
||||
|
||||
inline const combustionMixture& spray::composition() const
|
||||
|
||||
inline const basicMultiComponentMixture& spray::composition() const
|
||||
{
|
||||
return composition_;
|
||||
}
|
||||
|
||||
|
||||
inline const List<label>& spray::liquidToGasIndex() const
|
||||
{
|
||||
return liquidToGasIndex_;
|
||||
}
|
||||
|
||||
|
||||
inline const List<label>& spray::gasToLiquidIndex() const
|
||||
{
|
||||
return gasToLiquidIndex_;
|
||||
}
|
||||
|
||||
|
||||
inline const List<bool>& spray::isLiquidFuel() const
|
||||
{
|
||||
return isLiquidFuel_;
|
||||
}
|
||||
|
||||
|
||||
inline const bool& spray::twoD() const
|
||||
{
|
||||
return twoD_;
|
||||
}
|
||||
|
||||
|
||||
inline const vector& spray::axisOfSymmetry() const
|
||||
{
|
||||
return axisOfSymmetry_;
|
||||
}
|
||||
|
||||
|
||||
inline const vector& spray::axisOfWedge() const
|
||||
{
|
||||
return axisOfWedge_;
|
||||
}
|
||||
|
||||
|
||||
inline const vector& spray::axisOfWedgeNormal() const
|
||||
{
|
||||
return axisOfWedgeNormal_;
|
||||
}
|
||||
|
||||
|
||||
inline const scalar& spray::angleOfWedge() const
|
||||
{
|
||||
return angleOfWedge_;
|
||||
}
|
||||
|
||||
|
||||
inline const interpolation<vector>& spray::UInterpolator() const
|
||||
{
|
||||
return UInterpolator_;
|
||||
}
|
||||
|
||||
|
||||
inline const interpolation<scalar>& spray::rhoInterpolator() const
|
||||
{
|
||||
return rhoInterpolator_;
|
||||
}
|
||||
|
||||
|
||||
inline const interpolation<scalar>& spray::pInterpolator() const
|
||||
{
|
||||
return pInterpolator_;
|
||||
}
|
||||
|
||||
|
||||
inline const interpolation<scalar>& spray::TInterpolator() const
|
||||
{
|
||||
return TInterpolator_;
|
||||
}
|
||||
|
||||
|
||||
inline vectorField& spray::sms()
|
||||
{
|
||||
return sms_;
|
||||
}
|
||||
|
||||
|
||||
inline const vectorField& spray::sms() const
|
||||
{
|
||||
return sms_;
|
||||
@ -312,6 +347,7 @@ inline scalarField& spray::shs()
|
||||
return shs_;
|
||||
}
|
||||
|
||||
|
||||
inline const scalarField& spray::shs() const
|
||||
{
|
||||
return shs_;
|
||||
@ -323,16 +359,19 @@ inline PtrList<scalarField>& spray::srhos()
|
||||
return srhos_;
|
||||
}
|
||||
|
||||
|
||||
inline const PtrList<scalarField>& spray::srhos() const
|
||||
{
|
||||
return srhos_;
|
||||
}
|
||||
|
||||
|
||||
inline const scalar& spray::ambientPressure() const
|
||||
{
|
||||
return ambientPressure_;
|
||||
}
|
||||
|
||||
|
||||
inline const scalar& spray::ambientTemperature() const
|
||||
{
|
||||
return ambientTemperature_;
|
||||
|
||||
@ -28,7 +28,7 @@ License
|
||||
|
||||
#include "LISA.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "combustionMixture.H"
|
||||
#include "basicMultiComponentMixture.H"
|
||||
|
||||
#include "RosinRammler.H"
|
||||
|
||||
@ -84,7 +84,7 @@ void LISA::atomizeParcel
|
||||
) const
|
||||
{
|
||||
|
||||
|
||||
|
||||
const PtrList<volScalarField>& Y = spray_.composition().Y();
|
||||
|
||||
label Ns = Y.size();
|
||||
@ -98,7 +98,7 @@ void LISA::atomizeParcel
|
||||
{
|
||||
Winv += Y[i][cellI]/spray_.gasProperties()[i].W();
|
||||
}
|
||||
|
||||
|
||||
scalar R = specie::RR*Winv;
|
||||
|
||||
// ideal gas law to evaluate density
|
||||
@ -113,31 +113,31 @@ void LISA::atomizeParcel
|
||||
scalar WeberNumber = p.We(vel, rhoAverage, sigma);
|
||||
|
||||
scalar tau = 0.0;
|
||||
scalar dL = 0.0;
|
||||
scalar dL = 0.0;
|
||||
scalar k = 0.0;
|
||||
scalar muFuel = fuels.mu(pressure, p.T(), p.X());
|
||||
scalar rhoFuel = fuels.rho(1.0e+5, p.T(), p.X());
|
||||
scalar nuFuel = muFuel/rhoFuel;
|
||||
|
||||
vector uDir = p.U()/mag(p.U());
|
||||
|
||||
|
||||
scalar uGas = mag(vel & uDir);
|
||||
vector Ug = uGas*uDir;
|
||||
|
||||
/*
|
||||
/*
|
||||
TL
|
||||
It might be the relative velocity between Liquid and Gas, but I use the
|
||||
absolute velocity of the parcel as suggested by the authors
|
||||
absolute velocity of the parcel as suggested by the authors
|
||||
*/
|
||||
|
||||
|
||||
// scalar U = mag(p.Urel(vel));
|
||||
scalar U = mag(p.U());
|
||||
|
||||
|
||||
p.ct() += deltaT;
|
||||
|
||||
scalar Q = rhoAverage/rhoFuel;
|
||||
|
||||
const injectorType& it =
|
||||
const injectorType& it =
|
||||
spray_.injectors()[label(p.injector())].properties();
|
||||
|
||||
if (it.nHoles() > 1)
|
||||
@ -150,38 +150,38 @@ void LISA::atomizeParcel
|
||||
scalar pWalk = mag(p.position() - itPosition);
|
||||
|
||||
// Updating liquid sheet tickness... that is the droplet diameter
|
||||
|
||||
|
||||
const vector direction = it.direction(0, spray_.runTime().value());
|
||||
|
||||
|
||||
scalar h = (p.position() - itPosition) & direction;
|
||||
|
||||
scalar d = sqrt(sqr(pWalk)-sqr(h));
|
||||
|
||||
|
||||
scalar time = pWalk/mag(p.U());
|
||||
|
||||
|
||||
scalar elapsedTime = spray_.runTime().value();
|
||||
|
||||
|
||||
scalar massFlow = it.massFlowRate(max(0.0,elapsedTime-time));
|
||||
|
||||
scalar hSheet = massFlow/(mathematicalConstant::pi*d*rhoFuel*mag(p.U()));
|
||||
|
||||
|
||||
scalar hSheet = massFlow/(mathematicalConstant::pi*d*rhoFuel*mag(p.U()));
|
||||
|
||||
p.d() = min(hSheet,p.d());
|
||||
|
||||
if(WeberNumber > 27.0/16.0)
|
||||
{
|
||||
|
||||
|
||||
scalar kPos = 0.0;
|
||||
scalar kNeg = Q*pow(U, 2.0)*rhoFuel/sigma;
|
||||
|
||||
|
||||
scalar derivativePos = sqrt
|
||||
(
|
||||
Q*pow(U,2.0)
|
||||
);
|
||||
|
||||
scalar derivativeNeg =
|
||||
);
|
||||
|
||||
scalar derivativeNeg =
|
||||
(
|
||||
8.0*pow(nuFuel, 2.0)*pow(kNeg, 3.0)
|
||||
+ Q*pow(U, 2.0)*kNeg
|
||||
8.0*pow(nuFuel, 2.0)*pow(kNeg, 3.0)
|
||||
+ Q*pow(U, 2.0)*kNeg
|
||||
- 3.0*sigma/2.0/rhoFuel*pow(kNeg, 2.0)
|
||||
)
|
||||
/
|
||||
@ -189,23 +189,23 @@ void LISA::atomizeParcel
|
||||
(
|
||||
4.0*pow(nuFuel, 2.0)*pow(kNeg, 4.0)
|
||||
+ Q*pow(U, 2.0)*pow(kNeg, 2.0)
|
||||
- sigma*pow(kNeg, 3.0)/rhoFuel
|
||||
- sigma*pow(kNeg, 3.0)/rhoFuel
|
||||
)
|
||||
-
|
||||
4.0*nuFuel*kNeg;
|
||||
|
||||
scalar kOld = 0.0;
|
||||
scalar kOld = 0.0;
|
||||
|
||||
|
||||
|
||||
for(label i=0; i<40; i++)
|
||||
{
|
||||
|
||||
k = kPos - (derivativePos/((derivativeNeg-derivativePos)/(kNeg-kPos)));
|
||||
|
||||
scalar derivativek =
|
||||
|
||||
scalar derivativek =
|
||||
(
|
||||
8.0*pow(nuFuel, 2.0)*pow(k, 3.0)
|
||||
+ Q*pow(U, 2.0)*k
|
||||
8.0*pow(nuFuel, 2.0)*pow(k, 3.0)
|
||||
+ Q*pow(U, 2.0)*k
|
||||
- 3.0*sigma/2.0/rhoFuel*pow(k, 2.0)
|
||||
)
|
||||
/
|
||||
@ -213,10 +213,10 @@ void LISA::atomizeParcel
|
||||
(
|
||||
4.0*pow(nuFuel, 2.0)*pow(k, 4.0)
|
||||
+ Q*pow(U, 2.0)*pow(k, 2.0)
|
||||
- sigma*pow(k, 3.0)/rhoFuel
|
||||
- sigma*pow(k, 3.0)/rhoFuel
|
||||
)
|
||||
-
|
||||
4.0*nuFuel*k;
|
||||
4.0*nuFuel*k;
|
||||
|
||||
if(derivativek > 0)
|
||||
{
|
||||
@ -228,17 +228,17 @@ void LISA::atomizeParcel
|
||||
derivativeNeg = derivativek;
|
||||
kNeg = k;
|
||||
}
|
||||
|
||||
|
||||
if(mag(k-kOld)/k < 1e-4)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
kOld = k;
|
||||
|
||||
|
||||
}
|
||||
|
||||
scalar omegaS =
|
||||
|
||||
scalar omegaS =
|
||||
- 2.0 * nuFuel * pow(k, 2.0)
|
||||
+ sqrt
|
||||
(
|
||||
@ -246,22 +246,22 @@ void LISA::atomizeParcel
|
||||
+ Q*pow(U, 2.0)*pow(k, 2.0)
|
||||
- sigma*pow(k, 3.0)/rhoFuel
|
||||
);
|
||||
|
||||
tau = cTau_/omegaS;
|
||||
|
||||
|
||||
tau = cTau_/omegaS;
|
||||
|
||||
dL = sqrt(8.0*p.d()/k);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
k =
|
||||
|
||||
k =
|
||||
rhoAverage*pow(U, 2.0)
|
||||
/
|
||||
2.0*sigma;
|
||||
|
||||
|
||||
scalar J = pWalk*p.d()/2.0;
|
||||
|
||||
|
||||
tau = pow(3.0*cTau_,2.0/3.0)*cbrt(J*sigma/(sqr(Q)*pow(U,4.0)*rhoFuel));
|
||||
|
||||
dL = sqrt(4.0*p.d()/k);
|
||||
@ -269,78 +269,78 @@ void LISA::atomizeParcel
|
||||
|
||||
|
||||
|
||||
scalar kL =
|
||||
scalar kL =
|
||||
1.0
|
||||
/
|
||||
(
|
||||
dL *
|
||||
dL *
|
||||
pow(0.5 + 1.5 * muFuel/pow((rhoFuel*sigma*dL), 0.5), 0.5)
|
||||
);
|
||||
|
||||
scalar dD = cbrt(3.0*mathematicalConstant::pi*pow(dL, 2.0)/kL);
|
||||
|
||||
scalar dD = cbrt(3.0*mathematicalConstant::pi*pow(dL, 2.0)/kL);
|
||||
|
||||
scalar lisaExp = 0.27;
|
||||
scalar ambientPressure = 1.0e+5;
|
||||
|
||||
|
||||
scalar pRatio = spray_.ambientPressure()/ambientPressure;
|
||||
|
||||
|
||||
dD = dD*pow(pRatio,lisaExp);
|
||||
|
||||
// modifications to take account of the flash boiling on primary breakUp
|
||||
|
||||
scalar pExp = 0.135;
|
||||
|
||||
|
||||
scalar chi = 0.0;
|
||||
|
||||
label Nf = fuels.components().size();
|
||||
|
||||
label Nf = fuels.components().size();
|
||||
|
||||
scalar Td = p.T();
|
||||
|
||||
|
||||
for(label i = 0; i < Nf ; i++)
|
||||
{
|
||||
|
||||
|
||||
if(fuels.properties()[i].pv(spray_.ambientPressure(), Td) >= 0.999*spray_.ambientPressure())
|
||||
{
|
||||
|
||||
// The fuel is boiling.....
|
||||
// Calculation of the boiling temperature
|
||||
|
||||
// Calculation of the boiling temperature
|
||||
|
||||
scalar tBoilingSurface = Td;
|
||||
|
||||
|
||||
label Niter = 200;
|
||||
|
||||
|
||||
for(label k=0; k< Niter ; k++)
|
||||
{
|
||||
scalar pBoil = fuels.properties()[i].pv(pressure, tBoilingSurface);
|
||||
|
||||
|
||||
if(pBoil > pressure)
|
||||
{
|
||||
tBoilingSurface = tBoilingSurface - (Td-temperature)/Niter;
|
||||
tBoilingSurface = tBoilingSurface - (Td-temperature)/Niter;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
scalar hl = fuels.properties()[i].hl(spray_.ambientPressure(), tBoilingSurface);
|
||||
scalar iTp = fuels.properties()[i].h(spray_.ambientPressure(), Td) - spray_.ambientPressure()/fuels.properties()[i].rho(spray_.ambientPressure(), Td);
|
||||
scalar iTb = fuels.properties()[i].h(spray_.ambientPressure(), tBoilingSurface) - spray_.ambientPressure()/fuels.properties()[i].rho(spray_.ambientPressure(), tBoilingSurface);
|
||||
|
||||
|
||||
chi += p.X()[i]*(iTp-iTb)/hl;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// bounding chi
|
||||
|
||||
|
||||
chi = max(chi, 0.0);
|
||||
chi = min(chi, 1.0);
|
||||
|
||||
|
||||
// modifing dD to take account of flash boiling
|
||||
|
||||
|
||||
dD = dD*(1.0 - chi*pow(pRatio, -pExp));
|
||||
|
||||
|
||||
scalar lBU = Cl_ * mag(p.U())*tau;
|
||||
|
||||
if(pWalk > lBU)
|
||||
@ -349,7 +349,7 @@ void LISA::atomizeParcel
|
||||
p.liquidCore() = 0.0;
|
||||
|
||||
// calculate the new diameter with a Rosin Rammler distribution
|
||||
|
||||
|
||||
scalar minValue = min(p.d(),dD/10.0);
|
||||
|
||||
scalar maxValue = dD;
|
||||
@ -357,30 +357,30 @@ void LISA::atomizeParcel
|
||||
if(maxValue - minValue < SMALL)
|
||||
{
|
||||
minValue = p.d()/10.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
scalar range = maxValue - minValue;
|
||||
|
||||
|
||||
scalar y = 0;
|
||||
scalar x = 0;
|
||||
|
||||
bool success = false;
|
||||
|
||||
|
||||
while(!success)
|
||||
{
|
||||
|
||||
|
||||
x = minValue + range*rndGen_.scalar01();
|
||||
y = rndGen_.scalar01();
|
||||
|
||||
scalar p = 0.0;
|
||||
|
||||
|
||||
scalar nExp = 1;
|
||||
|
||||
|
||||
scalar xx = pow(x/dD, nExp);
|
||||
|
||||
p = xx*exp(-xx);
|
||||
|
||||
if (y<p)
|
||||
if (y<p)
|
||||
{
|
||||
success = true;
|
||||
}
|
||||
@ -388,13 +388,13 @@ void LISA::atomizeParcel
|
||||
}
|
||||
|
||||
// New droplet diameter
|
||||
|
||||
|
||||
p.d() = x;
|
||||
p.ct() = 0.0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ License
|
||||
|
||||
#include "blobsSheetAtomization.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "combustionMixture.H"
|
||||
#include "basicMultiComponentMixture.H"
|
||||
|
||||
#include "RosinRammler.H"
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ License
|
||||
|
||||
#include "noAtomization.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "combustionMixture.H"
|
||||
#include "basicMultiComponentMixture.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ License
|
||||
|
||||
#include "reitzDiwakar.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "combustionMixture.H"
|
||||
#include "basicMultiComponentMixture.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -23,7 +23,6 @@ $(DERIVEDCLOUDS)/basicKinematicCloud/basicKinematicCloud.C
|
||||
$(DERIVEDCLOUDS)/basicThermoCloud/basicThermoCloud.C
|
||||
$(DERIVEDCLOUDS)/BasicReactingCloud/defineBasicReactingCloud.C
|
||||
$(DERIVEDCLOUDS)/BasicReactingMultiphaseCloud/defineBasicReactingMultiphaseCloud.C
|
||||
$(DERIVEDCLOUDS)/BasicTrackedReactingCloud/defineBasicTrackedReactingCloud.C
|
||||
|
||||
|
||||
/* kinematic parcel sub-models */
|
||||
@ -46,12 +45,6 @@ $(REACTINGPARCEL)/defineBasicReactingParcel.C
|
||||
$(REACTINGPARCEL)/makeBasicReactingParcelSubmodels.C
|
||||
|
||||
|
||||
/* tracked reacting parcel sub-models */
|
||||
TRACKEDREACTINGPARCEL=$(DERIVEDPARCELS)/BasicTrackedReactingParcel
|
||||
$(TRACKEDREACTINGPARCEL)/defineTrackedReactingParcel.C
|
||||
$(TRACKEDREACTINGPARCEL)/makeBasicTrackedReactingParcelSubmodels.C
|
||||
|
||||
|
||||
/* reacting multiphase parcel sub-models */
|
||||
REACTINGMPPARCEL=$(DERIVEDPARCELS)/BasicReactingMultiphaseParcel
|
||||
$(REACTINGMPPARCEL)/defineBasicReactingMultiphaseParcel.C
|
||||
|
||||
@ -9,7 +9,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/thermophysicalModels/liquidMixture/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solids/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solidMixture/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
@ -28,6 +28,6 @@ LIB_LIBS = \
|
||||
-lsolidMixture \
|
||||
-lspecie \
|
||||
-lbasicThermophysicalModels \
|
||||
-lcombustionThermophysicalModels \
|
||||
-lreactionThermophysicalModels \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels
|
||||
|
||||
@ -151,18 +151,18 @@ Foam::KinematicCloud<ParcelType>::~KinematicCloud()
|
||||
template<class ParcelType>
|
||||
void Foam::KinematicCloud<ParcelType>::checkParcelProperties
|
||||
(
|
||||
ParcelType* pPtr,
|
||||
ParcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
)
|
||||
{
|
||||
if (!fullyDescribed)
|
||||
{
|
||||
pPtr->rho() = constProps_.rho0();
|
||||
parcel.rho() = constProps_.rho0();
|
||||
}
|
||||
|
||||
scalar carrierDt = this->db().time().deltaT().value();
|
||||
pPtr->stepFraction() = (carrierDt - lagrangianDt)/carrierDt;
|
||||
parcel.stepFraction() = (carrierDt - lagrangianDt)/carrierDt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -357,7 +357,7 @@ public:
|
||||
//- Check parcel properties
|
||||
void checkParcelProperties
|
||||
(
|
||||
ParcelType* pPtr,
|
||||
ParcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
);
|
||||
|
||||
@ -28,7 +28,6 @@ License
|
||||
|
||||
#include "CompositionModel.H"
|
||||
#include "PhaseChangeModel.H"
|
||||
#include "multiComponentMixture.H"
|
||||
|
||||
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
||||
|
||||
@ -68,14 +67,16 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo
|
||||
basicThermo& thermo
|
||||
)
|
||||
:
|
||||
ThermoCloud<ParcelType>(cloudName, rho, U, g, thermo),
|
||||
reactingCloud(),
|
||||
constProps_(this->particleProperties()),
|
||||
carrierThermo_(thermo),
|
||||
carrierSpecies_(thermo.composition().Y().size()),
|
||||
mcCarrierThermo_
|
||||
(
|
||||
dynamic_cast<multiComponentMixture<thermoType>&>(thermo)
|
||||
),
|
||||
compositionModel_
|
||||
(
|
||||
CompositionModel<ReactingCloud<ParcelType> >::New
|
||||
@ -92,23 +93,9 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
|
||||
*this
|
||||
)
|
||||
),
|
||||
rhoTrans_(thermo.composition().Y().size()),
|
||||
rhoTrans_(mcCarrierThermo_.species().size()),
|
||||
dMassPhaseChange_(0.0)
|
||||
{
|
||||
// Create the carrier species
|
||||
forAll(carrierSpecies_, specieI)
|
||||
{
|
||||
carrierSpecies_.set
|
||||
(
|
||||
specieI,
|
||||
new thermoType
|
||||
(
|
||||
dynamic_cast<const multiComponentMixture<thermoType>&>
|
||||
(thermo).speciesData()[specieI]
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Set storage for mass source fields and initialise to zero
|
||||
forAll(rhoTrans_, i)
|
||||
{
|
||||
@ -119,9 +106,7 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
this->name()
|
||||
+ "rhoTrans_"
|
||||
+ thermo.composition().Y()[i].name(),
|
||||
this->name() + "rhoTrans_" + mcCarrierThermo_.species()[i],
|
||||
this->db().time().timeName(),
|
||||
this->db(),
|
||||
IOobject::NO_READ,
|
||||
@ -148,34 +133,34 @@ Foam::ReactingCloud<ParcelType>::~ReactingCloud()
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingCloud<ParcelType>::checkParcelProperties
|
||||
(
|
||||
ParcelType* pPtr,
|
||||
ParcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
)
|
||||
{
|
||||
ThermoCloud<ParcelType>::checkParcelProperties
|
||||
(
|
||||
pPtr,
|
||||
parcel,
|
||||
lagrangianDt,
|
||||
fullyDescribed
|
||||
);
|
||||
|
||||
if (!fullyDescribed)
|
||||
{
|
||||
pPtr->Y() = composition().YMixture0();
|
||||
parcel.Y() = composition().YMixture0();
|
||||
}
|
||||
else
|
||||
{
|
||||
checkSuppliedComposition
|
||||
(
|
||||
pPtr->Y(),
|
||||
parcel.Y(),
|
||||
composition().YMixture0(),
|
||||
"YMixture"
|
||||
);
|
||||
}
|
||||
|
||||
// derived information - store initial mass
|
||||
pPtr->mass0() = pPtr->mass();
|
||||
parcel.mass0() = parcel.mass();
|
||||
}
|
||||
|
||||
|
||||
@ -193,9 +178,9 @@ void Foam::ReactingCloud<ParcelType>::resetSourceTerms()
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingCloud<ParcelType>::evolve()
|
||||
{
|
||||
const volScalarField& T = carrierThermo_.T();
|
||||
const volScalarField cp = carrierThermo_.Cp();
|
||||
const volScalarField& p = carrierThermo_.p();
|
||||
const volScalarField& T = this->carrierThermo().T();
|
||||
const volScalarField cp = this->carrierThermo().Cp();
|
||||
const volScalarField& p = this->carrierThermo().p();
|
||||
|
||||
autoPtr<interpolation<scalar> > rhoInterp = interpolation<scalar>::New
|
||||
(
|
||||
|
||||
@ -41,11 +41,9 @@ SourceFiles
|
||||
#ifndef ReactingCloud_H
|
||||
#define ReactingCloud_H
|
||||
|
||||
#include "autoPtr.H"
|
||||
#include "hCombustionThermo.H"
|
||||
|
||||
#include "ThermoCloud.H"
|
||||
#include "reactingCloud.H"
|
||||
#include "multiComponentMixture.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -94,11 +92,8 @@ protected:
|
||||
//- Parcel constant properties
|
||||
typename ParcelType::constantProperties constProps_;
|
||||
|
||||
//- Thermodynamics package (combustion)
|
||||
hCombustionThermo& carrierThermo_;
|
||||
|
||||
//- Gas phase properties
|
||||
PtrList<thermoType> carrierSpecies_;
|
||||
//- Multi-component carrier phase thermo
|
||||
multiComponentMixture<thermoType>& mcCarrierThermo_;
|
||||
|
||||
|
||||
// References to the cloud sub-models
|
||||
@ -148,7 +143,7 @@ public:
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo
|
||||
basicThermo& thermo
|
||||
);
|
||||
|
||||
|
||||
@ -168,14 +163,12 @@ public:
|
||||
inline const typename ParcelType::constantProperties&
|
||||
constProps() const;
|
||||
|
||||
//- Return const access to carrier phase thermo package
|
||||
inline const hCombustionThermo& carrierThermo() const;
|
||||
//- Return const access to multi-component carrier phase thermo
|
||||
inline const multiComponentMixture<thermoType>&
|
||||
mcCarrierThermo() const;
|
||||
|
||||
//- Return access to carrier phase thermo package
|
||||
inline hCombustionThermo& carrierThermo();
|
||||
|
||||
//- Gas phase properties
|
||||
inline const PtrList<thermoType>& carrierSpecies() const;
|
||||
//- Return access to multi-component carrier phase thermo
|
||||
inline multiComponentMixture<thermoType>& mcCarrierThermo();
|
||||
|
||||
|
||||
// Sub-models
|
||||
@ -224,7 +217,7 @@ public:
|
||||
//- Check parcel properties
|
||||
void checkParcelProperties
|
||||
(
|
||||
ParcelType* pPtr,
|
||||
ParcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
);
|
||||
|
||||
@ -35,26 +35,18 @@ Foam::ReactingCloud<ParcelType>::constProps() const
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::hCombustionThermo&
|
||||
Foam::ReactingCloud<ParcelType>::carrierThermo() const
|
||||
inline const Foam::multiComponentMixture<typename ParcelType::thermoType>&
|
||||
Foam::ReactingCloud<ParcelType>::mcCarrierThermo() const
|
||||
{
|
||||
return carrierThermo_;
|
||||
return mcCarrierThermo_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::hCombustionThermo&
|
||||
Foam::ReactingCloud<ParcelType>::carrierThermo()
|
||||
inline Foam::multiComponentMixture<typename ParcelType::thermoType>&
|
||||
Foam::ReactingCloud<ParcelType>::mcCarrierThermo()
|
||||
{
|
||||
return carrierThermo_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::PtrList<typename ParcelType::thermoType>&
|
||||
Foam::ReactingCloud<ParcelType>::carrierSpecies() const
|
||||
{
|
||||
return carrierSpecies_;
|
||||
return mcCarrierThermo_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo
|
||||
basicThermo& thermo
|
||||
)
|
||||
:
|
||||
ReactingCloud<ParcelType>(cloudName, rho, U, g, thermo),
|
||||
@ -76,14 +76,14 @@ Foam::ReactingMultiphaseCloud<ParcelType>::~ReactingMultiphaseCloud()
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingMultiphaseCloud<ParcelType>::checkParcelProperties
|
||||
(
|
||||
ParcelType* pPtr,
|
||||
ParcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
)
|
||||
{
|
||||
ReactingCloud<ParcelType>::checkParcelProperties
|
||||
(
|
||||
pPtr,
|
||||
parcel,
|
||||
lagrangianDt,
|
||||
fullyDescribed
|
||||
);
|
||||
@ -94,27 +94,27 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::checkParcelProperties
|
||||
|
||||
if (!fullyDescribed)
|
||||
{
|
||||
pPtr->YGas() = this->composition().Y0(idGas);
|
||||
pPtr->YLiquid() = this->composition().Y0(idLiquid);
|
||||
pPtr->YSolid() = this->composition().Y0(idSolid);
|
||||
parcel.YGas() = this->composition().Y0(idGas);
|
||||
parcel.YLiquid() = this->composition().Y0(idLiquid);
|
||||
parcel.YSolid() = this->composition().Y0(idSolid);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->checkSuppliedComposition
|
||||
(
|
||||
pPtr->YGas(),
|
||||
parcel.YGas(),
|
||||
this->composition().Y0(idGas),
|
||||
"YGas"
|
||||
);
|
||||
this->checkSuppliedComposition
|
||||
(
|
||||
pPtr->YLiquid(),
|
||||
parcel.YLiquid(),
|
||||
this->composition().Y0(idLiquid),
|
||||
"YLiquid"
|
||||
);
|
||||
this->checkSuppliedComposition
|
||||
(
|
||||
pPtr->YSolid(),
|
||||
parcel.YSolid(),
|
||||
this->composition().Y0(idSolid),
|
||||
"YSolid"
|
||||
);
|
||||
|
||||
@ -123,7 +123,7 @@ public:
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo
|
||||
basicThermo& thermo
|
||||
);
|
||||
|
||||
|
||||
@ -178,7 +178,7 @@ public:
|
||||
//- Check parcel properties
|
||||
void checkParcelProperties
|
||||
(
|
||||
ParcelType* pPtr,
|
||||
ParcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
);
|
||||
|
||||
@ -113,22 +113,22 @@ Foam::ThermoCloud<ParcelType>::~ThermoCloud()
|
||||
template<class ParcelType>
|
||||
void Foam::ThermoCloud<ParcelType>::checkParcelProperties
|
||||
(
|
||||
ParcelType* pPtr,
|
||||
ParcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
)
|
||||
{
|
||||
KinematicCloud<ParcelType>::checkParcelProperties
|
||||
(
|
||||
pPtr,
|
||||
parcel,
|
||||
lagrangianDt,
|
||||
fullyDescribed
|
||||
);
|
||||
|
||||
if (!fullyDescribed)
|
||||
{
|
||||
pPtr->T() = constProps_.T0();
|
||||
pPtr->cp() = constProps_.cp0();
|
||||
parcel.T() = constProps_.T0();
|
||||
parcel.cp() = constProps_.cp0();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -40,11 +40,9 @@ SourceFiles
|
||||
#ifndef ThermoCloud_H
|
||||
#define ThermoCloud_H
|
||||
|
||||
#include "autoPtr.H"
|
||||
#include "hCombustionThermo.H"
|
||||
|
||||
#include "KinematicCloud.H"
|
||||
#include "thermoCloud.H"
|
||||
#include "basicThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -220,7 +218,7 @@ public:
|
||||
//- Check parcel properties
|
||||
void checkParcelProperties
|
||||
(
|
||||
ParcelType* pPtr,
|
||||
ParcelType& parcel,
|
||||
const scalar lagrangianDt,
|
||||
const bool fullyDescribed
|
||||
);
|
||||
|
||||
@ -35,7 +35,7 @@ Foam::BasicReactingCloud<ThermoType>::BasicReactingCloud
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo
|
||||
basicThermo& thermo
|
||||
)
|
||||
:
|
||||
ReactingCloud<BasicReactingParcel<ThermoType> >
|
||||
|
||||
@ -81,7 +81,7 @@ public:
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo
|
||||
basicThermo& thermo
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -35,8 +35,7 @@ Foam::BasicReactingMultiphaseCloud<ThermoType>::BasicReactingMultiphaseCloud
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo,
|
||||
PtrList<ThermoType>& carrierSpecies
|
||||
basicThermo& thermo
|
||||
)
|
||||
:
|
||||
ReactingMultiphaseCloud<BasicReactingMultiphaseParcel<ThermoType> >
|
||||
@ -45,8 +44,7 @@ Foam::BasicReactingMultiphaseCloud<ThermoType>::BasicReactingMultiphaseCloud
|
||||
rho,
|
||||
U,
|
||||
g,
|
||||
thermo,
|
||||
carrierSpecies
|
||||
thermo
|
||||
)
|
||||
{
|
||||
BasicReactingMultiphaseParcel<ThermoType>::readFields(*this);
|
||||
|
||||
@ -81,8 +81,7 @@ public:
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo,
|
||||
PtrList<ThermoType>& carrierSpecies
|
||||
basicThermo& thermo
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -27,14 +27,15 @@ License
|
||||
#ifndef createReactingCloudTypes_H
|
||||
#define createReactingCloudTypes_H
|
||||
|
||||
#include "reactingThermoTypes.H"
|
||||
#include "thermoPhysicsTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#define createReactingCloudType(CloudType) \
|
||||
\
|
||||
createReactingCloudThermoType(CloudType, specieConstProperties); \
|
||||
createReactingCloudThermoType(CloudType, specieReactingProperties);
|
||||
createReactingCloudThermoType(CloudType, constGasThermoPhysics); \
|
||||
createReactingCloudThermoType(CloudType, gasThermoPhysics); \
|
||||
createReactingCloudThermoType(CloudType, icoPoly8ThermoPhysics);
|
||||
|
||||
|
||||
#define createReactingCloudThermoType(CloudType, ThermoType) \
|
||||
|
||||
@ -49,7 +49,7 @@ void Foam::KinematicParcel<ParcelType>::setCellValues
|
||||
"const scalar, "
|
||||
"const label"
|
||||
")"
|
||||
) << "Limiting density in cell " << cellI << " to "
|
||||
) << "Limiting observed density in cell " << cellI << " to "
|
||||
<< td.constProps().rhoMin() << nl << endl;
|
||||
|
||||
rhoc_ = td.constProps().rhoMin();
|
||||
@ -113,9 +113,6 @@ void Foam::KinematicParcel<ParcelType>::calc
|
||||
// Motion
|
||||
// ~~~~~~
|
||||
|
||||
// No additional forces
|
||||
vector Fx = vector::zero;
|
||||
|
||||
// Calculate new particle velocity
|
||||
vector U1 = calcVelocity(td, dt, cellI, d0, U0, rho0, mass0, Su, dUTrans);
|
||||
|
||||
|
||||
@ -168,7 +168,8 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::cellValueSourceCorrection
|
||||
forAll(td.cloud().rhoTrans(), i)
|
||||
{
|
||||
scalar Y = td.cloud().rhoTrans(i)[cellI]/addedMass;
|
||||
cpEff += Y*td.cloud().carrierSpecies()[i].Cp(this->Tc_);
|
||||
cpEff +=
|
||||
Y*td.cloud().mcCarrierThermo().speciesData()[i].Cp(this->Tc_);
|
||||
}
|
||||
}
|
||||
const scalar cpc = td.cpInterp().psi()[cellI];
|
||||
@ -248,7 +249,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
scalarField dMassSRGas(YGas_.size(), 0.0);
|
||||
scalarField dMassSRLiquid(YLiquid_.size(), 0.0);
|
||||
scalarField dMassSRSolid(YSolid_.size(), 0.0);
|
||||
scalarField dMassSRCarrier(td.cloud().carrierSpecies().size(), 0.0);
|
||||
scalarField
|
||||
dMassSRCarrier
|
||||
(
|
||||
td.cloud().mcCarrierThermo().species().size(),
|
||||
0.0
|
||||
);
|
||||
|
||||
// Clac mass and enthalpy transfer due to surface reactions
|
||||
calcSurfaceReactions
|
||||
@ -340,7 +346,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
td.cloud().hcTrans()[cellI] +=
|
||||
np0
|
||||
*dMassGas[i]
|
||||
*td.cloud().composition().carrierSpecies()[gid].H(T0);
|
||||
*td.cloud().mcCarrierThermo().speciesData()[gid].H(T0);
|
||||
}
|
||||
forAll(YLiquid_, i)
|
||||
{
|
||||
@ -349,7 +355,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
td.cloud().hcTrans()[cellI] +=
|
||||
np0
|
||||
*dMassLiquid[i]
|
||||
*td.cloud().composition().carrierSpecies()[gid].H(T0);
|
||||
*td.cloud().mcCarrierThermo().speciesData()[gid].H(T0);
|
||||
}
|
||||
/*
|
||||
// No mapping between solid components and carrier phase
|
||||
@ -360,7 +366,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
td.cloud().hcTrans()[cellI] +=
|
||||
np0
|
||||
*dMassSolid[i]
|
||||
*td.cloud().composition().carrierSpecies()[gid].H(T0);
|
||||
*td.cloud().mcCarrierThermo().speciesData()[gid].H(T0);
|
||||
}
|
||||
*/
|
||||
forAll(dMassSRCarrier, i)
|
||||
@ -369,7 +375,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
td.cloud().hcTrans()[cellI] +=
|
||||
np0
|
||||
*dMassSRCarrier[i]
|
||||
*td.cloud().composition().carrierSpecies()[i].H(T0);
|
||||
*td.cloud().mcCarrierThermo().speciesData()[i].H(T0);
|
||||
}
|
||||
|
||||
// Update momentum transfer
|
||||
|
||||
@ -50,7 +50,7 @@ void Foam::ReactingParcel<ParcelType>::setCellValues
|
||||
"const scalar, "
|
||||
"const label"
|
||||
")"
|
||||
) << "Limiting pressure in cell " << cellI << " to "
|
||||
) << "Limiting observed pressure in cell " << cellI << " to "
|
||||
<< td.constProps().pMin() << nl << endl;
|
||||
|
||||
pc_ = td.constProps().pMin();
|
||||
@ -86,7 +86,8 @@ void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection
|
||||
forAll(td.cloud().rhoTrans(), i)
|
||||
{
|
||||
scalar Y = td.cloud().rhoTrans(i)[cellI]/addedMass;
|
||||
cpEff += Y*td.cloud().carrierSpecies()[i].Cp(this->Tc_);
|
||||
cpEff +=
|
||||
Y*td.cloud().mcCarrierThermo().speciesData()[i].Cp(this->Tc_);
|
||||
}
|
||||
}
|
||||
const scalar cpc = td.cpInterp().psi()[cellI];
|
||||
@ -190,9 +191,6 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
// Motion
|
||||
// ~~~~~~
|
||||
|
||||
// No additional forces
|
||||
vector Fx = vector::zero;
|
||||
|
||||
// Calculate new particle velocity
|
||||
vector U1 = calcVelocity(td, dt, cellI, d0, U0, rho0, mass0, Su, dUTrans);
|
||||
|
||||
@ -210,7 +208,7 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
td.cloud().hcTrans()[cellI] +=
|
||||
np0
|
||||
*dMassPC[i]
|
||||
*td.cloud().composition().carrierSpecies()[gid].H(T0);
|
||||
*td.cloud().mcCarrierThermo().speciesData()[gid].H(T0);
|
||||
}
|
||||
|
||||
// Update momentum transfer
|
||||
@ -317,16 +315,15 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
|
||||
td.cloud().addToMassPhaseChange(this->nParticle_*dMassTot);
|
||||
|
||||
// Enthalphy transfer to carrier phase
|
||||
label id;
|
||||
forAll(YComponents, i)
|
||||
{
|
||||
label gid;
|
||||
id = td.cloud().composition().localToGlobalCarrierId(idPhase, i);
|
||||
const scalar hv = td.cloud().mcCarrierThermo().speciesData()[id].H(T);
|
||||
|
||||
gid = td.cloud().composition().localToGlobalCarrierId(idPhase, i);
|
||||
const scalar hv = td.cloud().composition().carrierSpecies()[gid].H(T);
|
||||
|
||||
gid = td.cloud().composition().globalIds(idPhase)[i];
|
||||
id = td.cloud().composition().globalIds(idPhase)[i];
|
||||
const scalar hl =
|
||||
td.cloud().composition().liquids().properties()[gid].h(pc_, T);
|
||||
td.cloud().composition().liquids().properties()[id].h(pc_, T);
|
||||
|
||||
Sh += dMassPC[i]*(hl - hv)/dt;
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ void Foam::ThermoParcel<ParcelType>::setCellValues
|
||||
"const scalar, "
|
||||
"const label"
|
||||
")"
|
||||
) << "Limiting temperature in cell " << cellI << " to "
|
||||
) << "Limiting observed temperature in cell " << cellI << " to "
|
||||
<< td.constProps().TMin() << nl << endl;
|
||||
|
||||
Tc_ = td.constProps().TMin();
|
||||
@ -178,13 +178,13 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer
|
||||
|
||||
if (mag(htc) < ROOTVSMALL && !td.cloud().radiation())
|
||||
{
|
||||
return T + dt*Sh/(this->mass()*cp);
|
||||
return T + dt*Sh/(this->volume(d)*rho*cp);
|
||||
}
|
||||
|
||||
scalar ap;
|
||||
scalar bp;
|
||||
|
||||
if(td.cloud().radiation())
|
||||
if (td.cloud().radiation())
|
||||
{
|
||||
const scalarField& G =
|
||||
td.cloud().mesh().objectRegistry::lookupObject<volScalarField>("G");
|
||||
|
||||
@ -1,169 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\/ 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 2 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::TrackedReactingParcel
|
||||
|
||||
Description
|
||||
Adds tracking to ReactingParcel
|
||||
|
||||
SourceFiles
|
||||
TrackedReactingParcelI.H
|
||||
TrackedReactingParcel.C
|
||||
TrackedReactingParcelIO.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef TrackedReactingParcel_H
|
||||
#define TrackedReactingParcel_H
|
||||
|
||||
#include "ReactingParcel.H"
|
||||
#include "ParticleTrackingData.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
template<class ParcelType>
|
||||
class TrackedReactingParcel;
|
||||
|
||||
// Forward declaration of friend functions
|
||||
|
||||
template<class ParcelType>
|
||||
Ostream& operator<<
|
||||
(
|
||||
Ostream&,
|
||||
const TrackedReactingParcel<ParcelType>&
|
||||
);
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class TrackedReactingParcel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ParcelType>
|
||||
class TrackedReactingParcel
|
||||
:
|
||||
public ReactingParcel<ParcelType>,
|
||||
public ParticleTrackingData<ParcelType>
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename ReactingParcel<ParcelType>::constantProperties
|
||||
constantProperties;
|
||||
|
||||
// Static data
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("TrackedReactingParcel");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from owner, position, and cloud owner
|
||||
// Other properties initialised as null
|
||||
inline TrackedReactingParcel
|
||||
(
|
||||
ReactingCloud<ParcelType>& owner,
|
||||
const vector& position,
|
||||
const label cellI
|
||||
);
|
||||
|
||||
//- Construct from components
|
||||
inline TrackedReactingParcel
|
||||
(
|
||||
ReactingCloud<ParcelType>& owner,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label typeId,
|
||||
const scalar nParticle0,
|
||||
const scalar d0,
|
||||
const vector& U0,
|
||||
const scalarField& Y0,
|
||||
const constantProperties& constProps
|
||||
);
|
||||
|
||||
//- Construct from Istream
|
||||
TrackedReactingParcel
|
||||
(
|
||||
const Cloud<ParcelType>& c,
|
||||
Istream& is,
|
||||
bool readFields = true
|
||||
);
|
||||
|
||||
//- Construct as a copy
|
||||
TrackedReactingParcel(const TrackedReactingParcel& p);
|
||||
|
||||
//- Construct and return a clone
|
||||
autoPtr<TrackedReactingParcel> clone() const
|
||||
{
|
||||
return
|
||||
autoPtr<TrackedReactingParcel>
|
||||
(
|
||||
new TrackedReactingParcel(*this)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// I-O
|
||||
|
||||
//- Read
|
||||
static void readFields(ReactingCloud<ParcelType>& c);
|
||||
|
||||
//- Write
|
||||
static void writeFields(const ReactingCloud<ParcelType>& c);
|
||||
|
||||
|
||||
// Ostream Operator
|
||||
|
||||
friend Ostream& operator<< <ParcelType>
|
||||
(
|
||||
Ostream&,
|
||||
const TrackedReactingParcel<ParcelType>&
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "TrackedReactingParcelI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "TrackedReactingParcel.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -1,105 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\/ 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 2 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "TrackedReactingParcel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template <class ParcelType>
|
||||
Foam::TrackedReactingParcel<ParcelType>::TrackedReactingParcel
|
||||
(
|
||||
const Cloud<ParcelType>& cloud,
|
||||
Istream& is,
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
ReactingParcel<ParcelType>(cloud, is, readFields),
|
||||
ParticleTrackingData<ParcelType>(cloud, is, readFields)
|
||||
{}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::TrackedReactingParcel<ParcelType>::readFields
|
||||
(
|
||||
ReactingCloud<ParcelType>& c
|
||||
)
|
||||
{
|
||||
if (!c.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ReactingParcel<ParcelType>::readFields(c);
|
||||
ParticleTrackingData<ParcelType>::readFields(c);
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::TrackedReactingParcel<ParcelType>::writeFields
|
||||
(
|
||||
const ReactingCloud<ParcelType>& c
|
||||
)
|
||||
{
|
||||
ReactingParcel<ParcelType>::writeFields(c);
|
||||
ParticleTrackingData<ParcelType>::writeFields(c);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const TrackedReactingParcel<ParcelType>& p
|
||||
)
|
||||
{
|
||||
if (os.format() == IOstream::ASCII)
|
||||
{
|
||||
os << static_cast<const ReactingParcel<ParcelType>&>(p)
|
||||
<< static_cast<const ParticleTrackingData<ParcelType>&>(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
os << static_cast<const ReactingParcel<ParcelType>&>(p)
|
||||
<< static_cast<const ParticleTrackingData<ParcelType>&>(p);
|
||||
}
|
||||
|
||||
// Check state of Ostream
|
||||
os.check
|
||||
(
|
||||
"Ostream& operator<<"
|
||||
"("
|
||||
"Ostream&, "
|
||||
"const TrackedReactingParcel<ParcelType>&"
|
||||
")"
|
||||
);
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,113 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\/ 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 2 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "BasicTrackedReactingParcel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ThermoType>
|
||||
Foam::BasicTrackedReactingParcel<ThermoType>::BasicTrackedReactingParcel
|
||||
(
|
||||
ReactingCloud<BasicTrackedReactingParcel<ThermoType> >& owner,
|
||||
const vector& position,
|
||||
const label cellI
|
||||
)
|
||||
:
|
||||
TrackedReactingParcel<BasicTrackedReactingParcel<ThermoType> >
|
||||
(
|
||||
owner,
|
||||
position,
|
||||
cellI
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
Foam::BasicTrackedReactingParcel<ThermoType>::BasicTrackedReactingParcel
|
||||
(
|
||||
ReactingCloud<BasicTrackedReactingParcel<ThermoType> >& owner,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label typeId,
|
||||
const scalar nParticle0,
|
||||
const scalar d0,
|
||||
const vector& U0,
|
||||
const scalarField& Y0,
|
||||
const typename
|
||||
TrackedReactingParcel<BasicTrackedReactingParcel<ThermoType> >::
|
||||
constantProperties& constProps
|
||||
)
|
||||
:
|
||||
TrackedReactingParcel<BasicTrackedReactingParcel<ThermoType> >
|
||||
(
|
||||
owner,
|
||||
position,
|
||||
cellI,
|
||||
typeId,
|
||||
nParticle0,
|
||||
d0,
|
||||
U0,
|
||||
Y0,
|
||||
constProps
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
Foam::BasicTrackedReactingParcel<ThermoType>::BasicTrackedReactingParcel
|
||||
(
|
||||
const Cloud<BasicTrackedReactingParcel<ThermoType> >& cloud,
|
||||
Istream& is,
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
TrackedReactingParcel<BasicTrackedReactingParcel<ThermoType> >
|
||||
(
|
||||
cloud,
|
||||
is,
|
||||
readFields
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
Foam::BasicTrackedReactingParcel<ThermoType>::BasicTrackedReactingParcel
|
||||
(
|
||||
const BasicTrackedReactingParcel<ThermoType>& p
|
||||
)
|
||||
:
|
||||
TrackedReactingParcel<BasicTrackedReactingParcel<ThermoType> >(p)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ThermoType>
|
||||
Foam::BasicTrackedReactingParcel<ThermoType>::~BasicTrackedReactingParcel()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,137 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\/ 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 2 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::BasicTrackedReactingParcel
|
||||
|
||||
Description
|
||||
|
||||
|
||||
SourceFiles
|
||||
BasicTrackedReactingParcel.C
|
||||
BasicTrackedReactingParcelIO.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef BasicTrackedReactingParcel_H
|
||||
#define BasicTrackedReactingParcel_H
|
||||
|
||||
#include "TrackedReactingParcel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
template<class ThermoType>
|
||||
class BasicTrackedReactingParcel;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class BasicTrackedReactingParcel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ThermoType>
|
||||
class BasicTrackedReactingParcel
|
||||
:
|
||||
public TrackedReactingParcel<BasicTrackedReactingParcel<ThermoType> >
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- The type of thermodynamics this parcel was instantiated for
|
||||
typedef ThermoType thermoType;
|
||||
|
||||
//- Run-time type information
|
||||
TypeName("BasicTrackedReactingParcel");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from owner, position, and cloud owner
|
||||
// Other properties initialised as null
|
||||
BasicTrackedReactingParcel
|
||||
(
|
||||
ReactingCloud<BasicTrackedReactingParcel>& owner,
|
||||
const vector& position,
|
||||
const label cellI
|
||||
);
|
||||
|
||||
//- Construct from components
|
||||
BasicTrackedReactingParcel
|
||||
(
|
||||
ReactingCloud<BasicTrackedReactingParcel>& owner,
|
||||
const vector& position,
|
||||
const label cellI,
|
||||
const label typeId,
|
||||
const scalar nParticle0,
|
||||
const scalar d0,
|
||||
const vector& U0,
|
||||
const scalarField& Y0,
|
||||
const typename
|
||||
TrackedReactingParcel<BasicTrackedReactingParcel>::
|
||||
constantProperties& constProps
|
||||
);
|
||||
|
||||
//- Construct from Istream
|
||||
BasicTrackedReactingParcel
|
||||
(
|
||||
const Cloud<BasicTrackedReactingParcel>& c,
|
||||
Istream& is,
|
||||
bool readFields = true
|
||||
);
|
||||
|
||||
//- Construct as a copy
|
||||
BasicTrackedReactingParcel(const BasicTrackedReactingParcel& p);
|
||||
|
||||
//- Construct and return a clone
|
||||
autoPtr<BasicTrackedReactingParcel> clone() const
|
||||
{
|
||||
return
|
||||
autoPtr<BasicTrackedReactingParcel>
|
||||
(
|
||||
new BasicTrackedReactingParcel(*this)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~BasicTrackedReactingParcel();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "BasicTrackedReactingParcel.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,63 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
||||
\\/ 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 2 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "BasicTrackedReactingParcel.H"
|
||||
|
||||
// Kinematic
|
||||
#include "makeReactingParcelDispersionModels.H"
|
||||
#include "makeReactingParcelDragModels.H"
|
||||
#include "makeReactingParcelInjectionModels.H"
|
||||
#include "makeReactingParcelPatchInteractionModels.H"
|
||||
#include "makeReactingParcelPostProcessingModels.H"
|
||||
|
||||
// Thermo
|
||||
#include "makeReactingParcelHeatTransferModels.H"
|
||||
|
||||
// Reacting
|
||||
#include "makeReactingParcelCompositionModels.H"
|
||||
#include "makeReactingParcelPhaseChangeModels.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
// Kinematic sub-models
|
||||
makeReactingDispersionModels(BasicTrackedReactingParcel);
|
||||
makeReactingDragModels(BasicTrackedReactingParcel);
|
||||
makeReactingInjectionModels(BasicTrackedReactingParcel);
|
||||
makeReactingPatchInteractionModels(BasicTrackedReactingParcel);
|
||||
makeReactingPostProcessingModels(BasicTrackedReactingParcel);
|
||||
|
||||
// Thermo sub-models
|
||||
makeReactingHeatTransferModels(BasicTrackedReactingParcel);
|
||||
|
||||
// Reacting sub-models
|
||||
makeReactingCompositionModels(BasicTrackedReactingParcel);
|
||||
makeReactingPhaseChangeModels(BasicTrackedReactingParcel);
|
||||
};
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -28,7 +28,7 @@ License
|
||||
#define createReactingMultiphaseParcelTypes_H
|
||||
|
||||
#include "makeParcelIOList.H"
|
||||
#include "reactingThermoTypes.H"
|
||||
#include "thermoPhysicsTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -37,12 +37,17 @@ License
|
||||
createReactingMultiphaseParcelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieConstProperties \
|
||||
constGasThermoPhysics \
|
||||
); \
|
||||
createReactingMultiphaseParcelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieReactingProperties \
|
||||
gasThermoPhysics \
|
||||
); \
|
||||
createReactingMultiphaseParcelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
icoPoly8ThermoPhysics \
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -28,14 +28,15 @@ License
|
||||
#define createReactingParcelTypes_H
|
||||
|
||||
#include "makeParcelIOList.H"
|
||||
#include "reactingThermoTypes.H"
|
||||
#include "thermoPhysicsTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#define createReactingParcelType(ParcelType) \
|
||||
\
|
||||
createReactingParcelThermoType(ParcelType, specieConstProperties); \
|
||||
createReactingParcelThermoType(ParcelType, specieReactingProperties);
|
||||
createReactingParcelThermoType(ParcelType, constGasThermoPhysics); \
|
||||
createReactingParcelThermoType(ParcelType, gasThermoPhysics); \
|
||||
createReactingParcelThermoType(ParcelType, icoPoly8ThermoPhysics);
|
||||
|
||||
|
||||
#define createReactingParcelThermoType(ParcelType, ThermoType) \
|
||||
|
||||
@ -36,12 +36,17 @@ License
|
||||
createTrackedReactingParcelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieConstProperties \
|
||||
constGasThermoPhysics \
|
||||
); \
|
||||
createTrackedReactingParcelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieReactingProperties \
|
||||
gasThermoPhysics \
|
||||
); \
|
||||
createTrackedReactingParcelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
icoPoly8ThermoPhysics \
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "reactingThermoTypes.H"
|
||||
#include "thermoPhysicsTypes.H"
|
||||
#include "ReactingCloud.H"
|
||||
|
||||
#include "SingleMixtureFraction.H"
|
||||
@ -41,12 +41,17 @@ License
|
||||
makeReactingMultiphaseCompositionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieConstProperties \
|
||||
constGasThermoPhysics \
|
||||
); \
|
||||
makeReactingMultiphaseCompositionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieReactingProperties \
|
||||
gasThermoPhysics \
|
||||
); \
|
||||
makeReactingMultiphaseCompositionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
icoPoly8ThermoPhysics \
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "reactingThermoTypes.H"
|
||||
#include "thermoPhysicsTypes.H"
|
||||
#include "ReactingMultiphaseCloud.H"
|
||||
|
||||
#include "ConstantRateDevolatilisation.H"
|
||||
@ -43,12 +43,17 @@ License
|
||||
makeReactingMultiphaseDevolatilisationModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieConstProperties \
|
||||
constGasThermoPhysics \
|
||||
); \
|
||||
makeReactingMultiphaseDevolatilisationModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieReactingProperties \
|
||||
gasThermoPhysics \
|
||||
); \
|
||||
makeReactingMultiphaseDevolatilisationModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
icoPoly8ThermoPhysics \
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "reactingThermoTypes.H"
|
||||
#include "thermoPhysicsTypes.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "ConeInjection.H"
|
||||
@ -45,13 +45,19 @@ License
|
||||
makeReactingMultiphaseInjectionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieConstProperties \
|
||||
constGasThermoPhysics \
|
||||
); \
|
||||
\
|
||||
makeReactingMultiphaseInjectionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieReactingProperties \
|
||||
gasThermoPhysics \
|
||||
); \
|
||||
\
|
||||
makeReactingMultiphaseInjectionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
icoPoly8ThermoPhysics \
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "reactingThermoTypes.H"
|
||||
#include "thermoPhysicsTypes.H"
|
||||
#include "ReactingMultiphaseCloud.H"
|
||||
|
||||
#include "NoSurfaceReaction.H"
|
||||
@ -41,12 +41,17 @@ License
|
||||
makeReactingMultiphaseSurfaceReactionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieConstProperties \
|
||||
constGasThermoPhysics \
|
||||
); \
|
||||
makeReactingMultiphaseSurfaceReactionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieReactingProperties \
|
||||
gasThermoPhysics \
|
||||
); \
|
||||
makeReactingMultiphaseSurfaceReactionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
icoPoly8ThermoPhysics \
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "reactingThermoTypes.H"
|
||||
#include "thermoPhysicsTypes.H"
|
||||
#include "ReactingCloud.H"
|
||||
|
||||
#include "SinglePhaseMixture.H"
|
||||
@ -41,12 +41,17 @@ License
|
||||
makeReactingCompositionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieConstProperties \
|
||||
constGasThermoPhysics \
|
||||
); \
|
||||
makeReactingCompositionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieReactingProperties \
|
||||
gasThermoPhysics \
|
||||
); \
|
||||
makeReactingCompositionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
icoPoly8ThermoPhysics \
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "reactingThermoTypes.H"
|
||||
#include "thermoPhysicsTypes.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "NoDispersion.H"
|
||||
@ -43,13 +43,19 @@ License
|
||||
makeReactingDispersionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieConstProperties \
|
||||
constGasThermoPhysics \
|
||||
); \
|
||||
\
|
||||
makeReactingDispersionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieReactingProperties \
|
||||
gasThermoPhysics \
|
||||
); \
|
||||
\
|
||||
makeReactingDispersionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
icoPoly8ThermoPhysics \
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "reactingThermoTypes.H"
|
||||
#include "thermoPhysicsTypes.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "NoDrag.H"
|
||||
@ -42,12 +42,17 @@ License
|
||||
makeReactingDragModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieConstProperties \
|
||||
constGasThermoPhysics \
|
||||
); \
|
||||
makeReactingDragModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieReactingProperties \
|
||||
gasThermoPhysics \
|
||||
); \
|
||||
makeReactingDragModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
icoPoly8ThermoPhysics \
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "reactingThermoTypes.H"
|
||||
#include "thermoPhysicsTypes.H"
|
||||
#include "ThermoCloud.H"
|
||||
|
||||
#include "NoHeatTransfer.H"
|
||||
@ -42,12 +42,17 @@ License
|
||||
makeReactingHeatTransferModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieConstProperties \
|
||||
constGasThermoPhysics \
|
||||
); \
|
||||
makeReactingHeatTransferModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieReactingProperties \
|
||||
gasThermoPhysics \
|
||||
); \
|
||||
makeReactingHeatTransferModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
icoPoly8ThermoPhysics \
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "reactingThermoTypes.H"
|
||||
#include "thermoPhysicsTypes.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "ConeInjection.H"
|
||||
@ -46,13 +46,19 @@ License
|
||||
makeReactingInjectionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieConstProperties \
|
||||
constGasThermoPhysics \
|
||||
); \
|
||||
\
|
||||
makeReactingInjectionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieReactingProperties \
|
||||
gasThermoPhysics \
|
||||
); \
|
||||
\
|
||||
makeReactingInjectionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
icoPoly8ThermoPhysics \
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "reactingThermoTypes.H"
|
||||
#include "thermoPhysicsTypes.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "LocalInteraction.H"
|
||||
@ -43,13 +43,19 @@ License
|
||||
makeReactingPatchInteractionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieConstProperties \
|
||||
constGasThermoPhysics \
|
||||
); \
|
||||
\
|
||||
makeReactingPatchInteractionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieReactingProperties \
|
||||
gasThermoPhysics \
|
||||
); \
|
||||
\
|
||||
makeReactingPatchInteractionModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
icoPoly8ThermoPhysics \
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "reactingThermoTypes.H"
|
||||
#include "thermoPhysicsTypes.H"
|
||||
#include "ReactingCloud.H"
|
||||
|
||||
#include "NoPhaseChange.H"
|
||||
@ -42,13 +42,19 @@ License
|
||||
makeReactingPhaseChangeModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieConstProperties \
|
||||
constGasThermoPhysics \
|
||||
); \
|
||||
\
|
||||
makeReactingPhaseChangeModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieReactingProperties \
|
||||
gasThermoPhysics \
|
||||
); \
|
||||
\
|
||||
makeReactingPhaseChangeModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
icoPoly8ThermoPhysics \
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "reactingThermoTypes.H"
|
||||
#include "thermoPhysicsTypes.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "NoPostProcessing.H"
|
||||
@ -42,13 +42,19 @@ License
|
||||
makeReactingPostProcessingModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieConstProperties \
|
||||
constGasThermoPhysics \
|
||||
); \
|
||||
\
|
||||
makeReactingPostProcessingModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
specieReactingProperties \
|
||||
gasThermoPhysics \
|
||||
); \
|
||||
\
|
||||
makeReactingPostProcessingModelThermoType \
|
||||
( \
|
||||
ParcelType, \
|
||||
icoPoly8ThermoPhysics \
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ void Foam::InjectionModel<CloudType>::readProps()
|
||||
(
|
||||
"injectionProperties",
|
||||
owner_.db().time().timeName(),
|
||||
"uniform/Lagrangian"/owner_.name(),
|
||||
"uniform"/cloud::prefix/owner_.name(),
|
||||
owner_.db(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -67,7 +67,7 @@ void Foam::InjectionModel<CloudType>::writeProps()
|
||||
(
|
||||
"injectionProperties",
|
||||
owner_.db().time().timeName(),
|
||||
"uniform/Lagrangian"/owner_.name(),
|
||||
"uniform"/cloud::prefix/owner_.name(),
|
||||
owner_.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -401,7 +401,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
|
||||
setProperties(parcelI, newParcels, timeInj, *pPtr);
|
||||
|
||||
// Check new parcel properties
|
||||
td.cloud().checkParcelProperties(pPtr, dt, fullyDescribed());
|
||||
td.cloud().checkParcelProperties(*pPtr, dt, fullyDescribed());
|
||||
|
||||
// Apply correction to velocity for 2-D cases
|
||||
meshTools::constrainDirection
|
||||
|
||||
@ -29,17 +29,20 @@ License
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template <class CloudType>
|
||||
bool Foam::LocalInteraction<CloudType>::applyToPatch(const polyPatch& pp) const
|
||||
Foam::label Foam::LocalInteraction<CloudType>::applyToPatch
|
||||
(
|
||||
const label globalPatchI
|
||||
) const
|
||||
{
|
||||
forAll(patchIds_, patchI)
|
||||
{
|
||||
if (patchIds_[patchI] == pp.index())
|
||||
if (patchIds_[patchI] == globalPatchI)
|
||||
{
|
||||
return true;
|
||||
return patchI;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -75,7 +78,11 @@ Foam::LocalInteraction<CloudType>::LocalInteraction
|
||||
DynamicList<word> badWalls;
|
||||
forAll(bMesh, patchI)
|
||||
{
|
||||
if (isA<wallPolyPatch>(bMesh[patchI]) && !applyToPatch(bMesh[patchI]))
|
||||
if
|
||||
(
|
||||
isA<wallPolyPatch>(bMesh[patchI])
|
||||
&& applyToPatch(bMesh[patchI].index()) < 0
|
||||
)
|
||||
{
|
||||
badWalls.append(bMesh[patchI].name());
|
||||
}
|
||||
@ -115,7 +122,9 @@ bool Foam::LocalInteraction<CloudType>::correct
|
||||
vector& U
|
||||
) const
|
||||
{
|
||||
if (applyToPatch(pp))
|
||||
label patchI = applyToPatch(pp.index());
|
||||
|
||||
if (patchI >= 0)
|
||||
{
|
||||
vector nw = pp.faceAreas()[pp.whichFace(faceId)];
|
||||
nw /= mag(nw);
|
||||
@ -125,10 +134,10 @@ bool Foam::LocalInteraction<CloudType>::correct
|
||||
|
||||
if (Un > 0)
|
||||
{
|
||||
U -= (1.0 + patchData_[pp.index()].e())*Un*nw;
|
||||
U -= (1.0 + patchData_[patchI].e())*Un*nw;
|
||||
}
|
||||
|
||||
U -= patchData_[pp.index()].mu()*Ut;
|
||||
U -= patchData_[patchI].mu()*Ut;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -132,8 +132,8 @@ class LocalInteraction
|
||||
|
||||
// Private member functions
|
||||
|
||||
//- Returns true if patch is in patchIds_ list
|
||||
bool applyToPatch(const polyPatch& pp) const;
|
||||
//- Returns local patchI if patch is in patchIds_ list
|
||||
label applyToPatch(const label globalPatchI) const;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -39,15 +39,14 @@ Foam::CompositionModel<CloudType>::CompositionModel
|
||||
dict_(dict),
|
||||
owner_(owner),
|
||||
coeffDict_(dict.subDict(type + "Coeffs")),
|
||||
carrierThermo_(owner.carrierThermo()),
|
||||
carrierSpecies_(owner.carrierSpecies()),
|
||||
mcCarrierThermo_(owner.mcCarrierThermo()),
|
||||
liquids_
|
||||
(
|
||||
liquidMixture::New
|
||||
(
|
||||
owner.mesh().objectRegistry::lookupObject<dictionary>
|
||||
(
|
||||
carrierThermo_.name()
|
||||
owner.carrierThermo().name()
|
||||
)
|
||||
)
|
||||
),
|
||||
@ -57,14 +56,14 @@ Foam::CompositionModel<CloudType>::CompositionModel
|
||||
(
|
||||
owner.mesh().objectRegistry::lookupObject<dictionary>
|
||||
(
|
||||
carrierThermo_.name()
|
||||
owner.carrierThermo().name()
|
||||
)
|
||||
)
|
||||
),
|
||||
phaseProps_
|
||||
(
|
||||
coeffDict_.lookup("phases"),
|
||||
carrierThermo_.composition().species(),
|
||||
mcCarrierThermo_.species(),
|
||||
liquids_().components(),
|
||||
solids_().components()
|
||||
)
|
||||
@ -102,18 +101,10 @@ const Foam::dictionary& Foam::CompositionModel<CloudType>::coeffDict() const
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
const Foam::hCombustionThermo&
|
||||
Foam::CompositionModel<CloudType>::carrierThermo() const
|
||||
const Foam::multiComponentMixture<typename CloudType::thermoType>&
|
||||
Foam::CompositionModel<CloudType>::mcCarrierThermo() const
|
||||
{
|
||||
return carrierThermo_;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
const Foam::PtrList<typename CloudType::thermoType>&
|
||||
Foam::CompositionModel<CloudType>::carrierSpecies() const
|
||||
{
|
||||
return carrierSpecies_;
|
||||
return mcCarrierThermo_;
|
||||
}
|
||||
|
||||
|
||||
@ -184,10 +175,9 @@ Foam::label Foam::CompositionModel<CloudType>::globalCarrierId
|
||||
const word& cmptName
|
||||
) const
|
||||
{
|
||||
forAll(carrierThermo_.composition().species(), i)
|
||||
forAll(mcCarrierThermo_.species(), i)
|
||||
{
|
||||
word carrierSpecieName = carrierThermo_.composition().species()[i];
|
||||
if (cmptName == carrierSpecieName)
|
||||
if (cmptName == mcCarrierThermo_.species()[i])
|
||||
{
|
||||
return i;
|
||||
}
|
||||
@ -323,8 +313,8 @@ Foam::scalarField Foam::CompositionModel<CloudType>::X
|
||||
forAll(Y, i)
|
||||
{
|
||||
label gid = props.globalIds()[i];
|
||||
WInv += Y[i]/this->carrierSpecies()[gid].W();
|
||||
X[i] = Y[i]/this->carrierSpecies()[gid].W();
|
||||
WInv += Y[i]/mcCarrierThermo_.speciesData()[gid].W();
|
||||
X[i] = Y[i]/mcCarrierThermo_.speciesData()[gid].W();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -374,7 +364,7 @@ Foam::scalar Foam::CompositionModel<CloudType>::H
|
||||
forAll(Y, i)
|
||||
{
|
||||
label gid = props.globalIds()[i];
|
||||
HMixture += Y[i]*this->carrierSpecies()[gid].H(T);
|
||||
HMixture += Y[i]*mcCarrierThermo_.speciesData()[gid].H(T);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -438,7 +428,7 @@ Foam::scalar Foam::CompositionModel<CloudType>::cp
|
||||
forAll(Y, i)
|
||||
{
|
||||
label gid = props.globalIds()[i];
|
||||
cpMixture += Y[i]*this->carrierSpecies()[gid].Cp(T);
|
||||
cpMixture += Y[i]*mcCarrierThermo_.speciesData()[gid].Cp(T);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ SourceFiles
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
#include "PtrList.H"
|
||||
#include "hCombustionThermo.H"
|
||||
#include "multiComponentMixture.H"
|
||||
|
||||
#include "liquidMixture.H"
|
||||
#include "solidMixture.H"
|
||||
@ -74,11 +74,8 @@ class CompositionModel
|
||||
//- The coefficients dictionary
|
||||
const dictionary& coeffDict_;
|
||||
|
||||
//- Reference to the carrier phase thermo package
|
||||
hCombustionThermo& carrierThermo_;
|
||||
|
||||
//- Reference to the carrier phase species
|
||||
const PtrList<typename CloudType::thermoType>& carrierSpecies_;
|
||||
//- Reference to the multi-component carrier phase thermo
|
||||
multiComponentMixture<typename CloudType::thermoType>& mcCarrierThermo_;
|
||||
|
||||
//- Global (additional) liquid properties data
|
||||
autoPtr<liquidMixture> liquids_;
|
||||
@ -146,15 +143,12 @@ public:
|
||||
const dictionary& coeffDict() const;
|
||||
|
||||
//- Return the carrier phase thermo package
|
||||
const hCombustionThermo& carrierThermo() const;
|
||||
const multiComponentMixture<typename CloudType::thermoType>&
|
||||
mcCarrierThermo() const;
|
||||
|
||||
|
||||
// Composition lists
|
||||
|
||||
//- Return the carrier species
|
||||
const PtrList<typename CloudType::thermoType>&
|
||||
carrierSpecies() const;
|
||||
|
||||
//- Return the global (additional) liquids
|
||||
const liquidMixture& liquids() const;
|
||||
|
||||
|
||||
@ -35,14 +35,14 @@ Foam::scalarField Foam::LiquidEvaporation<CloudType>::calcXc
|
||||
const label cellI
|
||||
) const
|
||||
{
|
||||
scalarField Xc(this->owner().carrierThermo().composition().Y().size());
|
||||
scalarField Xc(this->owner().mcCarrierThermo().Y().size());
|
||||
|
||||
scalar Winv = 0.0;
|
||||
forAll(Xc, i)
|
||||
{
|
||||
scalar Y = this->owner().carrierThermo().composition().Y()[i][cellI];
|
||||
Winv += Y/this->owner().carrierSpecies()[i].W();
|
||||
Xc[i] = Y/this->owner().carrierSpecies()[i].W();
|
||||
scalar Y = this->owner().mcCarrierThermo().Y()[i][cellI];
|
||||
Winv += Y/this->owner().mcCarrierThermo().speciesData()[i].W();
|
||||
Xc[i] = Y/this->owner().mcCarrierThermo().speciesData()[i].W();
|
||||
}
|
||||
|
||||
return Xc/Winv;
|
||||
@ -104,7 +104,7 @@ Foam::LiquidEvaporation<CloudType>::LiquidEvaporation
|
||||
owner.composition().globalCarrierId(activeLiquids_[i]);
|
||||
}
|
||||
|
||||
// Determine mapping between local and global liquids
|
||||
// Determine mapping between model active liquids and global liquids
|
||||
label idLiquid = owner.composition().idLiquid();
|
||||
forAll(activeLiquids_, i)
|
||||
{
|
||||
@ -153,8 +153,8 @@ void Foam::LiquidEvaporation<CloudType>::calculate
|
||||
// Reynolds number
|
||||
scalar Re = mag(Ur)*d/(nuc + ROOTVSMALL);
|
||||
|
||||
// film temperature evaluated using the particle temperature
|
||||
scalar Tf = T;
|
||||
// film temperature evaluated using the 2/3 rule
|
||||
scalar Tf = (2.0*T + Tc)/3.0;
|
||||
|
||||
// calculate mass transfer of each specie in liquid
|
||||
forAll(activeLiquids_, i)
|
||||
@ -162,12 +162,13 @@ void Foam::LiquidEvaporation<CloudType>::calculate
|
||||
label gid = liqToCarrierMap_[i];
|
||||
label lid = liqToLiqMap_[i];
|
||||
|
||||
// vapour diffusivity [m2/s]
|
||||
// vapour diffusivity at film temperature and cell pressure [m2/s]
|
||||
scalar Dab = liquids_->properties()[lid].D(pc, Tf);
|
||||
|
||||
// saturation pressure for species i [pa]
|
||||
// - carrier phase pressure assumed equal to the liquid vapour pressure
|
||||
// close to the surface
|
||||
// saturation pressure for species i at film temperature and cell
|
||||
// pressure [pa] - carrier phase pressure assumed equal to the liquid
|
||||
// vapour pressure close to the surface
|
||||
// - limited to pc if pSat > pc
|
||||
scalar pSat = min(liquids_->properties()[lid].pv(pc, Tf), pc);
|
||||
|
||||
// Schmidt number
|
||||
@ -179,11 +180,11 @@ void Foam::LiquidEvaporation<CloudType>::calculate
|
||||
// mass transfer coefficient [m/s]
|
||||
scalar kc = Sh*Dab/(d + ROOTVSMALL);
|
||||
|
||||
// vapour concentration at droplet surface [kmol/m3]
|
||||
// vapour concentration at droplet surface at film temperature [kmol/m3]
|
||||
scalar Cs = pSat/(specie::RR*Tf);
|
||||
|
||||
// vapour concentration in bulk gas [kmol/m3]
|
||||
scalar Cinf = Xc[gid]*pc/(specie::RR*Tc);
|
||||
// vapour concentration in bulk gas at film temperature [kmol/m3]
|
||||
scalar Cinf = Xc[gid]*pc/(specie::RR*Tf);
|
||||
|
||||
// molar flux of vapour [kmol/m2/s]
|
||||
scalar Ni = max(kc*(Cs - Cinf), 0.0);
|
||||
|
||||
@ -10,7 +10,7 @@ wmake libso solids
|
||||
wmake libso solidMixture
|
||||
|
||||
wmake libso basic
|
||||
wmake libso combustion
|
||||
wmake libso reactionThermo
|
||||
wmake libso laminarFlameSpeed
|
||||
wmake libso chemistryModel
|
||||
wmake libso pdfs
|
||||
|
||||
@ -1,13 +1,16 @@
|
||||
basicMixture = mixtures/basicMixture
|
||||
basicThermo = basicThermo
|
||||
mixtures/basicMixture/basicMixture.C
|
||||
mixtures/basicMixture/basicMixtures.C
|
||||
|
||||
$(basicMixture)/basicMixture.C
|
||||
$(basicMixture)/basicMixtures.C
|
||||
$(basicThermo)/basicThermo.C
|
||||
$(basicThermo)/newBasicThermo.C
|
||||
basicThermo/basicThermo.C
|
||||
|
||||
hThermo/hThermos.C
|
||||
eThermo/eThermos.C
|
||||
psiThermo/basicPsiThermo/basicPsiThermo.C
|
||||
psiThermo/basicPsiThermo/newBasicPsiThermo.C
|
||||
psiThermo/hPsiThermo/hPsiThermos.C
|
||||
psiThermo/ePsiThermo/ePsiThermos.C
|
||||
|
||||
rhoThermo/basicRhoThermo/basicRhoThermo.C
|
||||
rhoThermo/basicRhoThermo/newBasicRhoThermo.C
|
||||
rhoThermo/hRhoThermo/hRhoThermos.C
|
||||
|
||||
derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.C
|
||||
derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.C
|
||||
|
||||
@ -35,20 +35,16 @@ License
|
||||
#include "gradientInternalEnergyFvPatchScalarField.H"
|
||||
#include "mixedInternalEnergyFvPatchScalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
|
||||
|
||||
defineTypeNameAndDebug(basicThermo, 0);
|
||||
defineRunTimeSelectionTable(basicThermo, fvMesh);
|
||||
|
||||
defineTypeNameAndDebug(basicThermo, 0);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
wordList basicThermo::hBoundaryTypes()
|
||||
Foam::wordList Foam::basicThermo::hBoundaryTypes()
|
||||
{
|
||||
const volScalarField::GeometricBoundaryField& tbf = T_.boundaryField();
|
||||
|
||||
@ -77,7 +73,8 @@ wordList basicThermo::hBoundaryTypes()
|
||||
return hbt;
|
||||
}
|
||||
|
||||
void basicThermo::hBoundaryCorrection(volScalarField& h)
|
||||
|
||||
void Foam::basicThermo::hBoundaryCorrection(volScalarField& h)
|
||||
{
|
||||
volScalarField::GeometricBoundaryField& hbf = h.boundaryField();
|
||||
|
||||
@ -96,7 +93,8 @@ void basicThermo::hBoundaryCorrection(volScalarField& h)
|
||||
}
|
||||
}
|
||||
|
||||
wordList basicThermo::eBoundaryTypes()
|
||||
|
||||
Foam::wordList Foam::basicThermo::eBoundaryTypes()
|
||||
{
|
||||
const volScalarField::GeometricBoundaryField& tbf = T_.boundaryField();
|
||||
|
||||
@ -125,7 +123,8 @@ wordList basicThermo::eBoundaryTypes()
|
||||
return ebt;
|
||||
}
|
||||
|
||||
void basicThermo::eBoundaryCorrection(volScalarField& e)
|
||||
|
||||
void Foam::basicThermo::eBoundaryCorrection(volScalarField& e)
|
||||
{
|
||||
volScalarField::GeometricBoundaryField& ebf = e.boundaryField();
|
||||
|
||||
@ -146,7 +145,7 @@ void basicThermo::eBoundaryCorrection(volScalarField& e)
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
basicThermo::basicThermo(const fvMesh& mesh)
|
||||
Foam::basicThermo::basicThermo(const fvMesh& mesh)
|
||||
:
|
||||
IOdictionary
|
||||
(
|
||||
@ -173,19 +172,6 @@ basicThermo::basicThermo(const fvMesh& mesh)
|
||||
mesh
|
||||
),
|
||||
|
||||
T_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"T",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
),
|
||||
|
||||
psi_
|
||||
(
|
||||
IOobject
|
||||
@ -200,6 +186,19 @@ basicThermo::basicThermo(const fvMesh& mesh)
|
||||
dimensionSet(0, -2, 2, 0, 0)
|
||||
),
|
||||
|
||||
T_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"T",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
),
|
||||
|
||||
mu_
|
||||
(
|
||||
IOobject
|
||||
@ -232,20 +231,184 @@ basicThermo::basicThermo(const fvMesh& mesh)
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
basicThermo::~basicThermo()
|
||||
Foam::basicThermo::~basicThermo()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool basicThermo::read()
|
||||
Foam::volScalarField& Foam::basicThermo::p()
|
||||
{
|
||||
return p_;
|
||||
}
|
||||
|
||||
|
||||
const Foam::volScalarField& Foam::basicThermo::p() const
|
||||
{
|
||||
return p_;
|
||||
}
|
||||
|
||||
|
||||
const Foam::volScalarField& Foam::basicThermo::psi() const
|
||||
{
|
||||
return psi_;
|
||||
}
|
||||
|
||||
|
||||
Foam::volScalarField& Foam::basicThermo::h()
|
||||
{
|
||||
notImplemented("basicThermo::h()");
|
||||
return const_cast<volScalarField&>(volScalarField::null());
|
||||
}
|
||||
|
||||
|
||||
const Foam::volScalarField& Foam::basicThermo::h() const
|
||||
{
|
||||
notImplemented("basicThermo::h() const");
|
||||
return volScalarField::null();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::basicThermo::h
|
||||
(
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"basicThermo::h"
|
||||
"(const scalarField& T, const labelList& cells) const"
|
||||
);
|
||||
return tmp<scalarField>(NULL);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::basicThermo::h
|
||||
(
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"basicThermo::h"
|
||||
"(const scalarField& T, const label patchi) const"
|
||||
);
|
||||
return tmp<scalarField>(NULL);
|
||||
}
|
||||
|
||||
|
||||
Foam::volScalarField& Foam::basicThermo::e()
|
||||
{
|
||||
notImplemented("basicThermo::e()");
|
||||
return const_cast<volScalarField&>(volScalarField::null());
|
||||
}
|
||||
|
||||
|
||||
const Foam::volScalarField& Foam::basicThermo::e() const
|
||||
{
|
||||
notImplemented("basicThermo::e()");
|
||||
return volScalarField::null();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::basicThermo::e
|
||||
(
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"basicThermo::e"
|
||||
"(const scalarField& T, const labelList& cells) const"
|
||||
);
|
||||
return tmp<scalarField>(NULL);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::basicThermo::e
|
||||
(
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"basicThermo::e"
|
||||
"(const scalarField& T, const label patchi) const"
|
||||
);
|
||||
return tmp<scalarField>(NULL);
|
||||
}
|
||||
|
||||
|
||||
const Foam::volScalarField& Foam::basicThermo::T() const
|
||||
{
|
||||
return T_;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::basicThermo::Cp
|
||||
(
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"basicThermo::Cp"
|
||||
"(const scalarField& T, const label patchi) const"
|
||||
);
|
||||
return tmp<scalarField>(NULL);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::basicThermo::Cp() const
|
||||
{
|
||||
notImplemented("basicThermo::Cp() const");
|
||||
return volScalarField::null();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::basicThermo::Cv
|
||||
(
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"basicThermo::Cv"
|
||||
"(const scalarField& T, const label patchi) const"
|
||||
);
|
||||
return tmp<scalarField>(NULL);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::basicThermo::Cv() const
|
||||
{
|
||||
notImplemented("basicThermo::Cv() const");
|
||||
return volScalarField::null();
|
||||
}
|
||||
|
||||
|
||||
const Foam::volScalarField& Foam::basicThermo::mu() const
|
||||
{
|
||||
return mu_;
|
||||
}
|
||||
|
||||
|
||||
const Foam::volScalarField& Foam::basicThermo::alpha() const
|
||||
{
|
||||
return alpha_;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::basicThermo::read()
|
||||
{
|
||||
return regIOobject::read();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -41,7 +41,6 @@ SourceFiles
|
||||
#include "typeInfo.H"
|
||||
#include "IOdictionary.H"
|
||||
#include "autoPtr.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -49,7 +48,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class basicThermo Declaration
|
||||
Class basicThermo Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class basicThermo
|
||||
@ -61,21 +60,45 @@ protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
volScalarField p_;
|
||||
volScalarField T_;
|
||||
volScalarField psi_;
|
||||
// Fields
|
||||
|
||||
volScalarField mu_;
|
||||
volScalarField alpha_;
|
||||
//- Pressure [Pa]
|
||||
volScalarField p_;
|
||||
|
||||
//- Compressibility [s^2/m^2]
|
||||
volScalarField psi_;
|
||||
|
||||
//- Temperature [K]
|
||||
volScalarField T_;
|
||||
|
||||
//- Laminar dynamic viscosity [kg/m/s]
|
||||
volScalarField mu_;
|
||||
|
||||
//- Laminar thermal diffusuvity [kg/m/s]
|
||||
volScalarField alpha_;
|
||||
|
||||
|
||||
// Protected member functions
|
||||
|
||||
wordList hBoundaryTypes();
|
||||
void hBoundaryCorrection(volScalarField& h);
|
||||
// Enthalpy
|
||||
|
||||
//- Return the enthalpy field boundary types by interrogating the
|
||||
// temperature field boundary types
|
||||
wordList hBoundaryTypes();
|
||||
|
||||
//- Correct the enthalpy field boundaries
|
||||
void hBoundaryCorrection(volScalarField& h);
|
||||
|
||||
|
||||
// Internal energy
|
||||
|
||||
//- Return the internal energy field boundary types by
|
||||
// interrogating the temperature field boundary types
|
||||
wordList eBoundaryTypes();
|
||||
|
||||
//- Correct the internal energy field boundaries
|
||||
void eBoundaryCorrection(volScalarField& e);
|
||||
|
||||
wordList eBoundaryTypes();
|
||||
void eBoundaryCorrection(volScalarField& e);
|
||||
|
||||
//- Construct as copy (not implemented)
|
||||
basicThermo(const basicThermo&);
|
||||
@ -87,29 +110,12 @@ public:
|
||||
TypeName("basicThermo");
|
||||
|
||||
|
||||
// Declare run-time constructor selection table
|
||||
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
basicThermo,
|
||||
fvMesh,
|
||||
(const fvMesh& mesh),
|
||||
(mesh)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh
|
||||
basicThermo(const fvMesh&);
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
static autoPtr<basicThermo> New(const fvMesh&);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~basicThermo();
|
||||
|
||||
@ -120,193 +126,101 @@ public:
|
||||
virtual void correct() = 0;
|
||||
|
||||
|
||||
// Access to thermodynamic state variables.
|
||||
// Access to thermodynamic state variables
|
||||
|
||||
//- Pressure [Pa]
|
||||
// Non-const access allowed for transport equations
|
||||
virtual volScalarField& p()
|
||||
{
|
||||
return p_;
|
||||
}
|
||||
virtual volScalarField& p();
|
||||
|
||||
//- Pressure [Pa]
|
||||
virtual const volScalarField& p() const
|
||||
{
|
||||
return p_;
|
||||
}
|
||||
virtual const volScalarField& p() const;
|
||||
|
||||
//- Density [kg/m^3]
|
||||
virtual tmp<volScalarField> rho() const = 0;
|
||||
|
||||
//- Compressibility [s^2/m^2]
|
||||
virtual const volScalarField& psi() const;
|
||||
|
||||
//- Enthalpy [J/kg]
|
||||
// Non-const access allowed for transport equations
|
||||
virtual volScalarField& h()
|
||||
{
|
||||
notImplemented("basicThermo::h()");
|
||||
return const_cast<volScalarField&>(volScalarField::null());
|
||||
}
|
||||
virtual volScalarField& h();
|
||||
|
||||
//- Enthalpy [J/kg]
|
||||
virtual const volScalarField& h() const
|
||||
{
|
||||
notImplemented("basicThermo::h() const");
|
||||
return volScalarField::null();
|
||||
}
|
||||
virtual const volScalarField& h() const;
|
||||
|
||||
//- Enthalpy for cell-set [J/kg]
|
||||
virtual tmp<scalarField> h
|
||||
(
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"basicThermo::h"
|
||||
"(const scalarField& T, const labelList& cells) const"
|
||||
);
|
||||
return tmp<scalarField>(NULL);
|
||||
}
|
||||
) const;
|
||||
|
||||
//- Enthalpy for patch [J/kg]
|
||||
virtual tmp<scalarField> h
|
||||
(
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"basicThermo::h"
|
||||
"(const scalarField& T, const label patchi) const"
|
||||
);
|
||||
return tmp<scalarField>(NULL);
|
||||
}
|
||||
) const;
|
||||
|
||||
//- Internal energy [J/kg]
|
||||
// Non-const access allowed for transport equations
|
||||
virtual volScalarField& e()
|
||||
{
|
||||
notImplemented("basicThermo::e()");
|
||||
return const_cast<volScalarField&>(volScalarField::null());
|
||||
}
|
||||
virtual volScalarField& e();
|
||||
|
||||
//- Internal energy [J/kg]
|
||||
virtual const volScalarField& e() const
|
||||
{
|
||||
notImplemented("basicThermo::e()");
|
||||
return volScalarField::null();
|
||||
}
|
||||
virtual const volScalarField& e() const;
|
||||
|
||||
//- Internal energy for cell-set [J/kg]
|
||||
virtual tmp<scalarField> e
|
||||
(
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"basicThermo::e"
|
||||
"(const scalarField& T, const labelList& cells) const"
|
||||
);
|
||||
return tmp<scalarField>(NULL);
|
||||
}
|
||||
) const;
|
||||
|
||||
//-Internal energy for patch [J/kg]
|
||||
virtual tmp<scalarField> e
|
||||
(
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"basicThermo::e"
|
||||
"(const scalarField& T, const label patchi) const"
|
||||
);
|
||||
return tmp<scalarField>(NULL);
|
||||
}
|
||||
) const;
|
||||
|
||||
|
||||
// Fields derived from thermodynamic state variables
|
||||
|
||||
//- Temperature [K]
|
||||
virtual const volScalarField& T() const
|
||||
{
|
||||
return T_;
|
||||
}
|
||||
|
||||
//- Density [kg/m^3]
|
||||
virtual tmp<volScalarField> rho() const
|
||||
{
|
||||
return p_*psi();
|
||||
}
|
||||
|
||||
//- Compressibility [s^2/m^2]
|
||||
virtual const volScalarField& psi() const
|
||||
{
|
||||
return psi_;
|
||||
}
|
||||
virtual const volScalarField& T() const;
|
||||
|
||||
//- Heat capacity at constant pressure for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cp
|
||||
(
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"basicThermo::Cp"
|
||||
"(const scalarField& T, const label patchi) const"
|
||||
);
|
||||
return tmp<scalarField>(NULL);
|
||||
}
|
||||
) const;
|
||||
|
||||
//- Heat capacity at constant pressure [J/kg/K]
|
||||
virtual tmp<volScalarField> Cp() const
|
||||
{
|
||||
notImplemented("basicThermo::Cp() const");
|
||||
return volScalarField::null();
|
||||
}
|
||||
virtual tmp<volScalarField> Cp() const;
|
||||
|
||||
//- Heat capacity at constant volume for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cv
|
||||
(
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"basicThermo::Cv"
|
||||
"(const scalarField& T, const label patchi) const"
|
||||
);
|
||||
return tmp<scalarField>(NULL);
|
||||
}
|
||||
) const;
|
||||
|
||||
//- Heat capacity at constant volume [J/kg/K]
|
||||
virtual tmp<volScalarField> Cv() const
|
||||
{
|
||||
notImplemented("basicThermo::Cv() const");
|
||||
return volScalarField::null();
|
||||
}
|
||||
virtual tmp<volScalarField> Cv() const;
|
||||
|
||||
|
||||
// Access to transport state variables
|
||||
|
||||
//- Dynamic viscosity of mixture [kg/ms]
|
||||
virtual const volScalarField& mu() const
|
||||
{
|
||||
return mu_;
|
||||
}
|
||||
//- Dynamic viscosity of mixture [kg/m/s]
|
||||
virtual const volScalarField& mu() const;
|
||||
|
||||
//- Thermal diffusivity for enthalpy of mixture [kg/ms]
|
||||
virtual const volScalarField& alpha() const
|
||||
{
|
||||
return alpha_;
|
||||
}
|
||||
//- Thermal diffusivity for enthalpy of mixture [kg/m/s]
|
||||
virtual const volScalarField& alpha() const;
|
||||
|
||||
|
||||
//- Read thermophysicalProperties dictionary
|
||||
virtual bool read() = 0;
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -22,8 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "error.H"
|
||||
|
||||
@ -47,7 +47,7 @@ class fvMesh;
|
||||
class dictionary;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class basicMixture Declaration
|
||||
Class basicMixture Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class basicMixture
|
||||
@ -65,9 +65,8 @@ public:
|
||||
basicMixture(const dictionary&, const fvMesh&);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~basicMixture();
|
||||
//- Destructor
|
||||
virtual ~basicMixture();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
Selection function for internal energy based thermodynamics package.
|
||||
Mixture instantiation
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -0,0 +1,52 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\/ 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 2 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basicPsiThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(basicPsiThermo, 0);
|
||||
defineRunTimeSelectionTable(basicPsiThermo, fvMesh);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::basicPsiThermo::basicPsiThermo(const fvMesh& mesh)
|
||||
:
|
||||
basicThermo(mesh)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::basicPsiThermo::~basicPsiThermo()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,114 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\/ 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 2 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::basicPsiThermo
|
||||
|
||||
Description
|
||||
Basic thermodynamic properties based on compressibility
|
||||
|
||||
SourceFiles
|
||||
basicPsiThermo.C
|
||||
newBasicPsiThermo.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef basicPsiThermo_H
|
||||
#define basicPsiThermo_H
|
||||
|
||||
#include "basicThermo.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class basicPsiThermo Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class basicPsiThermo
|
||||
:
|
||||
public basicThermo
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
// Protected member functions
|
||||
|
||||
//- Construct as copy (not implemented)
|
||||
basicPsiThermo(const basicPsiThermo&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("basicPsiThermo");
|
||||
|
||||
|
||||
//- Declare run-time constructor selection table
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
basicPsiThermo,
|
||||
fvMesh,
|
||||
(const fvMesh& mesh),
|
||||
(mesh)
|
||||
);
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh
|
||||
basicPsiThermo(const fvMesh&);
|
||||
|
||||
|
||||
//- Selector
|
||||
static autoPtr<basicPsiThermo> New(const fvMesh&);
|
||||
|
||||
//- Destructor
|
||||
virtual ~basicPsiThermo();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
// Fields derived from thermodynamic state variables
|
||||
|
||||
//- Density [kg/m^3] - uses current value of pressure
|
||||
virtual tmp<volScalarField> rho() const
|
||||
{
|
||||
return p_*psi();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -23,39 +23,38 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
InClass
|
||||
Foam::hCombustionThermo
|
||||
Foam::basicPsiThermo
|
||||
|
||||
Description
|
||||
Macros for creating 'basic' compresibility-based thermo packages
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef makeCombustionThermo_H
|
||||
#define makeCombustionThermo_H
|
||||
#ifndef makeBasicPsiThermo_H
|
||||
#define makeBasicPsiThermo_H
|
||||
|
||||
#include "basicPsiThermo.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#define makeCombustionThermo(CThermo,MixtureThermo,Mixture,Transport,Thermo,EqnOfState) \
|
||||
#define makeBasicPsiThermo(Cthermo,Mixture,Transport,Thermo,EqnOfState) \
|
||||
\
|
||||
typedef MixtureThermo \
|
||||
<Mixture<Transport<specieThermo<Thermo<EqnOfState> > > > > \
|
||||
MixtureThermo##Mixture##Transport##Thermo##EqnOfState; \
|
||||
typedef Cthermo<Mixture<Transport<specieThermo<Thermo<EqnOfState> > > > > \
|
||||
Cthermo##Mixture##Transport##Thermo##EqnOfState; \
|
||||
\
|
||||
defineTemplateTypeNameAndDebugWithName \
|
||||
(MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \
|
||||
#MixtureThermo \
|
||||
"<"#Mixture"<"#Transport"<specieThermo<"#Thermo"<"#EqnOfState">>>>>", 0); \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
basicThermo, \
|
||||
MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \
|
||||
fvMesh \
|
||||
Cthermo##Mixture##Transport##Thermo##EqnOfState, \
|
||||
#Cthermo \
|
||||
"<"#Mixture"<"#Transport"<specieThermo<"#Thermo"<"#EqnOfState">>>>>", \
|
||||
0 \
|
||||
); \
|
||||
\
|
||||
addToRunTimeSelectionTable \
|
||||
( \
|
||||
CThermo, \
|
||||
MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \
|
||||
basicPsiThermo, \
|
||||
Cthermo##Mixture##Transport##Thermo##EqnOfState, \
|
||||
fvMesh \
|
||||
)
|
||||
|
||||
@ -24,19 +24,16 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "hCombustionThermo.H"
|
||||
#include "fvMesh.H"
|
||||
#include "basicPsiThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
Foam::autoPtr<Foam::basicPsiThermo> Foam::basicPsiThermo::New
|
||||
(
|
||||
const fvMesh& mesh
|
||||
)
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<hCombustionThermo> hCombustionThermo::New(const fvMesh& mesh)
|
||||
{
|
||||
word hCombustionThermoTypeName;
|
||||
word thermoTypeName;
|
||||
|
||||
// Enclose the creation of the thermophysicalProperties to ensure it is
|
||||
// deleted before the turbulenceModel is created otherwise the dictionary
|
||||
@ -54,31 +51,25 @@ autoPtr<hCombustionThermo> hCombustionThermo::New(const fvMesh& mesh)
|
||||
)
|
||||
);
|
||||
|
||||
thermoDict.lookup("thermoType") >> hCombustionThermoTypeName;
|
||||
thermoDict.lookup("thermoType") >> thermoTypeName;
|
||||
}
|
||||
|
||||
Info<< "Selecting thermodynamics package "
|
||||
<< hCombustionThermoTypeName << endl;
|
||||
Info<< "Selecting thermodynamics package " << thermoTypeName << endl;
|
||||
|
||||
fvMeshConstructorTable::iterator cstrIter =
|
||||
fvMeshConstructorTablePtr_->find(hCombustionThermoTypeName);
|
||||
fvMeshConstructorTablePtr_->find(thermoTypeName);
|
||||
|
||||
if (cstrIter == fvMeshConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn("hCombustionThermo::New(const fvMesh&)")
|
||||
<< "Unknown hCombustionThermo type "
|
||||
<< hCombustionThermoTypeName << endl << endl
|
||||
<< "Valid hCombustionThermo types are :" << endl
|
||||
<< fvMeshConstructorTablePtr_->toc()
|
||||
FatalErrorIn("basicPsiThermo::New(const fvMesh&)")
|
||||
<< "Unknown basicPsiThermo type " << thermoTypeName << nl << nl
|
||||
<< "Valid basicPsiThermo types are:" << nl
|
||||
<< fvMeshConstructorTablePtr_->toc() << nl
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<hCombustionThermo>(cstrIter()(mesh));
|
||||
return autoPtr<basicPsiThermo>(cstrIter()(mesh));
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -24,72 +24,22 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "eThermo.H"
|
||||
#include "ePsiThermo.H"
|
||||
#include "fvMesh.H"
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class MixtureType>
|
||||
Foam::eThermo<MixtureType>::eThermo(const fvMesh& mesh)
|
||||
:
|
||||
basicThermo(mesh),
|
||||
MixtureType(*this, mesh),
|
||||
|
||||
e_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"e",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionSet(0, 2, -2, 0, 0),
|
||||
eBoundaryTypes()
|
||||
)
|
||||
{
|
||||
scalarField& eCells = e_.internalField();
|
||||
const scalarField& TCells = T_.internalField();
|
||||
|
||||
forAll(eCells, celli)
|
||||
{
|
||||
eCells[celli] = this->cellMixture(celli).E(TCells[celli]);
|
||||
}
|
||||
|
||||
forAll(e_.boundaryField(), patchi)
|
||||
{
|
||||
e_.boundaryField()[patchi] == e(T_.boundaryField()[patchi], patchi);
|
||||
}
|
||||
|
||||
eBoundaryCorrection(e_);
|
||||
|
||||
calculate();
|
||||
psi_.oldTime(); // Switch on saving old time
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class MixtureType>
|
||||
Foam::eThermo<MixtureType>::~eThermo()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class MixtureType>
|
||||
void Foam::eThermo<MixtureType>::calculate()
|
||||
void Foam::ePsiThermo<MixtureType>::calculate()
|
||||
{
|
||||
const scalarField& eCells = e_.internalField();
|
||||
const scalarField& pCells = p_.internalField();
|
||||
const scalarField& pCells = this->p_.internalField();
|
||||
|
||||
scalarField& TCells = T_.internalField();
|
||||
scalarField& psiCells = psi_.internalField();
|
||||
scalarField& muCells = mu_.internalField();
|
||||
scalarField& alphaCells = alpha_.internalField();
|
||||
scalarField& TCells = this->T_.internalField();
|
||||
scalarField& psiCells = this->psi_.internalField();
|
||||
scalarField& muCells = this->mu_.internalField();
|
||||
scalarField& alphaCells = this->alpha_.internalField();
|
||||
|
||||
forAll(TCells, celli)
|
||||
{
|
||||
@ -103,16 +53,16 @@ void Foam::eThermo<MixtureType>::calculate()
|
||||
alphaCells[celli] = mixture_.alpha(TCells[celli]);
|
||||
}
|
||||
|
||||
forAll(T_.boundaryField(), patchi)
|
||||
forAll(this->T_.boundaryField(), patchi)
|
||||
{
|
||||
fvPatchScalarField& pp = p_.boundaryField()[patchi];
|
||||
fvPatchScalarField& pT = T_.boundaryField()[patchi];
|
||||
fvPatchScalarField& ppsi = psi_.boundaryField()[patchi];
|
||||
fvPatchScalarField& pp = this->p_.boundaryField()[patchi];
|
||||
fvPatchScalarField& pT = this->T_.boundaryField()[patchi];
|
||||
fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi];
|
||||
|
||||
fvPatchScalarField& pe = e_.boundaryField()[patchi];
|
||||
|
||||
fvPatchScalarField& pmu = mu_.boundaryField()[patchi];
|
||||
fvPatchScalarField& palpha = alpha_.boundaryField()[patchi];
|
||||
fvPatchScalarField& pmu = this->mu_.boundaryField()[patchi];
|
||||
fvPatchScalarField& palpha = this->alpha_.boundaryField()[patchi];
|
||||
|
||||
if (pT.fixesValue())
|
||||
{
|
||||
@ -146,30 +96,83 @@ void Foam::eThermo<MixtureType>::calculate()
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class MixtureType>
|
||||
Foam::ePsiThermo<MixtureType>::ePsiThermo(const fvMesh& mesh)
|
||||
:
|
||||
basicPsiThermo(mesh),
|
||||
MixtureType(*this, mesh),
|
||||
|
||||
e_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"e",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionSet(0, 2, -2, 0, 0),
|
||||
this->eBoundaryTypes()
|
||||
)
|
||||
{
|
||||
scalarField& eCells = e_.internalField();
|
||||
const scalarField& TCells = this->T_.internalField();
|
||||
|
||||
forAll(eCells, celli)
|
||||
{
|
||||
eCells[celli] = this->cellMixture(celli).E(TCells[celli]);
|
||||
}
|
||||
|
||||
forAll(e_.boundaryField(), patchi)
|
||||
{
|
||||
e_.boundaryField()[patchi] ==
|
||||
e(this->T_.boundaryField()[patchi], patchi);
|
||||
}
|
||||
|
||||
this->eBoundaryCorrection(e_);
|
||||
|
||||
calculate();
|
||||
|
||||
// Switch on saving old time
|
||||
this->psi_.oldTime();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class MixtureType>
|
||||
Foam::ePsiThermo<MixtureType>::~ePsiThermo()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class MixtureType>
|
||||
void Foam::eThermo<MixtureType>::correct()
|
||||
void Foam::ePsiThermo<MixtureType>::correct()
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "entering eThermo<MixtureType>::correct()" << endl;
|
||||
Info<< "entering ePsiThermo<MixtureType>::correct()" << endl;
|
||||
}
|
||||
|
||||
// force the saving of the old-time values
|
||||
psi_.oldTime();
|
||||
this->psi_.oldTime();
|
||||
|
||||
calculate();
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Info<< "exiting eThermo<MixtureType>::correct()" << endl;
|
||||
Info<< "exiting ePsiThermo<MixtureType>::correct()" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class MixtureType>
|
||||
Foam::tmp<Foam::scalarField> Foam::eThermo<MixtureType>::e
|
||||
Foam::tmp<Foam::scalarField> Foam::ePsiThermo<MixtureType>::e
|
||||
(
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
@ -188,7 +191,7 @@ Foam::tmp<Foam::scalarField> Foam::eThermo<MixtureType>::e
|
||||
|
||||
|
||||
template<class MixtureType>
|
||||
Foam::tmp<Foam::scalarField> Foam::eThermo<MixtureType>::e
|
||||
Foam::tmp<Foam::scalarField> Foam::ePsiThermo<MixtureType>::e
|
||||
(
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
@ -205,8 +208,9 @@ Foam::tmp<Foam::scalarField> Foam::eThermo<MixtureType>::e
|
||||
return te;
|
||||
}
|
||||
|
||||
|
||||
template<class MixtureType>
|
||||
Foam::tmp<Foam::scalarField> Foam::eThermo<MixtureType>::Cp
|
||||
Foam::tmp<Foam::scalarField> Foam::ePsiThermo<MixtureType>::Cp
|
||||
(
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
@ -223,10 +227,11 @@ Foam::tmp<Foam::scalarField> Foam::eThermo<MixtureType>::Cp
|
||||
return tCp;
|
||||
}
|
||||
|
||||
|
||||
template<class MixtureType>
|
||||
Foam::tmp<Foam::volScalarField> Foam::eThermo<MixtureType>::Cp() const
|
||||
Foam::tmp<Foam::volScalarField> Foam::ePsiThermo<MixtureType>::Cp() const
|
||||
{
|
||||
const fvMesh& mesh = T_.mesh();
|
||||
const fvMesh& mesh = this->T_.mesh();
|
||||
|
||||
tmp<volScalarField> tCp
|
||||
(
|
||||
@ -242,20 +247,20 @@ Foam::tmp<Foam::volScalarField> Foam::eThermo<MixtureType>::Cp() const
|
||||
),
|
||||
mesh,
|
||||
dimensionSet(0, 2, -2, -1, 0),
|
||||
T_.boundaryField().types()
|
||||
this->T_.boundaryField().types()
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& cp = tCp();
|
||||
|
||||
forAll(T_, celli)
|
||||
forAll(this->T_, celli)
|
||||
{
|
||||
cp[celli] = this->cellMixture(celli).Cp(T_[celli]);
|
||||
cp[celli] = this->cellMixture(celli).Cp(this->T_[celli]);
|
||||
}
|
||||
|
||||
forAll(T_.boundaryField(), patchi)
|
||||
forAll(this->T_.boundaryField(), patchi)
|
||||
{
|
||||
const fvPatchScalarField& pT = T_.boundaryField()[patchi];
|
||||
const fvPatchScalarField& pT = this->T_.boundaryField()[patchi];
|
||||
fvPatchScalarField& pCp = cp.boundaryField()[patchi];
|
||||
|
||||
forAll(pT, facei)
|
||||
@ -269,7 +274,7 @@ Foam::tmp<Foam::volScalarField> Foam::eThermo<MixtureType>::Cp() const
|
||||
|
||||
|
||||
template<class MixtureType>
|
||||
Foam::tmp<Foam::scalarField> Foam::eThermo<MixtureType>::Cv
|
||||
Foam::tmp<Foam::scalarField> Foam::ePsiThermo<MixtureType>::Cv
|
||||
(
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
@ -288,9 +293,9 @@ Foam::tmp<Foam::scalarField> Foam::eThermo<MixtureType>::Cv
|
||||
|
||||
|
||||
template<class MixtureType>
|
||||
Foam::tmp<Foam::volScalarField> Foam::eThermo<MixtureType>::Cv() const
|
||||
Foam::tmp<Foam::volScalarField> Foam::ePsiThermo<MixtureType>::Cv() const
|
||||
{
|
||||
const fvMesh& mesh = T_.mesh();
|
||||
const fvMesh& mesh = this->T_.mesh();
|
||||
|
||||
tmp<volScalarField> tCv
|
||||
(
|
||||
@ -311,14 +316,15 @@ Foam::tmp<Foam::volScalarField> Foam::eThermo<MixtureType>::Cv() const
|
||||
|
||||
volScalarField& cv = tCv();
|
||||
|
||||
forAll(T_, celli)
|
||||
forAll(this->T_, celli)
|
||||
{
|
||||
cv[celli] = this->cellMixture(celli).Cv(T_[celli]);
|
||||
cv[celli] = this->cellMixture(celli).Cv(this->T_[celli]);
|
||||
}
|
||||
|
||||
forAll(T_.boundaryField(), patchi)
|
||||
forAll(this->T_.boundaryField(), patchi)
|
||||
{
|
||||
cv.boundaryField()[patchi] = Cv(T_.boundaryField()[patchi], patchi);
|
||||
cv.boundaryField()[patchi] =
|
||||
Cv(this->T_.boundaryField()[patchi], patchi);
|
||||
}
|
||||
|
||||
return tCv;
|
||||
@ -326,9 +332,9 @@ Foam::tmp<Foam::volScalarField> Foam::eThermo<MixtureType>::Cv() const
|
||||
|
||||
|
||||
template<class MixtureType>
|
||||
bool Foam::eThermo<MixtureType>::read()
|
||||
bool Foam::ePsiThermo<MixtureType>::read()
|
||||
{
|
||||
if (basicThermo::read())
|
||||
if (basicPsiThermo::read())
|
||||
{
|
||||
MixtureType::read(*this);
|
||||
return true;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user