From 7eef5af786d1fd54165360e9c42c7894fce0442e Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 12 Sep 2012 15:36:39 +0100 Subject: [PATCH] sonicFoam: change internal energy equation formulation to conserve total energy --- .../solvers/compressible/sonicFoam/UEqn.H | 1 + .../compressible/sonicFoam/createFields.H | 3 + .../solvers/compressible/sonicFoam/eEqn.H | 2 +- .../solvers/compressible/sonicFoam/pEqn.H | 1 + .../compressible/sonicFoam/sonicFoam.C | 6 +- .../sonicFoam/laminar/forwardStep/0/U | 2 +- .../laminar/forwardStep/system/fvSchemes | 2 +- .../sonicFoam/laminar/shockTube/0/T | 1009 ++++++++++++++++- .../sonicFoam/laminar/shockTube/0/U | 3 +- .../sonicFoam/laminar/shockTube/0/magU | 2 + .../sonicFoam/laminar/shockTube/0/p | 1009 ++++++++++++++++- .../laminar/shockTube/system/fvSchemes | 2 +- .../ras/nacaAirfoil/system/fvSchemes | 16 +- .../ras/nacaAirfoil/system/fvSolution | 26 +- .../sonicFoam/ras/prism/system/fvSchemes | 16 +- .../sonicFoam/ras/prism/system/fvSolution | 18 +- 16 files changed, 2056 insertions(+), 62 deletions(-) diff --git a/applications/solvers/compressible/sonicFoam/UEqn.H b/applications/solvers/compressible/sonicFoam/UEqn.H index 27edbece47..c002490b48 100644 --- a/applications/solvers/compressible/sonicFoam/UEqn.H +++ b/applications/solvers/compressible/sonicFoam/UEqn.H @@ -6,3 +6,4 @@ fvVectorMatrix UEqn ); solve(UEqn == -fvc::grad(p)); +K = 0.5*magSqr(U); diff --git a/applications/solvers/compressible/sonicFoam/createFields.H b/applications/solvers/compressible/sonicFoam/createFields.H index 14ae0941d2..3c39d3e7aa 100644 --- a/applications/solvers/compressible/sonicFoam/createFields.H +++ b/applications/solvers/compressible/sonicFoam/createFields.H @@ -49,3 +49,6 @@ thermo ) ); + + Info<< "Creating field kinetic energy K\n" << endl; + volScalarField K("K", 0.5*magSqr(U)); diff --git a/applications/solvers/compressible/sonicFoam/eEqn.H b/applications/solvers/compressible/sonicFoam/eEqn.H index 6733f52885..cfd908ded8 100644 --- a/applications/solvers/compressible/sonicFoam/eEqn.H +++ b/applications/solvers/compressible/sonicFoam/eEqn.H @@ -5,7 +5,7 @@ + fvm::div(phi, e) - fvm::laplacian(turbulence->alphaEff(), e) == - - p*fvc::div(phi/fvc::interpolate(rho)) + - (fvc::ddt(rho, K) + fvc::div(phi, volScalarField("Ekp", K + p/rho))) ); thermo.correct(); diff --git a/applications/solvers/compressible/sonicFoam/pEqn.H b/applications/solvers/compressible/sonicFoam/pEqn.H index aeebee2df5..99ca26fce3 100644 --- a/applications/solvers/compressible/sonicFoam/pEqn.H +++ b/applications/solvers/compressible/sonicFoam/pEqn.H @@ -39,3 +39,4 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); +K = 0.5*magSqr(U); diff --git a/applications/solvers/compressible/sonicFoam/sonicFoam.C b/applications/solvers/compressible/sonicFoam/sonicFoam.C index 2697c3ea96..954404b6a4 100644 --- a/applications/solvers/compressible/sonicFoam/sonicFoam.C +++ b/applications/solvers/compressible/sonicFoam/sonicFoam.C @@ -56,16 +56,12 @@ int main(int argc, char *argv[]) #include "compressibleCourantNo.H" #include "rhoEqn.H" - #include "UEqn.H" - #include "eEqn.H" - - // --- PISO loop - for (int corr=0; corr +1000 +( +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +348.432 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +278.746 +) +; boundaryField { @@ -24,11 +1029,11 @@ boundaryField { type zeroGradient; } - empty { type empty; } } + // ************************************************************************* // diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/0/U b/tutorials/compressible/sonicFoam/laminar/shockTube/0/U index 7da5ec784d..f0e3a05af4 100644 --- a/tutorials/compressible/sonicFoam/laminar/shockTube/0/U +++ b/tutorials/compressible/sonicFoam/laminar/shockTube/0/U @@ -10,6 +10,7 @@ FoamFile version 2.0; format ascii; class volVectorField; + location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -24,11 +25,11 @@ boundaryField { type zeroGradient; } - empty { type empty; } } + // ************************************************************************* // diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/0/magU b/tutorials/compressible/sonicFoam/laminar/shockTube/0/magU index 9aa3823c4d..3b5988347e 100644 --- a/tutorials/compressible/sonicFoam/laminar/shockTube/0/magU +++ b/tutorials/compressible/sonicFoam/laminar/shockTube/0/magU @@ -10,6 +10,7 @@ FoamFile version 2.0; format ascii; class volScalarField; + location "0"; object magU; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -31,4 +32,5 @@ boundaryField } } + // ************************************************************************* // diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/0/p b/tutorials/compressible/sonicFoam/laminar/shockTube/0/p index d826cfa477..55ebab7370 100644 --- a/tutorials/compressible/sonicFoam/laminar/shockTube/0/p +++ b/tutorials/compressible/sonicFoam/laminar/shockTube/0/p @@ -10,13 +10,1018 @@ FoamFile version 2.0; format ascii; class volScalarField; + location "0"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; -internalField uniform 0; +internalField nonuniform List +1000 +( +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +100000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +10000 +) +; boundaryField { @@ -24,11 +1029,11 @@ boundaryField { type zeroGradient; } - empty { type empty; } } + // ************************************************************************* // diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSchemes b/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSchemes index 52cd939723..e4ef732976 100644 --- a/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSchemes +++ b/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSchemes @@ -33,7 +33,7 @@ divSchemes div(phi,U) Gauss upwind; div(phid,p) Gauss limitedLinear 1; div(phi,e) Gauss limitedLinear 1; - div(phi,K) Gauss limitedLinear 1; + div(phi,Ekp) Gauss limitedLinear 1; div((muEff*dev2(T(grad(U))))) Gauss linear 1; } diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSchemes b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSchemes index 4f1434c479..1103448ca8 100644 --- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSchemes +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSchemes @@ -29,25 +29,17 @@ divSchemes { default none; div(phi,U) Gauss limitedLinearV 1; + div(phi,e) Gauss limitedLinear 1; + div(phi,Ekp) Gauss limitedLinear 1; + div(phid,p) Gauss limitedLinear 1; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; - div(phi,R) Gauss upwind; - div(R) Gauss linear; - div(phid,p) Gauss limitedLinear 1; - div(phi,K) Gauss limitedLinear 1; - div(phi,e) Gauss limitedLinear 1; div((muEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear limited 0.5; - laplacian(DkEff,k) Gauss linear limited 0.5; - laplacian(DREff,R) Gauss linear limited 0.5; - laplacian(DepsilonEff,epsilon) Gauss linear limited 0.5; - laplacian(Dp,p) Gauss linear limited 0.5; - laplacian(alphaEff,e) Gauss linear limited 0.5; + default Gauss linear limited 0.5; } interpolationSchemes diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSolution b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSolution index 7c31faeadb..530a5bbd34 100644 --- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSolution +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSolution @@ -17,6 +17,11 @@ FoamFile solvers { + rho + { + solver diagonal; + } + p { solver PBiCG; @@ -25,26 +30,23 @@ solvers relTol 0; } - rho - { - solver PCG; - preconditioner DIC; - tolerance 1e-08; - relTol 0; - } - - "(U|e|k|epsilon|R)" + "(U|e)" { $p; - tolerance 1e-08; - relTol 0; + tolerance 1e-9; + } + + "(k|epsilon)" + { + $p; + tolerance 1e-10; } } PISO { nCorrectors 2; - nNonOrthogonalCorrectors 2; + nNonOrthogonalCorrectors 0; } diff --git a/tutorials/compressible/sonicFoam/ras/prism/system/fvSchemes b/tutorials/compressible/sonicFoam/ras/prism/system/fvSchemes index 6aa61d831a..9f2b7136ac 100644 --- a/tutorials/compressible/sonicFoam/ras/prism/system/fvSchemes +++ b/tutorials/compressible/sonicFoam/ras/prism/system/fvSchemes @@ -29,25 +29,17 @@ divSchemes { default none; div(phi,U) Gauss limitedLinearV 1; + div(phi,e) Gauss limitedLinear 1; + div(phi,Ekp) Gauss limitedLinear 1; + div(phid,p) Gauss limitedLinear 1; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; - div(phi,R) Gauss upwind; - div(R) Gauss linear; - div(phid,p) Gauss limitedLinear 1; - div(phi,K) Gauss limitedLinear 1; - div(phi,e) Gauss limitedLinear 1; div((muEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DREff,R) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(Dp,p) Gauss linear corrected; - laplacian(alphaEff,e) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/compressible/sonicFoam/ras/prism/system/fvSolution b/tutorials/compressible/sonicFoam/ras/prism/system/fvSolution index fc9fc84695..3f46bc0a25 100644 --- a/tutorials/compressible/sonicFoam/ras/prism/system/fvSolution +++ b/tutorials/compressible/sonicFoam/ras/prism/system/fvSolution @@ -17,6 +17,11 @@ FoamFile solvers { + rho + { + solver diagonal; + } + p { solver PBiCG; @@ -25,34 +30,23 @@ solvers relTol 0; } - rho - { - solver PCG; - preconditioner DIC; - tolerance 1e-05; - relTol 0; - } - "(U|e|R)" { $p; tolerance 1e-05; - relTol 0; } "(k|epsilon)" { $p; tolerance 1e-08; - relTol 0; } - } PISO { nCorrectors 2; - nNonOrthogonalCorrectors 2; + nNonOrthogonalCorrectors 0; }