Skip to content

Commit

Permalink
reactingMultiphaseEulerFoam: Added support for turbulent dispersion
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Weller committed Sep 17, 2015
1 parent 9f666b0 commit a1f2f59
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 17 deletions.
Expand Up @@ -26,6 +26,8 @@ License
#include "turbulentDispersionModel.H" #include "turbulentDispersionModel.H"
#include "phasePair.H" #include "phasePair.H"
#include "fvcGrad.H" #include "fvcGrad.H"
#include "surfaceInterpolate.H"
#include "fvcSnGrad.H"


// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //


Expand Down Expand Up @@ -66,4 +68,11 @@ Foam::turbulentDispersionModel::F() const
} }




Foam::tmp<Foam::surfaceScalarField>
Foam::turbulentDispersionModel::Ff() const
{
return fvc::interpolate(D())*fvc::snGrad(pair_.dispersed());
}


// ************************************************************************* // // ************************************************************************* //
Expand Up @@ -120,6 +120,9 @@ public:


//- Turbulent dispersion force //- Turbulent dispersion force
virtual tmp<volVectorField> F() const; virtual tmp<volVectorField> F() const;

//- Turbulent dispersion force on faces
virtual tmp<surfaceScalarField> Ff() const;
}; };




Expand Down
Expand Up @@ -38,6 +38,7 @@ License
#include "fvmDiv.H" #include "fvmDiv.H"
#include "fvmSup.H" #include "fvmSup.H"
#include "fvcDiv.H" #include "fvcDiv.H"
#include "fvcSnGrad.H"
#include "fvMatrix.H" #include "fvMatrix.H"


// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Expand Down Expand Up @@ -575,24 +576,75 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Fs() const
Fs[pair.phase2().index()] -= F; Fs[pair.phase2().index()] -= 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 // Add the turbulent dispersion force
// forAllConstIter forAllConstIter
// ( (
// turbulentDispersionModelTable, turbulentDispersionModelTable,
// turbulentDispersionModels_, turbulentDispersionModels_,
// turbulentDispersionModelIter turbulentDispersionModelIter
// ) )
// { {
// const volVectorField F(turbulentDispersionModelIter()->F<vector>()); const phasePair&

pair(this->phasePairs_[turbulentDispersionModelIter.key()]);
// const phasePair&
// pair(this->phasePairs_[turbulentDispersionModelIter.key()]);

// *eqns[pair.phase1().name()] += F;
// *eqns[pair.phase2().name()] -= F;
// }


return tFs; 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;
} }




Expand Down
Expand Up @@ -175,6 +175,12 @@ public:
//- Return the combined force (lift + wall-lubrication) //- Return the combined force (lift + wall-lubrication)
virtual autoPtr<PtrList<volVectorField> > Fs() const; 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) //- Return the combined face-force (lift + wall-lubrication)
virtual tmp<surfaceScalarField> Ff(const phasePairKey& key) const; virtual tmp<surfaceScalarField> Ff(const phasePairKey& key) const;


Expand Down
Expand Up @@ -169,6 +169,12 @@ public:
//- Return the combined force (lift + wall-lubrication) for phase pair //- Return the combined force (lift + wall-lubrication) for phase pair
virtual autoPtr<PtrList<Foam::volVectorField> > Fs() const = 0; 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 //- Return the total interfacial mass transfer rate for phase
virtual tmp<volScalarField> dmdt(const phaseModel& phase) const = 0; virtual tmp<volScalarField> dmdt(const phaseModel& phase) const = 0;


Expand Down
Expand Up @@ -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()); PtrList<surfaceScalarField> phiFs(phases.size());
{ {
autoPtr<PtrList<volVectorField> > Fs = fluid.Fs(); autoPtr<PtrList<volVectorField> > Fs = fluid.Fs();
autoPtr<PtrList<surfaceScalarField> > phiDs = fluid.phiDs(rAUs);


forAll(phases, phasei) forAll(phases, phasei)
{ {
Expand All @@ -50,6 +51,7 @@ PtrList<surfaceScalarField> phiFs(phases.size());
( (
IOobject::groupName("phiF", phase.name()), IOobject::groupName("phiF", phase.name()),
(fvc::interpolate(rAUs[phasei]*Fs()[phasei]) & mesh.Sf()) (fvc::interpolate(rAUs[phasei]*Fs()[phasei]) & mesh.Sf())
+ phiDs()[phasei]
) )
); );
} }
Expand Down

0 comments on commit a1f2f59

Please sign in to comment.