compressibleInterFoam: Corrected handling for rAU for restart of moving-mesh cases

This commit is contained in:
Henry Weller
2021-02-26 22:23:48 +00:00
parent d54645f2cd
commit 0e1db2f3c6
5 changed files with 31 additions and 14 deletions

View File

@ -123,14 +123,7 @@ int main(int argc, char *argv[])
if (correctPhi)
{
// Calculate absolute flux
// from the mapped surface velocity
phi = mesh.Sf() & Uf();
#include "correctPhi.H"
// Make the fluxes relative to the mesh motion
fvc::makeRelative(phi, U);
}
mixture.correct();

View File

@ -1,3 +1,7 @@
// Calculate absolute flux
// from the mapped surface velocity
phi = mesh.Sf() & Uf();
CorrectPhi
(
U,
@ -10,3 +14,6 @@ CorrectPhi
);
#include "continuityErrs.H"
// Make the fluxes relative to the mesh motion
fvc::makeRelative(phi, U);

View File

@ -11,3 +11,20 @@ const volScalarField& psi1 = mixture.thermo1().psi();
const volScalarField& psi2 = mixture.thermo2().psi();
tmp<volScalarField> rAU;
if (correctPhi)
{
rAU = new volScalarField
(
IOobject
(
"rAU",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(dimTime/dimDensity, 1)
);
}

View File

@ -1,3 +1,7 @@
// Calculate absolute flux
// from the mapped surface velocity
phi = mesh.Sf() & Uf();
if (divU.valid())
{
CorrectPhi
@ -26,3 +30,6 @@ else
}
#include "continuityErrs.H"
// Make the flux relative to the mesh motion
fvc::makeRelative(phi, U);

View File

@ -135,14 +135,7 @@ int main(int argc, char *argv[])
if (correctPhi)
{
// Calculate absolute flux
// from the mapped surface velocity
phi = mesh.Sf() & Uf();
#include "correctPhi.H"
// Make the flux relative to the mesh motion
fvc::makeRelative(phi, U);
}
mixture.correct();