Skip to content
Snippets Groups Projects
Commit 267f5cf0 authored by Henry's avatar Henry
Browse files

interDyMFoam, interPhaseChangeDyMFoam : Use 1/A from the previous time-step...

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
parent 160e7ea6
Branches
Tags
No related merge requests found
...@@ -37,7 +37,8 @@ if (mesh.changing()) ...@@ -37,7 +37,8 @@ if (mesh.changing())
pcorrTypes 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()) while (pimple.correctNonOrthogonal())
{ {
......
...@@ -57,6 +57,21 @@ int main(int argc, char *argv[]) ...@@ -57,6 +57,21 @@ int main(int argc, char *argv[])
#include "createFields.H" #include "createFields.H"
#include "readTimeControls.H" #include "readTimeControls.H"
#include "createPrghCorrTypes.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 "correctPhi.H"
#include "createUf.H" #include "createUf.H"
#include "CourantNo.H" #include "CourantNo.H"
......
{ {
volScalarField rAU("rAU", 1.0/UEqn.A()); rAU = 1.0/UEqn.A();
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU)); surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
volVectorField HbyA("HbyA", U); volVectorField HbyA("HbyA", U);
......
...@@ -67,6 +67,21 @@ int main(int argc, char *argv[]) ...@@ -67,6 +67,21 @@ int main(int argc, char *argv[])
#include "createFields.H" #include "createFields.H"
#include "readTimeControls.H" #include "readTimeControls.H"
#include "createPcorrTypes.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 "../interFoam/interDyMFoam/correctPhi.H"
#include "createUf.H" #include "createUf.H"
#include "CourantNo.H" #include "CourantNo.H"
......
{ {
volScalarField rAU("rAU", 1.0/UEqn.A()); rAU = 1.0/UEqn.A();
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU)); surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
volVectorField HbyA("HbyA", U); volVectorField HbyA("HbyA", U);
......
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