From 3341f925108a759f58f06ce2fd865321af6dd6ca Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Wed, 6 Jun 2018 11:07:45 +0100 Subject: [PATCH] sonicFoam, sonicDyMFoam, sonicLiquidFoam: Functionality merged into rhoPimpleFoam The sonicFoam, sonicDyMFoam and sonicLiquidFoam functionality has been merged into the transonic option of the latest rhoPimpleFoam solver and the corresponding tutorials moved into the rhoPimpleFoam tutorials directory. To run rhoPimpleFoam in transonic mode set the transonic option in the PIMPLE sub-dictionary of fvSolution: PIMPLE { . . . transonic yes; } --- .../rhoPimpleFoam/rhoPimpleFoam.C | 2 +- .../solvers/compressible/sonicFoam/EEqn.H | 21 --- .../solvers/compressible/sonicFoam/Make/files | 3 - .../compressible/sonicFoam/Make/options | 19 --- .../solvers/compressible/sonicFoam/UEqn.H | 24 --- .../compressible/sonicFoam/createFieldRefs.H | 2 - .../compressible/sonicFoam/createFields.H | 57 ------- .../solvers/compressible/sonicFoam/pEqn.H | 44 ----- .../sonicFoam/sonicDyMFoam/Make/files | 3 - .../sonicFoam/sonicDyMFoam/Make/options | 28 ---- .../sonicFoam/sonicDyMFoam/pEqn.H | 51 ------ .../sonicFoam/sonicDyMFoam/sonicDyMFoam.C | 151 ------------------ .../compressible/sonicFoam/sonicFoam.C | 103 ------------ .../sonicFoam/sonicLiquidFoam/Make/files | 3 - .../sonicFoam/sonicLiquidFoam/Make/options | 7 - .../compressibleContinuityErrs.H | 12 -- .../sonicFoam/sonicLiquidFoam/createFields.H | 49 ------ .../readThermodynamicProperties.H | 37 ----- .../sonicLiquidFoam/readTransportProperties.H | 20 --- .../sonicLiquidFoam/sonicLiquidFoam.C | 132 --------------- bin/sonicDyMFoam | 1 + bin/sonicFoam | 52 ++++++ bin/sonicLiquidFoam | 1 + etc/config.sh/bash_completion | 75 --------- .../rhoCentralFoam/shockTube/Allrun | 1 + .../shockTube/system/blockMeshDict | 2 +- .../shockTube/system/controlDict | 4 + .../rhoCentralFoam/shockTube/system/fvSchemes | 6 +- .../rhoCentralFoam/shockTube/system/sample | 13 +- .../RAS/nacaAirfoil/0/T | 0 .../RAS/nacaAirfoil/0/U | 0 .../RAS/nacaAirfoil/0/alphat | 0 .../RAS/nacaAirfoil/0/epsilon | 0 .../RAS/nacaAirfoil/0/k | 0 .../RAS/nacaAirfoil/0/nut | 0 .../RAS/nacaAirfoil/0/p | 0 .../RAS/nacaAirfoil/Allclean | 0 .../RAS/nacaAirfoil/Allrun | 0 .../RAS/nacaAirfoil/Running_Notes | 0 .../constant/thermophysicalProperties | 0 .../nacaAirfoil/constant/turbulenceProperties | 0 .../nacaAirfoil/prostar/nacaAirfoil.bnd.gz | Bin .../nacaAirfoil/prostar/nacaAirfoil.cel.gz | Bin .../nacaAirfoil/prostar/nacaAirfoil.vrt.gz | Bin .../RAS/nacaAirfoil/system/controlDict | 2 +- .../RAS/nacaAirfoil/system/fvSchemes | 0 .../RAS/nacaAirfoil/system/fvSolution | 2 + .../RAS/prism/0/T | 0 .../RAS/prism/0/U | 0 .../RAS/prism/0/alphat | 0 .../RAS/prism/0/epsilon | 0 .../RAS/prism/0/k | 0 .../RAS/prism/0/nut | 0 .../RAS/prism/0/p | 0 .../prism/constant/thermophysicalProperties | 0 .../RAS/prism/constant/turbulenceProperties | 0 .../RAS/prism/system/blockMeshDict | 0 .../RAS/prism/system/controlDict | 2 +- .../RAS/prism/system/fvSchemes | 0 .../RAS/prism/system/fvSolution | 2 + .../laminar/decompressionTank}/Allclean | 0 .../laminar/decompressionTank}/Allrun | 0 .../decompressionTank/decompressionTank}/0/T | 26 +-- .../decompressionTank}/decompressionTank/0/U | 0 .../decompressionTank}/decompressionTank/0/p | 0 .../constant/thermophysicalProperties | 33 +++- .../constant/turbulenceProperties | 1 - .../decompressionTank/system/blockMeshDict | 0 .../decompressionTank/system/controlDict | 2 +- .../decompressionTank/system/fvSchemes | 6 + .../decompressionTank}/system/fvSolution | 2 + .../laminar/forwardStep/0/T | 0 .../laminar/forwardStep/0/U | 0 .../laminar/forwardStep/0/p | 0 .../constant/thermophysicalProperties | 0 .../constant/turbulenceProperties | 0 .../laminar/forwardStep/system/blockMeshDict | 0 .../laminar/forwardStep/system/controlDict | 2 +- .../laminar/forwardStep/system/fvSchemes | 0 .../laminar/forwardStep}/system/fvSolution | 4 +- .../laminar/shockTube/0/T.orig | 0 .../laminar/shockTube/0/U.orig | 0 .../laminar/shockTube/0/p.orig | 0 .../laminar/shockTube/Allrun | 0 .../constant/thermophysicalProperties | 0 .../shockTube}/constant/turbulenceProperties | 0 .../laminar/shockTube/system/blockMeshDict | 0 .../laminar/shockTube/system/controlDict | 2 +- .../laminar/shockTube/system/fvSchemes | 0 .../laminar/shockTube/system/fvSolution | 2 + .../laminar/shockTube/system/sample | 0 .../laminar/shockTube/system/setFieldsDict | 0 .../compressible/sonicDyMFoam/movingCone/0/U | 61 ------- .../compressible/sonicDyMFoam/movingCone/0/p | 60 ------- .../sonicDyMFoam/movingCone/0/pointMotionUx | 56 ------- .../movingCone/constant/dynamicMeshDict | 28 ---- .../movingCone/system/blockMeshDict | 142 ---------------- .../movingCone/system/controlDict | 52 ------ .../movingCone/system/cuttingPlane | 38 ----- .../sonicDyMFoam/movingCone/system/fvSchemes | 58 ------- .../sonicDyMFoam/movingCone/system/fvSolution | 94 ----------- .../constant/thermodynamicProperties | 25 --- .../constant/transportProperties | 21 --- 103 files changed, 125 insertions(+), 1521 deletions(-) delete mode 100644 applications/solvers/compressible/sonicFoam/EEqn.H delete mode 100644 applications/solvers/compressible/sonicFoam/Make/files delete mode 100644 applications/solvers/compressible/sonicFoam/Make/options delete mode 100644 applications/solvers/compressible/sonicFoam/UEqn.H delete mode 100644 applications/solvers/compressible/sonicFoam/createFieldRefs.H delete mode 100644 applications/solvers/compressible/sonicFoam/createFields.H delete mode 100644 applications/solvers/compressible/sonicFoam/pEqn.H delete mode 100644 applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/files delete mode 100644 applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/options delete mode 100644 applications/solvers/compressible/sonicFoam/sonicDyMFoam/pEqn.H delete mode 100644 applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C delete mode 100644 applications/solvers/compressible/sonicFoam/sonicFoam.C delete mode 100644 applications/solvers/compressible/sonicFoam/sonicLiquidFoam/Make/files delete mode 100644 applications/solvers/compressible/sonicFoam/sonicLiquidFoam/Make/options delete mode 100644 applications/solvers/compressible/sonicFoam/sonicLiquidFoam/compressibleContinuityErrs.H delete mode 100644 applications/solvers/compressible/sonicFoam/sonicLiquidFoam/createFields.H delete mode 100644 applications/solvers/compressible/sonicFoam/sonicLiquidFoam/readThermodynamicProperties.H delete mode 100644 applications/solvers/compressible/sonicFoam/sonicLiquidFoam/readTransportProperties.H delete mode 100644 applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C create mode 120000 bin/sonicDyMFoam create mode 100755 bin/sonicFoam create mode 120000 bin/sonicLiquidFoam rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/nacaAirfoil/0/T (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/nacaAirfoil/0/U (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/nacaAirfoil/0/alphat (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/nacaAirfoil/0/epsilon (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/nacaAirfoil/0/k (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/nacaAirfoil/0/nut (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/nacaAirfoil/0/p (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/nacaAirfoil/Allclean (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/nacaAirfoil/Allrun (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/nacaAirfoil/Running_Notes (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/nacaAirfoil/constant/thermophysicalProperties (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/nacaAirfoil/constant/turbulenceProperties (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/nacaAirfoil/prostar/nacaAirfoil.bnd.gz (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/nacaAirfoil/prostar/nacaAirfoil.cel.gz (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/nacaAirfoil/prostar/nacaAirfoil.vrt.gz (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/nacaAirfoil/system/controlDict (98%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/nacaAirfoil/system/fvSchemes (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/nacaAirfoil/system/fvSolution (97%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/prism/0/T (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/prism/0/U (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/prism/0/alphat (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/prism/0/epsilon (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/prism/0/k (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/prism/0/nut (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/prism/0/p (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/prism/constant/thermophysicalProperties (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/prism/constant/turbulenceProperties (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/prism/system/blockMeshDict (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/prism/system/controlDict (97%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/prism/system/fvSchemes (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/RAS/prism/system/fvSolution (97%) rename tutorials/compressible/{sonicLiquidFoam => rhoPimpleFoam/laminar/decompressionTank}/Allclean (100%) rename tutorials/compressible/{sonicLiquidFoam => rhoPimpleFoam/laminar/decompressionTank}/Allrun (100%) rename tutorials/compressible/{sonicDyMFoam/movingCone => rhoPimpleFoam/laminar/decompressionTank/decompressionTank}/0/T (74%) rename tutorials/compressible/{sonicLiquidFoam => rhoPimpleFoam/laminar/decompressionTank}/decompressionTank/0/U (100%) rename tutorials/compressible/{sonicLiquidFoam => rhoPimpleFoam/laminar/decompressionTank}/decompressionTank/0/p (100%) rename tutorials/compressible/{sonicDyMFoam/movingCone => rhoPimpleFoam/laminar/decompressionTank/decompressionTank}/constant/thermophysicalProperties (70%) rename tutorials/compressible/{sonicFoam/laminar/shockTube => rhoPimpleFoam/laminar/decompressionTank/decompressionTank}/constant/turbulenceProperties (99%) rename tutorials/compressible/{sonicLiquidFoam => rhoPimpleFoam/laminar/decompressionTank}/decompressionTank/system/blockMeshDict (100%) rename tutorials/compressible/{sonicLiquidFoam => rhoPimpleFoam/laminar/decompressionTank}/decompressionTank/system/controlDict (97%) rename tutorials/compressible/{sonicLiquidFoam => rhoPimpleFoam/laminar/decompressionTank}/decompressionTank/system/fvSchemes (87%) rename tutorials/compressible/{sonicFoam/laminar/forwardStep => rhoPimpleFoam/laminar/decompressionTank/decompressionTank}/system/fvSolution (97%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/laminar/forwardStep/0/T (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/laminar/forwardStep/0/U (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/laminar/forwardStep/0/p (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/laminar/forwardStep/constant/thermophysicalProperties (100%) rename tutorials/compressible/{sonicDyMFoam/movingCone => rhoPimpleFoam/laminar/forwardStep}/constant/turbulenceProperties (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/laminar/forwardStep/system/blockMeshDict (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/laminar/forwardStep/system/controlDict (97%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/laminar/forwardStep/system/fvSchemes (100%) rename tutorials/compressible/{sonicLiquidFoam/decompressionTank => rhoPimpleFoam/laminar/forwardStep}/system/fvSolution (96%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/laminar/shockTube/0/T.orig (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/laminar/shockTube/0/U.orig (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/laminar/shockTube/0/p.orig (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/laminar/shockTube/Allrun (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/laminar/shockTube/constant/thermophysicalProperties (100%) rename tutorials/compressible/{sonicFoam/laminar/forwardStep => rhoPimpleFoam/laminar/shockTube}/constant/turbulenceProperties (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/laminar/shockTube/system/blockMeshDict (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/laminar/shockTube/system/controlDict (97%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/laminar/shockTube/system/fvSchemes (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/laminar/shockTube/system/fvSolution (97%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/laminar/shockTube/system/sample (100%) rename tutorials/compressible/{sonicFoam => rhoPimpleFoam}/laminar/shockTube/system/setFieldsDict (100%) delete mode 100644 tutorials/compressible/sonicDyMFoam/movingCone/0/U delete mode 100644 tutorials/compressible/sonicDyMFoam/movingCone/0/p delete mode 100644 tutorials/compressible/sonicDyMFoam/movingCone/0/pointMotionUx delete mode 100644 tutorials/compressible/sonicDyMFoam/movingCone/constant/dynamicMeshDict delete mode 100644 tutorials/compressible/sonicDyMFoam/movingCone/system/blockMeshDict delete mode 100644 tutorials/compressible/sonicDyMFoam/movingCone/system/controlDict delete mode 100644 tutorials/compressible/sonicDyMFoam/movingCone/system/cuttingPlane delete mode 100644 tutorials/compressible/sonicDyMFoam/movingCone/system/fvSchemes delete mode 100644 tutorials/compressible/sonicDyMFoam/movingCone/system/fvSolution delete mode 100644 tutorials/compressible/sonicLiquidFoam/decompressionTank/constant/thermodynamicProperties delete mode 100644 tutorials/compressible/sonicLiquidFoam/decompressionTank/constant/transportProperties diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C index 48367ac507..36287119d3 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C @@ -141,7 +141,7 @@ int main(int argc, char *argv[]) } } - if (pimple.nCorrPimple() <= 1) + if (pimple.firstIter()) { #include "rhoEqn.H" } diff --git a/applications/solvers/compressible/sonicFoam/EEqn.H b/applications/solvers/compressible/sonicFoam/EEqn.H deleted file mode 100644 index 73ce837396..0000000000 --- a/applications/solvers/compressible/sonicFoam/EEqn.H +++ /dev/null @@ -1,21 +0,0 @@ -{ - fvScalarMatrix EEqn - ( - fvm::ddt(rho, e) + fvm::div(phi, e) - + fvc::ddt(rho, K) + fvc::div(phi, K) - + fvc::div(fvc::absolute(phi/fvc::interpolate(rho), U), p, "div(phiv,p)") - - fvm::laplacian(turbulence->alphaEff(), e) - == - fvOptions(rho, e) - ); - - EEqn.relax(); - - fvOptions.constrain(EEqn); - - EEqn.solve(); - - fvOptions.correct(e); - - thermo.correct(); -} diff --git a/applications/solvers/compressible/sonicFoam/Make/files b/applications/solvers/compressible/sonicFoam/Make/files deleted file mode 100644 index c78af6be60..0000000000 --- a/applications/solvers/compressible/sonicFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -sonicFoam.C - -EXE = $(FOAM_APPBIN)/sonicFoam diff --git a/applications/solvers/compressible/sonicFoam/Make/options b/applications/solvers/compressible/sonicFoam/Make/options deleted file mode 100644 index 35d223f265..0000000000 --- a/applications/solvers/compressible/sonicFoam/Make/options +++ /dev/null @@ -1,19 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/transportModels/compressible/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -EXE_LIBS = \ - -lcompressibleTransportModels \ - -lfluidThermophysicalModels \ - -lspecie \ - -lturbulenceModels \ - -lcompressibleTurbulenceModels \ - -lmeshTools \ - -lsampling \ - -lfvOptions \ - -lfiniteVolume diff --git a/applications/solvers/compressible/sonicFoam/UEqn.H b/applications/solvers/compressible/sonicFoam/UEqn.H deleted file mode 100644 index c726eb40db..0000000000 --- a/applications/solvers/compressible/sonicFoam/UEqn.H +++ /dev/null @@ -1,24 +0,0 @@ -// Solve the Momentum equation - -MRF.correctBoundaryVelocity(U); - -fvVectorMatrix UEqn -( - fvm::ddt(rho, U) + fvm::div(phi, U) - + MRF.DDt(rho, U) - + turbulence->divDevRhoReff(U) - == - fvOptions(rho, U) -); - -UEqn.relax(); - -fvOptions.constrain(UEqn); - -if (pimple.momentumPredictor()) -{ - solve(UEqn == -fvc::grad(p)); - - fvOptions.correct(U); - K = 0.5*magSqr(U); -} diff --git a/applications/solvers/compressible/sonicFoam/createFieldRefs.H b/applications/solvers/compressible/sonicFoam/createFieldRefs.H deleted file mode 100644 index a14057e9bc..0000000000 --- a/applications/solvers/compressible/sonicFoam/createFieldRefs.H +++ /dev/null @@ -1,2 +0,0 @@ -volScalarField& e = thermo.he(); -const volScalarField& psi = thermo.psi(); diff --git a/applications/solvers/compressible/sonicFoam/createFields.H b/applications/solvers/compressible/sonicFoam/createFields.H deleted file mode 100644 index 901fe98e15..0000000000 --- a/applications/solvers/compressible/sonicFoam/createFields.H +++ /dev/null @@ -1,57 +0,0 @@ -Info<< "Reading thermophysical properties\n" << endl; - -autoPtr pThermo -( - psiThermo::New(mesh) -); -psiThermo& thermo = pThermo(); -thermo.validate(args.executable(), "e"); - -volScalarField& p = thermo.p(); - -volScalarField rho -( - IOobject - ( - "rho", - runTime.timeName(), - mesh - ), - thermo.rho() -); - -Info<< "Reading field U\n" << endl; -volVectorField U -( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh -); - -#include "compressibleCreatePhi.H" - -mesh.setFluxRequired(p.name()); - -Info<< "Creating turbulence model\n" << endl; -autoPtr turbulence -( - compressible::turbulenceModel::New - ( - rho, - U, - phi, - thermo - ) -); - -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); - -#include "createMRF.H" -#include "createFvOptions.H" diff --git a/applications/solvers/compressible/sonicFoam/pEqn.H b/applications/solvers/compressible/sonicFoam/pEqn.H deleted file mode 100644 index 50a9ff240d..0000000000 --- a/applications/solvers/compressible/sonicFoam/pEqn.H +++ /dev/null @@ -1,44 +0,0 @@ -rho = thermo.rho(); - -volScalarField rAU(1.0/UEqn.A()); -surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); -volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); -surfaceScalarField phid -( - "phid", - fvc::interpolate(psi) - *( - fvc::flux(HbyA) - + MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)) - ) -); - -MRF.makeRelative(fvc::interpolate(psi), phid); - -// Non-orthogonal pressure corrector loop -while (pimple.correctNonOrthogonal()) -{ - fvScalarMatrix pEqn - ( - fvm::ddt(psi, p) - + fvm::div(phid, p) - - fvm::laplacian(rhorAUf, p) - == - fvOptions(psi, p, rho.name()) - ); - - pEqn.solve(); - - if (pimple.finalNonOrthogonalIter()) - { - phi = pEqn.flux(); - } -} - -#include "rhoEqn.H" -#include "compressibleContinuityErrs.H" - -U = HbyA - rAU*fvc::grad(p); -U.correctBoundaryConditions(); -fvOptions.correct(U); -K = 0.5*magSqr(U); diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/files b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/files deleted file mode 100644 index 08fa87a2cc..0000000000 --- a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -sonicDyMFoam.C - -EXE = $(FOAM_APPBIN)/sonicDyMFoam diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/options b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/options deleted file mode 100644 index fdca074204..0000000000 --- a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/options +++ /dev/null @@ -1,28 +0,0 @@ -EXE_INC = \ - -I.. \ - -I../../rhoPimpleFoam \ - -I$(LIB_SRC)/transportModels/compressible/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ - -I$(LIB_SRC)/finiteVolume/cfdTools \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -EXE_LIBS = \ - -lcompressibleTransportModels \ - -lfluidThermophysicalModels \ - -lspecie \ - -lturbulenceModels \ - -lcompressibleTurbulenceModels \ - -lfiniteVolume \ - -lmeshTools \ - -lsampling \ - -lfvOptions \ - -ldynamicFvMesh \ - -ltopoChangerFvMesh \ - -ldynamicMesh \ - -lmeshTools diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/pEqn.H b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/pEqn.H deleted file mode 100644 index 92e0bb3673..0000000000 --- a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/pEqn.H +++ /dev/null @@ -1,51 +0,0 @@ -rho = thermo.rho(); - -volScalarField rAU(1.0/UEqn.A()); -surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); -volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); -surfaceScalarField phid -( - "phid", - fvc::interpolate(psi) - *( - fvc::flux(HbyA) - + rhorAUf*fvc::ddtCorr(rho, U, rhoUf)/fvc::interpolate(rho) - ) -); - -fvc::makeRelative(phid, psi, U); -MRF.makeRelative(fvc::interpolate(psi), phid); - -// Non-orthogonal pressure corrector loop -while (pimple.correctNonOrthogonal()) -{ - fvScalarMatrix pEqn - ( - fvm::ddt(psi, p) - + fvm::div(phid, p) - - fvm::laplacian(rhorAUf, p) - == - fvOptions(psi, p, rho.name()) - ); - - pEqn.solve(); - - if (pimple.finalNonOrthogonalIter()) - { - phi = pEqn.flux(); - } -} - -#include "rhoEqn.H" -#include "compressibleContinuityErrs.H" - -U = HbyA - rAU*fvc::grad(p); -U.correctBoundaryConditions(); -fvOptions.correct(U); -K = 0.5*magSqr(U); - -{ - rhoUf = fvc::interpolate(rho*U); - surfaceVectorField n(mesh.Sf()/mesh.magSf()); - rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf)); -} diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C deleted file mode 100644 index 0a826053ba..0000000000 --- a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C +++ /dev/null @@ -1,151 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Application - sonicDyMFoam - -Group - grpCompressibleSolvers grpMovingMeshSolvers - -Description - Transient solver for trans-sonic/supersonic, turbulent flow of a - compressible gas, with optional mesh motion and mesh topology changes. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "dynamicFvMesh.H" -#include "psiThermo.H" -#include "turbulentFluidThermoModel.H" -#include "pimpleControl.H" -#include "CorrectPhi.H" -#include "fvOptions.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "postProcess.H" - - #include "setRootCase.H" - #include "createTime.H" - #include "createDynamicFvMesh.H" - #include "createDyMControls.H" - #include "createFields.H" - #include "createFieldRefs.H" - #include "createRhoUf.H" - #include "compressibleCourantNo.H" - #include "setInitialDeltaT.H" - #include "initContinuityErrs.H" - - turbulence->validate(); - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { - #include "readDyMControls.H" - - { - // Store divrhoU from the previous mesh so that it can be mapped - // and used in correctPhi to ensure the corrected phi has the - // same divergence - volScalarField divrhoU - ( - "divrhoU", - fvc::div(fvc::absolute(phi, rho, U)) - ); - - #include "compressibleCourantNo.H" - #include "setDeltaT.H" - - runTime++; - - Info<< "Time = " << runTime.timeName() << nl << endl; - - // Store momentum to set rhoUf for introduced faces. - volVectorField rhoU("rhoU", rho*U); - - // Do any mesh changes - mesh.update(); - - if (mesh.changing()) - { - MRF.update(); - - if (correctPhi) - { - // Calculate absolute flux from the mapped surface velocity - phi = mesh.Sf() & rhoUf; - - #include "correctPhi.H" - - // Make the fluxes relative to the mesh-motion - fvc::makeRelative(phi, rho, U); - } - } - - if (checkMeshCourantNo) - { - #include "meshCourantNo.H" - } - } - - #include "rhoEqn.H" - Info<< "rhoEqn max/min : " << max(rho).value() - << " " << min(rho).value() << endl; - - // --- Pressure-velocity PIMPLE corrector loop - while (pimple.loop()) - { - #include "UEqn.H" - #include "EEqn.H" - - // --- Pressure corrector loop - while (pimple.correct()) - { - #include "pEqn.H" - } - - if (pimple.turbCorr()) - { - turbulence->correct(); - } - } - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/solvers/compressible/sonicFoam/sonicFoam.C b/applications/solvers/compressible/sonicFoam/sonicFoam.C deleted file mode 100644 index cdd25e095c..0000000000 --- a/applications/solvers/compressible/sonicFoam/sonicFoam.C +++ /dev/null @@ -1,103 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Application - sonicFoam - -Group - grpCompressibleSolvers - -Description - Transient solver for trans-sonic/supersonic, turbulent flow of a - compressible gas. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "psiThermo.H" -#include "turbulentFluidThermoModel.H" -#include "pimpleControl.H" -#include "fvOptions.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "postProcess.H" - - #include "setRootCase.H" - #include "createTime.H" - #include "createMesh.H" - #include "createControl.H" - #include "createFields.H" - #include "createFieldRefs.H" - #include "initContinuityErrs.H" - - turbulence->validate(); - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.loop()) - { - Info<< "Time = " << runTime.timeName() << nl << endl; - - #include "compressibleCourantNo.H" - - #include "rhoEqn.H" - - // --- Pressure-velocity PIMPLE corrector loop - while (pimple.loop()) - { - #include "UEqn.H" - #include "EEqn.H" - - // --- Pressure corrector loop - while (pimple.correct()) - { - #include "pEqn.H" - } - - if (pimple.turbCorr()) - { - turbulence->correct(); - } - } - - rho = thermo.rho(); - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/Make/files b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/Make/files deleted file mode 100644 index 17d1d393f4..0000000000 --- a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -sonicLiquidFoam.C - -EXE = $(FOAM_APPBIN)/sonicLiquidFoam diff --git a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/Make/options b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/Make/options deleted file mode 100644 index d27c95d033..0000000000 --- a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/Make/options +++ /dev/null @@ -1,7 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude - -EXE_LIBS = \ - -lfiniteVolume \ - -lmeshTools diff --git a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/compressibleContinuityErrs.H b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/compressibleContinuityErrs.H deleted file mode 100644 index 9851dfb7a9..0000000000 --- a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/compressibleContinuityErrs.H +++ /dev/null @@ -1,12 +0,0 @@ -{ - scalar sumLocalContErr = - (sum(mag(rho - rho0 - psi*(p - p0)))/sum(rho)).value(); - - scalar globalContErr = (sum(rho - rho0 - psi*(p - p0))/sum(rho)).value(); - - cumulativeContErr += globalContErr; - - Info<< "time step continuity errors : sum local = " << sumLocalContErr - << ", global = " << globalContErr - << ", cumulative = " << cumulativeContErr << endl; -} diff --git a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/createFields.H b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/createFields.H deleted file mode 100644 index d94b173fee..0000000000 --- a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/createFields.H +++ /dev/null @@ -1,49 +0,0 @@ -#include "readThermodynamicProperties.H" -#include "readTransportProperties.H" - -Info<< "Reading field p\n" << endl; -volScalarField p -( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh -); - - -Info<< "Reading field U\n" << endl; -volVectorField U -( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh -); - -volScalarField rho -( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - rhoO + psi*p -); - - -#include "compressibleCreatePhi.H" - -mesh.setFluxRequired(p.name()); diff --git a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/readThermodynamicProperties.H b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/readThermodynamicProperties.H deleted file mode 100644 index 82ebe7ae30..0000000000 --- a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/readThermodynamicProperties.H +++ /dev/null @@ -1,37 +0,0 @@ - Info<< "Reading thermodynamicProperties\n" << endl; - - IOdictionary thermodynamicProperties - ( - IOobject - ( - "thermodynamicProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) - ); - - dimensionedScalar rho0 - ( - "rho0", - dimDensity, - thermodynamicProperties - ); - - dimensionedScalar p0 - ( - "p0", - dimPressure, - thermodynamicProperties - ); - - dimensionedScalar psi - ( - "psi", - dimCompressibility, - thermodynamicProperties - ); - - // Density offset, i.e. the constant part of the density - dimensionedScalar rhoO("rhoO", rho0 - psi*p0); diff --git a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/readTransportProperties.H b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/readTransportProperties.H deleted file mode 100644 index 379e211982..0000000000 --- a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/readTransportProperties.H +++ /dev/null @@ -1,20 +0,0 @@ -Info<< "Reading transportProperties\n" << endl; - -IOdictionary transportProperties -( - IOobject - ( - "transportProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) -); - -dimensionedScalar mu -( - "mu", - dimDynamicViscosity, - transportProperties -); diff --git a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C deleted file mode 100644 index 3622d2dd70..0000000000 --- a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C +++ /dev/null @@ -1,132 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Application - sonicLiquidFoam - -Description - Transient solver for trans-sonic/supersonic, laminar flow of a - compressible liquid. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "pimpleControl.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "postProcess.H" - - #include "setRootCase.H" - #include "createTime.H" - #include "createMesh.H" - #include "createControl.H" - #include "createFields.H" - #include "initContinuityErrs.H" - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.loop()) - { - Info<< "Time = " << runTime.timeName() << nl << endl; - - #include "compressibleCourantNo.H" - - solve(fvm::ddt(rho) + fvc::div(phi)); - - // --- Pressure-velocity PIMPLE corrector loop - while (pimple.loop()) - { - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) - + fvm::div(phi, U) - - fvm::laplacian(mu, U) - ); - - solve(UEqn == -fvc::grad(p)); - - // --- Pressure corrector loop - while (pimple.correct()) - { - volScalarField rAU("rAU", 1.0/UEqn.A()); - surfaceScalarField rhorAUf - ( - "rhorAUf", - fvc::interpolate(rho*rAU) - ); - - U = rAU*UEqn.H(); - - surfaceScalarField phid - ( - "phid", - psi - *( - fvc::flux(U) - + rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho) - ) - ); - - phi = (rhoO/psi)*phid; - - fvScalarMatrix pEqn - ( - fvm::ddt(psi, p) - + fvc::div(phi) - + fvm::div(phid, p) - - fvm::laplacian(rhorAUf, p) - ); - - pEqn.solve(); - - phi += pEqn.flux(); - - solve(fvm::ddt(rho) + fvc::div(phi)); - #include "compressibleContinuityErrs.H" - - U -= rAU*fvc::grad(p); - U.correctBoundaryConditions(); - } - } - - rho = rhoO + psi*p; - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/bin/sonicDyMFoam b/bin/sonicDyMFoam new file mode 120000 index 0000000000..f9a4ea5582 --- /dev/null +++ b/bin/sonicDyMFoam @@ -0,0 +1 @@ +sonicFoam \ No newline at end of file diff --git a/bin/sonicFoam b/bin/sonicFoam new file mode 100755 index 0000000000..118213b761 --- /dev/null +++ b/bin/sonicFoam @@ -0,0 +1,52 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation +# \\/ M anipulation | +#------------------------------------------------------------------------------- +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# Script +# supersededByPostProcess +# +# Description +# Script to suggest using the new "postProcess" utility. +# +#------------------------------------------------------------------------------ +sonicFoam=${0##*/} + +cat <