interDyMFoam, interPhaseChangeDyMFoam : Use 1/A from the previous time-step rather than 1 in the pcorr equation

This provides better convergence and consistency between p_rgh and pcorr
This commit is contained in:
Henry
2013-12-17 14:59:13 +00:00
parent 160e7ea6dd
commit 267f5cf0f5
5 changed files with 34 additions and 3 deletions

View File

@ -37,7 +37,8 @@ if (mesh.changing())
pcorrTypes
);
dimensionedScalar rAUf("rAUf", dimTime/rho.dimensions(), 1.0);
// dimensionedScalar rAUf("rAUf", dimTime/rho.dimensions(), 1.0);
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
while (pimple.correctNonOrthogonal())
{

View File

@ -57,6 +57,21 @@ int main(int argc, char *argv[])
#include "createFields.H"
#include "readTimeControls.H"
#include "createPrghCorrTypes.H"
volScalarField rAU
(
IOobject
(
"rAU",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("rAUf", dimTime/rho.dimensions(), 1.0)
);
#include "correctPhi.H"
#include "createUf.H"
#include "CourantNo.H"

View File

@ -1,5 +1,5 @@
{
volScalarField rAU("rAU", 1.0/UEqn.A());
rAU = 1.0/UEqn.A();
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
volVectorField HbyA("HbyA", U);

View File

@ -67,6 +67,21 @@ int main(int argc, char *argv[])
#include "createFields.H"
#include "readTimeControls.H"
#include "createPcorrTypes.H"
volScalarField rAU
(
IOobject
(
"rAU",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("rAUf", dimTime/rho.dimensions(), 1.0)
);
#include "../interFoam/interDyMFoam/correctPhi.H"
#include "createUf.H"
#include "CourantNo.H"

View File

@ -1,5 +1,5 @@
{
volScalarField rAU("rAU", 1.0/UEqn.A());
rAU = 1.0/UEqn.A();
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
volVectorField HbyA("HbyA", U);