Fixed dynamic refinement tutorials: direct topo change does not deal with face mapping correctly
This commit is contained in:
parent
8a4cca0d96
commit
cc22953ac4
2 changed files with 31 additions and 20 deletions
|
@ -38,7 +38,14 @@
|
|||
pcorrTypes
|
||||
);
|
||||
|
||||
dimensionedScalar rAUf("(1|A(U))", dimTime/rho.dimensions(), 1.0);
|
||||
dimensionedScalar rAUf
|
||||
(
|
||||
"(1|A(U))",
|
||||
dimTime/rho.dimensions(),
|
||||
runTime.deltaT().value()
|
||||
);
|
||||
|
||||
phi = (fvc::interpolate(U) & mesh.Sf());
|
||||
|
||||
adjustPhi(phi, U, pcorr);
|
||||
|
||||
|
@ -59,4 +66,8 @@
|
|||
}
|
||||
|
||||
# include "continuityErrs.H"
|
||||
# include "CourantNo.H"
|
||||
|
||||
// Recalculate rhoPhi from rho
|
||||
rhoPhi = fvc::interpolate(rho)*phi;
|
||||
}
|
||||
|
|
|
@ -45,17 +45,17 @@ Description
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "readPISOControls.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "createFields.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "correctPhi.H"
|
||||
#include "CourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createDynamicFvMesh.H"
|
||||
# include "readGravitationalAcceleration.H"
|
||||
# include "readPISOControls.H"
|
||||
# include "initContinuityErrs.H"
|
||||
# include "createFields.H"
|
||||
# include "readTimeControls.H"
|
||||
# include "correctPhi.H"
|
||||
# include "CourantNo.H"
|
||||
# include "setInitialDeltaT.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -63,13 +63,13 @@ int main(int argc, char *argv[])
|
|||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readControls.H"
|
||||
#include "CourantNo.H"
|
||||
# include "readControls.H"
|
||||
# include "CourantNo.H"
|
||||
|
||||
// Make the fluxes absolute
|
||||
fvc::makeAbsolute(phi, U);
|
||||
|
||||
#include "setDeltaT.H"
|
||||
# include "setDeltaT.H"
|
||||
|
||||
runTime++;
|
||||
|
||||
|
@ -92,7 +92,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
if (mesh.changing() && correctPhi)
|
||||
{
|
||||
#include "correctPhi.H"
|
||||
# include "correctPhi.H"
|
||||
}
|
||||
|
||||
// Make the fluxes relative to the mesh motion
|
||||
|
@ -100,19 +100,19 @@ int main(int argc, char *argv[])
|
|||
|
||||
if (mesh.changing() && checkMeshCourantNo)
|
||||
{
|
||||
#include "meshCourantNo.H"
|
||||
# include "meshCourantNo.H"
|
||||
}
|
||||
|
||||
twoPhaseProperties.correct();
|
||||
|
||||
#include "alphaEqnSubCycle.H"
|
||||
# include "alphaEqnSubCycle.H"
|
||||
|
||||
#include "UEqn.H"
|
||||
# include "UEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=0; corr<nCorr; corr++)
|
||||
{
|
||||
#include "pEqn.H"
|
||||
# include "pEqn.H"
|
||||
}
|
||||
|
||||
p = pd + rho*gh;
|
||||
|
|
Reference in a new issue