mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
reactingMultiphaseEulerFoam: Added support for turbulent dispersion
This commit is contained in:
@ -26,6 +26,8 @@ License
|
||||
#include "turbulentDispersionModel.H"
|
||||
#include "phasePair.H"
|
||||
#include "fvcGrad.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
#include "fvcSnGrad.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
@ -66,4 +68,11 @@ Foam::turbulentDispersionModel::F() const
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::surfaceScalarField>
|
||||
Foam::turbulentDispersionModel::Ff() const
|
||||
{
|
||||
return fvc::interpolate(D())*fvc::snGrad(pair_.dispersed());
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -120,6 +120,9 @@ public:
|
||||
|
||||
//- Turbulent dispersion force
|
||||
virtual tmp<volVectorField> F() const;
|
||||
|
||||
//- Turbulent dispersion force on faces
|
||||
virtual tmp<surfaceScalarField> Ff() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -38,6 +38,7 @@ License
|
||||
#include "fvmDiv.H"
|
||||
#include "fvmSup.H"
|
||||
#include "fvcDiv.H"
|
||||
#include "fvcSnGrad.H"
|
||||
#include "fvMatrix.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
@ -575,27 +576,78 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Fs() const
|
||||
Fs[pair.phase2().index()] -= F;
|
||||
}
|
||||
|
||||
// Add the turbulent dispersion force
|
||||
// forAllConstIter
|
||||
// (
|
||||
// turbulentDispersionModelTable,
|
||||
// turbulentDispersionModels_,
|
||||
// turbulentDispersionModelIter
|
||||
// )
|
||||
// {
|
||||
// const volVectorField F(turbulentDispersionModelIter()->F<vector>());
|
||||
|
||||
// const phasePair&
|
||||
// pair(this->phasePairs_[turbulentDispersionModelIter.key()]);
|
||||
|
||||
// *eqns[pair.phase1().name()] += F;
|
||||
// *eqns[pair.phase2().name()] -= F;
|
||||
// }
|
||||
|
||||
return tFs;
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseSystem>
|
||||
Foam::autoPtr<Foam::PtrList<Foam::surfaceScalarField> >
|
||||
Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::phiDs
|
||||
(
|
||||
const PtrList<volScalarField>& rAUs
|
||||
) const
|
||||
{
|
||||
autoPtr<PtrList<surfaceScalarField> > tphiDs
|
||||
(
|
||||
new PtrList<surfaceScalarField>(this->phases().size())
|
||||
);
|
||||
|
||||
PtrList<surfaceScalarField>& phiDs = tphiDs();
|
||||
|
||||
forAll(phiDs, phasei)
|
||||
{
|
||||
phiDs.set
|
||||
(
|
||||
phasei,
|
||||
new surfaceScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
liftModel::typeName + ":F",
|
||||
this->mesh_.time().timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
this->mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
"zero",
|
||||
dimTime*dimArea*turbulentDispersionModel::dimF/dimDensity,
|
||||
0
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Add the turbulent dispersion force
|
||||
forAllConstIter
|
||||
(
|
||||
turbulentDispersionModelTable,
|
||||
turbulentDispersionModels_,
|
||||
turbulentDispersionModelIter
|
||||
)
|
||||
{
|
||||
const phasePair&
|
||||
pair(this->phasePairs_[turbulentDispersionModelIter.key()]);
|
||||
|
||||
const volScalarField D(turbulentDispersionModelIter()->D());
|
||||
const surfaceScalarField snGradAlpha1
|
||||
(
|
||||
fvc::snGrad(pair.phase1())*this->mesh_.magSf()
|
||||
);
|
||||
|
||||
phiDs[pair.phase1().index()] +=
|
||||
fvc::interpolate(rAUs[pair.phase1().index()]*D)*snGradAlpha1;
|
||||
phiDs[pair.phase2().index()] -=
|
||||
fvc::interpolate(rAUs[pair.phase2().index()]*D)*snGradAlpha1;
|
||||
}
|
||||
|
||||
return tphiDs;
|
||||
}
|
||||
|
||||
|
||||
template<class BasePhaseSystem>
|
||||
bool Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::read()
|
||||
{
|
||||
|
||||
@ -175,6 +175,12 @@ public:
|
||||
//- Return the combined force (lift + wall-lubrication)
|
||||
virtual autoPtr<PtrList<volVectorField> > Fs() const;
|
||||
|
||||
//- Return the turbulent dispersion force on faces for phase pair
|
||||
virtual autoPtr<PtrList<surfaceScalarField> > phiDs
|
||||
(
|
||||
const PtrList<volScalarField>& rAUs
|
||||
) const;
|
||||
|
||||
//- Return the combined face-force (lift + wall-lubrication)
|
||||
virtual tmp<surfaceScalarField> Ff(const phasePairKey& key) const;
|
||||
|
||||
|
||||
@ -169,6 +169,12 @@ public:
|
||||
//- Return the combined force (lift + wall-lubrication) for phase pair
|
||||
virtual autoPtr<PtrList<Foam::volVectorField> > Fs() const = 0;
|
||||
|
||||
//- Return the turbulent dispersion force on faces for phase pair
|
||||
virtual autoPtr<PtrList<Foam::surfaceScalarField> > phiDs
|
||||
(
|
||||
const PtrList<volScalarField>& rAUs
|
||||
) const = 0;
|
||||
|
||||
//- Return the total interfacial mass transfer rate for phase
|
||||
virtual tmp<volScalarField> dmdt(const phaseModel& phase) const = 0;
|
||||
|
||||
|
||||
@ -34,10 +34,11 @@ forAll(phases, phasei)
|
||||
);
|
||||
}
|
||||
|
||||
// Turbulent diffusion, particle-pressure, lift and wall-lubrication fluxes
|
||||
// Lift, wall-lubrication and turbulent diffusion fluxes
|
||||
PtrList<surfaceScalarField> phiFs(phases.size());
|
||||
{
|
||||
autoPtr<PtrList<volVectorField> > Fs = fluid.Fs();
|
||||
autoPtr<PtrList<surfaceScalarField> > phiDs = fluid.phiDs(rAUs);
|
||||
|
||||
forAll(phases, phasei)
|
||||
{
|
||||
@ -50,6 +51,7 @@ PtrList<surfaceScalarField> phiFs(phases.size());
|
||||
(
|
||||
IOobject::groupName("phiF", phase.name()),
|
||||
(fvc::interpolate(rAUs[phasei]*Fs()[phasei]) & mesh.Sf())
|
||||
+ phiDs()[phasei]
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user