From c6359c087bf574132a375ee1f50ca7af66fff0a8 Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 25 Jul 2012 12:04:09 +0100 Subject: [PATCH] compressibleTwoPhaseEulerFoam/pEqn.H: Corrected handling of the kinetic theory drag in the pressure equation --- .../compressibleTwoPhaseEulerFoam/pEqn.H | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H index 67717b0738..709d30c398 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H @@ -22,27 +22,29 @@ volVectorField HbyA2("HbyA2", U2); HbyA2 = rAU2*U2Eqn.H(); + surfaceScalarField ppDrag("ppDrag", 0.0*phi1); + + if (g0.value() > 0.0) + { + ppDrag -= ppMagf*fvc::snGrad(alpha1)*mesh.magSf(); + } + + if (kineticTheory.on()) + { + ppDrag -= + fvc::interpolate(1.0/rho1)*rAlphaAU1f + *fvc::snGrad(kineticTheory.pa())*mesh.magSf(); + } + surfaceScalarField phiHbyA1 ( "phiHbyA1", (fvc::interpolate(HbyA1) & mesh.Sf()) + fvc::ddtPhiCorr(rAU1, alpha1, U1, phi1) + fvc::interpolate((1.0/rho1)*rAU1*dragCoeff)*phi2 + + ppDrag + rAlphaAU1f*(g & mesh.Sf()) ); - - if (g0.value() > 0.0) - { - phiHbyA1 -= ppMagf*fvc::snGrad(alpha1)*mesh.magSf(); - } - - if (kineticTheory.on()) - { - phiHbyA1 -= - fvc::interpolate((1.0/rho1)*rAU1) - *fvc::snGrad(kineticTheory.pa())*mesh.magSf(); - } - mrfZones.relativeFlux(phiHbyA1); surfaceScalarField phiHbyA2 @@ -135,7 +137,8 @@ U1 = HbyA1 + fvc::reconstruct ( - rAlphaAU1f + ppDrag + + rAlphaAU1f *( (g & mesh.Sf()) + mSfGradp/fvc::interpolate(rho1)