compressibleTwoPhaseEulerFoam: added MRF support

This commit is contained in:
Henry
2012-03-15 15:10:42 +00:00
parent 12f2f0c09b
commit 3417551c2d
3 changed files with 16 additions and 0 deletions

View File

@ -45,6 +45,8 @@ Description
#include "pimpleControl.H" #include "pimpleControl.H"
#include "MRFZones.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[]) int main(int argc, char *argv[])
@ -55,6 +57,7 @@ int main(int argc, char *argv[])
#include "createMesh.H" #include "createMesh.H"
#include "readGravitationalAcceleration.H" #include "readGravitationalAcceleration.H"
#include "createFields.H" #include "createFields.H"
#include "createMRFZones.H"
#include "readPPProperties.H" #include "readPPProperties.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
#include "readTimeControls.H" #include "readTimeControls.H"

View File

@ -0,0 +1,4 @@
MRFZones mrfZones(mesh);
mrfZones.correctBoundaryVelocity(U1);
mrfZones.correctBoundaryVelocity(U2);
mrfZones.correctBoundaryVelocity(U);

View File

@ -2,6 +2,11 @@
rho1 = rho10 + psi1*p; rho1 = rho10 + psi1*p;
rho2 = rho20 + psi2*p; rho2 = rho20 + psi2*p;
mrfZones.absoluteFlux(phi1.oldTime());
mrfZones.absoluteFlux(phi1);
mrfZones.absoluteFlux(phi2.oldTime());
mrfZones.absoluteFlux(phi2);
surfaceScalarField alpha1f(fvc::interpolate(alpha1)); surfaceScalarField alpha1f(fvc::interpolate(alpha1));
surfaceScalarField alpha2f(scalar(1) - alpha1f); surfaceScalarField alpha2f(scalar(1) - alpha1f);
@ -25,6 +30,7 @@
+ fvc::interpolate((1.0/rho1)*rAU1*dragCoeff)*phi2 + fvc::interpolate((1.0/rho1)*rAU1*dragCoeff)*phi2
+ rAlphaAU1f*(g & mesh.Sf()) + rAlphaAU1f*(g & mesh.Sf())
); );
mrfZones.relativeFlux(phiHbyA1);
surfaceScalarField phiHbyA2 surfaceScalarField phiHbyA2
( (
@ -34,6 +40,7 @@
+ fvc::interpolate((1.0/rho2)*rAU2*dragCoeff)*phi1 + fvc::interpolate((1.0/rho2)*rAU2*dragCoeff)*phi1
+ rAlphaAU2f*(g & mesh.Sf()) + rAlphaAU2f*(g & mesh.Sf())
); );
mrfZones.relativeFlux(phiHbyA2);
surfaceScalarField phiHbyA("phiHbyA", alpha1f*phiHbyA1 + alpha2f*phiHbyA2); surfaceScalarField phiHbyA("phiHbyA", alpha1f*phiHbyA1 + alpha2f*phiHbyA2);
@ -97,10 +104,12 @@
phi1.boundaryField() == phi1.boundaryField() ==
(fvc::interpolate(U1) & mesh.Sf())().boundaryField(); (fvc::interpolate(U1) & mesh.Sf())().boundaryField();
phi1 = phiHbyA1 + rAlphaAU1f*mSfGradp/fvc::interpolate(rho1); phi1 = phiHbyA1 + rAlphaAU1f*mSfGradp/fvc::interpolate(rho1);
mrfZones.relativeFlux(phi1.oldTime());
phi2.boundaryField() == phi2.boundaryField() ==
(fvc::interpolate(U2) & mesh.Sf())().boundaryField(); (fvc::interpolate(U2) & mesh.Sf())().boundaryField();
phi2 = phiHbyA2 + rAlphaAU2f*mSfGradp/fvc::interpolate(rho2); phi2 = phiHbyA2 + rAlphaAU2f*mSfGradp/fvc::interpolate(rho2);
mrfZones.relativeFlux(phi2.oldTime());
phi = alpha1f*phi1 + alpha2f*phi2; phi = alpha1f*phi1 + alpha2f*phi2;