multiphaseEuler: Improved mass transfer linearisation w.r.t pressure
Mass transfer rates are now updated following a change in the pressure if the mass transfer modelling provides a pressure coefficient. This means that pimple correctors can be used to improve the behaviour of mass transfer processes that coupled closely to the pressure field.
This commit is contained in:
@ -102,6 +102,10 @@ void Foam::solvers::multiphaseEuler::cellPressureCorrector()
|
|||||||
// Explicit force fluxes
|
// Explicit force fluxes
|
||||||
PtrList<surfaceScalarField> phiFs(fluid.phiFs(rAUs));
|
PtrList<surfaceScalarField> phiFs(fluid.phiFs(rAUs));
|
||||||
|
|
||||||
|
// Mass transfer rates
|
||||||
|
PtrList<volScalarField> dmdts(fluid.dmdts());
|
||||||
|
PtrList<volScalarField> d2mdtdps(fluid.d2mdtdps());
|
||||||
|
|
||||||
// --- Pressure corrector loop
|
// --- Pressure corrector loop
|
||||||
while (pimple.correct())
|
while (pimple.correct())
|
||||||
{
|
{
|
||||||
@ -282,7 +286,7 @@ void Foam::solvers::multiphaseEuler::cellPressureCorrector()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Compressible pressure equations
|
// Compressible pressure equations
|
||||||
PtrList<fvScalarMatrix> pEqnComps(compressibilityEqns());
|
PtrList<fvScalarMatrix> pEqnComps(compressibilityEqns(dmdts, d2mdtdps));
|
||||||
|
|
||||||
// Cache p prior to solve for density update
|
// Cache p prior to solve for density update
|
||||||
volScalarField p_rgh_0(p_rgh);
|
volScalarField p_rgh_0(p_rgh);
|
||||||
@ -407,6 +411,15 @@ void Foam::solvers::multiphaseEuler::cellPressureCorrector()
|
|||||||
phase.thermoRef().rho() += phase.thermo().psi()*(p_rgh - p_rgh_0);
|
phase.thermoRef().rho() += phase.thermo().psi()*(p_rgh - p_rgh_0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update mass transfer rates for change in p_rgh
|
||||||
|
forAll(phases, phasei)
|
||||||
|
{
|
||||||
|
if (dmdts.set(phasei) && d2mdtdps.set(phasei))
|
||||||
|
{
|
||||||
|
dmdts[phasei] += d2mdtdps[phasei]*(p_rgh - p_rgh_0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Correct p_rgh for consistency with p and the updated densities
|
// Correct p_rgh for consistency with p and the updated densities
|
||||||
rho = fluid.rho();
|
rho = fluid.rho();
|
||||||
p_rgh = p - rho*buoyancy.gh;
|
p_rgh = p - rho*buoyancy.gh;
|
||||||
|
|||||||
@ -34,13 +34,14 @@ License
|
|||||||
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::PtrList<Foam::fvScalarMatrix>
|
Foam::PtrList<Foam::fvScalarMatrix>
|
||||||
Foam::solvers::multiphaseEuler::compressibilityEqns() const
|
Foam::solvers::multiphaseEuler::compressibilityEqns
|
||||||
|
(
|
||||||
|
const PtrList<volScalarField>& dmdts,
|
||||||
|
const PtrList<volScalarField>& d2mdtdps
|
||||||
|
) const
|
||||||
{
|
{
|
||||||
PtrList<fvScalarMatrix> pEqnComps(phases.size());
|
PtrList<fvScalarMatrix> pEqnComps(phases.size());
|
||||||
|
|
||||||
PtrList<volScalarField> dmdts(fluid.dmdts());
|
|
||||||
PtrList<volScalarField> d2mdtdps(fluid.d2mdtdps());
|
|
||||||
|
|
||||||
forAll(phases, phasei)
|
forAll(phases, phasei)
|
||||||
{
|
{
|
||||||
phaseModel& phase = phases[phasei];
|
phaseModel& phase = phases[phasei];
|
||||||
|
|||||||
@ -113,6 +113,10 @@ void Foam::solvers::multiphaseEuler::facePressureCorrector()
|
|||||||
// Explicit force fluxes
|
// Explicit force fluxes
|
||||||
PtrList<surfaceScalarField> phiFfs(fluid.phiFfs(rAUfs));
|
PtrList<surfaceScalarField> phiFfs(fluid.phiFfs(rAUfs));
|
||||||
|
|
||||||
|
// Mass transfer rates
|
||||||
|
PtrList<volScalarField> dmdts(fluid.dmdts());
|
||||||
|
PtrList<volScalarField> d2mdtdps(fluid.d2mdtdps());
|
||||||
|
|
||||||
// --- Pressure corrector loop
|
// --- Pressure corrector loop
|
||||||
while (pimple.correct())
|
while (pimple.correct())
|
||||||
{
|
{
|
||||||
@ -269,7 +273,7 @@ void Foam::solvers::multiphaseEuler::facePressureCorrector()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Compressible pressure equations
|
// Compressible pressure equations
|
||||||
PtrList<fvScalarMatrix> pEqnComps(compressibilityEqns());
|
PtrList<fvScalarMatrix> pEqnComps(compressibilityEqns(dmdts, d2mdtdps));
|
||||||
|
|
||||||
// Cache p prior to solve for density update
|
// Cache p prior to solve for density update
|
||||||
volScalarField p_rgh_0(p_rgh);
|
volScalarField p_rgh_0(p_rgh);
|
||||||
@ -381,6 +385,15 @@ void Foam::solvers::multiphaseEuler::facePressureCorrector()
|
|||||||
phase.thermoRef().rho() += phase.thermo().psi()*(p_rgh - p_rgh_0);
|
phase.thermoRef().rho() += phase.thermo().psi()*(p_rgh - p_rgh_0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update mass transfer rates for change in p_rgh
|
||||||
|
forAll(phases, phasei)
|
||||||
|
{
|
||||||
|
if (dmdts.set(phasei) && d2mdtdps.set(phasei))
|
||||||
|
{
|
||||||
|
dmdts[phasei] += d2mdtdps[phasei]*(p_rgh - p_rgh_0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Correct p_rgh for consistency with p and the updated densities
|
// Correct p_rgh for consistency with p and the updated densities
|
||||||
rho = fluid.rho();
|
rho = fluid.rho();
|
||||||
p_rgh = p - rho*buoyancy.gh;
|
p_rgh = p - rho*buoyancy.gh;
|
||||||
|
|||||||
@ -185,7 +185,11 @@ private:
|
|||||||
void facePressureCorrector();
|
void facePressureCorrector();
|
||||||
|
|
||||||
//- Return the list of pressure equation compressibility contributions
|
//- Return the list of pressure equation compressibility contributions
|
||||||
PtrList<fvScalarMatrix> compressibilityEqns() const;
|
PtrList<fvScalarMatrix> compressibilityEqns
|
||||||
|
(
|
||||||
|
const PtrList<volScalarField>& dmdts,
|
||||||
|
const PtrList<volScalarField>& d2mdtdps
|
||||||
|
) const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -44,7 +44,10 @@ void Foam::solvers::multiphaseEuler::pressureCorrector()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PtrList<fvScalarMatrix> pEqnComps(compressibilityEqns());
|
PtrList<fvScalarMatrix> pEqnComps
|
||||||
|
(
|
||||||
|
compressibilityEqns(fluid.dmdts(), fluid.d2mdtdps())
|
||||||
|
);
|
||||||
|
|
||||||
forAll(phases, phasei)
|
forAll(phases, phasei)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user