Skip to content
Snippets Groups Projects
Commit 48bf5ba4 authored by Henry's avatar Henry
Browse files

twoPhaseEulerFoam: Update the handling of phi BCs in MRF region

parent b1e90e0b
No related merge requests found
...@@ -57,16 +57,12 @@ ...@@ -57,16 +57,12 @@
+ fvc::ddtPhiCorr(rAU2, alpha2, U2, phi2) + fvc::ddtPhiCorr(rAU2, alpha2, U2, phi2)
); );
phi = alpha1f*phiHbyA1 + alpha2f*phiHbyA2;
mrfZones.makeRelative(phi);
phiHbyA1 += phiHbyA1 +=
( (
fvc::interpolate((1.0/rho1)*rAU1*dragCoeff)*phi2 fvc::interpolate((1.0/rho1)*rAU1*dragCoeff)*phi2
- phiP1 - phiP1
+ rAlphaAU1f*(g & mesh.Sf()) + rAlphaAU1f*(g & mesh.Sf())
); );
mrfZones.makeRelative(phiHbyA1);
phiHbyA2 += phiHbyA2 +=
( (
...@@ -74,8 +70,9 @@ ...@@ -74,8 +70,9 @@
- phiP2 - phiP2
+ rAlphaAU2f*(g & mesh.Sf()) + rAlphaAU2f*(g & mesh.Sf())
); );
mrfZones.makeRelative(phiHbyA2);
mrfZones.makeRelative(phiHbyA1);
mrfZones.makeRelative(phiHbyA2);
mrfZones.makeRelative(phi1.oldTime()); mrfZones.makeRelative(phi1.oldTime());
mrfZones.makeRelative(phi1); mrfZones.makeRelative(phi1);
mrfZones.makeRelative(phi2.oldTime()); mrfZones.makeRelative(phi2.oldTime());
...@@ -83,6 +80,16 @@ ...@@ -83,6 +80,16 @@
surfaceScalarField phiHbyA("phiHbyA", alpha1f*phiHbyA1 + alpha2f*phiHbyA2); surfaceScalarField phiHbyA("phiHbyA", alpha1f*phiHbyA1 + alpha2f*phiHbyA2);
// Update phi BCs before pEqn
phi.boundaryField() =
mrfZones.relative
(
alpha1f.boundaryField()
*(mesh.Sf().boundaryField() & U1.boundaryField())
+ alpha2f.boundaryField()
*(mesh.Sf().boundaryField() & U2.boundaryField())
);
HbyA1 += (1.0/rho1)*rAU1*dragCoeff*U2; HbyA1 += (1.0/rho1)*rAU1*dragCoeff*U2;
HbyA2 += (1.0/rho2)*rAU2*dragCoeff*U1; HbyA2 += (1.0/rho2)*rAU2*dragCoeff*U1;
...@@ -171,11 +178,17 @@ ...@@ -171,11 +178,17 @@
surfaceScalarField mSfGradp(pEqnIncomp.flux()/Dp); surfaceScalarField mSfGradp(pEqnIncomp.flux()/Dp);
phi1.boundaryField() == phi1.boundaryField() ==
(mesh.Sf().boundaryField() & U1.boundaryField()); mrfZones.relative
(
mesh.Sf().boundaryField() & U1.boundaryField()
);
phi1 = phiHbyA1 + rAlphaAU1f*mSfGradp/fvc::interpolate(rho1); phi1 = phiHbyA1 + rAlphaAU1f*mSfGradp/fvc::interpolate(rho1);
phi2.boundaryField() == phi2.boundaryField() ==
(mesh.Sf().boundaryField() & U2.boundaryField()); mrfZones.relative
(
mesh.Sf().boundaryField() & U2.boundaryField()
);
phi2 = phiHbyA2 + rAlphaAU2f*mSfGradp/fvc::interpolate(rho2); phi2 = phiHbyA2 + rAlphaAU2f*mSfGradp/fvc::interpolate(rho2);
phi = alpha1f*phi1 + alpha2f*phi2; phi = alpha1f*phi1 + alpha2f*phi2;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment