mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
rhoPimpleDyMFoam: Update correctPhi for morphing meshes
This commit is contained in:
@ -40,8 +40,6 @@ if (pimple.transonic())
|
|||||||
fvOptions(psi, p, rho.name())
|
fvOptions(psi, p, rho.name())
|
||||||
);
|
);
|
||||||
|
|
||||||
fvOptions.constrain(pEqn);
|
|
||||||
|
|
||||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||||
|
|
||||||
if (pimple.finalNonOrthogonalIter())
|
if (pimple.finalNonOrthogonalIter())
|
||||||
@ -74,8 +72,6 @@ else
|
|||||||
fvOptions(psi, p, rho.name())
|
fvOptions(psi, p, rho.name())
|
||||||
);
|
);
|
||||||
|
|
||||||
fvOptions.constrain(pEqn);
|
|
||||||
|
|
||||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||||
|
|
||||||
if (pimple.finalNonOrthogonalIter())
|
if (pimple.finalNonOrthogonalIter())
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,6 +24,9 @@ License
|
|||||||
Application
|
Application
|
||||||
rhoPimpleFoam
|
rhoPimpleFoam
|
||||||
|
|
||||||
|
Group
|
||||||
|
grpCompressibleSolvers grpMovingMeshSolvers
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Transient solver for laminar or turbulent flow of compressible fluids
|
Transient solver for laminar or turbulent flow of compressible fluids
|
||||||
for HVAC and similar applications.
|
for HVAC and similar applications.
|
||||||
@ -71,17 +74,21 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
// Store divrhoU from the previous time-step/mesh for the correctPhi
|
||||||
|
volScalarField divrhoU
|
||||||
|
(
|
||||||
|
"divrhoU",
|
||||||
|
fvc::div(fvc::absolute(phi, rho, U))
|
||||||
|
);
|
||||||
|
|
||||||
|
runTime++;
|
||||||
|
|
||||||
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
// Store momentum to set rhoUf for introduced faces.
|
// Store momentum to set rhoUf for introduced faces.
|
||||||
volVectorField rhoU("rhoU", rho*U);
|
volVectorField rhoU("rhoU", rho*U);
|
||||||
|
|
||||||
// Store divrhoU from the previous time-step/mesh for the correctPhi
|
|
||||||
volScalarField divrhoU(fvc::div(fvc::absolute(phi, rho, U)));
|
|
||||||
|
|
||||||
// Do any mesh changes
|
// Do any mesh changes
|
||||||
mesh.update();
|
mesh.update();
|
||||||
|
|
||||||
@ -102,12 +109,9 @@ int main(int argc, char *argv[])
|
|||||||
#include "meshCourantNo.H"
|
#include "meshCourantNo.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pimple.nCorrPIMPLE() <= 1)
|
#include "rhoEqn.H"
|
||||||
{
|
Info<< "rhoEqn max/min : " << max(rho).value()
|
||||||
#include "rhoEqn.H"
|
<< " " << min(rho).value() << endl;
|
||||||
Info<< "rhoEqn max/min : " << max(rho).value()
|
|
||||||
<< " " << min(rho).value() << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// --- Pressure-velocity PIMPLE corrector loop
|
// --- Pressure-velocity PIMPLE corrector loop
|
||||||
while (pimple.loop())
|
while (pimple.loop())
|
||||||
|
|||||||
Reference in New Issue
Block a user