mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
compressibleTwoPhaseEulerFoam: added MRF support
This commit is contained in:
@ -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"
|
||||||
|
|||||||
@ -0,0 +1,4 @@
|
|||||||
|
MRFZones mrfZones(mesh);
|
||||||
|
mrfZones.correctBoundaryVelocity(U1);
|
||||||
|
mrfZones.correctBoundaryVelocity(U2);
|
||||||
|
mrfZones.correctBoundaryVelocity(U);
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user