From 5874a05c7fb4802f8b5217cf87898387095b3c33 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Tue, 7 Apr 2015 14:59:39 +0100 Subject: [PATCH] pDivU updates --- .../solvers/compressible/sonicDyMFoam/eEqn.H | 3 +-- .../compressible/sonicDyMFoam/sonicDyMFoam.C | 16 +++++++++++++--- .../steadyCompressibleSRFFoam/readFieldBounds.H | 6 +++--- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/applications/solvers/compressible/sonicDyMFoam/eEqn.H b/applications/solvers/compressible/sonicDyMFoam/eEqn.H index a1d0940f8..55c92b497 100644 --- a/applications/solvers/compressible/sonicDyMFoam/eEqn.H +++ b/applications/solvers/compressible/sonicDyMFoam/eEqn.H @@ -5,8 +5,7 @@ + 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) + - fvm::SuSp(pDivU/e, e) // viscous heating? ); diff --git a/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C b/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C index 189cffddd..9d33c4448 100644 --- a/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C +++ b/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C @@ -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" diff --git a/applications/solvers/compressible/steadyCompressibleSRFFoam/readFieldBounds.H b/applications/solvers/compressible/steadyCompressibleSRFFoam/readFieldBounds.H index 9628254e3..74432672c 100644 --- a/applications/solvers/compressible/steadyCompressibleSRFFoam/readFieldBounds.H +++ b/applications/solvers/compressible/steadyCompressibleSRFFoam/readFieldBounds.H @@ -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);