mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'feature-recycle-particles' into 'develop'
Feature recycle particles See merge request Development/openfoam!396
This commit is contained in:
@ -244,6 +244,8 @@ void Foam::KinematicCloud<CloudType>::postEvolve
|
|||||||
|
|
||||||
this->dispersion().cacheFields(false);
|
this->dispersion().cacheFields(false);
|
||||||
|
|
||||||
|
this->patchInteraction().postEvolve();
|
||||||
|
|
||||||
forces_.cacheFields(false);
|
forces_.cacheFields(false);
|
||||||
|
|
||||||
functions_.postEvolve(td);
|
functions_.postEvolve(td);
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -32,9 +33,10 @@ License
|
|||||||
|
|
||||||
#include "LocalInteraction.H"
|
#include "LocalInteraction.H"
|
||||||
#include "NoInteraction.H"
|
#include "NoInteraction.H"
|
||||||
#include "Rebound.H"
|
|
||||||
#include "StandardWallInteraction.H"
|
|
||||||
#include "MultiInteraction.H"
|
#include "MultiInteraction.H"
|
||||||
|
#include "Rebound.H"
|
||||||
|
#include "RecycleInteraction.H"
|
||||||
|
#include "StandardWallInteraction.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -44,9 +46,10 @@ License
|
|||||||
\
|
\
|
||||||
makePatchInteractionModelType(LocalInteraction, CloudType); \
|
makePatchInteractionModelType(LocalInteraction, CloudType); \
|
||||||
makePatchInteractionModelType(NoInteraction, CloudType); \
|
makePatchInteractionModelType(NoInteraction, CloudType); \
|
||||||
|
makePatchInteractionModelType(MultiInteraction, CloudType); \
|
||||||
makePatchInteractionModelType(Rebound, CloudType); \
|
makePatchInteractionModelType(Rebound, CloudType); \
|
||||||
makePatchInteractionModelType(StandardWallInteraction, CloudType); \
|
makePatchInteractionModelType(RecycleInteraction, CloudType); \
|
||||||
makePatchInteractionModelType(MultiInteraction, CloudType);
|
makePatchInteractionModelType(StandardWallInteraction, CloudType);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -147,6 +147,7 @@ void Foam::patchInjectionBase::updateMesh(const polyMesh& mesh)
|
|||||||
void Foam::patchInjectionBase::setPositionAndCell
|
void Foam::patchInjectionBase::setPositionAndCell
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
|
const scalar fraction01,
|
||||||
Random& rnd,
|
Random& rnd,
|
||||||
vector& position,
|
vector& position,
|
||||||
label& cellOwner,
|
label& cellOwner,
|
||||||
@ -154,23 +155,15 @@ void Foam::patchInjectionBase::setPositionAndCell
|
|||||||
label& tetPti
|
label& tetPti
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalar areaFraction = rnd.globalPosition(scalar(0), patchArea_);
|
|
||||||
|
|
||||||
if (cellOwners_.size() > 0)
|
if (cellOwners_.size() > 0)
|
||||||
{
|
{
|
||||||
// Determine which processor to inject from
|
// Determine which processor to inject from
|
||||||
label proci = 0;
|
const label proci = whichProc(fraction01);
|
||||||
forAllReverse(sumTriMagSf_, i)
|
|
||||||
{
|
|
||||||
if (areaFraction >= sumTriMagSf_[i])
|
|
||||||
{
|
|
||||||
proci = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Pstream::myProcNo() == proci)
|
if (Pstream::myProcNo() == proci)
|
||||||
{
|
{
|
||||||
|
const scalar areaFraction = fraction01*patchArea_;
|
||||||
|
|
||||||
// Find corresponding decomposed face triangle
|
// Find corresponding decomposed face triangle
|
||||||
label trii = 0;
|
label trii = 0;
|
||||||
scalar offset = sumTriMagSf_[proci];
|
scalar offset = sumTriMagSf_[proci];
|
||||||
@ -271,4 +264,46 @@ void Foam::patchInjectionBase::setPositionAndCell
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::patchInjectionBase::setPositionAndCell
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
Random& rnd,
|
||||||
|
vector& position,
|
||||||
|
label& cellOwner,
|
||||||
|
label& tetFacei,
|
||||||
|
label& tetPti
|
||||||
|
)
|
||||||
|
{
|
||||||
|
scalar fraction01 = rnd.globalSample01<scalar>();
|
||||||
|
|
||||||
|
setPositionAndCell
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
fraction01,
|
||||||
|
rnd,
|
||||||
|
position,
|
||||||
|
cellOwner,
|
||||||
|
tetFacei,
|
||||||
|
tetPti
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::label Foam::patchInjectionBase::whichProc(const scalar fraction01) const
|
||||||
|
{
|
||||||
|
const scalar areaFraction = fraction01*patchArea_;
|
||||||
|
|
||||||
|
// Determine which processor to inject from
|
||||||
|
forAllReverse(sumTriMagSf_, i)
|
||||||
|
{
|
||||||
|
if (areaFraction >= sumTriMagSf_[i])
|
||||||
|
{
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -116,6 +116,19 @@ public:
|
|||||||
//- Update patch geometry and derived info for injection locations
|
//- Update patch geometry and derived info for injection locations
|
||||||
virtual void updateMesh(const polyMesh& mesh);
|
virtual void updateMesh(const polyMesh& mesh);
|
||||||
|
|
||||||
|
//- Set the injection position and owner cell, tetFace and tetPt
|
||||||
|
// Supply the fraction used to determine the location on the patch
|
||||||
|
void setPositionAndCell
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const scalar fraction01,
|
||||||
|
Random& rnd,
|
||||||
|
vector& position,
|
||||||
|
label& cellOwner,
|
||||||
|
label& tetFacei,
|
||||||
|
label& tetPti
|
||||||
|
);
|
||||||
|
|
||||||
//- Set the injection position and owner cell, tetFace and tetPt
|
//- Set the injection position and owner cell, tetFace and tetPt
|
||||||
virtual void setPositionAndCell
|
virtual void setPositionAndCell
|
||||||
(
|
(
|
||||||
@ -126,6 +139,9 @@ public:
|
|||||||
label& tetFacei,
|
label& tetFacei,
|
||||||
label& tetPti
|
label& tetPti
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- Return the processor that has the location specified by the fraction
|
||||||
|
label whichProc(const scalar fraction01) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -176,4 +176,25 @@ bool Foam::MultiInteraction<CloudType>::correct
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
void Foam::MultiInteraction<CloudType>::postEvolve()
|
||||||
|
{
|
||||||
|
for (auto& m : models_)
|
||||||
|
{
|
||||||
|
m.postEvolve();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
void Foam::MultiInteraction<CloudType>::info(Ostream& os)
|
||||||
|
{
|
||||||
|
for (auto& m : models_)
|
||||||
|
{
|
||||||
|
Info<< "Patch interaction model " << m.type() << ':' << endl;
|
||||||
|
m.info(os);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -148,6 +148,12 @@ public:
|
|||||||
const polyPatch& pp,
|
const polyPatch& pp,
|
||||||
bool& keepParticle
|
bool& keepParticle
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- Post-evolve hook
|
||||||
|
virtual void postEvolve();
|
||||||
|
|
||||||
|
//- Write patch interaction info to stream
|
||||||
|
virtual void info(Ostream& os);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -198,6 +198,11 @@ void Foam::PatchInteractionModel<CloudType>::addToEscapedParcels
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
void Foam::PatchInteractionModel<CloudType>::postEvolve()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::PatchInteractionModel<CloudType>::info(Ostream& os)
|
void Foam::PatchInteractionModel<CloudType>::info(Ostream& os)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -181,8 +181,10 @@ public:
|
|||||||
) = 0;
|
) = 0;
|
||||||
|
|
||||||
//- Add to escaped parcels
|
//- Add to escaped parcels
|
||||||
void addToEscapedParcels(const scalar mass);
|
virtual void addToEscapedParcels(const scalar mass);
|
||||||
|
|
||||||
|
//- Post-evolve hook
|
||||||
|
virtual void postEvolve();
|
||||||
|
|
||||||
//- Write patch interaction info to stream
|
//- Write patch interaction info to stream
|
||||||
virtual void info(Ostream& os);
|
virtual void info(Ostream& os);
|
||||||
|
|||||||
@ -0,0 +1,515 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "RecycleInteraction.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
void Foam::RecycleInteraction<CloudType>::writeFileHeader(Ostream& os)
|
||||||
|
{
|
||||||
|
PatchInteractionModel<CloudType>::writeFileHeader(os);
|
||||||
|
|
||||||
|
forAll(nRemoved_, i)
|
||||||
|
{
|
||||||
|
const word& outPatchName = recyclePatches_[i].first();
|
||||||
|
|
||||||
|
forAll(nRemoved_[i], injectori)
|
||||||
|
{
|
||||||
|
const word suffix = Foam::name(injectori);
|
||||||
|
this->writeTabbed(os, outPatchName + "_nRemoved_" + suffix);
|
||||||
|
this->writeTabbed(os, outPatchName + "_massRemoved_" + suffix);
|
||||||
|
}
|
||||||
|
|
||||||
|
const word& inPatchName = recyclePatches_[i].second();
|
||||||
|
|
||||||
|
forAll(nInjected_[i], injectori)
|
||||||
|
{
|
||||||
|
const word suffix = Foam::name(injectori);
|
||||||
|
this->writeTabbed(os, inPatchName + "_nInjected_" + suffix);
|
||||||
|
this->writeTabbed(os, inPatchName + "_massInjected_" + suffix);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
Foam::RecycleInteraction<CloudType>::RecycleInteraction
|
||||||
|
(
|
||||||
|
const dictionary& dict,
|
||||||
|
CloudType& cloud
|
||||||
|
)
|
||||||
|
:
|
||||||
|
PatchInteractionModel<CloudType>(dict, cloud, typeName),
|
||||||
|
mesh_(cloud.mesh()),
|
||||||
|
recyclePatches_(this->coeffDict().lookup("recyclePatches")),
|
||||||
|
recyclePatchesIds_(recyclePatches_.size()),
|
||||||
|
recycledParcels_(recyclePatches_.size()),
|
||||||
|
nRemoved_(recyclePatches_.size()), // per patch the no. of parcels
|
||||||
|
massRemoved_(nRemoved_.size()),
|
||||||
|
nInjected_(nRemoved_.size()),
|
||||||
|
massInjected_(nRemoved_.size()),
|
||||||
|
injectionPatchPtr_(nRemoved_.size()),
|
||||||
|
recycleFraction_
|
||||||
|
(
|
||||||
|
this->coeffDict().template getCheck<scalar>
|
||||||
|
(
|
||||||
|
"recycleFraction",
|
||||||
|
scalarMinMax::zero_one()
|
||||||
|
)
|
||||||
|
),
|
||||||
|
outputByInjectorId_
|
||||||
|
(
|
||||||
|
this->coeffDict().getOrDefault("outputByInjectorId", false)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// Determine the number of injectors and the injector mapping
|
||||||
|
label nInjectors = 0;
|
||||||
|
if (outputByInjectorId_)
|
||||||
|
{
|
||||||
|
for (const auto& inj : cloud.injectors())
|
||||||
|
{
|
||||||
|
injIdToIndex_.insert(inj.injectorID(), ++nInjectors);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// The normal case, and safety if injector mapping was somehow null
|
||||||
|
if (injIdToIndex_.empty())
|
||||||
|
{
|
||||||
|
nInjectors = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
forAll(nRemoved_, i)
|
||||||
|
{
|
||||||
|
// Create injection helper for each inflow patch
|
||||||
|
injectionPatchPtr_.set
|
||||||
|
(
|
||||||
|
i,
|
||||||
|
new patchInjectionBase(mesh_, recyclePatches_[i].second())
|
||||||
|
);
|
||||||
|
|
||||||
|
// Mappings from patch names to patch IDs
|
||||||
|
recyclePatchesIds_[i].first() =
|
||||||
|
mesh_.boundaryMesh().findPatchID(recyclePatches_[i].first());
|
||||||
|
recyclePatchesIds_[i].second() =
|
||||||
|
mesh_.boundaryMesh().findPatchID(recyclePatches_[i].second());
|
||||||
|
|
||||||
|
// Storage for reporting
|
||||||
|
nRemoved_[i].setSize(nInjectors, Zero);
|
||||||
|
massRemoved_[i].setSize(nInjectors, Zero);
|
||||||
|
nInjected_[i].setSize(nInjectors, Zero);
|
||||||
|
massInjected_[i].setSize(nInjectors, Zero);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
Foam::RecycleInteraction<CloudType>::RecycleInteraction
|
||||||
|
(
|
||||||
|
const RecycleInteraction<CloudType>& pim
|
||||||
|
)
|
||||||
|
:
|
||||||
|
PatchInteractionModel<CloudType>(pim),
|
||||||
|
mesh_(pim.mesh_),
|
||||||
|
recyclePatches_(pim.recyclePatches_),
|
||||||
|
recyclePatchesIds_(pim.recyclePatchesIds_),
|
||||||
|
nRemoved_(pim.nRemoved_),
|
||||||
|
massRemoved_(pim.massRemoved_),
|
||||||
|
nInjected_(pim.nInjected_),
|
||||||
|
massInjected_(pim.massInjected_),
|
||||||
|
injIdToIndex_(pim.injIdToIndex_),
|
||||||
|
injectionPatchPtr_(),
|
||||||
|
recycleFraction_(pim.recycleFraction_),
|
||||||
|
outputByInjectorId_(pim.outputByInjectorId_)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
bool Foam::RecycleInteraction<CloudType>::correct
|
||||||
|
(
|
||||||
|
typename CloudType::parcelType& p,
|
||||||
|
const polyPatch& pp,
|
||||||
|
bool& keepParticle
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// Injector ID
|
||||||
|
const label idx =
|
||||||
|
(
|
||||||
|
injIdToIndex_.size()
|
||||||
|
? injIdToIndex_.lookup(p.typeId(), 0)
|
||||||
|
: 0
|
||||||
|
);
|
||||||
|
|
||||||
|
// See if this patch is designated an outflow patch
|
||||||
|
label addri = -1;
|
||||||
|
forAll(recyclePatchesIds_, i)
|
||||||
|
{
|
||||||
|
if (recyclePatchesIds_[i].first() == pp.index())
|
||||||
|
{
|
||||||
|
addri = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (addri == -1)
|
||||||
|
{
|
||||||
|
// Not processing this outflow patch
|
||||||
|
keepParticle = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Flag to remove current parcel and copy to local storage
|
||||||
|
keepParticle = false;
|
||||||
|
recycledParcels_[addri].append
|
||||||
|
(
|
||||||
|
static_cast<parcelType*>(p.clone().ptr())
|
||||||
|
);
|
||||||
|
|
||||||
|
++nRemoved_[addri][idx];
|
||||||
|
massRemoved_[addri][idx] += p.nParticle()*p.mass();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
void Foam::RecycleInteraction<CloudType>::postEvolve()
|
||||||
|
{
|
||||||
|
if (Pstream::parRun())
|
||||||
|
{
|
||||||
|
// Relocate the recycled parcels into slots for each receiving processor
|
||||||
|
List<IDLList<parcelType>> transferParcels(Pstream::nProcs());
|
||||||
|
List<DynamicList<scalar>> fractions(Pstream::nProcs());
|
||||||
|
List<DynamicList<label>> patchAddr(Pstream::nProcs());
|
||||||
|
|
||||||
|
auto& rnd = this->owner().rndGen();
|
||||||
|
|
||||||
|
forAll(recycledParcels_, addri)
|
||||||
|
{
|
||||||
|
auto& patchParcels = recycledParcels_[addri];
|
||||||
|
auto& injectionPatch = injectionPatchPtr_[addri];
|
||||||
|
|
||||||
|
forAllIters(patchParcels, pIter)
|
||||||
|
{
|
||||||
|
// Choose a random location to insert the parcel
|
||||||
|
const scalar fraction01 = rnd.template sample01<scalar>();
|
||||||
|
|
||||||
|
// Identify the processor that owns the location
|
||||||
|
const label toProci = injectionPatch.whichProc(fraction01);
|
||||||
|
|
||||||
|
// Store info in slot for target processor
|
||||||
|
transferParcels[toProci].append(patchParcels.remove(pIter));
|
||||||
|
fractions[toProci].append(fraction01);
|
||||||
|
patchAddr[toProci].append(addri);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set-up the sends
|
||||||
|
PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
|
||||||
|
|
||||||
|
// Clear transfer buffers
|
||||||
|
pBufs.clear();
|
||||||
|
|
||||||
|
// Stream into send buffers
|
||||||
|
forAll(transferParcels, proci)
|
||||||
|
{
|
||||||
|
if (transferParcels[proci].size())
|
||||||
|
{
|
||||||
|
UOPstream particleStream(proci, pBufs);
|
||||||
|
|
||||||
|
particleStream
|
||||||
|
<< transferParcels[proci]
|
||||||
|
<< fractions[proci]
|
||||||
|
<< patchAddr[proci];
|
||||||
|
|
||||||
|
transferParcels[proci].clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start sending. Sets number of bytes transferred
|
||||||
|
labelList allNTrans(Pstream::nProcs());
|
||||||
|
pBufs.finishedSends(allNTrans);
|
||||||
|
bool transferred = false;
|
||||||
|
for (const label n : allNTrans)
|
||||||
|
{
|
||||||
|
if (n)
|
||||||
|
{
|
||||||
|
transferred = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
reduce(transferred, orOp<bool>());
|
||||||
|
if (!transferred)
|
||||||
|
{
|
||||||
|
// No parcels to transfer
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve from receive buffers
|
||||||
|
for (label proci = 0; proci < Pstream::nProcs(); ++proci)
|
||||||
|
{
|
||||||
|
if (allNTrans[proci])
|
||||||
|
{
|
||||||
|
UIPstream particleStream(proci, pBufs);
|
||||||
|
IDLList<parcelType> newParticles
|
||||||
|
(
|
||||||
|
particleStream,
|
||||||
|
typename parcelType::iNew(this->owner().mesh())
|
||||||
|
);
|
||||||
|
scalarList fractions(particleStream);
|
||||||
|
labelList patchAddr(particleStream);
|
||||||
|
|
||||||
|
label parceli = 0;
|
||||||
|
for (parcelType& newp : newParticles)
|
||||||
|
{
|
||||||
|
// Parcel to be recycled
|
||||||
|
vector newPosition;
|
||||||
|
label cellOwner;
|
||||||
|
label dummy;
|
||||||
|
const label addri = patchAddr[parceli];
|
||||||
|
injectionPatchPtr_[addri].setPositionAndCell
|
||||||
|
(
|
||||||
|
mesh_,
|
||||||
|
fractions[parceli],
|
||||||
|
this->owner().rndGen(),
|
||||||
|
newPosition,
|
||||||
|
cellOwner,
|
||||||
|
dummy,
|
||||||
|
dummy
|
||||||
|
);
|
||||||
|
newp.relocate(newPosition, cellOwner);
|
||||||
|
newp.U() = this->owner().U()[cellOwner];
|
||||||
|
newp.nParticle() *= recycleFraction_;
|
||||||
|
|
||||||
|
const label idx =
|
||||||
|
(
|
||||||
|
injIdToIndex_.size()
|
||||||
|
? injIdToIndex_.lookup(newp.typeId(), 0)
|
||||||
|
: 0
|
||||||
|
);
|
||||||
|
++nInjected_[addri][idx];
|
||||||
|
massInjected_[addri][idx] += newp.nParticle()*newp.mass();
|
||||||
|
|
||||||
|
this->owner().addParticle(newParticles.remove(&newp));
|
||||||
|
++parceli;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
forAll(recycledParcels_, addri)
|
||||||
|
{
|
||||||
|
forAllIters(recycledParcels_[addri], iter)
|
||||||
|
{
|
||||||
|
// Parcel to be recycled
|
||||||
|
vector newPosition;
|
||||||
|
label cellOwner;
|
||||||
|
label dummy;
|
||||||
|
injectionPatchPtr_[addri].setPositionAndCell
|
||||||
|
(
|
||||||
|
mesh_,
|
||||||
|
this->owner().rndGen(),
|
||||||
|
newPosition,
|
||||||
|
cellOwner,
|
||||||
|
dummy,
|
||||||
|
dummy
|
||||||
|
);
|
||||||
|
|
||||||
|
// Update parcel properties
|
||||||
|
parcelType* newp = recycledParcels_[addri].remove(iter);
|
||||||
|
newp->relocate(newPosition, cellOwner);
|
||||||
|
newp->nParticle() *= recycleFraction_;
|
||||||
|
|
||||||
|
// Assume parcel velocity is same as the carrier velocity
|
||||||
|
newp->U() = this->owner().U()[cellOwner];
|
||||||
|
|
||||||
|
const label idx =
|
||||||
|
(
|
||||||
|
injIdToIndex_.size()
|
||||||
|
? injIdToIndex_.lookup(newp->typeId(), 0)
|
||||||
|
: 0
|
||||||
|
);
|
||||||
|
++nInjected_[addri][idx];
|
||||||
|
massInjected_[addri][idx] += newp->nParticle()*newp->mass();
|
||||||
|
|
||||||
|
this->owner().addParticle(newp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
void Foam::RecycleInteraction<CloudType>::info(Ostream& os)
|
||||||
|
{
|
||||||
|
PatchInteractionModel<CloudType>::info(os);
|
||||||
|
|
||||||
|
labelListList npr0(nRemoved_.size());
|
||||||
|
scalarListList mpr0(massRemoved_.size());
|
||||||
|
labelListList npi0(nInjected_.size());
|
||||||
|
scalarListList mpi0(massInjected_.size());
|
||||||
|
|
||||||
|
forAll(nRemoved_, patchi)
|
||||||
|
{
|
||||||
|
label lsd = nRemoved_[patchi].size();
|
||||||
|
npr0[patchi].setSize(lsd, Zero);
|
||||||
|
mpr0[patchi].setSize(lsd, Zero);
|
||||||
|
npi0[patchi].setSize(lsd, Zero);
|
||||||
|
mpi0[patchi].setSize(lsd, Zero);
|
||||||
|
}
|
||||||
|
|
||||||
|
this->getModelProperty("nRemoved", npr0);
|
||||||
|
this->getModelProperty("massRemoved", mpr0);
|
||||||
|
this->getModelProperty("nInjected", npi0);
|
||||||
|
this->getModelProperty("massInjected", mpi0);
|
||||||
|
|
||||||
|
// Accumulate current data
|
||||||
|
labelListList npr(nRemoved_);
|
||||||
|
|
||||||
|
forAll(npr, i)
|
||||||
|
{
|
||||||
|
Pstream::listCombineGather(npr[i], plusEqOp<label>());
|
||||||
|
npr[i] = npr[i] + npr0[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
scalarListList mpr(massRemoved_);
|
||||||
|
forAll(mpr, i)
|
||||||
|
{
|
||||||
|
Pstream::listCombineGather(mpr[i], plusEqOp<scalar>());
|
||||||
|
mpr[i] = mpr[i] + mpr0[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
labelListList npi(nInjected_);
|
||||||
|
forAll(npi, i)
|
||||||
|
{
|
||||||
|
Pstream::listCombineGather(npi[i], plusEqOp<label>());
|
||||||
|
npi[i] = npi[i] + npi0[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
scalarListList mpi(massInjected_);
|
||||||
|
forAll(mpi, i)
|
||||||
|
{
|
||||||
|
Pstream::listCombineGather(mpi[i], plusEqOp<scalar>());
|
||||||
|
mpi[i] = mpi[i] + mpi0[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (injIdToIndex_.size())
|
||||||
|
{
|
||||||
|
// Since injIdToIndex_ is a one-to-one mapping (starting as zero),
|
||||||
|
// can simply invert it.
|
||||||
|
labelList indexToInjector(injIdToIndex_.size());
|
||||||
|
forAllConstIters(injIdToIndex_, iter)
|
||||||
|
{
|
||||||
|
indexToInjector[iter.val()] = iter.key();
|
||||||
|
}
|
||||||
|
|
||||||
|
forAll(npr, i)
|
||||||
|
{
|
||||||
|
const word& outPatchName = recyclePatches_[i].first();
|
||||||
|
|
||||||
|
os << " Parcel fate: patch " << outPatchName
|
||||||
|
<< " (number, mass)" << nl;
|
||||||
|
|
||||||
|
forAll(mpr[i], indexi)
|
||||||
|
{
|
||||||
|
os << " - removed (injector " << indexToInjector[indexi]
|
||||||
|
<< ") = " << npr[i][indexi]
|
||||||
|
<< ", " << mpr[i][indexi] << nl;
|
||||||
|
|
||||||
|
this->file()
|
||||||
|
<< tab << npr[i][indexi] << tab << mpr[i][indexi];
|
||||||
|
}
|
||||||
|
|
||||||
|
const word& inPatchName = recyclePatches_[i].second();
|
||||||
|
|
||||||
|
os << " Parcel fate: patch " << inPatchName
|
||||||
|
<< " (number, mass)" << nl;
|
||||||
|
|
||||||
|
forAll(mpi[i], indexi)
|
||||||
|
{
|
||||||
|
os << " - injected (injector " << indexToInjector[indexi]
|
||||||
|
<< ") = " << npi[i][indexi]
|
||||||
|
<< ", " << mpi[i][indexi] << nl;
|
||||||
|
this->file()
|
||||||
|
<< tab << npi[i][indexi] << tab << mpi[i][indexi];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this->file() << endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
forAll(npr, i)
|
||||||
|
{
|
||||||
|
const word& outPatchName = recyclePatches_[i].first();
|
||||||
|
|
||||||
|
os << " Parcel fate: patch " << outPatchName
|
||||||
|
<< " (number, mass)" << nl
|
||||||
|
<< " - removed = " << npr[i][0] << ", " << mpr[i][0]
|
||||||
|
<< nl;
|
||||||
|
|
||||||
|
this->file()
|
||||||
|
<< tab << npr[i][0] << tab << mpr[i][0];
|
||||||
|
}
|
||||||
|
|
||||||
|
forAll(npi, i)
|
||||||
|
{
|
||||||
|
const word& inPatchName = recyclePatches_[i].second();
|
||||||
|
|
||||||
|
os << " Parcel fate: patch " << inPatchName
|
||||||
|
<< " (number, mass)" << nl
|
||||||
|
<< " - injected = " << npi[i][0] << ", " << mpi[i][0]
|
||||||
|
<< nl;
|
||||||
|
|
||||||
|
this->file()
|
||||||
|
<< tab << npi[i][0] << tab << mpi[i][0];
|
||||||
|
}
|
||||||
|
|
||||||
|
this->file() << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this->writeTime())
|
||||||
|
{
|
||||||
|
this->setModelProperty("nRemoved", npr);
|
||||||
|
this->setModelProperty("massRemoved", mpr);
|
||||||
|
this->setModelProperty("nInjected", npi);
|
||||||
|
this->setModelProperty("massInjected", mpi);
|
||||||
|
|
||||||
|
nRemoved_ = Zero;
|
||||||
|
massRemoved_ = Zero;
|
||||||
|
nInjected_ = Zero;
|
||||||
|
massInjected_ = Zero;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,226 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | www.openfoam.com
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::RecycleInteraction
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpLagrangianIntermediatePatchInteractionSubModels
|
||||||
|
|
||||||
|
Description
|
||||||
|
Patch interaction model to perform
|
||||||
|
parcel transfer and recycle from one patch to another.
|
||||||
|
|
||||||
|
Parcels that hit a given 'outflow' patch
|
||||||
|
are recycled to a given 'inflow' patch, with optional:
|
||||||
|
- recycle fraction [0-1]
|
||||||
|
|
||||||
|
Usage
|
||||||
|
Minimal example by using
|
||||||
|
\c constant/reactingCloud1Properties.subModels.multiInteractionCoeffs
|
||||||
|
\verbatim
|
||||||
|
multiInteractionCoeffs
|
||||||
|
{
|
||||||
|
...
|
||||||
|
|
||||||
|
model1
|
||||||
|
{
|
||||||
|
// Mandatory entries (unmodifiable)
|
||||||
|
patchInteractionModel recycleInteraction;
|
||||||
|
|
||||||
|
recycleInteractionCoeffs
|
||||||
|
{
|
||||||
|
recyclePatches
|
||||||
|
(
|
||||||
|
(<outletPatch1> <inletPatch1>)
|
||||||
|
(<outletPatch2> <inletPatch2>)
|
||||||
|
...
|
||||||
|
);
|
||||||
|
|
||||||
|
recycleFraction 0.8; // [0-1]
|
||||||
|
|
||||||
|
// Optional entries (unmodifiable)
|
||||||
|
outputByInjectorId false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
...
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
where the entries mean:
|
||||||
|
\table
|
||||||
|
Property | Description | Type | Reqd | Dflt
|
||||||
|
patchInteractionModel | Type name: recycleInteraction <!--
|
||||||
|
--> | word | yes | -
|
||||||
|
recyclePatches | Names of outlet-inlet patch pairs <!--
|
||||||
|
--> | (word word) | yes | -
|
||||||
|
recycleFraction | Fraction of parcels recycled from <!--
|
||||||
|
--> outlet to inlet | scalar | yes | -
|
||||||
|
outputByInjectorId | Flag to output escaped/mass <!--
|
||||||
|
--> particles sorted by injectorID | bool | no | false
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
RecycleInteraction.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef RecycleInteraction_H
|
||||||
|
#define RecycleInteraction_H
|
||||||
|
|
||||||
|
#include "patchInjectionBase.H"
|
||||||
|
#include "IDLList.H"
|
||||||
|
#include "PtrList.H"
|
||||||
|
#include "PatchInteractionModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class RecycleInteraction Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
class RecycleInteraction
|
||||||
|
:
|
||||||
|
public PatchInteractionModel<CloudType>
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
|
||||||
|
typedef typename CloudType::parcelType parcelType;
|
||||||
|
|
||||||
|
// Protected Data
|
||||||
|
|
||||||
|
//- Reference to mesh
|
||||||
|
const fvMesh& mesh_;
|
||||||
|
|
||||||
|
//- Outlet-inlet patch pair to apply parcel recycling
|
||||||
|
List<Pair<word>> recyclePatches_;
|
||||||
|
|
||||||
|
//- Patch IDs of recyclePatches
|
||||||
|
List<Pair<label>> recyclePatchesIds_;
|
||||||
|
|
||||||
|
//- Parcel IDs of recycled parcels
|
||||||
|
List<IDLList<parcelType>> recycledParcels_;
|
||||||
|
|
||||||
|
|
||||||
|
// Bookkeeping for particle fates
|
||||||
|
|
||||||
|
//- Number of parcels removed
|
||||||
|
List<List<label>> nRemoved_;
|
||||||
|
|
||||||
|
//- Mass of parcels removed
|
||||||
|
List<List<scalar>> massRemoved_;
|
||||||
|
|
||||||
|
//- Number of parcels injected
|
||||||
|
List<List<label>> nInjected_;
|
||||||
|
|
||||||
|
//- Mass of parcels injected
|
||||||
|
List<List<scalar>> massInjected_;
|
||||||
|
|
||||||
|
|
||||||
|
//- Injector ID to local index map
|
||||||
|
Map<label> injIdToIndex_;
|
||||||
|
|
||||||
|
//- Injection patch pointer
|
||||||
|
PtrList<patchInjectionBase> injectionPatchPtr_;
|
||||||
|
|
||||||
|
//- Parcel fraction to be recycled from outlet to inlet
|
||||||
|
const scalar recycleFraction_;
|
||||||
|
|
||||||
|
//- Flag to output escaped/mass particles sorted by injectorID
|
||||||
|
bool outputByInjectorId_;
|
||||||
|
|
||||||
|
|
||||||
|
// Protected Member Functions
|
||||||
|
|
||||||
|
//- Output file header information
|
||||||
|
virtual void writeFileHeader(Ostream& os);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("recycleInteraction");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from dictionary
|
||||||
|
RecycleInteraction(const dictionary& dict, CloudType& cloud);
|
||||||
|
|
||||||
|
//- Construct copy from owner cloud and patch interaction model
|
||||||
|
RecycleInteraction(const RecycleInteraction<CloudType>& pim);
|
||||||
|
|
||||||
|
//- Construct and return a clone using supplied owner cloud
|
||||||
|
virtual autoPtr<PatchInteractionModel<CloudType>> clone() const
|
||||||
|
{
|
||||||
|
return autoPtr<PatchInteractionModel<CloudType>>
|
||||||
|
(
|
||||||
|
new RecycleInteraction<CloudType>(*this)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~RecycleInteraction() = default;
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Apply velocity correction
|
||||||
|
// Returns true if particle remains in same cell
|
||||||
|
virtual bool correct
|
||||||
|
(
|
||||||
|
typename CloudType::parcelType& p,
|
||||||
|
const polyPatch& pp,
|
||||||
|
bool& keepParticle
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Post-evolve hook
|
||||||
|
virtual void postEvolve();
|
||||||
|
|
||||||
|
//- Write patch interaction info to stream
|
||||||
|
virtual void info(Ostream& os);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
#include "RecycleInteraction.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
object H2O;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
"(inlet1|inlet2)"
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue $internalField;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
object T;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 1 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 300;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
"(inlet1|inlet2)"
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue $internalField;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volVectorField;
|
||||||
|
object U;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 1 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform (0 0 0);
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
inlet1
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0.2 0 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
inlet2
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 -0.1 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue $internalField;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
object air;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 1;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
"(inlet1|inlet2)"
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue $internalField;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
object alphat;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [1 -1 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
"(inlet1|inlet2)"
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type compressible::alphatWallFunction;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
object epsilon;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -3 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 3e-3;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
"(inlet1|inlet2)"
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue $internalField;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type epsilonWallFunction;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
object k;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0.015;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
"(inlet1|inlet2)"
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue $internalField;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type kqRWallFunction;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
object alphat;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
"(inlet1|inlet2)"
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type nutkWallFunction;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
object p;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [1 -1 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 100000;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
"(inlet1|inlet2)"
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
object p_rgh;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [1 -1 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 100000;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
"(inlet1|inlet2)"
|
||||||
|
{
|
||||||
|
type fixedFluxPressure;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type fixedFluxPressure;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
8
tutorials/lagrangian/reactingParcelFoam/recycleParticles/Allclean
Executable file
8
tutorials/lagrangian/reactingParcelFoam/recycleParticles/Allclean
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
|
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
cleanCase0
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
12
tutorials/lagrangian/reactingParcelFoam/recycleParticles/Allrun
Executable file
12
tutorials/lagrangian/reactingParcelFoam/recycleParticles/Allrun
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
restore0Dir
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
|
||||||
|
runApplication $(getApplication)
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
16
tutorials/lagrangian/reactingParcelFoam/recycleParticles/Allrun-parallel
Executable file
16
tutorials/lagrangian/reactingParcelFoam/recycleParticles/Allrun-parallel
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
restore0Dir
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
|
||||||
|
runApplication decomposePar
|
||||||
|
|
||||||
|
runParallel $(getApplication)
|
||||||
|
|
||||||
|
runApplication reconstructPar
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object chemistryProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
chemistryType
|
||||||
|
{
|
||||||
|
solver noChemistrySolver;
|
||||||
|
}
|
||||||
|
|
||||||
|
chemistry off;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object combustionProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
combustionModel none;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class uniformDimensionedVectorField;
|
||||||
|
object g;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 1 -2 0 0 0 0];
|
||||||
|
|
||||||
|
value (0 0 0);
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object radiationProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
radiation off;
|
||||||
|
|
||||||
|
radiationModel none;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,176 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object reactingCloud1Properties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
solution
|
||||||
|
{
|
||||||
|
active true;
|
||||||
|
coupled true;
|
||||||
|
transient yes;
|
||||||
|
cellValueSourceCorrection on;
|
||||||
|
maxCo 0.3;
|
||||||
|
|
||||||
|
sourceTerms
|
||||||
|
{
|
||||||
|
schemes
|
||||||
|
{
|
||||||
|
rho explicit 1;
|
||||||
|
U explicit 1;
|
||||||
|
Yi explicit 1;
|
||||||
|
h explicit 1;
|
||||||
|
radiation explicit 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interpolationSchemes
|
||||||
|
{
|
||||||
|
rho cell;
|
||||||
|
U cellPoint;
|
||||||
|
thermo:mu cell;
|
||||||
|
T cell;
|
||||||
|
Cp cell;
|
||||||
|
kappa cell;
|
||||||
|
p cell;
|
||||||
|
}
|
||||||
|
|
||||||
|
integrationSchemes
|
||||||
|
{
|
||||||
|
U Euler;
|
||||||
|
T analytical;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
constantProperties
|
||||||
|
{
|
||||||
|
rho0 1000;
|
||||||
|
T0 300;
|
||||||
|
Cp0 4100;
|
||||||
|
|
||||||
|
constantVolume false;
|
||||||
|
}
|
||||||
|
|
||||||
|
subModels
|
||||||
|
{
|
||||||
|
particleForces
|
||||||
|
{
|
||||||
|
sphereDrag;
|
||||||
|
}
|
||||||
|
|
||||||
|
injectionModels
|
||||||
|
{
|
||||||
|
patchInjector
|
||||||
|
{
|
||||||
|
type patchInjection;
|
||||||
|
parcelBasisType fixed;
|
||||||
|
patch inlet1;
|
||||||
|
U0 (1 0.0 0.0);
|
||||||
|
parcelsPerSecond 10;
|
||||||
|
nParticle 1;
|
||||||
|
sizeDistribution
|
||||||
|
{
|
||||||
|
type uniform;
|
||||||
|
uniformDistribution
|
||||||
|
{
|
||||||
|
minValue 0.0001;
|
||||||
|
maxValue 0.001;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
flowRateProfile constant 1;
|
||||||
|
massTotal 1;
|
||||||
|
SOI 0.0;
|
||||||
|
duration 100.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dispersionModel none;
|
||||||
|
|
||||||
|
patchInteractionModel multiInteraction;
|
||||||
|
|
||||||
|
heatTransferModel RanzMarshall;
|
||||||
|
|
||||||
|
compositionModel singleMixtureFraction;
|
||||||
|
|
||||||
|
phaseChangeModel liquidEvaporation;
|
||||||
|
|
||||||
|
devolatilisationModel none;
|
||||||
|
|
||||||
|
surfaceReactionModel none;
|
||||||
|
|
||||||
|
stochasticCollisionModel none;
|
||||||
|
|
||||||
|
surfaceFilmModel none;
|
||||||
|
|
||||||
|
radiation off;
|
||||||
|
|
||||||
|
multiInteractionCoeffs
|
||||||
|
{
|
||||||
|
oneInteractionOnly no;
|
||||||
|
|
||||||
|
model2
|
||||||
|
{
|
||||||
|
patchInteractionModel recycleInteraction;
|
||||||
|
recycleInteractionCoeffs
|
||||||
|
{
|
||||||
|
recyclePatches ((outlet inlet2));
|
||||||
|
recycleFraction 0.8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
model1
|
||||||
|
{
|
||||||
|
patchInteractionModel standardWallInteraction;
|
||||||
|
standardWallInteractionCoeffs
|
||||||
|
{
|
||||||
|
type rebound;
|
||||||
|
}
|
||||||
|
|
||||||
|
writeToFile yes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RanzMarshallCoeffs
|
||||||
|
{
|
||||||
|
BirdCorrection true;
|
||||||
|
}
|
||||||
|
|
||||||
|
singleMixtureFractionCoeffs
|
||||||
|
{
|
||||||
|
phases
|
||||||
|
(
|
||||||
|
gas
|
||||||
|
{
|
||||||
|
}
|
||||||
|
liquid
|
||||||
|
{
|
||||||
|
H2O 1;
|
||||||
|
}
|
||||||
|
solid
|
||||||
|
{
|
||||||
|
}
|
||||||
|
);
|
||||||
|
YGasTot0 0;
|
||||||
|
YLiquidTot0 1;
|
||||||
|
YSolidTot0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
liquidEvaporationCoeffs
|
||||||
|
{
|
||||||
|
enthalpyTransfer enthalpyDifference;
|
||||||
|
|
||||||
|
activeLiquids ( H2O );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
species
|
||||||
|
(
|
||||||
|
air
|
||||||
|
H2O
|
||||||
|
);
|
||||||
|
|
||||||
|
reactions
|
||||||
|
{}
|
||||||
@ -0,0 +1,163 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object thermo.incompressiblePoly;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
/*
|
||||||
|
in order to use the Boussinesq approximation for the density is sufficient to use the icoPolynominial model by setting its coefficients in the following way
|
||||||
|
[>> BOUSSINESQ TO icoPolynomial converter]
|
||||||
|
|
||||||
|
Rearranging Boussinesq equation in the form of rho = A + B * T
|
||||||
|
rho = rho_0 - rho_0 * Beta * (T - T_0)
|
||||||
|
rho = rho_0 + rho_0 * Beta * T_0 - rho_0 * Beta * T
|
||||||
|
|
||||||
|
By using the following values :
|
||||||
|
rho_0 = 1;
|
||||||
|
T_0 = 298;
|
||||||
|
Beta = 0.0034; // thermal expansion coefficient of air : At normal standard conditions of 25 degree Celsius or 298 Kelvin, Thermal expansion coefficient of air is said to be around 0.0034/K.
|
||||||
|
|
||||||
|
A = rho_0 + rho_0 * Beta * T_0 = 1+1*0.0034*298 = 2.0132
|
||||||
|
B = -rho_0 * Beta = -0.0034
|
||||||
|
|
||||||
|
Therefore in the icoPolynomial subdictionaries in constant/thermo.incompressiblePoly we will set :
|
||||||
|
|
||||||
|
equationOfState
|
||||||
|
{
|
||||||
|
rhoCoeffs<8> ( 2.0132 -0.0034 0 0 0 0 0 0 ); // rho = A + B * T
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
N2
|
||||||
|
{
|
||||||
|
specie
|
||||||
|
{
|
||||||
|
molWeight 28.0134;
|
||||||
|
}
|
||||||
|
equationOfState
|
||||||
|
{
|
||||||
|
rhoCoeffs<8> ( 2.0132 -0.0034 0 0 0 0 0 0 );
|
||||||
|
}
|
||||||
|
thermodynamics
|
||||||
|
{
|
||||||
|
Hf 0;
|
||||||
|
Sf 0;
|
||||||
|
CpCoeffs<8> ( 979.08 0.41787 -0.0011761 1.6742e-06 -7.2559e-10 0 0 0 );
|
||||||
|
}
|
||||||
|
transport
|
||||||
|
{
|
||||||
|
muCoeffs<8> ( 1.5068e-06 6.1598e-08 -1.8188e-11 0 0 0 0 0 );
|
||||||
|
kappaCoeffs<8> ( 0.0031494 8.4997e-05 -1.2621e-08 0 0 0 0 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
air
|
||||||
|
{
|
||||||
|
$N2;
|
||||||
|
}
|
||||||
|
|
||||||
|
O2
|
||||||
|
{
|
||||||
|
specie
|
||||||
|
{
|
||||||
|
molWeight 31.9988;
|
||||||
|
}
|
||||||
|
equationOfState
|
||||||
|
{
|
||||||
|
rhoCoeffs<8> ( 2.0132 -0.0034 0 0 0 0 0 0 );
|
||||||
|
}
|
||||||
|
thermodynamics
|
||||||
|
{
|
||||||
|
Hf 0;
|
||||||
|
Sf 0;
|
||||||
|
CpCoeffs<8> ( 834.84 0.29297 -0.00014959 3.4143e-07 -2.2786e-10 0 0 0 );
|
||||||
|
}
|
||||||
|
transport
|
||||||
|
{
|
||||||
|
muCoeffs<8> ( 1.5068e-06 6.1598e-08 -1.8188e-11 0 0 0 0 0 );
|
||||||
|
kappaCoeffs<8> ( 0.00016082 8.5301e-05 -1.4998e-08 0 0 0 0 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
H2O
|
||||||
|
{
|
||||||
|
specie
|
||||||
|
{
|
||||||
|
molWeight 18.0153;
|
||||||
|
}
|
||||||
|
equationOfState
|
||||||
|
{
|
||||||
|
rhoCoeffs<8> ( 2.0132 -0.0034 0 0 0 0 0 0 );
|
||||||
|
}
|
||||||
|
thermodynamics
|
||||||
|
{
|
||||||
|
Hf -13423000;
|
||||||
|
Sf 10482;
|
||||||
|
CpCoeffs<8> ( 1563.1 1.604 -0.0029334 3.2168e-06 -1.1571e-09 0 0 0 );
|
||||||
|
}
|
||||||
|
transport
|
||||||
|
{
|
||||||
|
muCoeffs<8> ( 1.5068e-06 6.1598e-08 -1.8188e-11 0 0 0 0 0 );
|
||||||
|
kappaCoeffs<8> ( 0.0037972 0.00015336 -1.1859e-08 0 0 0 0 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CO2
|
||||||
|
{
|
||||||
|
specie
|
||||||
|
{
|
||||||
|
molWeight 44.01;
|
||||||
|
}
|
||||||
|
// to be updated: following CO2 coefficients taken from 02 subdictionary
|
||||||
|
equationOfState
|
||||||
|
{
|
||||||
|
rhoCoeffs<8> ( 2.0132 -0.0034 0 0 0 0 0 0 );
|
||||||
|
}
|
||||||
|
thermodynamics
|
||||||
|
{
|
||||||
|
Hf 0;
|
||||||
|
Sf 0;
|
||||||
|
CpCoeffs<8> ( 834.84 0.29297 -0.00014959 3.4143e-07 -2.2786e-10 0 0 0 );
|
||||||
|
}
|
||||||
|
transport
|
||||||
|
{
|
||||||
|
muCoeffs<8> ( 1.5068e-06 6.1598e-08 -1.8188e-11 0 0 0 0 0 );
|
||||||
|
kappaCoeffs<8> ( 0.00016082 8.5301e-05 -1.4998e-08 0 0 0 0 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
air
|
||||||
|
{
|
||||||
|
specie
|
||||||
|
{
|
||||||
|
molWeight 28.85;
|
||||||
|
}
|
||||||
|
equationOfState
|
||||||
|
{
|
||||||
|
rhoCoeffs<8> ( 2.0132 -0.0034 0 0 0 0 0 0 );
|
||||||
|
}
|
||||||
|
thermodynamics
|
||||||
|
{
|
||||||
|
Hf 0;
|
||||||
|
Sf 0;
|
||||||
|
CpCoeffs<8> ( 948.76 0.39171 -0.00095999 1.393e-06 -6.2029e-10 0 0 0 );
|
||||||
|
}
|
||||||
|
transport
|
||||||
|
{
|
||||||
|
muCoeffs<8> ( 1.5061e-06 6.16e-08 -1.819e-11 0 0 0 0 0 );
|
||||||
|
kappaCoeffs<8> ( 0.0025219 8.506e-05 -1.312e-08 0 0 0 0 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object thermophysicalProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
thermoType
|
||||||
|
{
|
||||||
|
type heRhoThermo;
|
||||||
|
mixture reactingMixture;
|
||||||
|
transport polynomial;
|
||||||
|
thermo hPolynomial;
|
||||||
|
energy sensibleEnthalpy;
|
||||||
|
equationOfState icoPolynomial;
|
||||||
|
specie specie;
|
||||||
|
}
|
||||||
|
|
||||||
|
dpdt no;
|
||||||
|
|
||||||
|
chemistryReader foamChemistryReader;
|
||||||
|
|
||||||
|
foamChemistryFile "<constant>/reactions";
|
||||||
|
|
||||||
|
foamChemistryThermoFile "<constant>/thermo.incompressiblePoly";
|
||||||
|
|
||||||
|
liquids
|
||||||
|
{
|
||||||
|
H2O;
|
||||||
|
}
|
||||||
|
|
||||||
|
solids
|
||||||
|
{}
|
||||||
|
|
||||||
|
inertSpecie air;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object turbulenceProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
simulationType RAS;
|
||||||
|
|
||||||
|
RAS
|
||||||
|
{
|
||||||
|
RASModel kEpsilon;
|
||||||
|
|
||||||
|
printCoeffs no;
|
||||||
|
turbulence on;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,105 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object blockMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
scale 1;
|
||||||
|
|
||||||
|
vertices
|
||||||
|
(
|
||||||
|
( 0 0 0 )
|
||||||
|
( 1 0 0 )
|
||||||
|
( 2 0 0 )
|
||||||
|
( 4 0 0 )
|
||||||
|
( 4 1 0 )
|
||||||
|
( 2 1 0 )
|
||||||
|
( 2 2 0 )
|
||||||
|
( 1 2 0 )
|
||||||
|
( 1 1 0 )
|
||||||
|
( 0 1 0 )
|
||||||
|
|
||||||
|
( 0 0 0.1 )
|
||||||
|
( 1 0 0.1 )
|
||||||
|
( 2 0 0.1 )
|
||||||
|
( 4 0 0.1 )
|
||||||
|
( 4 1 0.1 )
|
||||||
|
( 2 1 0.1 )
|
||||||
|
( 2 2 0.1 )
|
||||||
|
( 1 2 0.1 )
|
||||||
|
( 1 1 0.1 )
|
||||||
|
( 0 1 0.1 )
|
||||||
|
);
|
||||||
|
|
||||||
|
blocks
|
||||||
|
(
|
||||||
|
hex (0 1 8 9 10 11 18 19) ( 10 10 1 ) simpleGrading ( 1 1 1 )
|
||||||
|
hex (1 2 5 8 11 12 15 18) ( 10 10 1 ) simpleGrading ( 1 1 1 )
|
||||||
|
hex (2 3 4 5 12 13 14 15) ( 20 10 1 ) simpleGrading ( 1 1 1 )
|
||||||
|
hex (8 5 6 7 18 15 16 17) ( 10 10 1 ) simpleGrading ( 1 1 1 )
|
||||||
|
);
|
||||||
|
|
||||||
|
edges
|
||||||
|
(
|
||||||
|
);
|
||||||
|
|
||||||
|
defaultPatch
|
||||||
|
{
|
||||||
|
name frontAndBack;
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
boundary
|
||||||
|
(
|
||||||
|
inlet1
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 10 19 9)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
inlet2
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(7 17 16 6)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(3 4 14 13)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 1 11 10)
|
||||||
|
(1 2 12 11)
|
||||||
|
(2 3 13 12)
|
||||||
|
(9 19 18 8)
|
||||||
|
(8 18 17 7)
|
||||||
|
(5 6 16 15)
|
||||||
|
(5 15 14 4)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object controlDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
application reactingParcelFoam;
|
||||||
|
|
||||||
|
startFrom startTime;
|
||||||
|
|
||||||
|
startTime 0;
|
||||||
|
|
||||||
|
stopAt endTime;
|
||||||
|
|
||||||
|
endTime 60;
|
||||||
|
|
||||||
|
deltaT 1e-3;
|
||||||
|
|
||||||
|
writeControl adjustable;
|
||||||
|
|
||||||
|
writeInterval 0.5;
|
||||||
|
|
||||||
|
purgeWrite 0;
|
||||||
|
|
||||||
|
writeFormat ascii;
|
||||||
|
|
||||||
|
writePrecision 8;;
|
||||||
|
|
||||||
|
writeCompression off;
|
||||||
|
|
||||||
|
timeFormat general;
|
||||||
|
|
||||||
|
timePrecision 8;
|
||||||
|
|
||||||
|
runTimeModifiable true;
|
||||||
|
|
||||||
|
adjustTimeStep yes;
|
||||||
|
|
||||||
|
maxCo 1.0;
|
||||||
|
|
||||||
|
maxDeltaT 1;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object decomposeParDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
numberOfSubdomains 2;
|
||||||
|
|
||||||
|
method scotch;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvSchemes;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
ddtSchemes
|
||||||
|
{
|
||||||
|
default Euler;
|
||||||
|
}
|
||||||
|
|
||||||
|
gradSchemes
|
||||||
|
{
|
||||||
|
default Gauss linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
divSchemes
|
||||||
|
{
|
||||||
|
default none;
|
||||||
|
div(phi,U) Gauss upwind;
|
||||||
|
|
||||||
|
turbulence Gauss upwind;
|
||||||
|
div(phi,k) $turbulence;
|
||||||
|
div(phi,epsilon) $turbulence;
|
||||||
|
|
||||||
|
energy Gauss linear;
|
||||||
|
div(phi,K) $energy;
|
||||||
|
div(phi,h) $energy;
|
||||||
|
|
||||||
|
div(phi,Yi_h) Gauss upwind;
|
||||||
|
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
laplacianSchemes
|
||||||
|
{
|
||||||
|
default Gauss linear orthogonal;
|
||||||
|
}
|
||||||
|
|
||||||
|
interpolationSchemes
|
||||||
|
{
|
||||||
|
default linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
snGradSchemes
|
||||||
|
{
|
||||||
|
default orthogonal;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,97 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2011 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvSolution;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
solvers
|
||||||
|
{
|
||||||
|
"rho.*"
|
||||||
|
{
|
||||||
|
solver diagonal;
|
||||||
|
}
|
||||||
|
|
||||||
|
"(U|k|epsilon)"
|
||||||
|
{
|
||||||
|
solver PBiCGStab;
|
||||||
|
preconditioner DILU;
|
||||||
|
tolerance 1e-06;
|
||||||
|
relTol 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
"(U|k|epsilon)Final"
|
||||||
|
{
|
||||||
|
$U;
|
||||||
|
tolerance 1e-06;
|
||||||
|
relTol 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p_rgh
|
||||||
|
{
|
||||||
|
solver GAMG;
|
||||||
|
smoother DICGaussSeidel;
|
||||||
|
tolerance 0;
|
||||||
|
relTol 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
p_rghFinal
|
||||||
|
{
|
||||||
|
$p_rgh;
|
||||||
|
tolerance 1e-06;
|
||||||
|
relTol 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Phi
|
||||||
|
{
|
||||||
|
$p_rgh;
|
||||||
|
}
|
||||||
|
|
||||||
|
Yi
|
||||||
|
{
|
||||||
|
solver PBiCGStab;
|
||||||
|
preconditioner DILU;
|
||||||
|
tolerance 1e-6;
|
||||||
|
relTol 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h
|
||||||
|
{
|
||||||
|
$Yi;
|
||||||
|
relTol 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
hFinal
|
||||||
|
{
|
||||||
|
$Yi;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PIMPLE
|
||||||
|
{
|
||||||
|
transonic no;
|
||||||
|
nOuterCorrectors 1;
|
||||||
|
nCorrectors 2;
|
||||||
|
nNonOrthogonalCorrectors 0;
|
||||||
|
momentumPredictor yes;
|
||||||
|
}
|
||||||
|
|
||||||
|
relaxationFactors
|
||||||
|
{
|
||||||
|
equations
|
||||||
|
{
|
||||||
|
".*Final" 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user