Skip to content

Commit a1f2f59

Browse files
author
Henry Weller
committed
reactingMultiphaseEulerFoam: Added support for turbulent dispersion
1 parent 9f666b0 commit a1f2f59

File tree

6 files changed

+95
-17
lines changed

6 files changed

+95
-17
lines changed

applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.C

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ License
2626
#include "turbulentDispersionModel.H"
2727
#include "phasePair.H"
2828
#include "fvcGrad.H"
29+
#include "surfaceInterpolate.H"
30+
#include "fvcSnGrad.H"
2931

3032
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
3133

@@ -66,4 +68,11 @@ Foam::turbulentDispersionModel::F() const
6668
}
6769

6870

71+
Foam::tmp<Foam::surfaceScalarField>
72+
Foam::turbulentDispersionModel::Ff() const
73+
{
74+
return fvc::interpolate(D())*fvc::snGrad(pair_.dispersed());
75+
}
76+
77+
6978
// ************************************************************************* //

applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.H

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ public:
120120

121121
//- Turbulent dispersion force
122122
virtual tmp<volVectorField> F() const;
123+
124+
//- Turbulent dispersion force on faces
125+
virtual tmp<surfaceScalarField> Ff() const;
123126
};
124127

125128

applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C

Lines changed: 68 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ License
3838
#include "fvmDiv.H"
3939
#include "fvmSup.H"
4040
#include "fvcDiv.H"
41+
#include "fvcSnGrad.H"
4142
#include "fvMatrix.H"
4243

4344
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@@ -575,24 +576,75 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Fs() const
575576
Fs[pair.phase2().index()] -= F;
576577
}
577578

579+
return tFs;
580+
}
581+
582+
583+
template<class BasePhaseSystem>
584+
Foam::autoPtr<Foam::PtrList<Foam::surfaceScalarField> >
585+
Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::phiDs
586+
(
587+
const PtrList<volScalarField>& rAUs
588+
) const
589+
{
590+
autoPtr<PtrList<surfaceScalarField> > tphiDs
591+
(
592+
new PtrList<surfaceScalarField>(this->phases().size())
593+
);
594+
595+
PtrList<surfaceScalarField>& phiDs = tphiDs();
596+
597+
forAll(phiDs, phasei)
598+
{
599+
phiDs.set
600+
(
601+
phasei,
602+
new surfaceScalarField
603+
(
604+
IOobject
605+
(
606+
liftModel::typeName + ":F",
607+
this->mesh_.time().timeName(),
608+
this->mesh_,
609+
IOobject::NO_READ,
610+
IOobject::NO_WRITE,
611+
false
612+
),
613+
this->mesh_,
614+
dimensionedScalar
615+
(
616+
"zero",
617+
dimTime*dimArea*turbulentDispersionModel::dimF/dimDensity,
618+
0
619+
)
620+
)
621+
);
622+
}
623+
578624
// Add the turbulent dispersion force
579-
// forAllConstIter
580-
// (
581-
// turbulentDispersionModelTable,
582-
// turbulentDispersionModels_,
583-
// turbulentDispersionModelIter
584-
// )
585-
// {
586-
// const volVectorField F(turbulentDispersionModelIter()->F<vector>());
587-
588-
// const phasePair&
589-
// pair(this->phasePairs_[turbulentDispersionModelIter.key()]);
590-
591-
// *eqns[pair.phase1().name()] += F;
592-
// *eqns[pair.phase2().name()] -= F;
593-
// }
625+
forAllConstIter
626+
(
627+
turbulentDispersionModelTable,
628+
turbulentDispersionModels_,
629+
turbulentDispersionModelIter
630+
)
631+
{
632+
const phasePair&
633+
pair(this->phasePairs_[turbulentDispersionModelIter.key()]);
594634

595-
return tFs;
635+
const volScalarField D(turbulentDispersionModelIter()->D());
636+
const surfaceScalarField snGradAlpha1
637+
(
638+
fvc::snGrad(pair.phase1())*this->mesh_.magSf()
639+
);
640+
641+
phiDs[pair.phase1().index()] +=
642+
fvc::interpolate(rAUs[pair.phase1().index()]*D)*snGradAlpha1;
643+
phiDs[pair.phase2().index()] -=
644+
fvc::interpolate(rAUs[pair.phase2().index()]*D)*snGradAlpha1;
645+
}
646+
647+
return tphiDs;
596648
}
597649

598650

applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.H

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,12 @@ public:
175175
//- Return the combined force (lift + wall-lubrication)
176176
virtual autoPtr<PtrList<volVectorField> > Fs() const;
177177

178+
//- Return the turbulent dispersion force on faces for phase pair
179+
virtual autoPtr<PtrList<surfaceScalarField> > phiDs
180+
(
181+
const PtrList<volScalarField>& rAUs
182+
) const;
183+
178184
//- Return the combined face-force (lift + wall-lubrication)
179185
virtual tmp<surfaceScalarField> Ff(const phasePairKey& key) const;
180186

applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@ public:
169169
//- Return the combined force (lift + wall-lubrication) for phase pair
170170
virtual autoPtr<PtrList<Foam::volVectorField> > Fs() const = 0;
171171

172+
//- Return the turbulent dispersion force on faces for phase pair
173+
virtual autoPtr<PtrList<Foam::surfaceScalarField> > phiDs
174+
(
175+
const PtrList<volScalarField>& rAUs
176+
) const = 0;
177+
172178
//- Return the total interfacial mass transfer rate for phase
173179
virtual tmp<volScalarField> dmdt(const phaseModel& phase) const = 0;
174180

applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ forAll(phases, phasei)
3434
);
3535
}
3636

37-
// Turbulent diffusion, particle-pressure, lift and wall-lubrication fluxes
37+
// Lift, wall-lubrication and turbulent diffusion fluxes
3838
PtrList<surfaceScalarField> phiFs(phases.size());
3939
{
4040
autoPtr<PtrList<volVectorField> > Fs = fluid.Fs();
41+
autoPtr<PtrList<surfaceScalarField> > phiDs = fluid.phiDs(rAUs);
4142

4243
forAll(phases, phasei)
4344
{
@@ -50,6 +51,7 @@ PtrList<surfaceScalarField> phiFs(phases.size());
5051
(
5152
IOobject::groupName("phiF", phase.name()),
5253
(fvc::interpolate(rAUs[phasei]*Fs()[phasei]) & mesh.Sf())
54+
+ phiDs()[phasei]
5355
)
5456
);
5557
}

0 commit comments

Comments
 (0)