mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
interPhaseChangeDyMFoam: Corrected correctPhi to include the phase-change dilatation effect
This commit is contained in:
@ -37,14 +37,17 @@ if (mesh.changing())
|
|||||||
pcorrTypes
|
pcorrTypes
|
||||||
);
|
);
|
||||||
|
|
||||||
// dimensionedScalar rAUf("rAUf", dimTime/rho.dimensions(), 1.0);
|
|
||||||
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
|
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
|
||||||
|
|
||||||
|
#ifndef divUCorr
|
||||||
|
#define divUCorr
|
||||||
|
#endif
|
||||||
|
|
||||||
while (pimple.correctNonOrthogonal())
|
while (pimple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
fvScalarMatrix pcorrEqn
|
fvScalarMatrix pcorrEqn
|
||||||
(
|
(
|
||||||
fvm::laplacian(rAUf, pcorr) == fvc::div(phi)
|
fvm::laplacian(rAUf, pcorr) == fvc::div(phi) divUCorr
|
||||||
);
|
);
|
||||||
|
|
||||||
pcorrEqn.setReference(pRefCell, pRefValue);
|
pcorrEqn.setReference(pRefCell, pRefValue);
|
||||||
@ -56,5 +59,7 @@ if (mesh.changing())
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef divUCorr
|
||||||
|
|
||||||
#include "continuityErrs.H"
|
#include "continuityErrs.H"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -82,9 +82,18 @@
|
|||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Under-relax the correction for all but the 1st corrector
|
||||||
|
if (aCorr == 0)
|
||||||
|
{
|
||||||
tphiAlpha() += tphiAlphaCorr();
|
tphiAlpha() += tphiAlphaCorr();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
alpha1 = 0.5*alpha1 + 0.5*alpha10;
|
||||||
|
tphiAlpha() += 0.5*tphiAlphaCorr();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
MULES::explicitSolve
|
MULES::explicitSolve
|
||||||
(
|
(
|
||||||
|
|||||||
@ -82,7 +82,6 @@ int main(int argc, char *argv[])
|
|||||||
dimensionedScalar("rAUf", dimTime/rho.dimensions(), 1.0)
|
dimensionedScalar("rAUf", dimTime/rho.dimensions(), 1.0)
|
||||||
);
|
);
|
||||||
|
|
||||||
#include "../interFoam/interDyMFoam/correctPhi.H"
|
|
||||||
#include "createUf.H"
|
#include "createUf.H"
|
||||||
#include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
#include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
@ -106,6 +105,9 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
if (pimple.firstIter() || moveMeshOuterCorrectors)
|
if (pimple.firstIter() || moveMeshOuterCorrectors)
|
||||||
{
|
{
|
||||||
|
// Store divU from the previous mesh for the correctPhi
|
||||||
|
volScalarField divU(fvc::div(fvc::absolute(phi, U)));
|
||||||
|
|
||||||
scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
|
scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
|
||||||
|
|
||||||
mesh.update();
|
mesh.update();
|
||||||
@ -125,6 +127,7 @@ int main(int argc, char *argv[])
|
|||||||
// Calculate absolute flux from the mapped surface velocity
|
// Calculate absolute flux from the mapped surface velocity
|
||||||
phi = mesh.Sf() & Uf;
|
phi = mesh.Sf() & Uf;
|
||||||
|
|
||||||
|
#define divUCorr -divU
|
||||||
#include "../interFoam/interDyMFoam/correctPhi.H"
|
#include "../interFoam/interDyMFoam/correctPhi.H"
|
||||||
|
|
||||||
// Make the flux relative to the mesh motion
|
// Make the flux relative to the mesh motion
|
||||||
|
|||||||
@ -32,7 +32,6 @@ divSchemes
|
|||||||
|
|
||||||
div(phi,alpha) Gauss vanLeer;
|
div(phi,alpha) Gauss vanLeer;
|
||||||
div(phirb,alpha) Gauss linear;
|
div(phirb,alpha) Gauss linear;
|
||||||
UD Gauss upwind;
|
|
||||||
div(rhoPhi,U) Gauss linearUpwind grad(U);
|
div(rhoPhi,U) Gauss linearUpwind grad(U);
|
||||||
div(phi,k) Gauss upwind;
|
div(phi,k) Gauss upwind;
|
||||||
div(phi,epsilon) Gauss upwind;
|
div(phi,epsilon) Gauss upwind;
|
||||||
|
|||||||
Reference in New Issue
Block a user