pDivU updates

This commit is contained in:
Hrvoje Jasak 2015-04-07 14:59:39 +01:00
parent 3e93373759
commit 5874a05c7f
3 changed files with 17 additions and 8 deletions

View file

@ -5,7 +5,6 @@
+ fvm::div(phi, e)
- fvm::laplacian(turbulence->alphaEff(), e)
==
// - p*fvc::div(phi/fvc::interpolate(rho) + fvc::meshPhi(rho, U))
- fvm::SuSp(pDivU/e, e)
// viscous heating?
);

View file

@ -25,9 +25,12 @@ Application
sonicDyMFoam
Description
Transient solver for trans-sonic/supersonic, laminar flow of a
Transient solver for trans-sonic/supersonic for laminar or flow of a
compressible gas with support for mesh motion and topological changes
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
pseudo-transient simulations.
Updated from sonicFoamAutoMotion by Hrvoje Jasak
Author
@ -64,7 +67,7 @@ int main(int argc, char *argv[])
# include "setDeltaT.H"
runTime++;
Info<< "deltaT = " << runTime.deltaT().value() << nl << endl;
Info<< "Time = " << runTime.timeName() << nl << endl;
bool meshChanged = mesh.update();
@ -102,7 +105,14 @@ int main(int argc, char *argv[])
{
// Under-relax pDivU term
pDivU.storePrevIter();
pDivU = p*fvc::div(phi/fvc::interpolate(rho));
pDivU =
p*fvc::div
(
phi/fvc::interpolate(rho)
+ fvc::meshPhi(rho, U)
);
pDivU.relax();
# include "rhoEqn.H"

View file

@ -14,7 +14,7 @@
fieldBounds.lookup("T") >> TMin.value() >> TMax.value();
// Velocity bound
dimensionedScalar UMax("UMax", dimVelocity, GREAT);
dimensionedScalar UrelMax("UrelMax", dimVelocity, GREAT);
fieldBounds.lookup(U.name()) >> UMax.value();
dimensionedScalar smallU("smallU", dimVelocity, 1e-10);
fieldBounds.lookup(Urel.name()) >> UrelMax.value();
dimensionedScalar smallUrel("smallUrel", dimVelocity, 1e-10);