diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/Make/options b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/Make/options index b403a0268e..45c9d929fa 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/Make/options +++ b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/Make/options @@ -1,9 +1,6 @@ EXE_INC = \ -I. \ -I$(FOAM_SOLVERS)/combustion/reactingFoam \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ @@ -12,20 +9,26 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \ - -I$(LIB_SRC)/combustionModels/lnInclude - + -I$(LIB_SRC)/combustionModels/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/finiteVolume/cfdTools \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/dynamicFvMesh/lnInclude EXE_LIBS = \ - -lfiniteVolume \ - -lfvOptions \ - -lmeshTools \ - -lsampling \ - -lturbulenceModels \ - -lcompressibleTurbulenceModels \ - -lreactionThermophysicalModels \ - -lspecie \ -lcompressibleTransportModels \ -lfluidThermophysicalModels \ + -lspecie \ -lchemistryModel \ -lODE \ - -lcombustionModels + -lcombustionModels \ + -lreactionThermophysicalModels \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ + -lfiniteVolume \ + -ldynamicFvMesh \ + -ltopoChangerFvMesh \ + -lmeshTools \ + -lsampling \ + -lfvOptions diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/rhoReactingFoam.C b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/rhoReactingFoam.C index 738d109846..3e67f88fe7 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/rhoReactingFoam.C +++ b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/rhoReactingFoam.C @@ -31,12 +31,14 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "dynamicFvMesh.H" #include "rhoReactionThermo.H" #include "CombustionModel.H" #include "turbulentFluidThermoModel.H" #include "multivariateScheme.H" #include "pimpleControl.H" #include "pressureControl.H" +#include "CorrectPhi.H" #include "fvOptions.H" #include "localEulerDdtScheme.H" #include "fvcSmooth.H" @@ -49,13 +51,12 @@ int main(int argc, char *argv[]) #include "setRootCaseLists.H" #include "createTime.H" - #include "createMesh.H" - #include "createControl.H" + #include "createDynamicFvMesh.H" + #include "createDyMControls.H" #include "initContinuityErrs.H" #include "createFields.H" #include "createFieldRefs.H" #include "createRhoUfIfPresent.H" - #include "createTimeControls.H" turbulence->validate(); @@ -71,7 +72,20 @@ int main(int argc, char *argv[]) while (runTime.run()) { - #include "readTimeControls.H" + #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 + autoPtr divrhoU; + if (correctPhi) + { + divrhoU = new volScalarField + ( + "divrhoU", + fvc::div(fvc::absolute(phi, rho, U)) + ); + } if (LTS) { @@ -87,11 +101,49 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; - #include "rhoEqn.H" - // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { + if (pimple.firstIter() || moveMeshOuterCorrectors) + { + // Store momentum to set rhoUf for introduced faces. + autoPtr rhoU; + if (rhoUf.valid()) + { + rhoU = new volVectorField("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 "../../../compressible/rhoPimpleFoam/correctPhi.H" + + // Make the fluxes relative to the mesh-motion + fvc::makeRelative(phi, rho, U); + } + + if (checkMeshCourantNo) + { + #include "meshCourantNo.H" + } + } + } + + if (pimple.firstIter() && !pimple.simpleRho()) + { + #include "rhoEqn.H" + } + #include "UEqn.H" #include "YEqn.H" #include "EEqn.H" diff --git a/applications/solvers/compressible/rhoCentralFoam/Allwclean b/applications/solvers/compressible/rhoCentralFoam/Allwclean index 787221b83c..abc2014e90 100755 --- a/applications/solvers/compressible/rhoCentralFoam/Allwclean +++ b/applications/solvers/compressible/rhoCentralFoam/Allwclean @@ -3,6 +3,5 @@ cd ${0%/*} || exit 1 # Run from this directory wclean libso BCs wclean -wclean rhoCentralDyMFoam #------------------------------------------------------------------------------ diff --git a/applications/solvers/compressible/rhoCentralFoam/Allwmake b/applications/solvers/compressible/rhoCentralFoam/Allwmake index 5dee7d1a88..e6ead0f47d 100755 --- a/applications/solvers/compressible/rhoCentralFoam/Allwmake +++ b/applications/solvers/compressible/rhoCentralFoam/Allwmake @@ -4,6 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Parse arguments for library compilation . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -(wmake $targetType BCs && wmake $targetType && wmake $targetType rhoCentralDyMFoam) +(wmake $targetType BCs && wmake $targetType) #------------------------------------------------------------------------------ diff --git a/applications/solvers/compressible/rhoCentralFoam/Make/options b/applications/solvers/compressible/rhoCentralFoam/Make/options index 24fc2d966e..3b71f3ea95 100644 --- a/applications/solvers/compressible/rhoCentralFoam/Make/options +++ b/applications/solvers/compressible/rhoCentralFoam/Make/options @@ -6,7 +6,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude \ + -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ @@ -18,4 +18,6 @@ EXE_LIBS = \ -lrhoCentralFoam \ -lturbulenceModels \ -lcompressibleTurbulenceModels \ + -ldynamicFvMesh \ + -ltopoChangerFvMesh \ -lmeshTools diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/Make/files b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/Make/files deleted file mode 100644 index f78400aa8d..0000000000 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -rhoCentralDyMFoam.C - -EXE = $(FOAM_APPBIN)/rhoCentralDyMFoam diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/Make/options b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/Make/options deleted file mode 100644 index 29b8a6faa4..0000000000 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/Make/options +++ /dev/null @@ -1,26 +0,0 @@ -EXE_INC = \ - -I.. \ - -I../BCs/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/transportModels/compressible/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude \ - -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude - -EXE_LIBS = \ - -lfiniteVolume \ - -lfvOptions \ - -lcompressibleTransportModels \ - -lfluidThermophysicalModels \ - -lspecie \ - -lrhoCentralFoam \ - -lturbulenceModels \ - -lcompressibleTurbulenceModels \ - -ldynamicMesh \ - -ldynamicFvMesh \ - -ltopoChangerFvMesh \ - -lmeshTools diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C deleted file mode 100644 index 5088958b69..0000000000 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C +++ /dev/null @@ -1,269 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-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 . - -Application - rhoCentralDyMFoam - -Description - Density-based compressible flow solver based on central-upwind schemes of - Kurganov and Tadmor with support for mesh-motion and topology changes. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "dynamicFvMesh.H" -#include "psiThermo.H" -#include "turbulentFluidThermoModel.H" -#include "fixedRhoFvPatchScalarField.H" -#include "directionInterpolate.H" -#include "localEulerDdtScheme.H" -#include "fvcSmooth.H" -#include "motionSolver.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #define NO_CONTROL - #include "postProcess.H" - - #include "setRootCaseLists.H" - #include "createTime.H" - #include "createDynamicFvMesh.H" - #include "createFields.H" - #include "createFieldRefs.H" - #include "createTimeControls.H" - - turbulence->validate(); - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - #include "readFluxScheme.H" - - dimensionedScalar v_zero("v_zero", dimVolume/dimTime, 0.0); - - // Courant numbers used to adjust the time-step - scalar CoNum = 0.0; - scalar meanCoNum = 0.0; - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { - #include "readTimeControls.H" - #include "setDeltaT.H" - - runTime++; - - Info<< "Time = " << runTime.timeName() << nl << endl; - - // Do any mesh changes - mesh.update(); - - // --- Directed interpolation of primitive fields onto faces - - surfaceScalarField rho_pos(interpolate(rho, pos)); - surfaceScalarField rho_neg(interpolate(rho, neg)); - - surfaceVectorField rhoU_pos(interpolate(rhoU, pos, U.name())); - surfaceVectorField rhoU_neg(interpolate(rhoU, neg, U.name())); - - volScalarField rPsi("rPsi", 1.0/psi); - surfaceScalarField rPsi_pos(interpolate(rPsi, pos, T.name())); - surfaceScalarField rPsi_neg(interpolate(rPsi, neg, T.name())); - - surfaceScalarField e_pos(interpolate(e, pos, T.name())); - surfaceScalarField e_neg(interpolate(e, neg, T.name())); - - surfaceVectorField U_pos("U_pos", rhoU_pos/rho_pos); - surfaceVectorField U_neg("U_neg", rhoU_neg/rho_neg); - - surfaceScalarField p_pos("p_pos", rho_pos*rPsi_pos); - surfaceScalarField p_neg("p_neg", rho_neg*rPsi_neg); - - surfaceScalarField phiv_pos("phiv_pos", U_pos & mesh.Sf()); - surfaceScalarField phiv_neg("phiv_neg", U_neg & mesh.Sf()); - - // Make fluxes relative to mesh-motion - if (mesh.moving()) - { - phiv_pos -= mesh.phi(); - phiv_neg -= mesh.phi(); - } - - volScalarField c("c", sqrt(thermo.Cp()/thermo.Cv()*rPsi)); - surfaceScalarField cSf_pos - ( - "cSf_pos", - interpolate(c, pos, T.name())*mesh.magSf() - ); - surfaceScalarField cSf_neg - ( - "cSf_neg", - interpolate(c, neg, T.name())*mesh.magSf() - ); - - surfaceScalarField ap - ( - "ap", - max(max(phiv_pos + cSf_pos, phiv_neg + cSf_neg), v_zero) - ); - surfaceScalarField am - ( - "am", - min(min(phiv_pos - cSf_pos, phiv_neg - cSf_neg), v_zero) - ); - - surfaceScalarField a_pos("a_pos", ap/(ap - am)); - - surfaceScalarField amaxSf("amaxSf", max(mag(am), mag(ap))); - - surfaceScalarField aSf("aSf", am*a_pos); - - if (fluxScheme == "Tadmor") - { - aSf = -0.5*amaxSf; - a_pos = 0.5; - } - - surfaceScalarField a_neg("a_neg", 1.0 - a_pos); - - phiv_pos *= a_pos; - phiv_neg *= a_neg; - - surfaceScalarField aphiv_pos("aphiv_pos", phiv_pos - aSf); - surfaceScalarField aphiv_neg("aphiv_neg", phiv_neg + aSf); - - // Reuse amaxSf for the maximum positive and negative fluxes - // estimated by the central scheme - amaxSf = max(mag(aphiv_pos), mag(aphiv_neg)); - - #include "centralCourantNo.H" - - phi = aphiv_pos*rho_pos + aphiv_neg*rho_neg; - - surfaceVectorField phiUp - ( - (aphiv_pos*rhoU_pos + aphiv_neg*rhoU_neg) - + (a_pos*p_pos + a_neg*p_neg)*mesh.Sf() - ); - - surfaceScalarField phiEp - ( - "phiEp", - aphiv_pos*(rho_pos*(e_pos + 0.5*magSqr(U_pos)) + p_pos) - + aphiv_neg*(rho_neg*(e_neg + 0.5*magSqr(U_neg)) + p_neg) - + aSf*p_pos - aSf*p_neg - ); - - // Make flux for pressure-work absolute - if (mesh.moving()) - { - phiEp += mesh.phi()*(a_pos*p_pos + a_neg*p_neg); - } - - volScalarField muEff("muEff", turbulence->muEff()); - volTensorField tauMC("tauMC", muEff*dev2(Foam::T(fvc::grad(U)))); - - // --- Solve density - solve(fvm::ddt(rho) + fvc::div(phi)); - - // --- Solve momentum - solve(fvm::ddt(rhoU) + fvc::div(phiUp)); - - U.ref() = - rhoU() - /rho(); - U.correctBoundaryConditions(); - rhoU.boundaryFieldRef() == rho.boundaryField()*U.boundaryField(); - - if (!inviscid) - { - solve - ( - fvm::ddt(rho, U) - fvc::ddt(rho, U) - - fvm::laplacian(muEff, U) - - fvc::div(tauMC) - ); - rhoU = rho*U; - } - - // --- Solve energy - surfaceScalarField sigmaDotU - ( - "sigmaDotU", - ( - fvc::interpolate(muEff)*mesh.magSf()*fvc::snGrad(U) - + fvc::dotInterpolate(mesh.Sf(), tauMC) - ) - & (a_pos*U_pos + a_neg*U_neg) - ); - - solve - ( - fvm::ddt(rhoE) - + fvc::div(phiEp) - - fvc::div(sigmaDotU) - ); - - e = rhoE/rho - 0.5*magSqr(U); - e.correctBoundaryConditions(); - thermo.correct(); - rhoE.boundaryFieldRef() == - rho.boundaryField()* - ( - e.boundaryField() + 0.5*magSqr(U.boundaryField()) - ); - - if (!inviscid) - { - solve - ( - fvm::ddt(rho, e) - fvc::ddt(rho, e) - - fvm::laplacian(turbulence->alphaEff(), e) - ); - thermo.correct(); - rhoE = rho*(e + 0.5*magSqr(U)); - } - - p.ref() = - rho() - /psi(); - p.correctBoundaryConditions(); - rho.boundaryFieldRef() == psi.boundaryField()*p.boundaryField(); - - 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/rhoCentralFoam/rhoCentralFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C index fa46e993d0..f74fa9f1a0 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C @@ -26,11 +26,12 @@ Application Description Density-based compressible flow solver based on central-upwind schemes of - Kurganov and Tadmor. + Kurganov and Tadmor with support for mesh-motion and topology changes. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "dynamicFvMesh.H" #include "psiThermo.H" #include "turbulentFluidThermoModel.H" #include "fixedRhoFvPatchScalarField.H" @@ -47,7 +48,7 @@ int main(int argc, char *argv[]) #include "setRootCaseLists.H" #include "createTime.H" - #include "createMesh.H" + #include "createDynamicFvMesh.H" #include "createFields.H" #include "createFieldRefs.H" #include "createTimeControls.H" @@ -68,6 +69,17 @@ int main(int argc, char *argv[]) while (runTime.run()) { + #include "readTimeControls.H" + + if (!LTS) + { + #include "setDeltaT.H" + runTime++; + + // Do any mesh changes + mesh.update(); + } + // --- Directed interpolation of primitive fields onto faces surfaceScalarField rho_pos(interpolate(rho, pos)); @@ -92,6 +104,13 @@ int main(int argc, char *argv[]) surfaceScalarField phiv_pos("phiv_pos", U_pos & mesh.Sf()); surfaceScalarField phiv_neg("phiv_neg", U_neg & mesh.Sf()); + // Make fluxes relative to mesh-motion + if (mesh.moving()) + { + phiv_pos -= mesh.phi(); + phiv_neg -= mesh.phi(); + } + volScalarField c("c", sqrt(thermo.Cp()/thermo.Cv()*rPsi)); surfaceScalarField cSf_pos ( @@ -140,18 +159,12 @@ int main(int argc, char *argv[]) amaxSf = max(mag(aphiv_pos), mag(aphiv_neg)); #include "centralCourantNo.H" - #include "readTimeControls.H" if (LTS) { #include "setRDeltaT.H" + runTime++; } - else - { - #include "setDeltaT.H" - } - - runTime++; Info<< "Time = " << runTime.timeName() << nl << endl; @@ -171,6 +184,12 @@ int main(int argc, char *argv[]) + aSf*p_pos - aSf*p_neg ); + // Make flux for pressure-work absolute + if (mesh.moving()) + { + phiEp += mesh.phi()*(a_pos*p_pos + a_neg*p_neg); + } + volScalarField muEff("muEff", turbulence->muEff()); volTensorField tauMC("tauMC", muEff*dev2(Foam::T(fvc::grad(U)))); diff --git a/applications/solvers/compressible/rhoPimpleFoam/Make/options b/applications/solvers/compressible/rhoPimpleFoam/Make/options index c3f820e3be..94658ff20f 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoPimpleFoam/Make/options @@ -7,8 +7,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude + -I$(LIB_SRC)/dynamicFvMesh/lnInclude EXE_LIBS = \ -lcompressibleTransportModels \ @@ -17,9 +16,8 @@ EXE_LIBS = \ -lturbulenceModels \ -lcompressibleTurbulenceModels \ -lfiniteVolume \ - -lmeshTools \ - -lsampling \ - -lfvOptions \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ - -ldynamicMesh + -lmeshTools \ + -lsampling \ + -lfvOptions diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C index 3b9df2dd7c..fd0c922baa 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C @@ -37,7 +37,6 @@ Description #include "dynamicFvMesh.H" #include "fluidThermo.H" #include "turbulentFluidThermoModel.H" -#include "bound.H" #include "pimpleControl.H" #include "pressureControl.H" #include "CorrectPhi.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 f6fd70e2ad..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 | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-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 . - -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 "setRootCaseLists.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 25b4adb349..0000000000 --- a/applications/solvers/compressible/sonicFoam/sonicFoam.C +++ /dev/null @@ -1,103 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-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 . - -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 "setRootCaseLists.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 e4a37b1576..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 | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-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 . - -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 "setRootCaseLists.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/applications/solvers/incompressible/shallowWaterFoam/createFields.H b/applications/solvers/incompressible/shallowWaterFoam/createFields.H index 2e987664ec..e81dc5ee0a 100644 --- a/applications/solvers/incompressible/shallowWaterFoam/createFields.H +++ b/applications/solvers/incompressible/shallowWaterFoam/createFields.H @@ -15,7 +15,7 @@ volScalarField h ); Info<< "Reading field h0 if present\n" << endl; -volScalarField h0 +const volScalarField h0 ( IOobject ( diff --git a/applications/solvers/lagrangian/DPMFoam/Allwclean b/applications/solvers/lagrangian/DPMFoam/Allwclean index b78c67f661..3c1cb65d84 100755 --- a/applications/solvers/lagrangian/DPMFoam/Allwclean +++ b/applications/solvers/lagrangian/DPMFoam/Allwclean @@ -5,7 +5,5 @@ wclean libso DPMTurbulenceModels wclean wclean MPPICFoam -wclean DPMDyMFoam -wclean DPMDyMFoam/MPPICDyMFoam #------------------------------------------------------------------------------ diff --git a/applications/solvers/lagrangian/DPMFoam/Allwmake b/applications/solvers/lagrangian/DPMFoam/Allwmake index e3c5370297..c43d3b37b7 100755 --- a/applications/solvers/lagrangian/DPMFoam/Allwmake +++ b/applications/solvers/lagrangian/DPMFoam/Allwmake @@ -8,7 +8,5 @@ wmake $targetType DPMTurbulenceModels wmake $targetType wmake $targetType MPPICFoam -wmake $targetType DPMDyMFoam -wmake $targetType DPMDyMFoam/MPPICDyMFoam #------------------------------------------------------------------------------ diff --git a/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/DPMDyMFoam.C b/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/DPMDyMFoam.C deleted file mode 100644 index efc58a564e..0000000000 --- a/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/DPMDyMFoam.C +++ /dev/null @@ -1,166 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-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 . - -Application - DPMDyMFoam - -Description - Transient solver for the coupled transport of a single kinematic particle - cloud including the effect of the volume fraction of particles on the - continuous phase, with optional mesh motion and mesh topology changes. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "dynamicFvMesh.H" -#include "singlePhaseTransportModel.H" -#include "PhaseIncompressibleTurbulenceModel.H" -#include "pimpleControl.H" -#include "CorrectPhi.H" - -#ifdef MPPIC - #include "basicKinematicMPPICCloud.H" - #define basicKinematicTypeCloud basicKinematicMPPICCloud -#else - #include "basicKinematicCollidingCloud.H" - #define basicKinematicTypeCloud basicKinematicCollidingCloud -#endif - -int main(int argc, char *argv[]) -{ - argList::addOption - ( - "cloudName", - "name", - "specify alternative cloud name. default is 'kinematicCloud'" - ); - - #include "postProcess.H" - - #include "setRootCaseLists.H" - #include "createTime.H" - #include "createDynamicFvMesh.H" - #include "createDyMControls.H" - #include "createFields.H" - #include "createUcf.H" - #include "initContinuityErrs.H" - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { - #include "readDyMControls.H" - #include "CourantNo.H" - #include "setDeltaT.H" - - runTime++; - - Info<< "Time = " << runTime.timeName() << nl << endl; - - // Store the particle positions - kinematicCloud.storeGlobalPositions(); - - mesh.update(); - - // Calculate absolute flux from the mapped surface velocity - phic = mesh.Sf() & Ucf; - - if (mesh.changing() && correctPhi) - { - #include "correctPhic.H" - } - - // Make the flux relative to the mesh motion - fvc::makeRelative(phic, Uc); - - if (mesh.changing() && checkMeshCourantNo) - { - #include "meshCourantNo.H" - } - - continuousPhaseTransport.correct(); - muc = rhoc*continuousPhaseTransport.nu(); - - Info<< "Evolving " << kinematicCloud.name() << endl; - kinematicCloud.evolve(); - - // Update continuous phase volume fraction field - alphac = max(1.0 - kinematicCloud.theta(), alphacMin); - alphac.correctBoundaryConditions(); - alphacf = fvc::interpolate(alphac); - alphaPhic = alphacf*phic; - - fvVectorMatrix cloudSU(kinematicCloud.SU(Uc)); - volVectorField cloudVolSUSu - ( - IOobject - ( - "cloudVolSUSu", - runTime.timeName(), - mesh - ), - mesh, - dimensionedVector - ( - "0", - cloudSU.dimensions()/dimVolume, - Zero - ), - zeroGradientFvPatchVectorField::typeName - ); - - cloudVolSUSu.primitiveFieldRef() = -cloudSU.source()/mesh.V(); - cloudVolSUSu.correctBoundaryConditions(); - cloudSU.source() = Zero; - - // --- Pressure-velocity PIMPLE corrector loop - while (pimple.loop()) - { - #include "UcEqn.H" - - // --- PISO loop - while (pimple.correct()) - { - #include "pEqn.H" - } - - if (pimple.turbCorr()) - { - continuousPhaseTurbulence->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/lagrangian/DPMFoam/DPMDyMFoam/MPPICDyMFoam/Make/files b/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/MPPICDyMFoam/Make/files deleted file mode 100644 index d25393d1ff..0000000000 --- a/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/MPPICDyMFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -MPPICDyMFoam.C - -EXE = $(FOAM_APPBIN)/MPPICDyMFoam diff --git a/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/MPPICDyMFoam/Make/options b/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/MPPICDyMFoam/Make/options deleted file mode 100644 index 741b07f6cf..0000000000 --- a/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/MPPICDyMFoam/Make/options +++ /dev/null @@ -1,42 +0,0 @@ -EXE_INC = \ - -I.. \ - -I../.. \ - -I../../DPMTurbulenceModels/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/lagrangian/basic/lnInclude \ - -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/transportModels/compressible/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ - -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \ - -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ - -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ - -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude - -EXE_LIBS = \ - -lfiniteVolume \ - -lfvOptions \ - -lmeshTools \ - -llagrangian \ - -llagrangianIntermediate \ - -llagrangianTurbulence \ - -lspecie \ - -lradiationModels \ - -lincompressibleTransportModels \ - -lturbulenceModels \ - -lincompressibleTurbulenceModels \ - -lDPMTurbulenceModels \ - -lregionModels \ - -lsurfaceFilmModels \ - -lsampling \ - -ldynamicFvMesh \ - -ltopoChangerFvMesh \ - -ldynamicMesh diff --git a/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/Make/files b/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/Make/files deleted file mode 100644 index c3354998ef..0000000000 --- a/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -DPMDyMFoam.C - -EXE = $(FOAM_APPBIN)/DPMDyMFoam diff --git a/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/Make/options b/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/Make/options deleted file mode 100644 index a4c0fcc139..0000000000 --- a/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/Make/options +++ /dev/null @@ -1,41 +0,0 @@ -EXE_INC = \ - -I.. \ - -I../DPMTurbulenceModels/lnInclude \ - -I$(LIB_SRC)/lagrangian/basic/lnInclude \ - -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/transportModels/compressible/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ - -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \ - -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ - -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude - -EXE_LIBS = \ - -llagrangian \ - -llagrangianIntermediate \ - -llagrangianTurbulence \ - -lspecie \ - -lradiationModels \ - -lincompressibleTransportModels \ - -lturbulenceModels \ - -lincompressibleTurbulenceModels \ - -lDPMTurbulenceModels \ - -lregionModels \ - -lsurfaceFilmModels \ - -lsampling \ - -lfiniteVolume \ - -lfvOptions \ - -lmeshTools \ - -ldynamicFvMesh \ - -ltopoChangerFvMesh \ - -ldynamicMesh diff --git a/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/pEqn.H b/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/pEqn.H deleted file mode 100644 index dd4d382bef..0000000000 --- a/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/pEqn.H +++ /dev/null @@ -1,62 +0,0 @@ -{ - volVectorField HbyA(constrainHbyA(rAUc*UcEqn.H(), Uc, p)); - - surfaceScalarField phiHbyA - ( - "phiHbyA", - ( - fvc::flux(HbyA) - + alphacf*rAUcf*fvc::ddtCorr(Uc, Ucf) - ) - ); - - if (p.needReference()) - { - fvc::makeRelative(phiHbyA, Uc); - adjustPhi(phiHbyA, Uc, p); - fvc::makeAbsolute(phiHbyA, Uc); - } - - phiHbyA += phicForces; - - // Update the pressure BCs to ensure flux consistency - constrainPressure(p, Uc, phiHbyA, rAUcf); - - // Non-orthogonal pressure corrector loop - while (pimple.correctNonOrthogonal()) - { - fvScalarMatrix pEqn - ( - fvm::laplacian(alphacf*rAUcf, p) - == - fvc::ddt(alphac) + fvc::div(alphacf*phiHbyA) - ); - - pEqn.setReference(pRefCell, pRefValue); - - pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); - - if (pimple.finalNonOrthogonalIter()) - { - phic = phiHbyA - pEqn.flux()/alphacf; - - p.relax(); - - Uc = HbyA - + rAUc - *fvc::reconstruct((phicForces - pEqn.flux()/alphacf)/rAUcf); - Uc.correctBoundaryConditions(); - - { - Ucf = fvc::interpolate(Uc); - surfaceVectorField n(mesh.Sf()/mesh.magSf()); - Ucf += n*(phic/mesh.magSf() - (n & Ucf)); - } - - // Make the fluxes relative to the mesh motion - fvc::makeRelative(phic, Uc); - } - } -} - -#include "continuityErrs.H" diff --git a/applications/solvers/lagrangian/DPMFoam/DPMFoam.C b/applications/solvers/lagrangian/DPMFoam/DPMFoam.C index 255bb16ce9..5fae95c04a 100644 --- a/applications/solvers/lagrangian/DPMFoam/DPMFoam.C +++ b/applications/solvers/lagrangian/DPMFoam/DPMFoam.C @@ -27,14 +27,16 @@ Application Description Transient solver for the coupled transport of a single kinematic particle cloud including the effect of the volume fraction of particles on the - continuous phase. + continuous phase, with optional mesh motion and mesh topology changes. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "dynamicFvMesh.H" #include "singlePhaseTransportModel.H" #include "PhaseIncompressibleTurbulenceModel.H" #include "pimpleControl.H" +#include "CorrectPhi.H" #ifdef MPPIC #include "basicKinematicMPPICCloud.H" @@ -57,17 +59,17 @@ int main(int argc, char *argv[]) #include "setRootCaseLists.H" #include "createTime.H" - #include "createMesh.H" - #include "createControl.H" - #include "createTimeControls.H" + #include "createDynamicFvMesh.H" + #include "createDyMControls.H" #include "createFields.H" + #include "createUcfIfPresent.H" #include "initContinuityErrs.H" Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { - #include "readTimeControls.H" + #include "readDyMControls.H" #include "CourantNo.H" #include "setDeltaT.H" @@ -75,6 +77,30 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; + // Store the particle positions + kinematicCloud.storeGlobalPositions(); + + mesh.update(); + + if (mesh.changing()) + { + if (correctPhi) + { + // Calculate absolute flux from the mapped surface velocity + phic = mesh.Sf() & Ucf(); + + #include "correctPhic.H" + + // Make the flux relative to the mesh motion + fvc::makeRelative(phic, Uc); + } + + if (checkMeshCourantNo) + { + #include "meshCourantNo.H" + } + } + continuousPhaseTransport.correct(); muc = rhoc*continuousPhaseTransport.nu(); diff --git a/applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/options b/applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/options index b0eaf6453e..74f9041da0 100644 --- a/applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/options +++ b/applications/solvers/lagrangian/DPMFoam/MPPICFoam/Make/options @@ -1,8 +1,6 @@ EXE_INC = \ -I.. \ -I../DPMTurbulenceModels/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ @@ -17,20 +15,20 @@ EXE_INC = \ -I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ - -lfiniteVolume \ - -lfvOptions \ - -lmeshTools \ -llagrangian \ -llagrangianIntermediate \ -llagrangianTurbulence \ - -lspecie \ - -lradiationModels \ -lincompressibleTransportModels \ -lturbulenceModels \ -lincompressibleTurbulenceModels \ -lDPMTurbulenceModels \ - -lregionModels \ - -lsurfaceFilmModels \ - -lsampling + -lfiniteVolume \ + -ldynamicFvMesh \ + -ltopoChangerFvMesh \ + -lfvOptions \ + -lmeshTools diff --git a/applications/solvers/lagrangian/DPMFoam/Make/options b/applications/solvers/lagrangian/DPMFoam/Make/options index b1f295e294..67374724f9 100644 --- a/applications/solvers/lagrangian/DPMFoam/Make/options +++ b/applications/solvers/lagrangian/DPMFoam/Make/options @@ -15,21 +15,19 @@ EXE_INC = \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ -llagrangian \ -llagrangianIntermediate \ -llagrangianTurbulence \ - -lspecie \ - -lradiationModels \ -lincompressibleTransportModels \ -lturbulenceModels \ -lincompressibleTurbulenceModels \ -lDPMTurbulenceModels \ - -lregionModels \ - -lsurfaceFilmModels \ - -lsampling \ -lfiniteVolume \ + -ldynamicFvMesh \ + -ltopoChangerFvMesh \ -lfvOptions \ -lmeshTools diff --git a/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/correctPhic.H b/applications/solvers/lagrangian/DPMFoam/correctPhic.H similarity index 100% rename from applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/correctPhic.H rename to applications/solvers/lagrangian/DPMFoam/correctPhic.H diff --git a/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/createUcf.H b/applications/solvers/lagrangian/DPMFoam/createUcf.H similarity index 100% rename from applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/createUcf.H rename to applications/solvers/lagrangian/DPMFoam/createUcf.H diff --git a/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/MPPICDyMFoam/MPPICDyMFoam.C b/applications/solvers/lagrangian/DPMFoam/createUcfIfPresent.H similarity index 68% rename from applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/MPPICDyMFoam/MPPICDyMFoam.C rename to applications/solvers/lagrangian/DPMFoam/createUcfIfPresent.H index 4e44ea2634..61231b1030 100644 --- a/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/MPPICDyMFoam/MPPICDyMFoam.C +++ b/applications/solvers/lagrangian/DPMFoam/createUcfIfPresent.H @@ -21,21 +21,35 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . -Application - MPPICDyMFoam +Global + createUcfIfPresent Description - Transient solver for the coupled transport of a single kinematic particle - cloud including the effect of the volume fraction of particles on the - continuous phase. Multi-Phase Particle In Cell (MPPIC) modeling is used to - represent collisions without resolving particle-particle interactions, - with optional mesh motion and mesh topology changes. + Creates and initialises the continuous phase face velocity field Ufc + if required. \*---------------------------------------------------------------------------*/ -#define MPPIC +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "DPMDyMFoam.C" +autoPtr Ucf; +if (mesh.dynamic()) +{ + Info<< "Constructing continuous phase face velocity Ucf\n" << endl; + + Ucf = new surfaceVectorField + ( + IOobject + ( + "Ucf", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + fvc::interpolate(Uc) + ); +} // ************************************************************************* // diff --git a/applications/solvers/lagrangian/DPMFoam/pEqn.H b/applications/solvers/lagrangian/DPMFoam/pEqn.H index ea0bd1c101..81efb9b9ff 100644 --- a/applications/solvers/lagrangian/DPMFoam/pEqn.H +++ b/applications/solvers/lagrangian/DPMFoam/pEqn.H @@ -6,13 +6,15 @@ "phiHbyA", ( fvc::flux(HbyA) - + alphacf*rAUcf*fvc::ddtCorr(Uc, phic) + + alphacf*rAUcf*fvc::ddtCorr(Uc, phic, Ucf) ) ); if (p.needReference()) { + fvc::makeRelative(phiHbyA, Uc); adjustPhi(phiHbyA, Uc, p); + fvc::makeAbsolute(phiHbyA, Uc); } phiHbyA += phicForces; @@ -41,8 +43,15 @@ p.relax(); Uc = HbyA - + rAUc*fvc::reconstruct((phicForces - pEqn.flux()/alphacf)/rAUcf); + + rAUc + *fvc::reconstruct((phicForces - pEqn.flux()/alphacf)/rAUcf); Uc.correctBoundaryConditions(); + + // Correct Ucf if the mesh is moving + fvc::correctUf(Ucf, Uc, phic); + + // Make the fluxes relative to the mesh motion + fvc::makeRelative(phic, Uc); } } } diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options index aebc4519bb..83385b8ab4 100644 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options +++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options @@ -1,33 +1,26 @@ EXE_INC = \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/transportModels/compressible/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ - -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ + -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ -llagrangian \ -llagrangianIntermediate \ -llagrangianTurbulence \ - -lcompressibleTransportModels \ - -lfluidThermophysicalModels \ - -lspecie \ - -lradiationModels \ -lturbulenceModels \ -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lfiniteVolume \ - -lfvOptions \ - -lmeshTools \ -lregionModels \ - -lsurfaceFilmModels + -lsurfaceFilmModels \ + -ldynamicFvMesh \ + -ltopoChangerFvMesh \ + -lmeshTools diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/Make/files b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/Make/files deleted file mode 100644 index 2cce02e105..0000000000 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -icoUncoupledKinematicParcelDyMFoam.C - -EXE = $(FOAM_APPBIN)/icoUncoupledKinematicParcelDyMFoam diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/Make/options b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/Make/options deleted file mode 100644 index 76fa725a3a..0000000000 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/Make/options +++ /dev/null @@ -1,40 +0,0 @@ -EXE_INC = \ - -I.. \ - -I$(LIB_SRC)/lagrangian/basic/lnInclude \ - -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/transportModels/compressible/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ - -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude \ - -I$(LIB_SRC)/dynamicFvMesh/lnInclude - - -EXE_LIBS = \ - -llagrangian \ - -llagrangianIntermediate \ - -llagrangianTurbulence \ - -lcompressibleTransportModels \ - -lfluidThermophysicalModels \ - -lspecie \ - -lradiationModels \ - -lturbulenceModels \ - -lincompressibleTurbulenceModels \ - -lincompressibleTransportModels \ - -lfiniteVolume \ - -lfvOptions \ - -lmeshTools \ - -lregionModels \ - -lsurfaceFilmModels \ - -ldynamicMesh \ - -ldynamicFvMesh \ - -ltopoChangerFvMesh diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/icoUncoupledKinematicParcelDyMFoam.C b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/icoUncoupledKinematicParcelDyMFoam.C deleted file mode 100644 index 3daab7f55f..0000000000 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/icoUncoupledKinematicParcelDyMFoam.C +++ /dev/null @@ -1,95 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-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 . - -Application - uncoupledKinematicParcelDyMFoam - -Description - Transient solver for the passive transport of a single kinematic - particle cloud, with optional mesh motion and mesh topology changes. - - Uses a pre-calculated velocity field to evolve the cloud. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "dynamicFvMesh.H" -#include "singlePhaseTransportModel.H" -#include "turbulentTransportModel.H" -#include "basicKinematicCollidingCloud.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - argList::addOption - ( - "cloudName", - "name", - "specify alternative cloud name. default is 'kinematicCloud'" - ); - - #include "postProcess.H" - - #include "setRootCaseLists.H" - #include "createTime.H" - #include "createDynamicFvMesh.H" - #include "createControl.H" - #include "createFields.H" - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.loop()) - { - Info<< "Time = " << runTime.timeName() << nl << endl; - - kinematicCloud.storeGlobalPositions(); - - mesh.update(); - - U.correctBoundaryConditions(); - - Info<< "Evolving " << kinematicCloud.name() << endl; - - laminarTransport.correct(); - - mu = laminarTransport.nu()*rhoInfValue; - - kinematicCloud.evolve(); - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C index 540682f0f5..02a5cee6c1 100644 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C +++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C @@ -22,17 +22,18 @@ License along with OpenFOAM. If not, see . Application - icoUncoupledKinematicParcelFoam + uncoupledKinematicParcelFoam Description Transient solver for the passive transport of a single kinematic - particle cloud. + particle cloud, with optional mesh motion and mesh topology changes. Uses a pre-calculated velocity field to evolve the cloud. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "dynamicFvMesh.H" #include "singlePhaseTransportModel.H" #include "turbulentTransportModel.H" #include "basicKinematicCollidingCloud.H" @@ -48,13 +49,14 @@ int main(int argc, char *argv[]) "specify alternative cloud name. default is 'kinematicCloud'" ); + #define NO_CONTROL #include "postProcess.H" #include "setRootCaseLists.H" #include "createTime.H" - #include "createMesh.H" - #include "createControl.H" + #include "createDynamicFvMesh.H" #include "createFields.H" + #include "CourantNo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -64,10 +66,18 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; - Info<< "Evolving " << kinematicCloud.name() << endl; + kinematicCloud.storeGlobalPositions(); + + mesh.update(); + + if (mesh.changing()) + { + U.correctBoundaryConditions(); + } laminarTransport.correct(); + Info<< "Evolving " << kinematicCloud.name() << endl; mu = laminarTransport.nu()*rhoInfValue; kinematicCloud.evolve(); diff --git a/applications/solvers/lagrangian/sprayFoam/Make/options b/applications/solvers/lagrangian/sprayFoam/Make/options index 2a27738259..38dd84ca10 100644 --- a/applications/solvers/lagrangian/sprayFoam/Make/options +++ b/applications/solvers/lagrangian/sprayFoam/Make/options @@ -1,6 +1,7 @@ EXE_INC = \ -I. \ -I../reactingParcelFoam \ + -I../../compressible/rhoPimpleFoam \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ @@ -21,7 +22,9 @@ EXE_INC = \ -I$(LIB_SRC)/ODE/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ - -I$(LIB_SRC)/combustionModels/lnInclude + -I$(LIB_SRC)/combustionModels/lnInclude \ + -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ -lturbulenceModels \ @@ -43,6 +46,8 @@ EXE_LIBS = \ -lsurfaceFilmModels \ -lcombustionModels \ -lfiniteVolume \ + -ldynamicFvMesh \ + -ltopoChangerFvMesh \ -lfvOptions \ -lmeshTools \ -lsampling diff --git a/applications/solvers/lagrangian/sprayFoam/engineFoam/Make/options b/applications/solvers/lagrangian/sprayFoam/engineFoam/Make/options index 4dc1ac0367..f4506588f7 100644 --- a/applications/solvers/lagrangian/sprayFoam/engineFoam/Make/options +++ b/applications/solvers/lagrangian/sprayFoam/engineFoam/Make/options @@ -1,6 +1,5 @@ EXE_INC = \ -I. \ - -I../sprayDyMFoam \ -I.. \ -I../../reactingParcelFoam \ -I$(LIB_SRC)/finiteVolume/lnInclude \ diff --git a/applications/solvers/lagrangian/sprayFoam/engineFoam/engineFoam.C b/applications/solvers/lagrangian/sprayFoam/engineFoam/engineFoam.C index 777d5fea0c..dc068968e3 100644 --- a/applications/solvers/lagrangian/sprayFoam/engineFoam/engineFoam.C +++ b/applications/solvers/lagrangian/sprayFoam/engineFoam/engineFoam.C @@ -57,10 +57,10 @@ int main(int argc, char *argv[]) #include "readEngineTimeControls.H" #include "createFields.H" #include "createFieldRefs.H" - #include "createRhoUf.H" #include "compressibleCourantNo.H" #include "setInitialDeltaT.H" #include "initContinuityErrs.H" + #include "createRhoUfIfPresent.H" #include "startSummary.H" turbulence->validate(); diff --git a/applications/solvers/lagrangian/sprayFoam/pEqn.H b/applications/solvers/lagrangian/sprayFoam/pEqn.H index 10c49d1811..cb5fd1a45b 100644 --- a/applications/solvers/lagrangian/sprayFoam/pEqn.H +++ b/applications/solvers/lagrangian/sprayFoam/pEqn.H @@ -22,11 +22,12 @@ if (pimple.transonic()) fvc::flux(HbyA) + MRF.zeroFilter ( - rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho) + rhorAUf*fvc::ddtCorr(rho, U, phi, rhoUf)/fvc::interpolate(rho) ) ) ); + fvc::makeRelative(phid, psi, U); MRF.makeRelative(fvc::interpolate(psi), phid); while (pimple.correctNonOrthogonal()) @@ -54,12 +55,11 @@ else surfaceScalarField phiHbyA ( "phiHbyA", - ( - fvc::flux(rho*HbyA) - + rhorAUf*fvc::ddtCorr(rho, U, phi) - ) + fvc::flux(rho*HbyA) + + MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi, rhoUf)) ); + fvc::makeRelative(phiHbyA, rho, U); MRF.makeRelative(fvc::interpolate(rho), phiHbyA); // Update the pressure BCs to ensure flux consistency @@ -105,7 +105,15 @@ U.correctBoundaryConditions(); fvOptions.correct(U); K = 0.5*magSqr(U); +// Correct rhoUf if the mesh is moving +fvc::correctRhoUf(rhoUf, rho, U, phi); + if (thermo.dpdt()) { dpdt = fvc::ddt(p); + + if (mesh.moving()) + { + dpdt -= fvc::div(fvc::meshPhi(rho, U), p); + } } diff --git a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/files b/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/files deleted file mode 100644 index b8c30b71e9..0000000000 --- a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -sprayDyMFoam.C - -EXE = $(FOAM_APPBIN)/sprayDyMFoam diff --git a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/options b/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/options deleted file mode 100644 index d53d6614e4..0000000000 --- a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/options +++ /dev/null @@ -1,54 +0,0 @@ -EXE_INC = \ - -I.. \ - -I../../reactingParcelFoam \ - -I../../../compressible/rhoPimpleFoam \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ - -I$(LIB_SRC)/lagrangian/basic/lnInclude \ - -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ - -I$(LIB_SRC)/lagrangian/spray/lnInclude \ - -I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/transportModels/compressible/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/ODE/lnInclude \ - -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ - -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ - -I$(LIB_SRC)/combustionModels/lnInclude \ - -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude - -EXE_LIBS = \ - -lturbulenceModels \ - -lcompressibleTurbulenceModels \ - -llagrangian \ - -llagrangianIntermediate \ - -llagrangianTurbulence \ - -llagrangianSpray \ - -lspecie \ - -lcompressibleTransportModels \ - -lfluidThermophysicalModels \ - -lthermophysicalProperties \ - -lreactionThermophysicalModels \ - -lSLGThermo \ - -lchemistryModel \ - -lradiationModels \ - -lODE \ - -lregionModels \ - -lsurfaceFilmModels \ - -lcombustionModels \ - -lfiniteVolume \ - -lfvOptions \ - -ldynamicFvMesh \ - -ltopoChangerFvMesh \ - -ldynamicMesh \ - -lmeshTools diff --git a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/pEqn.H b/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/pEqn.H deleted file mode 100644 index a08bcf9fd1..0000000000 --- a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/pEqn.H +++ /dev/null @@ -1,122 +0,0 @@ -rho = thermo.rho(); -rho = max(rho, rhoMin); -rho = min(rho, rhoMax); -rho.relax(); - -volScalarField rAU(1.0/UEqn.A()); -surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); -volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); - -if (pimple.nCorrPISO() <= 1) -{ - tUEqn.clear(); -} - -if (pimple.transonic()) -{ - surfaceScalarField phid - ( - "phid", - fvc::interpolate(psi) - *( - fvc::flux(HbyA) - + MRF.zeroFilter - ( - rhorAUf*fvc::ddtCorr(rho, U, rhoUf)/fvc::interpolate(rho) - ) - ) - ); - - fvc::makeRelative(phid, psi, U); - MRF.makeRelative(fvc::interpolate(psi), phid); - - while (pimple.correctNonOrthogonal()) - { - fvScalarMatrix pEqn - ( - fvm::ddt(psi, p) - + fvm::div(phid, p) - - fvm::laplacian(rhorAUf, p) - == - parcels.Srho() - + fvOptions(psi, p, rho.name()) - ); - - pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); - - if (pimple.finalNonOrthogonalIter()) - { - phi == pEqn.flux(); - } - } -} -else -{ - surfaceScalarField phiHbyA - ( - "phiHbyA", - fvc::flux(rho*HbyA) - + MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, rhoUf)) - ); - - fvc::makeRelative(phiHbyA, rho, U); - MRF.makeRelative(fvc::interpolate(rho), phiHbyA); - - // Update the pressure BCs to ensure flux consistency - constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF); - - while (pimple.correctNonOrthogonal()) - { - fvScalarMatrix pEqn - ( - fvm::ddt(psi, p) - + fvc::div(phiHbyA) - - fvm::laplacian(rhorAUf, p) - == - parcels.Srho() - + fvOptions(psi, p, rho.name()) - ); - - pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); - - if (pimple.finalNonOrthogonalIter()) - { - phi = phiHbyA + pEqn.flux(); - } - } -} - -#include "rhoEqn.H" -#include "compressibleContinuityErrs.H" - -// Explicitly relax pressure for momentum corrector -p.relax(); - -// Recalculate density from the relaxed pressure -rho = thermo.rho(); -rho = max(rho, rhoMin); -rho = min(rho, rhoMax); -rho.relax(); -Info<< "rho max/min : " << max(rho).value() - << " " << min(rho).value() << endl; - -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)); -} - -if (thermo.dpdt()) -{ - dpdt = fvc::ddt(p); - - if (mesh.moving()) - { - dpdt -= fvc::div(fvc::meshPhi(rho, U), p); - } -} diff --git a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/sprayDyMFoam.C b/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/sprayDyMFoam.C deleted file mode 100644 index 32bac247ab..0000000000 --- a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/sprayDyMFoam.C +++ /dev/null @@ -1,159 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-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 . - -Application - sprayDyMFoam - -Description - Transient solver for compressible, turbulent flow with a spray particle - cloud, with optional mesh motion and mesh topology changes. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "dynamicFvMesh.H" -#include "turbulenceModel.H" -#include "basicSprayCloud.H" -#include "psiReactionThermo.H" -#include "CombustionModel.H" -#include "radiationModel.H" -#include "SLGThermo.H" -#include "pimpleControl.H" -#include "CorrectPhi.H" -#include "fvOptions.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "postProcess.H" - - #include "setRootCaseLists.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 time-step/mesh for the correctPhi - 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); - - // Store the particle positions - parcels.storeGlobalPositions(); - - // 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" - } - } - } - - parcels.evolve(); - - #include "rhoEqn.H" - - // --- Pressure-velocity PIMPLE corrector loop - while (pimple.loop()) - { - #include "UEqn.H" - #include "YEqn.H" - #include "EEqn.H" - - // --- Pressure corrector loop - while (pimple.correct()) - { - #include "pEqn.H" - } - - if (pimple.turbCorr()) - { - turbulence->correct(); - } - } - - rho = thermo.rho(); - - if (runTime.write()) - { - combustion->Qdot()().write(); - } - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/solvers/lagrangian/sprayFoam/sprayFoam.C b/applications/solvers/lagrangian/sprayFoam/sprayFoam.C index 06357b7130..c4a00b078f 100644 --- a/applications/solvers/lagrangian/sprayFoam/sprayFoam.C +++ b/applications/solvers/lagrangian/sprayFoam/sprayFoam.C @@ -26,18 +26,20 @@ Application Description Transient solver for compressible, turbulent flow with a spray particle - cloud. + cloud, with optional mesh motion and mesh topology changes. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "turbulentFluidThermoModel.H" +#include "dynamicFvMesh.H" +#include "turbulenceModel.H" #include "basicSprayCloud.H" #include "psiReactionThermo.H" #include "CombustionModel.H" #include "radiationModel.H" #include "SLGThermo.H" #include "pimpleControl.H" +#include "CorrectPhi.H" #include "fvOptions.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -48,14 +50,14 @@ int main(int argc, char *argv[]) #include "setRootCaseLists.H" #include "createTime.H" - #include "createMesh.H" - #include "createControl.H" - #include "createTimeControls.H" + #include "createDynamicFvMesh.H" + #include "createDyMControls.H" #include "createFields.H" #include "createFieldRefs.H" #include "compressibleCourantNo.H" #include "setInitialDeltaT.H" #include "initContinuityErrs.H" + #include "createRhoUfIfPresent.H" turbulence->validate(); @@ -65,7 +67,21 @@ int main(int argc, char *argv[]) while (runTime.run()) { - #include "readTimeControls.H" + #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 + autoPtr divrhoU; + if (correctPhi) + { + divrhoU = new volScalarField + ( + "divrhoU", + fvc::div(fvc::absolute(phi, rho, U)) + ); + } + #include "compressibleCourantNo.H" #include "setDeltaT.H" @@ -73,44 +89,68 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; - parcels.evolve(); - - if (!pimple.frozenFlow()) + // Store momentum to set rhoUf for introduced faces. + autoPtr rhoU; + if (rhoUf.valid()) { - #include "rhoEqn.H" + rhoU = new volVectorField("rhoU", rho*U); + } - // --- Pressure-velocity PIMPLE corrector loop - while (pimple.loop()) + // Store the particle positions + parcels.storeGlobalPositions(); + + // Do any mesh changes + mesh.update(); + + if (mesh.changing()) + { + MRF.update(); + + if (correctPhi) { - #include "UEqn.H" - #include "YEqn.H" - #include "EEqn.H" + // Calculate absolute flux from the mapped surface velocity + phi = mesh.Sf() & rhoUf(); - // --- Pressure corrector loop - while (pimple.correct()) - { - #include "pEqn.H" - } + #include "correctPhi.H" - if (pimple.turbCorr()) - { - turbulence->correct(); - } + // Make the fluxes relative to the mesh-motion + fvc::makeRelative(phi, rho, U); } - rho = thermo.rho(); - - if (runTime.write()) + if (checkMeshCourantNo) { - combustion->Qdot()().write(); + #include "meshCourantNo.H" } } - else + + parcels.evolve(); + + #include "rhoEqn.H" + + // --- Pressure-velocity PIMPLE corrector loop + while (pimple.loop()) { - if (runTime.writeTime()) + #include "UEqn.H" + #include "YEqn.H" + #include "EEqn.H" + + // --- Pressure corrector loop + while (pimple.correct()) { - parcels.write(); + #include "pEqn.H" } + + if (pimple.turbCorr()) + { + turbulence->correct(); + } + } + + rho = thermo.rho(); + + if (runTime.write()) + { + combustion->Qdot()().write(); } Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options index 639909b38e..45524dff69 100644 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options @@ -11,7 +11,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ - -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ + -I$(LIB_SRC)/dynamicFvMesh/lnInclude EXE_LIBS = \ -llagrangian \ @@ -27,4 +28,5 @@ EXE_LIBS = \ -lfvOptions \ -lmeshTools \ -lregionModels \ - -lsurfaceFilmModels + -lsurfaceFilmModels \ + -ldynamicFvMesh diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelDyMFoam/Make/files b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelDyMFoam/Make/files deleted file mode 100644 index 430b1df24f..0000000000 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelDyMFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -uncoupledKinematicParcelDyMFoam.C - -EXE = $(FOAM_APPBIN)/uncoupledKinematicParcelDyMFoam diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelDyMFoam/Make/options b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelDyMFoam/Make/options deleted file mode 100644 index 2d385f9853..0000000000 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelDyMFoam/Make/options +++ /dev/null @@ -1,36 +0,0 @@ -EXE_INC = \ - -I.. \ - -I$(LIB_SRC)/lagrangian/basic/lnInclude \ - -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/transportModels/compressible/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ - -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude \ - -I$(LIB_SRC)/dynamicFvMesh/lnInclude - -EXE_LIBS = \ - -llagrangian \ - -llagrangianIntermediate \ - -llagrangianTurbulence \ - -lcompressibleTransportModels \ - -lfluidThermophysicalModels \ - -lspecie \ - -lradiationModels \ - -lturbulenceModels \ - -lcompressibleTurbulenceModels \ - -lfiniteVolume \ - -lfvOptions \ - -lmeshTools \ - -lregionModels \ - -lsurfaceFilmModels \ - -ldynamicMesh \ - -ldynamicFvMesh \ - -ltopoChangerFvMesh diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelDyMFoam/uncoupledKinematicParcelDyMFoam.C b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelDyMFoam/uncoupledKinematicParcelDyMFoam.C deleted file mode 100644 index 9aff41bf96..0000000000 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelDyMFoam/uncoupledKinematicParcelDyMFoam.C +++ /dev/null @@ -1,90 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-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 . - -Application - uncoupledKinematicParcelDyMFoam - -Description - Transient solver for the passive transport of a particle cloud. - - Uses a pre- calculated velocity field to evolve the cloud. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "dynamicFvMesh.H" -#include "psiThermo.H" -#include "turbulentFluidThermoModel.H" -#include "basicKinematicCloud.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - argList::addOption - ( - "cloudName", - "name", - "specify alternative cloud name. default is 'kinematicCloud'" - ); - - #define NO_CONTROL - #include "postProcess.H" - - #include "setRootCaseLists.H" - #include "createTime.H" - #include "createDynamicFvMesh.H" - #include "createFields.H" - #include "compressibleCourantNo.H" - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.loop()) - { - Info<< "Time = " << runTime.timeName() << nl << endl; - - kinematicCloud.storeGlobalPositions(); - - mesh.update(); - - U.correctBoundaryConditions(); - - Info<< "Evolving " << kinematicCloud.name() << endl; - kinematicCloud.evolve(); - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C index d67f390372..304c5ea0b2 100644 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C @@ -32,6 +32,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "dynamicFvMesh.H" #include "psiThermo.H" #include "turbulentFluidThermoModel.H" #include "basicKinematicCloud.H" @@ -52,7 +53,7 @@ int main(int argc, char *argv[]) #include "setRootCaseLists.H" #include "createTime.H" - #include "createMesh.H" + #include "createDynamicFvMesh.H" #include "createFields.H" #include "compressibleCourantNo.H" @@ -64,6 +65,15 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; + kinematicCloud.storeGlobalPositions(); + + mesh.update(); + + if (mesh.changing()) + { + U.correctBoundaryConditions(); + } + Info<< "Evolving " << kinematicCloud.name() << endl; kinematicCloud.evolve(); diff --git a/applications/solvers/multiphase/cavitatingFoam/Make/options b/applications/solvers/multiphase/cavitatingFoam/Make/options index 02d5a1cc3e..157057ceb8 100644 --- a/applications/solvers/multiphase/cavitatingFoam/Make/options +++ b/applications/solvers/multiphase/cavitatingFoam/Make/options @@ -7,6 +7,7 @@ EXE_INC = \ -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/barotropicCompressibilityModel/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ @@ -14,5 +15,6 @@ EXE_LIBS = \ -lincompressibleTurbulenceModels \ -lbarotropicCompressibilityModel \ -lfiniteVolume \ + -ldynamicFvMesh \ -lfvOptions \ -lmeshTools diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/files b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/files deleted file mode 100644 index 57cd74e01d..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -cavitatingDyMFoam.C - -EXE = $(FOAM_APPBIN)/cavitatingDyMFoam diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/options b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/options deleted file mode 100644 index b5d7b2cdfa..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/options +++ /dev/null @@ -1,23 +0,0 @@ -EXE_INC = \ - -I.. \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ - -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/barotropicCompressibilityModel/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/dynamicFvMesh/lnInclude - -EXE_LIBS = \ - -lturbulenceModels \ - -lincompressibleTurbulenceModels \ - -lbarotropicCompressibilityModel \ - -lfiniteVolume \ - -lfvOptions \ - -ldynamicMesh \ - -ldynamicFvMesh \ - -lmeshTools diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/cavitatingDyMFoam.C b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/cavitatingDyMFoam.C deleted file mode 100644 index fb3818496f..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/cavitatingDyMFoam.C +++ /dev/null @@ -1,125 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-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 . - -Application - cavitatingFoam - -Description - Transient cavitation code based on the homogeneous equilibrium model - from which the compressibility of the liquid/vapour "mixture" is obtained, - with optional mesh motion and mesh topology changes. - - Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "dynamicFvMesh.H" -#include "barotropicCompressibilityModel.H" -#include "incompressibleTwoPhaseMixture.H" -#include "turbulentTransportModel.H" -#include "CorrectPhi.H" -#include "pimpleControl.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "postProcess.H" - - #include "setRootCaseLists.H" - #include "createTime.H" - #include "createDynamicFvMesh.H" - #include "createControls.H" - #include "createFields.H" - #include "createUf.H" - #include "createPcorrTypes.H" - #include "CourantNo.H" - #include "setInitialDeltaT.H" - - turbulence->validate(); - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { - #include "readControls.H" - - { - #include "CourantNo.H" - #include "setDeltaT.H" - - runTime++; - - Info<< "Time = " << runTime.timeName() << nl << endl; - - // Do any mesh changes - mesh.update(); - - if (mesh.changing() && correctPhi) - { - // Calculate absolute flux from the mapped surface velocity - phi = mesh.Sf() & Uf; - - #include "correctPhi.H" - - // Make the flux relative to the mesh motion - fvc::makeRelative(phi, U); - } - } - - // --- Pressure-velocity PIMPLE corrector loop - while (pimple.loop()) - { - #include "rhoEqn.H" - #include "alphavPsi.H" - #include "UEqn.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/multiphase/cavitatingFoam/cavitatingDyMFoam/createControls.H b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/createControls.H deleted file mode 100644 index d47cf78b5a..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/createControls.H +++ /dev/null @@ -1,6 +0,0 @@ -#include "createDyMControls.H" - -scalar maxAcousticCo -( - readScalar(runTime.controlDict().lookup("maxAcousticCo")) -); diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H deleted file mode 100644 index f0ead3619b..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H +++ /dev/null @@ -1,88 +0,0 @@ -{ - if (pimple.nCorrPimple() == 1) - { - p = - ( - rho - - alphal*rhol0 - - ((alphav*psiv + alphal*psil) - psi)*pSat - )/psi; - } - - surfaceScalarField rhof("rhof", fvc::interpolate(rho)); - - volScalarField rAU(1.0/UEqn.A()); - surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); - volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); - - phi = fvc::flux(HbyA) - + rhorAUf*fvc::ddtCorr(U, Uf); - fvc::makeRelative(phi, U); - - surfaceScalarField phiGradp(rhorAUf*mesh.magSf()*fvc::snGrad(p)); - - phi -= phiGradp/rhof; - - volScalarField rho0(rho - psi*p); - - while (pimple.correctNonOrthogonal()) - { - fvScalarMatrix pEqn - ( - fvc::ddt(rho) - + psi*correction(fvm::ddt(p)) - + fvc::div(phi, rho) - + fvc::div(phiGradp) - - fvm::laplacian(rhorAUf, p) - ); - - pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); - - if (pimple.finalNonOrthogonalIter()) - { - phi += (phiGradp + pEqn.flux())/rhof; - } - } - - Info<< "Predicted p max-min : " << max(p).value() - << " " << min(p).value() << endl; - - rho == max(rho0 + psi*p, rhoMin); - - #include "alphavPsi.H" - - p = - ( - rho - - alphal*rhol0 - - ((alphav*psiv + alphal*psil) - psi)*pSat - )/psi; - - p.correctBoundaryConditions(); - - Info<< "Phase-change corrected p max-min : " << max(p).value() - << " " << min(p).value() << endl; - - // Correct velocity - - U = HbyA - rAU*fvc::grad(p); - - // Remove the swirl component of velocity for "wedge" cases - if (pimple.dict().found("removeSwirl")) - { - label swirlCmpt(readLabel(pimple.dict().lookup("removeSwirl"))); - - Info<< "Removing swirl component-" << swirlCmpt << " of U" << endl; - U.field().replace(swirlCmpt, 0.0); - } - - U.correctBoundaryConditions(); - - Info<< "max(U) " << max(mag(U)).value() << endl; - - { - Uf = fvc::interpolate(U); - surfaceVectorField n(mesh.Sf()/mesh.magSf()); - Uf += n*(phi/mesh.magSf() - (n & Uf)); - } -} diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/readControls.H b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/readControls.H deleted file mode 100644 index 84ef52ce65..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/readControls.H +++ /dev/null @@ -1,3 +0,0 @@ -#include "readDyMControls.H" - -maxAcousticCo = readScalar(runTime.controlDict().lookup("maxAcousticCo")); diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C b/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C index c783b384cb..8d24ac9230 100644 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C +++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C @@ -26,16 +26,19 @@ Application Description Transient cavitation code based on the homogeneous equilibrium model - from which the compressibility of the liquid/vapour "mixture" is obtained. + from which the compressibility of the liquid/vapour "mixture" is obtained, + with optional mesh motion and mesh topology changes. Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "dynamicFvMesh.H" #include "barotropicCompressibilityModel.H" #include "incompressibleTwoPhaseMixture.H" #include "turbulentTransportModel.H" +#include "CorrectPhi.H" #include "pimpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -46,10 +49,11 @@ int main(int argc, char *argv[]) #include "setRootCaseLists.H" #include "createTime.H" - #include "createMesh.H" - #include "createControl.H" + #include "createDynamicFvMesh.H" #include "createControls.H" #include "createFields.H" + #include "createUfIfPresent.H" + #include "createPcorrTypes.H" #include "CourantNo.H" #include "setInitialDeltaT.H" @@ -62,11 +66,29 @@ int main(int argc, char *argv[]) while (runTime.run()) { #include "readControls.H" - #include "CourantNo.H" - #include "setDeltaT.H" - runTime++; - Info<< "Time = " << runTime.timeName() << nl << endl; + { + #include "CourantNo.H" + #include "setDeltaT.H" + + runTime++; + + Info<< "Time = " << runTime.timeName() << nl << endl; + + // Do any mesh changes + mesh.update(); + + if (mesh.changing() && correctPhi) + { + // Calculate absolute flux from the mapped surface velocity + phi = mesh.Sf() & Uf(); + + #include "correctPhi.H" + + // Make the flux relative to the mesh motion + fvc::makeRelative(phi, U); + } + } // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/correctPhi.H b/applications/solvers/multiphase/cavitatingFoam/correctPhi.H similarity index 100% rename from applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/correctPhi.H rename to applications/solvers/multiphase/cavitatingFoam/correctPhi.H diff --git a/applications/solvers/multiphase/cavitatingFoam/createControls.H b/applications/solvers/multiphase/cavitatingFoam/createControls.H index e5c7eea9f7..d47cf78b5a 100644 --- a/applications/solvers/multiphase/cavitatingFoam/createControls.H +++ b/applications/solvers/multiphase/cavitatingFoam/createControls.H @@ -1,4 +1,4 @@ -#include "createTimeControls.H" +#include "createDyMControls.H" scalar maxAcousticCo ( diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/createPcorrTypes.H b/applications/solvers/multiphase/cavitatingFoam/createPcorrTypes.H similarity index 100% rename from applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/createPcorrTypes.H rename to applications/solvers/multiphase/cavitatingFoam/createPcorrTypes.H diff --git a/applications/solvers/multiphase/cavitatingFoam/pEqn.H b/applications/solvers/multiphase/cavitatingFoam/pEqn.H index 8f5707fcde..716327bf74 100644 --- a/applications/solvers/multiphase/cavitatingFoam/pEqn.H +++ b/applications/solvers/multiphase/cavitatingFoam/pEqn.H @@ -15,19 +15,21 @@ surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); - phi = fvc::flux(HbyA) - + rhorAUf*fvc::ddtCorr(U, phi); + phi = fvc::flux(HbyA) + rhorAUf*fvc::ddtCorr(U, phi, Uf); + fvc::makeRelative(phi, U); surfaceScalarField phiGradp(rhorAUf*mesh.magSf()*fvc::snGrad(p)); phi -= phiGradp/rhof; + volScalarField rho0(rho - psi*p); + while (pimple.correctNonOrthogonal()) { fvScalarMatrix pEqn ( - fvm::ddt(psi, p) - - (rhol0 + (psil - psiv)*pSat)*fvc::ddt(alphav) - pSat*fvc::ddt(psi) + fvc::ddt(rho) + + psi*correction(fvm::ddt(p)) + fvc::div(phi, rho) + fvc::div(phiGradp) - fvm::laplacian(rhorAUf, p) @@ -44,13 +46,7 @@ Info<< "Predicted p max-min : " << max(p).value() << " " << min(p).value() << endl; - rho == max - ( - psi*p - + alphal*rhol0 - + ((alphav*psiv + alphal*psil) - psi)*pSat, - rhoMin - ); + rho == max(rho0 + psi*p, rhoMin); #include "alphavPsi.H" @@ -82,4 +78,7 @@ U.correctBoundaryConditions(); Info<< "max(U) " << max(mag(U)).value() << endl; + + // Correct Uf if the mesh is moving + fvc::correctUf(Uf, U, phi); } diff --git a/applications/solvers/multiphase/cavitatingFoam/readControls.H b/applications/solvers/multiphase/cavitatingFoam/readControls.H index a2d4dc80a7..84ef52ce65 100644 --- a/applications/solvers/multiphase/cavitatingFoam/readControls.H +++ b/applications/solvers/multiphase/cavitatingFoam/readControls.H @@ -1,3 +1,3 @@ -#include "readTimeControls.H" +#include "readDyMControls.H" maxAcousticCo = readScalar(runTime.controlDict().lookup("maxAcousticCo")); diff --git a/applications/solvers/multiphase/compressibleInterFoam/Allwclean b/applications/solvers/multiphase/compressibleInterFoam/Allwclean index 773096f8bb..2e9b7fa3d7 100755 --- a/applications/solvers/multiphase/compressibleInterFoam/Allwclean +++ b/applications/solvers/multiphase/compressibleInterFoam/Allwclean @@ -6,7 +6,6 @@ wclean libso surfaceTensionModels wclean libso VoFphaseCompressibleTurbulenceModels wclean -wclean compressibleInterDyMFoam wclean compressibleInterFilmFoam #------------------------------------------------------------------------------ diff --git a/applications/solvers/multiphase/compressibleInterFoam/Allwmake b/applications/solvers/multiphase/compressibleInterFoam/Allwmake index 757145f256..5685a23f41 100755 --- a/applications/solvers/multiphase/compressibleInterFoam/Allwmake +++ b/applications/solvers/multiphase/compressibleInterFoam/Allwmake @@ -9,7 +9,6 @@ wmake $targetType surfaceTensionModels wmake $targetType VoFphaseCompressibleTurbulenceModels wmake $targetType -wmake $targetType compressibleInterDyMFoam wmake $targetType compressibleInterFilmFoam #------------------------------------------------------------------------------ diff --git a/applications/solvers/multiphase/compressibleInterFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/Make/options index 57c4b80dce..cf5ab1021b 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/Make/options +++ b/applications/solvers/multiphase/compressibleInterFoam/Make/options @@ -2,6 +2,7 @@ EXE_INC = \ -I. \ -I../VoF \ -ItwoPhaseMixtureThermo \ + -IVoFphaseCompressibleTurbulenceModels/lnInclude \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ @@ -9,9 +10,10 @@ EXE_INC = \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \ - -IVoFphaseCompressibleTurbulenceModels/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/dynamicMesh/lnInclude \ + -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -ltwoPhaseMixtureThermo \ @@ -27,4 +29,6 @@ EXE_LIBS = \ -lVoFphaseCompressibleTurbulenceModels \ -lfiniteVolume \ -lfvOptions \ - -lmeshTools + -lmeshTools \ + -ldynamicMesh \ + -ldynamicFvMesh diff --git a/applications/solvers/multiphase/compressibleInterFoam/TEqn.H b/applications/solvers/multiphase/compressibleInterFoam/TEqn.H index bf7a4bfc25..f21f74073f 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/TEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/TEqn.H @@ -4,7 +4,7 @@ fvm::ddt(rho, T) + fvm::div(rhoPhi, T) - fvm::Sp(contErr, T) - fvm::laplacian(turbulence.alphaEff(), T) + ( - fvc::div(fvc::absolute(phi, U), p)()() - contErr/rho*p + fvc::div(fvc::absolute(phi, U), p)()() // - contErr/rho*p + (fvc::ddt(rho, K) + fvc::div(rhoPhi, K))()() - contErr*K ) *( diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/files b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/files deleted file mode 100644 index 121264b1a9..0000000000 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -compressibleInterDyMFoam.C - -EXE = $(FOAM_APPBIN)/compressibleInterDyMFoam diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options deleted file mode 100644 index 53bc21eada..0000000000 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options +++ /dev/null @@ -1,35 +0,0 @@ -EXE_INC = \ - -I. \ - -I.. \ - -I../../VoF \ - -I../twoPhaseMixtureThermo \ - -I../VoFphaseCompressibleTurbulenceModels/lnInclude \ - -I$(LIB_SRC)/transportModels/compressible/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ - -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -EXE_LIBS = \ - -ltwoPhaseMixtureThermo \ - -ltwoPhaseSurfaceTension \ - -lcompressibleTransportModels \ - -lfluidThermophysicalModels \ - -lspecie \ - -ltwoPhaseMixture \ - -ltwoPhaseProperties \ - -linterfaceProperties \ - -lturbulenceModels \ - -lcompressibleTurbulenceModels \ - -lVoFphaseCompressibleTurbulenceModels \ - -ldynamicMesh \ - -lmeshTools \ - -ldynamicFvMesh \ - -lfiniteVolume \ - -lfvOptions diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C deleted file mode 100644 index 3026af37f2..0000000000 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C +++ /dev/null @@ -1,176 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-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 . - -Application - compressibleInterDyMFoam - -Description - Solver for 2 compressible, non-isothermal immiscible fluids using a VOF - (volume of fluid) phase-fraction based interface capturing approach, - with optional mesh motion and mesh topology changes including adaptive - re-meshing. - - The momentum and other fluid properties are of the "mixture" and a single - momentum equation is solved. - - Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "dynamicFvMesh.H" -#include "CMULES.H" -#include "EulerDdtScheme.H" -#include "localEulerDdtScheme.H" -#include "CrankNicolsonDdtScheme.H" -#include "subCycle.H" -#include "compressibleInterPhaseTransportModel.H" -#include "pimpleControl.H" -#include "fvOptions.H" -#include "CorrectPhi.H" -#include "fvcSmooth.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "postProcess.H" - - #include "setRootCaseLists.H" - #include "createTime.H" - #include "createDynamicFvMesh.H" - #include "initContinuityErrs.H" - #include "createDyMControls.H" - #include "createFields.H" - #include "createUf.H" - #include "CourantNo.H" - #include "setInitialDeltaT.H" - - volScalarField& p = mixture.p(); - volScalarField& T = mixture.T(); - const volScalarField& psi1 = mixture.thermo1().psi(); - const volScalarField& psi2 = mixture.thermo2().psi(); - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { - #include "readDyMControls.H" - - // Store divU from the previous mesh so that it can be mapped - // and used in correctPhi to ensure the corrected phi has the - // same divergence - volScalarField divU("divU0", fvc::div(fvc::absolute(phi, U))); - - if (LTS) - { - #include "setRDeltaT.H" - } - else - { - #include "CourantNo.H" - #include "alphaCourantNo.H" - #include "setDeltaT.H" - } - - runTime++; - - Info<< "Time = " << runTime.timeName() << nl << endl; - - // --- Pressure-velocity PIMPLE corrector loop - while (pimple.loop()) - { - if (pimple.firstIter() || moveMeshOuterCorrectors) - { - scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime(); - - mesh.update(); - - if (mesh.changing()) - { - - MRF.update(); - - Info<< "Execution time for mesh.update() = " - << runTime.elapsedCpuTime() - timeBeforeMeshUpdate - << " s" << endl; - - gh = (g & mesh.C()) - ghRef; - ghf = (g & mesh.Cf()) - ghRef; - - if (correctPhi) - { - // Calculate absolute flux - // from the mapped surface velocity - phi = mesh.Sf() & Uf; - - #include "correctPhi.H" - - // Make the fluxes relative to the mesh motion - fvc::makeRelative(phi, U); - - mixture.correct(); - } - - if (checkMeshCourantNo) - { - #include "meshCourantNo.H" - } - } - } - - #include "alphaControls.H" - #include "compressibleAlphaEqnSubCycle.H" - - turbulence.correctPhasePhi(); - - #include "UEqn.H" - #include "TEqn.H" - - // --- Pressure corrector loop - while (pimple.correct()) - { - #include "pEqn.H" - } - - if (pimple.turbCorr()) - { - turbulence.correct(); - } - } - - runTime.write(); - - Info<< "ExecutionTime = " - << runTime.elapsedCpuTime() - << " s\n\n" << endl; - } - - Info<< "End\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H deleted file mode 100644 index 49ad93a45c..0000000000 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H +++ /dev/null @@ -1,156 +0,0 @@ -{ - volScalarField rAU("rAU", 1.0/UEqn.A()); - surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU)); - volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh)); - surfaceScalarField phiHbyA - ( - "phiHbyA", - fvc::flux(HbyA) - + MRF.zeroFilter(fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, Uf)) - ); - MRF.makeRelative(phiHbyA); - - surfaceScalarField phig - ( - ( - mixture.surfaceTensionForce() - - ghf*fvc::snGrad(rho) - )*rAUf*mesh.magSf() - ); - - phiHbyA += phig; - - // Update the pressure BCs to ensure flux consistency - constrainPressure(p_rgh, U, phiHbyA, rAUf, MRF); - - // Make the fluxes relative to the mesh motion - fvc::makeRelative(phiHbyA, U); - - tmp p_rghEqnComp1; - tmp p_rghEqnComp2; - - if (pimple.transonic()) - { - #include "rhofs.H" - - surfaceScalarField phid1("phid1", fvc::interpolate(psi1)*phi); - surfaceScalarField phid2("phid2", fvc::interpolate(psi2)*phi); - - p_rghEqnComp1 = - pos(alpha1) - *( - ( - fvc::ddt(alpha1, rho1) + fvc::div(alphaPhi1*rho1f) - - (fvOptions(alpha1, mixture.thermo1().rho())&rho1) - )/rho1 - - fvc::ddt(alpha1) - fvc::div(alphaPhi1) - + (alpha1/rho1) - *correction - ( - psi1*fvm::ddt(p_rgh) - + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh) - ) - ); - p_rghEqnComp1.ref().relax(); - - p_rghEqnComp2 = - pos(alpha2) - *( - ( - fvc::ddt(alpha2, rho2) + fvc::div(alphaPhi2*rho2f) - - (fvOptions(alpha2, mixture.thermo2().rho())&rho2) - )/rho2 - - fvc::ddt(alpha2) - fvc::div(alphaPhi2) - + (alpha2/rho2) - *correction - ( - psi2*fvm::ddt(p_rgh) - + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh) - ) - ); - p_rghEqnComp2.ref().relax(); - } - else - { - #include "rhofs.H" - - p_rghEqnComp1 = - pos(alpha1) - *( - ( - fvc::ddt(alpha1, rho1) + fvc::div(alphaPhi1*rho1f) - - (fvOptions(alpha1, mixture.thermo1().rho())&rho1) - )/rho1 - - fvc::ddt(alpha1) - fvc::div(alphaPhi1) - + fvc::div(mesh.phi())*alpha1 - + (alpha1*psi1/rho1)*correction(fvm::ddt(p_rgh)) - ); - - p_rghEqnComp2 = - pos(alpha2) - *( - ( - fvc::ddt(alpha2, rho2) + fvc::div(alphaPhi2*rho2f) - - (fvOptions(alpha2, mixture.thermo2().rho())&rho2) - )/rho2 - - fvc::ddt(alpha2) - fvc::div(alphaPhi2) - + fvc::div(mesh.phi())*alpha2 - + (alpha2*psi2/rho2)*correction(fvm::ddt(p_rgh)) - ); - } - - // Cache p_rgh prior to solve for density update - volScalarField p_rgh_0(p_rgh); - - while (pimple.correctNonOrthogonal()) - { - fvScalarMatrix p_rghEqnIncomp - ( - fvc::div(phiHbyA) - - fvm::laplacian(rAUf, p_rgh) - ); - - solve - ( - p_rghEqnComp1() + p_rghEqnComp2() + p_rghEqnIncomp, - mesh.solver(p_rgh.select(pimple.finalInnerIter())) - ); - - if (pimple.finalNonOrthogonalIter()) - { - p = max(p_rgh + (alpha1*rho1 + alpha2*rho2)*gh, pMin); - p_rgh = p - (alpha1*rho1 + alpha2*rho2)*gh; - - dgdt = - ( - alpha1*(p_rghEqnComp2 & p_rgh) - - alpha2*(p_rghEqnComp1 & p_rgh) - ); - - phi = phiHbyA + p_rghEqnIncomp.flux(); - - U = HbyA - + rAU*fvc::reconstruct((phig + p_rghEqnIncomp.flux())/rAUf); - U.correctBoundaryConditions(); - fvOptions.correct(U); - } - } - - { - Uf = fvc::interpolate(U); - surfaceVectorField n(mesh.Sf()/mesh.magSf()); - Uf += n*(fvc::absolute(phi, U)/mesh.magSf() - (n & Uf)); - } - - // Update densities from change in p_rgh - mixture.thermo1().correctRho(psi1*(p_rgh - p_rgh_0)); - mixture.thermo2().correctRho(psi2*(p_rgh - p_rgh_0)); - - rho = alpha1*rho1 + alpha2*rho2; - - // Correct p_rgh for consistency with p and the updated densities - p_rgh = p - rho*gh; - p_rgh.correctBoundaryConditions(); - - K = 0.5*magSqr(U); -} diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C index e2e1e60dd9..747f0a0d5b 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C @@ -26,7 +26,9 @@ Application Description Solver for 2 compressible, non-isothermal immiscible fluids using a VOF - (volume of fluid) phase-fraction based interface capturing approach. + (volume of fluid) phase-fraction based interface capturing approach, + with optional mesh motion and mesh topology changes including adaptive + re-meshing. The momentum and other fluid properties are of the "mixture" and a single momentum equation is solved. @@ -39,6 +41,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "dynamicFvMesh.H" #include "CMULES.H" #include "EulerDdtScheme.H" #include "localEulerDdtScheme.H" @@ -47,6 +50,7 @@ Description #include "compressibleInterPhaseTransportModel.H" #include "pimpleControl.H" #include "fvOptions.H" +#include "CorrectPhi.H" #include "fvcSmooth.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -57,30 +61,30 @@ int main(int argc, char *argv[]) #include "setRootCaseLists.H" #include "createTime.H" - #include "createMesh.H" - #include "createControl.H" - #include "createTimeControls.H" + #include "createDynamicFvMesh.H" + #include "initContinuityErrs.H" + #include "createDyMControls.H" #include "createFields.H" + #include "CourantNo.H" + #include "setInitialDeltaT.H" + #include "createUfIfPresent.H" volScalarField& p = mixture.p(); volScalarField& T = mixture.T(); const volScalarField& psi1 = mixture.thermo1().psi(); const volScalarField& psi2 = mixture.thermo2().psi(); - if (!LTS) - { - #include "readTimeControls.H" - #include "CourantNo.H" - #include "setInitialDeltaT.H" - } - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { - #include "readTimeControls.H" + #include "readDyMControls.H" + + // Store divU from the previous mesh so that it can be mapped + // and used in correctPhi to ensure the corrected phi has the + // same divergence + volScalarField divU("divU0", fvc::div(fvc::absolute(phi, U))); if (LTS) { @@ -100,6 +104,40 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { + if (pimple.firstIter() || moveMeshOuterCorrectors) + { + mesh.update(); + + if (mesh.changing()) + { + gh = (g & mesh.C()) - ghRef; + ghf = (g & mesh.Cf()) - ghRef; + + MRF.update(); + + if (correctPhi) + { + // Calculate absolute flux + // from the mapped surface velocity + phi = mesh.Sf() & Uf(); + + #include "correctPhi.H" + + // Make the fluxes relative to the mesh motion + fvc::makeRelative(phi, U); + + mixture.correct(); + } + + if (checkMeshCourantNo) + { + #include "meshCourantNo.H" + } + } + } + + divU = fvc::div(fvc::absolute(phi, U)); + #include "alphaControls.H" #include "compressibleAlphaEqnSubCycle.H" diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/correctPhi.H b/applications/solvers/multiphase/compressibleInterFoam/correctPhi.H similarity index 82% rename from applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/correctPhi.H rename to applications/solvers/multiphase/compressibleInterFoam/correctPhi.H index ad73a951ff..79860853b8 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/correctPhi.H +++ b/applications/solvers/multiphase/compressibleInterFoam/correctPhi.H @@ -8,6 +8,4 @@ CorrectPhi pimple ); -//***HGW phi.oldTime() = phi; - #include "continuityErrs.H" diff --git a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H index 5854748e99..87ae3d1328 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H @@ -6,7 +6,7 @@ ( "phiHbyA", fvc::flux(HbyA) - + MRF.zeroFilter(fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)) + + MRF.zeroFilter(fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi, Uf)) ); MRF.makeRelative(phiHbyA); @@ -23,6 +23,9 @@ // Update the pressure BCs to ensure flux consistency constrainPressure(p_rgh, U, phiHbyA, rAUf, MRF); + // Make the fluxes relative to the mesh motion + fvc::makeRelative(phiHbyA, U); + tmp p_rghEqnComp1; tmp p_rghEqnComp2; @@ -34,8 +37,7 @@ surfaceScalarField phid2("phid2", fvc::interpolate(psi2)*phi); p_rghEqnComp1 = - pos(alpha1) - *( + ( ( fvc::ddt(alpha1, rho1) + fvc::div(alphaPhi1*rho1f) - (fvOptions(alpha1, mixture.thermo1().rho())&rho1) @@ -48,11 +50,9 @@ + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh) ) ); - p_rghEqnComp1.ref().relax(); p_rghEqnComp2 = - pos(alpha2) - *( + ( ( fvc::ddt(alpha2, rho2) + fvc::div(alphaPhi2*rho2f) - (fvOptions(alpha2, mixture.thermo2().rho())&rho2) @@ -65,7 +65,6 @@ + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh) ) ); - p_rghEqnComp2.ref().relax(); } else { @@ -94,6 +93,21 @@ ); } + if (mesh.moving()) + { + p_rghEqnComp1.ref() += fvc::div(mesh.phi())*alpha1; + p_rghEqnComp2.ref() += fvc::div(mesh.phi())*alpha2; + } + + p_rghEqnComp1.ref() *= pos(alpha1); + p_rghEqnComp2.ref() *= pos(alpha2); + + if (pimple.transonic()) + { + p_rghEqnComp1.ref().relax(); + p_rghEqnComp2.ref().relax(); + } + // Cache p_rgh prior to solve for density update volScalarField p_rgh_0(p_rgh); @@ -131,6 +145,9 @@ } } + // Correct Uf if the mesh is moving + fvc::correctUf(Uf, U, fvc::absolute(phi, U)); + // Update densities from change in p_rgh mixture.thermo1().correctRho(psi1*(p_rgh - p_rgh_0)); mixture.thermo2().correctRho(psi2*(p_rgh - p_rgh_0)); diff --git a/applications/solvers/multiphase/interFoam/Make/options b/applications/solvers/multiphase/interFoam/Make/options index 6ecfb3a658..e9366d55a8 100644 --- a/applications/solvers/multiphase/interFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/Make/options @@ -18,6 +18,6 @@ EXE_LIBS = \ -lincompressibleTurbulenceModels \ -lfiniteVolume \ -ldynamicFvMesh \ + -ltopoChangerFvMesh \ -lfvOptions \ - -lmeshTools \ - -lsampling + -lmeshTools diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/Allwclean b/applications/solvers/multiphase/interPhaseChangeFoam/Allwclean index 573e235fdc..52d19bc530 100755 --- a/applications/solvers/multiphase/interPhaseChangeFoam/Allwclean +++ b/applications/solvers/multiphase/interPhaseChangeFoam/Allwclean @@ -3,6 +3,5 @@ cd ${0%/*} || exit 1 # Run from this directory wclean libso phaseChangeTwoPhaseMixtures wclean -wclean interPhaseChangeDyMFoam #------------------------------------------------------------------------------ diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/Allwmake b/applications/solvers/multiphase/interPhaseChangeFoam/Allwmake index dfcde284ea..9655af2bd3 100755 --- a/applications/solvers/multiphase/interPhaseChangeFoam/Allwmake +++ b/applications/solvers/multiphase/interPhaseChangeFoam/Allwmake @@ -6,6 +6,5 @@ cd ${0%/*} || exit 1 # Run from this directory wmake $targetType phaseChangeTwoPhaseMixtures wmake $targetType -wmake $targetType interPhaseChangeDyMFoam #------------------------------------------------------------------------------ diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/Make/options b/applications/solvers/multiphase/interPhaseChangeFoam/Make/options index a29ad660e8..509d511bbd 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/Make/options +++ b/applications/solvers/multiphase/interPhaseChangeFoam/Make/options @@ -1,14 +1,17 @@ EXE_INC = \ - -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ + -I. \ + -I../VoF \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ + -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ + -I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \ + -IphaseChangeTwoPhaseMixtures/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ - -IphaseChangeTwoPhaseMixtures/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude + -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ -lphaseChangeTwoPhaseMixtures \ @@ -19,6 +22,7 @@ EXE_LIBS = \ -lturbulenceModels \ -lincompressibleTurbulenceModels \ -lfiniteVolume \ - -lmeshTools \ + -ldynamicFvMesh \ + -ltopoChangerFvMesh \ -lfvOptions \ - -lsampling + -lmeshTools diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H index 1e27597292..622c5a8489 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H @@ -1,13 +1,16 @@ fvVectorMatrix UEqn ( - fvm::ddt(rho, U) - + fvm::div(rhoPhi, U) + fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - fvm::Sp(fvc::ddt(rho) + fvc::div(rhoPhi), U) + turbulence->divDevRhoReff(rho, U) + == + fvOptions(rho, U) ); UEqn.relax(); + fvOptions.constrain(UEqn); + if (pimple.momentumPredictor()) { solve @@ -17,10 +20,12 @@ fvc::reconstruct ( ( - interface.surfaceTensionForce() + mixture.surfaceTensionForce() - ghf*fvc::snGrad(rho) - fvc::snGrad(p_rgh) ) * mesh.magSf() ) ); + + fvOptions.correct(U); } diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqn.H index e3bbba19d8..c94af99e52 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqn.H @@ -2,10 +2,9 @@ word alphaScheme("div(phi,alpha)"); word alpharScheme("div(phirb,alpha)"); - surfaceScalarField phir("phir", phic*interface.nHatf()); + surfaceScalarField phir("phir", phic*mixture.nHatf()); - Pair> vDotAlphal = - mixture->vDotAlphal(); + Pair> vDotAlphal = mixture.vDotAlphal(); const volScalarField& vDotcAlphal = vDotAlphal[0](); const volScalarField& vDotvAlphal = vDotAlphal[1](); const volScalarField vDotvmcAlphal(vDotvAlphal - vDotcAlphal); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqnSubCycle.H b/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqnSubCycle.H index a04fc46947..534ed4a670 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqnSubCycle.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqnSubCycle.H @@ -1,16 +1,14 @@ { // Standard face-flux compression coefficient - surfaceScalarField phic(interface.cAlpha()*mag(phi/mesh.magSf())); + surfaceScalarField phic(mixture.cAlpha()*mag(phi/mesh.magSf())); // Add the optional isotropic compression contribution if (icAlpha > 0) { phic *= (1.0 - icAlpha); - phic += (interface.cAlpha()*icAlpha)*fvc::interpolate(mag(U)); + phic += (mixture.cAlpha()*icAlpha)*fvc::interpolate(mag(U)); } - volScalarField divU(fvc::div(phi)); - if (nAlphaSubCycles > 1) { dimensionedScalar totalDeltaT = runTime.deltaT(); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/correctPhi.H b/applications/solvers/multiphase/interPhaseChangeFoam/correctPhi.H similarity index 62% rename from applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/correctPhi.H rename to applications/solvers/multiphase/interPhaseChangeFoam/correctPhi.H index 6c85d967a4..58b79bed40 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/correctPhi.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/correctPhi.H @@ -3,7 +3,7 @@ CorrectPhi U, phi, p_rgh, - surfaceScalarField("rAUf", fvc::interpolate(rAU)), + surfaceScalarField("rAUf", fvc::interpolate(rAU())), divU, pimple ); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H b/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H index 28c6b2c4eb..5838579caf 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H @@ -30,14 +30,18 @@ volVectorField U Info<< "Creating phaseChangeTwoPhaseMixture\n" << endl; -autoPtr mixture = - phaseChangeTwoPhaseMixture::New(U, phi); +autoPtr mixturePtr +( + phaseChangeTwoPhaseMixture::New(U, phi) +); -volScalarField& alpha1(mixture->alpha1()); -volScalarField& alpha2(mixture->alpha2()); +phaseChangeTwoPhaseMixture& mixture = mixturePtr(); -const dimensionedScalar& rho1 = mixture->rho1(); -const dimensionedScalar& rho2 = mixture->rho2(); +volScalarField& alpha1(mixture.alpha1()); +volScalarField& alpha2(mixture.alpha2()); + +const dimensionedScalar& rho1 = mixture.rho1(); +const dimensionedScalar& rho2 = mixture.rho2(); // Need to store rho for ddt(rho, U) @@ -55,13 +59,10 @@ volScalarField rho rho.oldTime(); -// Construct interface from alpha1 distribution -interfaceProperties interface(alpha1, U, mixture()); - // Construct incompressible turbulence model autoPtr turbulence ( - incompressible::turbulenceModel::New(U, phi, mixture()) + incompressible::turbulenceModel::New(U, phi, mixture) ); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/initCorrectPhi.H b/applications/solvers/multiphase/interPhaseChangeFoam/initCorrectPhi.H new file mode 100644 index 0000000000..59b96c87a9 --- /dev/null +++ b/applications/solvers/multiphase/interPhaseChangeFoam/initCorrectPhi.H @@ -0,0 +1,36 @@ +tmp rAU; + +if (correctPhi) +{ + rAU = new volScalarField + ( + IOobject + ( + "rAU", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("rAU", dimTime/dimDensity, 1) + ); + + volScalarField divU("divU0", fvc::div(fvc::absolute(phi, U))); + + #include "correctPhi.H" +} +else +{ + CorrectPhi + ( + U, + phi, + p_rgh, + dimensionedScalar("rAUf", dimTime/rho.dimensions(), 1), + geometricZeroField(), + pimple + ); + + #include "continuityErrs.H" +} diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/Make/files b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/Make/files deleted file mode 100644 index 2d4521425f..0000000000 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -interPhaseChangeDyMFoam.C - -EXE = $(FOAM_APPBIN)/interPhaseChangeDyMFoam diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/Make/options b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/Make/options deleted file mode 100644 index 0a4397e063..0000000000 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/Make/options +++ /dev/null @@ -1,30 +0,0 @@ -EXE_INC = \ - -I.. \ - -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ - -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ - -I../phaseChangeTwoPhaseMixtures/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude \ - -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude - -EXE_LIBS = \ - -lphaseChangeTwoPhaseMixtures \ - -ltwoPhaseMixture \ - -linterfaceProperties \ - -ltwoPhaseProperties \ - -lincompressibleTransportModels \ - -lturbulenceModels \ - -lincompressibleTurbulenceModels \ - -lfiniteVolume \ - -ldynamicMesh \ - -ldynamicFvMesh \ - -ltopoChangerFvMesh \ - -lmeshTools \ - -lfvOptions \ - -lsampling diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C deleted file mode 100644 index 9e29eb81c2..0000000000 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C +++ /dev/null @@ -1,190 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-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 . - -Application - interPhaseChangeDyMFoam - -Description - Solver for 2 incompressible, isothermal immiscible fluids with phase-change - (e.g. cavitation). Uses a VOF (volume of fluid) phase-fraction based - interface capturing approach, with optional mesh motion and mesh topology - changes including adaptive re-meshing. - - The momentum and other fluid properties are of the "mixture" and a - single momentum equation is solved. - - The set of phase-change models provided are designed to simulate cavitation - but other mechanisms of phase-change are supported within this solver - framework. - - Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "dynamicFvMesh.H" -#include "CMULES.H" -#include "subCycle.H" -#include "interfaceProperties.H" -#include "phaseChangeTwoPhaseMixture.H" -#include "turbulentTransportModel.H" -#include "pimpleControl.H" -#include "fvOptions.H" -#include "CorrectPhi.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "postProcess.H" - - #include "setRootCaseLists.H" - #include "createTime.H" - #include "createDynamicFvMesh.H" - #include "createDyMControls.H" - #include "initContinuityErrs.H" - #include "createFields.H" - - volScalarField rAU - ( - IOobject - ( - "rAU", - runTime.timeName(), - mesh, - IOobject::READ_IF_PRESENT, - IOobject::AUTO_WRITE - ), - mesh, - dimensionedScalar("rAUf", dimTime/rho.dimensions(), 1.0) - ); - - #include "createUf.H" - #include "CourantNo.H" - #include "setInitialDeltaT.H" - - turbulence->validate(); - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { - #include "readDyMControls.H" - - // Store divU from the previous mesh so that it can be mapped - // and used in correctPhi to ensure the corrected phi has the - // same divergence - volScalarField divU("divU0", fvc::div(fvc::absolute(phi, U))); - - #include "CourantNo.H" - #include "setDeltaT.H" - - runTime++; - - Info<< "Time = " << runTime.timeName() << nl << endl; - - // --- Pressure-velocity PIMPLE corrector loop - while (pimple.loop()) - { - if (pimple.firstIter() || moveMeshOuterCorrectors) - { - scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime(); - - mesh.update(); - - if (mesh.changing()) - { - Info<< "Execution time for mesh.update() = " - << runTime.elapsedCpuTime() - timeBeforeMeshUpdate - << " s" << endl; - - gh = (g & mesh.C()) - ghRef; - ghf = (g & mesh.Cf()) - ghRef; - } - - if (mesh.changing() && correctPhi) - { - // Calculate absolute flux from the mapped surface velocity - phi = mesh.Sf() & Uf; - - #include "correctPhi.H" - - // Make the flux relative to the mesh motion - fvc::makeRelative(phi, U); - } - - if (mesh.changing() && checkMeshCourantNo) - { - #include "meshCourantNo.H" - } - } - - #include "alphaControls.H" - - surfaceScalarField rhoPhi - ( - IOobject - ( - "rhoPhi", - runTime.timeName(), - mesh - ), - mesh, - dimensionedScalar("0", dimMass/dimTime, 0) - ); - - mixture->correct(); - - #include "alphaEqnSubCycle.H" - interface.correct(); - - #include "UEqn.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/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H deleted file mode 100644 index 8d992e80b0..0000000000 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H +++ /dev/null @@ -1,80 +0,0 @@ -{ - rAU = 1.0/UEqn.A(); - surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU)); - volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh)); - surfaceScalarField phiHbyA - ( - "phiHbyA", - fvc::flux(HbyA) - + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, Uf) - ); - - if (p_rgh.needReference()) - { - fvc::makeRelative(phiHbyA, U); - adjustPhi(phiHbyA, U, p_rgh); - fvc::makeAbsolute(phiHbyA, U); - } - - surfaceScalarField phig - ( - ( - interface.surfaceTensionForce() - - ghf*fvc::snGrad(rho) - )*rAUf*mesh.magSf() - ); - - phiHbyA += phig; - - // Update the pressure BCs to ensure flux consistency - constrainPressure(p_rgh, U, phiHbyA, rAUf); - - Pair> vDotP = mixture->vDotP(); - const volScalarField& vDotcP = vDotP[0](); - const volScalarField& vDotvP = vDotP[1](); - - while (pimple.correctNonOrthogonal()) - { - fvScalarMatrix p_rghEqn - ( - fvc::div(phiHbyA) - fvm::laplacian(rAUf, p_rgh) - - (vDotvP - vDotcP)*(mixture->pSat() - rho*gh) - + fvm::Sp(vDotvP - vDotcP, p_rgh) - ); - - p_rghEqn.setReference(pRefCell, pRefValue); - - p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter()))); - - if (pimple.finalNonOrthogonalIter()) - { - phi = phiHbyA + p_rghEqn.flux(); - - U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rAUf); - U.correctBoundaryConditions(); - fvOptions.correct(U); - } - } - - { - Uf = fvc::interpolate(U); - surfaceVectorField n(mesh.Sf()/mesh.magSf()); - Uf += n*(phi/mesh.magSf() - (n & Uf)); - } - - // Make the fluxes relative to the mesh motion - fvc::makeRelative(phi, U); - - p == p_rgh + rho*gh; - - if (p_rgh.needReference()) - { - p += dimensionedScalar - ( - "p", - p.dimensions(), - pRefValue - getRefCellValue(p, pRefCell) - ); - p_rgh = p - rho*gh; - } -} diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C index 3402f4ef65..e15dd8e16a 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C @@ -27,7 +27,8 @@ Application Description Solver for 2 incompressible, isothermal immiscible fluids with phase-change (e.g. cavitation). Uses a VOF (volume of fluid) phase-fraction based - interface capturing approach. + interface capturing approach, with optional mesh motion and mesh topology + changes including adaptive re-meshing. The momentum and other fluid properties are of the "mixture" and a single momentum equation is solved. @@ -41,6 +42,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "dynamicFvMesh.H" #include "CMULES.H" #include "subCycle.H" #include "interfaceProperties.H" @@ -48,6 +50,7 @@ Description #include "turbulentTransportModel.H" #include "pimpleControl.H" #include "fvOptions.H" +#include "CorrectPhi.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -57,23 +60,33 @@ int main(int argc, char *argv[]) #include "setRootCaseLists.H" #include "createTime.H" - #include "createMesh.H" - #include "createControl.H" + #include "createDynamicFvMesh.H" + #include "createDyMControls.H" + #include "initContinuityErrs.H" #include "createFields.H" - #include "createTimeControls.H" - #include "CourantNo.H" - #include "setInitialDeltaT.H" + #include "initCorrectPhi.H" + #include "createUfIfPresent.H" turbulence->validate(); + #include "CourantNo.H" + #include "setInitialDeltaT.H" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { - #include "readTimeControls.H" + #include "readDyMControls.H" + + // Store divU from the previous mesh so that it can be mapped + // and used in correctPhi to ensure the corrected phi has the + // same divergence + volScalarField divU("divU0", fvc::div(fvc::absolute(phi, U))); + #include "CourantNo.H" + #include "alphaCourantNo.H" #include "setDeltaT.H" runTime++; @@ -83,7 +96,37 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { - #include "alphaControls.H" + if (pimple.firstIter() || moveMeshOuterCorrectors) + { + mesh.update(); + + if (mesh.changing()) + { + gh = (g & mesh.C()) - ghRef; + ghf = (g & mesh.Cf()) - ghRef; + + if (correctPhi) + { + // Calculate absolute flux + // from the mapped surface velocity + phi = mesh.Sf() & Uf(); + + #include "correctPhi.H" + + // Make the flux relative to the mesh motion + fvc::makeRelative(phi, U); + + mixture.correct(); + } + + if (checkMeshCourantNo) + { + #include "meshCourantNo.H" + } + } + } + + divU = fvc::div(fvc::absolute(phi, U)); surfaceScalarField rhoPhi ( @@ -97,10 +140,10 @@ int main(int argc, char *argv[]) dimensionedScalar("0", dimMass/dimTime, 0) ); - mixture->correct(); - + #include "alphaControls.H" #include "alphaEqnSubCycle.H" - interface.correct(); + + mixture.correct(); #include "UEqn.H" diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H index c08deda403..50dabd056c 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H @@ -1,19 +1,33 @@ { - volScalarField rAU("rAU", 1.0/UEqn.A()); - surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU)); - volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh)); + if (correctPhi) + { + rAU.ref() = 1.0/UEqn.A(); + } + else + { + rAU = 1.0/UEqn.A(); + } + + surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU())); + volVectorField HbyA(constrainHbyA(rAU()*UEqn.H(), U, p_rgh)); surfaceScalarField phiHbyA ( "phiHbyA", fvc::flux(HbyA) - + fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi) + + fvc::interpolate(rho*rAU())*fvc::ddtCorr(U, phi, Uf) ); - adjustPhi(phiHbyA, U, p_rgh); + + if (p_rgh.needReference()) + { + fvc::makeRelative(phiHbyA, U); + adjustPhi(phiHbyA, U, p_rgh); + fvc::makeAbsolute(phiHbyA, U); + } surfaceScalarField phig ( ( - interface.surfaceTensionForce() + mixture.surfaceTensionForce() - ghf*fvc::snGrad(rho) )*rAUf*mesh.magSf() ); @@ -23,7 +37,7 @@ // Update the pressure BCs to ensure flux consistency constrainPressure(p_rgh, U, phiHbyA, rAUf); - Pair> vDotP = mixture->vDotP(); + Pair> vDotP = mixture.vDotP(); const volScalarField& vDotcP = vDotP[0](); const volScalarField& vDotvP = vDotP[1](); @@ -32,7 +46,7 @@ fvScalarMatrix p_rghEqn ( fvc::div(phiHbyA) - fvm::laplacian(rAUf, p_rgh) - - (vDotvP - vDotcP)*(mixture->pSat() - rho*gh) + - (vDotvP - vDotcP)*(mixture.pSat() - rho*gh) + fvm::Sp(vDotvP - vDotcP, p_rgh) ); @@ -44,12 +58,18 @@ { phi = phiHbyA + p_rghEqn.flux(); - U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rAUf); + U = HbyA + rAU()*fvc::reconstruct((phig + p_rghEqn.flux())/rAUf); U.correctBoundaryConditions(); fvOptions.correct(U); } } + // Correct Uf if the mesh is moving + fvc::correctUf(Uf, U, phi); + + // Make the fluxes relative to the mesh motion + fvc::makeRelative(phi, U); + p == p_rgh + rho*gh; if (p_rgh.needReference()) @@ -62,4 +82,9 @@ ); p_rgh = p - rho*gh; } + + if (!correctPhi) + { + rAU.clear(); + } } diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C index 2157decca1..92edddee65 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C @@ -66,8 +66,8 @@ Foam::phaseChangeTwoPhaseMixtures::Kunz::Kunz Foam::Pair> Foam::phaseChangeTwoPhaseMixtures::Kunz::mDotAlphal() const { - const volScalarField& p = alpha1_.db().lookupObject("p"); - volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1))); + const volScalarField& p = alpha1().db().lookupObject("p"); + volScalarField limitedAlpha1(min(max(alpha1(), scalar(0)), scalar(1))); return Pair> ( @@ -81,8 +81,8 @@ Foam::phaseChangeTwoPhaseMixtures::Kunz::mDotAlphal() const Foam::Pair> Foam::phaseChangeTwoPhaseMixtures::Kunz::mDotP() const { - const volScalarField& p = alpha1_.db().lookupObject("p"); - volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1))); + const volScalarField& p = alpha1().db().lookupObject("p"); + volScalarField limitedAlpha1(min(max(alpha1(), scalar(0)), scalar(1))); return Pair> ( diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Make/options b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Make/options index 2e61e4ba77..b83d5d1d48 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Make/options +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Make/options @@ -1,11 +1,11 @@ EXE_INC = \ - -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ + -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ + -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ + -I$(LIB_SRC)/transportModels/immiscibleIncompressibleTwoPhaseMixture/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ - -ltwoPhaseMixture \ - -ltwoPhaseProperties \ - -lincompressibleTransportModels \ + -limmiscibleIncompressibleTwoPhaseMixture \ -lfiniteVolume diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C index c00d6fa236..3a825a6121 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C @@ -66,7 +66,7 @@ Foam::phaseChangeTwoPhaseMixtures::Merkle::Merkle Foam::Pair> Foam::phaseChangeTwoPhaseMixtures::Merkle::mDotAlphal() const { - const volScalarField& p = alpha1_.db().lookupObject("p"); + const volScalarField& p = alpha1().db().lookupObject("p"); return Pair> ( @@ -78,8 +78,8 @@ Foam::phaseChangeTwoPhaseMixtures::Merkle::mDotAlphal() const Foam::Pair> Foam::phaseChangeTwoPhaseMixtures::Merkle::mDotP() const { - const volScalarField& p = alpha1_.db().lookupObject("p"); - volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1))); + const volScalarField& p = alpha1().db().lookupObject("p"); + volScalarField limitedAlpha1(min(max(alpha1(), scalar(0)), scalar(1))); return Pair> ( diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C index 99f3f75c1f..a6f2215925 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C @@ -96,7 +96,7 @@ Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::pCoeff const volScalarField& p ) const { - volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1))); + volScalarField limitedAlpha1(min(max(alpha1(), scalar(0)), scalar(1))); volScalarField rho ( limitedAlpha1*rho1() + (scalar(1) - limitedAlpha1)*rho2() @@ -111,10 +111,10 @@ Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::pCoeff Foam::Pair> Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::mDotAlphal() const { - const volScalarField& p = alpha1_.db().lookupObject("p"); + const volScalarField& p = alpha1().db().lookupObject("p"); volScalarField pCoeff(this->pCoeff(p)); - volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1))); + volScalarField limitedAlpha1(min(max(alpha1(), scalar(0)), scalar(1))); return Pair> ( @@ -128,10 +128,10 @@ Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::mDotAlphal() const Foam::Pair> Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::mDotP() const { - const volScalarField& p = alpha1_.db().lookupObject("p"); + const volScalarField& p = alpha1().db().lookupObject("p"); volScalarField pCoeff(this->pCoeff(p)); - volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1))); + volScalarField limitedAlpha1(min(max(alpha1(), scalar(0)), scalar(1))); volScalarField apCoeff(limitedAlpha1*pCoeff); return Pair> diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C index 0fcf887de8..e9a2b97aef 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C @@ -42,7 +42,7 @@ Foam::phaseChangeTwoPhaseMixture::phaseChangeTwoPhaseMixture const surfaceScalarField& phi ) : - incompressibleTwoPhaseMixture(U, phi), + immiscibleIncompressibleTwoPhaseMixture(U, phi), phaseChangeTwoPhaseMixtureCoeffs_(optionalSubDict(type + "Coeffs")), pSat_("pSat", dimPressure, lookup("pSat")) {} @@ -53,7 +53,7 @@ Foam::phaseChangeTwoPhaseMixture::phaseChangeTwoPhaseMixture Foam::Pair> Foam::phaseChangeTwoPhaseMixture::vDotAlphal() const { - volScalarField alphalCoeff(1.0/rho1() - alpha1_*(1.0/rho1() - 1.0/rho2())); + volScalarField alphalCoeff(1.0/rho1() - alpha1()*(1.0/rho1() - 1.0/rho2())); Pair> mDotAlphal = this->mDotAlphal(); return Pair> @@ -75,7 +75,7 @@ Foam::phaseChangeTwoPhaseMixture::vDotP() const bool Foam::phaseChangeTwoPhaseMixture::read() { - if (incompressibleTwoPhaseMixture::read()) + if (immiscibleIncompressibleTwoPhaseMixture::read()) { phaseChangeTwoPhaseMixtureCoeffs_ = optionalSubDict(type() + "Coeffs"); lookup("pSat") >> pSat_; diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H index 4d60986a12..bf55b7ebe5 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H @@ -35,7 +35,7 @@ SourceFiles #ifndef phaseChangeTwoPhaseMixture_H #define phaseChangeTwoPhaseMixture_H -#include "incompressibleTwoPhaseMixture.H" +#include "immiscibleIncompressibleTwoPhaseMixture.H" #include "typeInfo.H" #include "runTimeSelectionTables.H" #include "volFields.H" @@ -54,7 +54,7 @@ namespace Foam class phaseChangeTwoPhaseMixture : - public incompressibleTwoPhaseMixture + public immiscibleIncompressibleTwoPhaseMixture { protected: diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/options b/applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/options index 2026e36fb6..a4d71be758 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/options +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/options @@ -4,15 +4,17 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude - EXE_LIBS = \ -lincompressibleTransportModels \ -lturbulenceModels \ -lincompressibleTurbulenceModels \ -lfiniteVolume \ + -ldynamicFvMesh \ + -ltopoChangerFvMesh \ -lmeshTools \ -lfvOptions \ -lsampling diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/correctPhi.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/correctPhi.H similarity index 100% rename from applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/correctPhi.H rename to applications/solvers/multiphase/potentialFreeSurfaceFoam/correctPhi.H diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H index 0e259d8809..773efc099a 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H @@ -1,4 +1,4 @@ -volScalarField rAU(1.0/UEqn.A()); +rAU = 1.0/UEqn.A(); surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU)); volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_gh)); @@ -11,11 +11,17 @@ surfaceScalarField phiHbyA ( "phiHbyA", fvc::flux(HbyA) - + MRF.zeroFilter(rAUf*fvc::ddtCorr(U, phi)) + + MRF.zeroFilter(rAUf*fvc::ddtCorr(U, phi, Uf)) ); MRF.makeRelative(phiHbyA); -adjustPhi(phiHbyA, U, p_gh); + +if (p_gh.needReference()) +{ + fvc::makeRelative(phiHbyA, U); + adjustPhi(phiHbyA, U, p_gh); + fvc::makeAbsolute(phiHbyA, U); +} // Update the pressure BCs to ensure flux consistency constrainPressure(p_gh, U, phiHbyA, rAUf); @@ -35,16 +41,22 @@ while (pimple.correctNonOrthogonal()) if (pimple.finalNonOrthogonalIter()) { phi = phiHbyA - p_ghEqn.flux(); + + // Explicitly relax pressure for momentum corrector + p_gh.relax(); + + U = HbyA - rAU*fvc::grad(p_gh); + U.correctBoundaryConditions(); + fvOptions.correct(U); } } #include "continuityErrs.H" -// Explicitly relax pressure for momentum corrector -p_gh.relax(); +// Correct Uf if the mesh is moving +fvc::correctUf(Uf, U, phi); + +// Make the fluxes relative to the mesh motion +fvc::makeRelative(phi, U); p = p_gh + (g & mesh.C()); - -U = HbyA - rAU*fvc::grad(p_gh); -U.correctBoundaryConditions(); -fvOptions.correct(U); diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/Make/files b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/Make/files deleted file mode 100644 index b572d7b364..0000000000 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -potentialFreeSurfaceDyMFoam.C - -EXE = $(FOAM_APPBIN)/potentialFreeSurfaceDyMFoam diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/Make/options b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/Make/options deleted file mode 100644 index eca0dd4fcc..0000000000 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/Make/options +++ /dev/null @@ -1,25 +0,0 @@ -EXE_INC = \ - -I.. \ - -I../../interFoam \ - -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude \ - -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude - - -EXE_LIBS = \ - -lincompressibleTransportModels \ - -lturbulenceModels \ - -lincompressibleTurbulenceModels \ - -lfiniteVolume \ - -ldynamicMesh \ - -ldynamicFvMesh \ - -ltopoChangerFvMesh \ - -lmeshTools \ - -lfvOptions \ - -lsampling diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/pEqn.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/pEqn.H deleted file mode 100644 index 9f7da03a11..0000000000 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/pEqn.H +++ /dev/null @@ -1,67 +0,0 @@ -{ - rAU = 1.0/UEqn.A(); - surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU)); - volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_gh)); - - if (pimple.nCorrPISO() <= 1) - { - tUEqn.clear(); - } - - surfaceScalarField phiHbyA - ( - "phiHbyA", - fvc::flux(HbyA) - + MRF.zeroFilter(rAUf*fvc::ddtCorr(U, Uf)) - ); - - MRF.makeRelative(phiHbyA); - - if (p_gh.needReference()) - { - fvc::makeRelative(phiHbyA, U); - adjustPhi(phiHbyA, U, p_gh); - fvc::makeAbsolute(phiHbyA, U); - } - - // Update the pressure BCs to ensure flux consistency - constrainPressure(p_gh, U, phiHbyA, rAUf); - - // Non-orthogonal pressure corrector loop - while (pimple.correctNonOrthogonal()) - { - fvScalarMatrix p_ghEqn - ( - fvm::laplacian(rAUf, p_gh) == fvc::div(phiHbyA) - ); - - p_ghEqn.setReference(p_ghRefCell, p_ghRefValue); - - p_ghEqn.solve(mesh.solver(p_gh.select(pimple.finalInnerIter()))); - - if (pimple.finalNonOrthogonalIter()) - { - phi = phiHbyA - p_ghEqn.flux(); - - // Explicitly relax pressure for momentum corrector - p_gh.relax(); - - U = HbyA - rAU*fvc::grad(p_gh); - U.correctBoundaryConditions(); - fvOptions.correct(U); - } - } - - #include "continuityErrs.H" - - { - Uf = fvc::interpolate(U); - surfaceVectorField n(mesh.Sf()/mesh.magSf()); - Uf += n*(phi/mesh.magSf() - (n & Uf)); - } - - // Make the fluxes relative to the mesh motion - fvc::makeRelative(phi, U); - - p = p_gh + (g & mesh.C()); -} diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/potentialFreeSurfaceDyMFoam.C b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/potentialFreeSurfaceDyMFoam.C deleted file mode 100644 index 0a7ecd8358..0000000000 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/potentialFreeSurfaceDyMFoam.C +++ /dev/null @@ -1,159 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2014-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 . - -Application - potentialFreeSurfaceDyMFoam - -Description - Incompressible Navier-Stokes solver with inclusion of a wave height field - to enable single-phase free-surface approximations, with optional mesh - motion and mesh topology changes. - - Wave height field, zeta, used by pressure boundary conditions. - - Optional mesh motion and mesh topology changes including adaptive - re-meshing. - - Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "dynamicFvMesh.H" -#include "singlePhaseTransportModel.H" -#include "turbulentTransportModel.H" -#include "pimpleControl.H" -#include "fvOptions.H" -#include "CorrectPhi.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "postProcess.H" - - #include "setRootCaseLists.H" - #include "createTime.H" - #include "createDynamicFvMesh.H" - #include "initContinuityErrs.H" - #include "createDyMControls.H" - #include "createFields.H" - - volScalarField rAU - ( - IOobject - ( - "rAU", - runTime.timeName(), - mesh, - IOobject::READ_IF_PRESENT, - IOobject::AUTO_WRITE - ), - mesh, - dimensionedScalar("rAUf", dimTime, 1.0) - ); - - #include "correctPhi.H" - #include "createUf.H" - - turbulence->validate(); - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { - #include "readDyMControls.H" - #include "CourantNo.H" - #include "setDeltaT.H" - - runTime++; - - Info<< "Time = " << runTime.timeName() << nl << endl; - - // --- Pressure-velocity PIMPLE corrector loop - while (pimple.loop()) - { - if (pimple.firstIter() || moveMeshOuterCorrectors) - { - scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime(); - - mesh.update(); - - if (mesh.changing()) - { - Info<< "Execution time for mesh.update() = " - << runTime.elapsedCpuTime() - timeBeforeMeshUpdate - << " s" << endl; - - MRF.update(); - - if (correctPhi) - { - // Calculate absolute flux - // from the mapped surface velocity - phi = mesh.Sf() & Uf; - - #include "correctPhi.H" - - // Make the flux relative to the mesh motion - fvc::makeRelative(phi, U); - } - - if (checkMeshCourantNo) - { - #include "meshCourantNo.H" - } - } - } - - #include "UEqn.H" - - // --- Pressure corrector loop - while (pimple.correct()) - { - #include "pEqn.H" - } - - if (pimple.turbCorr()) - { - laminarTransport.correct(); - 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/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C index 4fe84d9565..0aacb80c73 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C @@ -26,19 +26,25 @@ Application Description Incompressible Navier-Stokes solver with inclusion of a wave height field - to enable single-phase free-surface approximations + to enable single-phase free-surface approximations, with optional mesh + motion and mesh topology changes. - Wave height field, zeta, used by pressure boundary conditions + Wave height field, zeta, used by pressure boundary conditions. + + Optional mesh motion and mesh topology changes including adaptive + re-meshing. Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "dynamicFvMesh.H" #include "singlePhaseTransportModel.H" #include "turbulentTransportModel.H" #include "pimpleControl.H" #include "fvOptions.H" +#include "CorrectPhi.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -48,11 +54,31 @@ int main(int argc, char *argv[]) #include "setRootCaseLists.H" #include "createTime.H" - #include "createMesh.H" - #include "createControl.H" - #include "createTimeControls.H" - #include "createFields.H" + #include "createDynamicFvMesh.H" #include "initContinuityErrs.H" + #include "createDyMControls.H" + #include "createFields.H" + + volScalarField rAU + ( + IOobject + ( + "rAU", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("rAUf", dimTime, 1.0) + ); + + if (correctPhi) + { + #include "correctPhi.H" + } + + #include "createUfIfPresent.H" turbulence->validate(); @@ -62,7 +88,7 @@ int main(int argc, char *argv[]) while (runTime.run()) { - #include "readTimeControls.H" + #include "readDyMControls.H" #include "CourantNo.H" #include "setDeltaT.H" @@ -73,6 +99,39 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { + if (pimple.firstIter() || moveMeshOuterCorrectors) + { + scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime(); + + mesh.update(); + + if (mesh.changing()) + { + Info<< "Execution time for mesh.update() = " + << runTime.elapsedCpuTime() - timeBeforeMeshUpdate + << " s" << endl; + + MRF.update(); + + if (correctPhi) + { + // Calculate absolute flux + // from the mapped surface velocity + phi = mesh.Sf() & Uf(); + + #include "correctPhi.H" + + // Make the flux relative to the mesh motion + fvc::makeRelative(phi, U); + } + + if (checkMeshCourantNo) + { + #include "meshCourantNo.H" + } + } + } + #include "UEqn.H" // --- Pressure corrector loop diff --git a/bin/DPMDyMFoam b/bin/DPMDyMFoam new file mode 120000 index 0000000000..d9fcbed5a0 --- /dev/null +++ b/bin/DPMDyMFoam @@ -0,0 +1 @@ +mergedDyM \ No newline at end of file diff --git a/bin/MPPICDyMFoam b/bin/MPPICDyMFoam new file mode 120000 index 0000000000..d9fcbed5a0 --- /dev/null +++ b/bin/MPPICDyMFoam @@ -0,0 +1 @@ +mergedDyM \ No newline at end of file diff --git a/bin/cavitatingDyMFoam b/bin/cavitatingDyMFoam new file mode 120000 index 0000000000..d9fcbed5a0 --- /dev/null +++ b/bin/cavitatingDyMFoam @@ -0,0 +1 @@ +mergedDyM \ No newline at end of file diff --git a/bin/compressibleInterDyMFoam b/bin/compressibleInterDyMFoam new file mode 120000 index 0000000000..d9fcbed5a0 --- /dev/null +++ b/bin/compressibleInterDyMFoam @@ -0,0 +1 @@ +mergedDyM \ No newline at end of file diff --git a/bin/icoUncoupledKinematicParcelDyMFoam b/bin/icoUncoupledKinematicParcelDyMFoam new file mode 120000 index 0000000000..d9fcbed5a0 --- /dev/null +++ b/bin/icoUncoupledKinematicParcelDyMFoam @@ -0,0 +1 @@ +mergedDyM \ No newline at end of file diff --git a/bin/interPhaseChangeDyMFoam b/bin/interPhaseChangeDyMFoam new file mode 120000 index 0000000000..d9fcbed5a0 --- /dev/null +++ b/bin/interPhaseChangeDyMFoam @@ -0,0 +1 @@ +mergedDyM \ No newline at end of file diff --git a/bin/potentialFreeSurfaceDyMFoam b/bin/potentialFreeSurfaceDyMFoam new file mode 120000 index 0000000000..d9fcbed5a0 --- /dev/null +++ b/bin/potentialFreeSurfaceDyMFoam @@ -0,0 +1 @@ +mergedDyM \ No newline at end of file diff --git a/bin/rhoCentralDyMFoam b/bin/rhoCentralDyMFoam new file mode 120000 index 0000000000..d9fcbed5a0 --- /dev/null +++ b/bin/rhoCentralDyMFoam @@ -0,0 +1 @@ +mergedDyM \ No newline at end of file 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 <. Global - createRhoUf + createRhoUfIfPresent Description Creates and initialises the velocity field rhoUf if required. diff --git a/src/finiteVolume/cfdTools/incompressible/createUfIfPresent.H b/src/finiteVolume/cfdTools/incompressible/createUfIfPresent.H index e321a9126b..715c5d2967 100644 --- a/src/finiteVolume/cfdTools/incompressible/createUfIfPresent.H +++ b/src/finiteVolume/cfdTools/incompressible/createUfIfPresent.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Global - createUf + createUfIfPresent Description Creates and initialises the velocity field Uf if required. diff --git a/tutorials/compressible/rhoCentralDyMFoam/movingCone/0/T b/tutorials/compressible/rhoCentralFoam/movingCone/0/T similarity index 100% rename from tutorials/compressible/rhoCentralDyMFoam/movingCone/0/T rename to tutorials/compressible/rhoCentralFoam/movingCone/0/T diff --git a/tutorials/compressible/rhoCentralDyMFoam/movingCone/0/U b/tutorials/compressible/rhoCentralFoam/movingCone/0/U similarity index 100% rename from tutorials/compressible/rhoCentralDyMFoam/movingCone/0/U rename to tutorials/compressible/rhoCentralFoam/movingCone/0/U diff --git a/tutorials/compressible/rhoCentralDyMFoam/movingCone/0/p b/tutorials/compressible/rhoCentralFoam/movingCone/0/p similarity index 100% rename from tutorials/compressible/rhoCentralDyMFoam/movingCone/0/p rename to tutorials/compressible/rhoCentralFoam/movingCone/0/p diff --git a/tutorials/compressible/rhoCentralDyMFoam/movingCone/0/pointMotionUx b/tutorials/compressible/rhoCentralFoam/movingCone/0/pointMotionUx similarity index 100% rename from tutorials/compressible/rhoCentralDyMFoam/movingCone/0/pointMotionUx rename to tutorials/compressible/rhoCentralFoam/movingCone/0/pointMotionUx diff --git a/tutorials/compressible/rhoCentralDyMFoam/movingCone/constant/dynamicMeshDict b/tutorials/compressible/rhoCentralFoam/movingCone/constant/dynamicMeshDict similarity index 100% rename from tutorials/compressible/rhoCentralDyMFoam/movingCone/constant/dynamicMeshDict rename to tutorials/compressible/rhoCentralFoam/movingCone/constant/dynamicMeshDict diff --git a/tutorials/compressible/rhoCentralDyMFoam/movingCone/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/movingCone/constant/thermophysicalProperties similarity index 100% rename from tutorials/compressible/rhoCentralDyMFoam/movingCone/constant/thermophysicalProperties rename to tutorials/compressible/rhoCentralFoam/movingCone/constant/thermophysicalProperties diff --git a/tutorials/compressible/rhoCentralDyMFoam/movingCone/constant/turbulenceProperties b/tutorials/compressible/rhoCentralFoam/movingCone/constant/turbulenceProperties similarity index 100% rename from tutorials/compressible/rhoCentralDyMFoam/movingCone/constant/turbulenceProperties rename to tutorials/compressible/rhoCentralFoam/movingCone/constant/turbulenceProperties diff --git a/tutorials/compressible/rhoCentralDyMFoam/movingCone/system/blockMeshDict b/tutorials/compressible/rhoCentralFoam/movingCone/system/blockMeshDict similarity index 100% rename from tutorials/compressible/rhoCentralDyMFoam/movingCone/system/blockMeshDict rename to tutorials/compressible/rhoCentralFoam/movingCone/system/blockMeshDict diff --git a/tutorials/compressible/rhoCentralDyMFoam/movingCone/system/controlDict b/tutorials/compressible/rhoCentralFoam/movingCone/system/controlDict similarity index 96% rename from tutorials/compressible/rhoCentralDyMFoam/movingCone/system/controlDict rename to tutorials/compressible/rhoCentralFoam/movingCone/system/controlDict index df7bdf20be..8c951dc3fc 100644 --- a/tutorials/compressible/rhoCentralDyMFoam/movingCone/system/controlDict +++ b/tutorials/compressible/rhoCentralFoam/movingCone/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application rhoCentralDyMFoam; +application rhoCentralFoam; startFrom startTime; diff --git a/tutorials/compressible/rhoCentralDyMFoam/movingCone/system/cuttingPlane b/tutorials/compressible/rhoCentralFoam/movingCone/system/cuttingPlane similarity index 100% rename from tutorials/compressible/rhoCentralDyMFoam/movingCone/system/cuttingPlane rename to tutorials/compressible/rhoCentralFoam/movingCone/system/cuttingPlane diff --git a/tutorials/compressible/rhoCentralDyMFoam/movingCone/system/fvSchemes b/tutorials/compressible/rhoCentralFoam/movingCone/system/fvSchemes similarity index 100% rename from tutorials/compressible/rhoCentralDyMFoam/movingCone/system/fvSchemes rename to tutorials/compressible/rhoCentralFoam/movingCone/system/fvSchemes diff --git a/tutorials/compressible/rhoCentralDyMFoam/movingCone/system/fvSolution b/tutorials/compressible/rhoCentralFoam/movingCone/system/fvSolution similarity index 100% rename from tutorials/compressible/rhoCentralDyMFoam/movingCone/system/fvSolution rename to tutorials/compressible/rhoCentralFoam/movingCone/system/fvSolution diff --git a/tutorials/compressible/rhoCentralFoam/shockTube/Allrun b/tutorials/compressible/rhoCentralFoam/shockTube/Allrun index ed61ac5435..48dc65fef7 100755 --- a/tutorials/compressible/rhoCentralFoam/shockTube/Allrun +++ b/tutorials/compressible/rhoCentralFoam/shockTube/Allrun @@ -7,5 +7,6 @@ cd ${0%/*} || exit 1 # Run from this directory runApplication blockMesh runApplication setFields runApplication $(getApplication) +runApplication -s sample postProcess -func sample #------------------------------------------------------------------------------ diff --git a/tutorials/compressible/rhoCentralFoam/shockTube/system/blockMeshDict b/tutorials/compressible/rhoCentralFoam/shockTube/system/blockMeshDict index 6df2b7f197..0930fcf633 100644 --- a/tutorials/compressible/rhoCentralFoam/shockTube/system/blockMeshDict +++ b/tutorials/compressible/rhoCentralFoam/shockTube/system/blockMeshDict @@ -30,7 +30,7 @@ vertices blocks ( - hex (0 1 2 3 4 5 6 7) (100 1 1) simpleGrading (1 1 1) + hex (0 1 2 3 4 5 6 7) (1000 1 1) simpleGrading (1 1 1) ); edges diff --git a/tutorials/compressible/rhoCentralFoam/shockTube/system/controlDict b/tutorials/compressible/rhoCentralFoam/shockTube/system/controlDict index 64a8e0f113..4f35cca9c4 100644 --- a/tutorials/compressible/rhoCentralFoam/shockTube/system/controlDict +++ b/tutorials/compressible/rhoCentralFoam/shockTube/system/controlDict @@ -51,5 +51,9 @@ maxCo 0.2; maxDeltaT 1; +functions +{ + #includeFunc mag(U) +} // ************************************************************************* // diff --git a/tutorials/compressible/rhoCentralFoam/shockTube/system/fvSchemes b/tutorials/compressible/rhoCentralFoam/shockTube/system/fvSchemes index 1c01209a00..57b1f0b17a 100644 --- a/tutorials/compressible/rhoCentralFoam/shockTube/system/fvSchemes +++ b/tutorials/compressible/rhoCentralFoam/shockTube/system/fvSchemes @@ -41,9 +41,9 @@ laplacianSchemes interpolationSchemes { default linear; - reconstruct(rho) vanLeer; - reconstruct(U) vanLeerV; - reconstruct(T) vanLeer; + reconstruct(rho) vanAlbada; + reconstruct(U) vanAlbadaV; + reconstruct(T) vanAlbada; } snGradSchemes diff --git a/tutorials/compressible/rhoCentralFoam/shockTube/system/sample b/tutorials/compressible/rhoCentralFoam/shockTube/system/sample index 5e108da392..92f87e0b42 100644 --- a/tutorials/compressible/rhoCentralFoam/shockTube/system/sample +++ b/tutorials/compressible/rhoCentralFoam/shockTube/system/sample @@ -24,17 +24,16 @@ setFormat raw; sets ( - line + data { type lineFace; axis x; - start (-5 0 0); - end (5 0 0); - nPoints 100; + start (-4.995 0 0); + end (4.995 0 0); + nPoints 1000; } ); -fields ( p U.component(0) T rho ); - +fields (T mag(U) p); // ************************************************************************* // diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/0/T b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/0/T similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/nacaAirfoil/0/T rename to tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/0/T diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/0/U b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/0/U similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/nacaAirfoil/0/U rename to tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/0/U diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/0/alphat b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/0/alphat similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/nacaAirfoil/0/alphat rename to tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/0/alphat diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/0/epsilon b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/0/epsilon similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/nacaAirfoil/0/epsilon rename to tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/0/epsilon diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/0/k b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/0/k similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/nacaAirfoil/0/k rename to tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/0/k diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/0/nut b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/0/nut similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/nacaAirfoil/0/nut rename to tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/0/nut diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/0/p b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/0/p similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/nacaAirfoil/0/p rename to tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/0/p diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allclean b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/Allclean similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allclean rename to tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/Allclean diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allrun b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/Allrun similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allrun rename to tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/Allrun diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Running_Notes b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/Running_Notes similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Running_Notes rename to tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/Running_Notes diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/constant/thermophysicalProperties b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/constant/thermophysicalProperties similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/nacaAirfoil/constant/thermophysicalProperties rename to tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/constant/thermophysicalProperties diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/constant/turbulenceProperties b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/constant/turbulenceProperties similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/nacaAirfoil/constant/turbulenceProperties rename to tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/constant/turbulenceProperties diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/prostar/nacaAirfoil.bnd.gz b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/prostar/nacaAirfoil.bnd.gz similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/nacaAirfoil/prostar/nacaAirfoil.bnd.gz rename to tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/prostar/nacaAirfoil.bnd.gz diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/prostar/nacaAirfoil.cel.gz b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/prostar/nacaAirfoil.cel.gz similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/nacaAirfoil/prostar/nacaAirfoil.cel.gz rename to tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/prostar/nacaAirfoil.cel.gz diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/prostar/nacaAirfoil.vrt.gz b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/prostar/nacaAirfoil.vrt.gz similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/nacaAirfoil/prostar/nacaAirfoil.vrt.gz rename to tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/prostar/nacaAirfoil.vrt.gz diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/system/controlDict b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/system/controlDict similarity index 98% rename from tutorials/compressible/sonicFoam/RAS/nacaAirfoil/system/controlDict rename to tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/system/controlDict index 09e5a1d4a0..b47cbff88b 100644 --- a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/system/controlDict +++ b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application sonicFoam; +application rhoPimpleFoam; startFrom latestTime; diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/system/fvSchemes similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/nacaAirfoil/system/fvSchemes rename to tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/system/fvSchemes diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/system/fvSolution b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/system/fvSolution similarity index 97% rename from tutorials/compressible/sonicFoam/RAS/nacaAirfoil/system/fvSolution rename to tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/system/fvSolution index b57e22e195..e514647601 100644 --- a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/system/fvSolution +++ b/tutorials/compressible/rhoPimpleFoam/RAS/nacaAirfoil/system/fvSolution @@ -48,6 +48,8 @@ PIMPLE nOuterCorrectors 1; nCorrectors 2; nNonOrthogonalCorrectors 0; + + transonic yes; } diff --git a/tutorials/compressible/sonicFoam/RAS/prism/0/T b/tutorials/compressible/rhoPimpleFoam/RAS/prism/0/T similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/prism/0/T rename to tutorials/compressible/rhoPimpleFoam/RAS/prism/0/T diff --git a/tutorials/compressible/sonicFoam/RAS/prism/0/U b/tutorials/compressible/rhoPimpleFoam/RAS/prism/0/U similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/prism/0/U rename to tutorials/compressible/rhoPimpleFoam/RAS/prism/0/U diff --git a/tutorials/compressible/sonicFoam/RAS/prism/0/alphat b/tutorials/compressible/rhoPimpleFoam/RAS/prism/0/alphat similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/prism/0/alphat rename to tutorials/compressible/rhoPimpleFoam/RAS/prism/0/alphat diff --git a/tutorials/compressible/sonicFoam/RAS/prism/0/epsilon b/tutorials/compressible/rhoPimpleFoam/RAS/prism/0/epsilon similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/prism/0/epsilon rename to tutorials/compressible/rhoPimpleFoam/RAS/prism/0/epsilon diff --git a/tutorials/compressible/sonicFoam/RAS/prism/0/k b/tutorials/compressible/rhoPimpleFoam/RAS/prism/0/k similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/prism/0/k rename to tutorials/compressible/rhoPimpleFoam/RAS/prism/0/k diff --git a/tutorials/compressible/sonicFoam/RAS/prism/0/nut b/tutorials/compressible/rhoPimpleFoam/RAS/prism/0/nut similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/prism/0/nut rename to tutorials/compressible/rhoPimpleFoam/RAS/prism/0/nut diff --git a/tutorials/compressible/sonicFoam/RAS/prism/0/p b/tutorials/compressible/rhoPimpleFoam/RAS/prism/0/p similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/prism/0/p rename to tutorials/compressible/rhoPimpleFoam/RAS/prism/0/p diff --git a/tutorials/compressible/sonicFoam/RAS/prism/constant/thermophysicalProperties b/tutorials/compressible/rhoPimpleFoam/RAS/prism/constant/thermophysicalProperties similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/prism/constant/thermophysicalProperties rename to tutorials/compressible/rhoPimpleFoam/RAS/prism/constant/thermophysicalProperties diff --git a/tutorials/compressible/sonicFoam/RAS/prism/constant/turbulenceProperties b/tutorials/compressible/rhoPimpleFoam/RAS/prism/constant/turbulenceProperties similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/prism/constant/turbulenceProperties rename to tutorials/compressible/rhoPimpleFoam/RAS/prism/constant/turbulenceProperties diff --git a/tutorials/compressible/sonicFoam/RAS/prism/system/blockMeshDict b/tutorials/compressible/rhoPimpleFoam/RAS/prism/system/blockMeshDict similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/prism/system/blockMeshDict rename to tutorials/compressible/rhoPimpleFoam/RAS/prism/system/blockMeshDict diff --git a/tutorials/compressible/sonicFoam/RAS/prism/system/controlDict b/tutorials/compressible/rhoPimpleFoam/RAS/prism/system/controlDict similarity index 97% rename from tutorials/compressible/sonicFoam/RAS/prism/system/controlDict rename to tutorials/compressible/rhoPimpleFoam/RAS/prism/system/controlDict index ab158aa3d5..28c08f4583 100644 --- a/tutorials/compressible/sonicFoam/RAS/prism/system/controlDict +++ b/tutorials/compressible/rhoPimpleFoam/RAS/prism/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application sonicFoam; +application rhoPimpleFoam; startFrom startTime; diff --git a/tutorials/compressible/sonicFoam/RAS/prism/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/RAS/prism/system/fvSchemes similarity index 100% rename from tutorials/compressible/sonicFoam/RAS/prism/system/fvSchemes rename to tutorials/compressible/rhoPimpleFoam/RAS/prism/system/fvSchemes diff --git a/tutorials/compressible/sonicFoam/RAS/prism/system/fvSolution b/tutorials/compressible/rhoPimpleFoam/RAS/prism/system/fvSolution similarity index 97% rename from tutorials/compressible/sonicFoam/RAS/prism/system/fvSolution rename to tutorials/compressible/rhoPimpleFoam/RAS/prism/system/fvSolution index 25d64e7ba7..eb41855f13 100644 --- a/tutorials/compressible/sonicFoam/RAS/prism/system/fvSolution +++ b/tutorials/compressible/rhoPimpleFoam/RAS/prism/system/fvSolution @@ -48,6 +48,8 @@ PIMPLE nOuterCorrectors 2; nCorrectors 1; nNonOrthogonalCorrectors 0; + + transonic yes; } diff --git a/tutorials/compressible/sonicLiquidFoam/Allclean b/tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/Allclean similarity index 100% rename from tutorials/compressible/sonicLiquidFoam/Allclean rename to tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/Allclean diff --git a/tutorials/compressible/sonicLiquidFoam/Allrun b/tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/Allrun similarity index 100% rename from tutorials/compressible/sonicLiquidFoam/Allrun rename to tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/Allrun diff --git a/tutorials/compressible/sonicDyMFoam/movingCone/0/T b/tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/0/T similarity index 71% rename from tutorials/compressible/sonicDyMFoam/movingCone/0/T rename to tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/0/T index 8b10f8e01e..d0bc5d1c88 100644 --- a/tutorials/compressible/sonicDyMFoam/movingCone/0/T +++ b/tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/0/T @@ -20,40 +20,30 @@ internalField uniform 300; boundaryField { - movingWall + outerWall { - type zeroGradient; + type fixedValue; + value $internalField; } - farFieldMoving + axis { - type zeroGradient; + type symmetryPlane; } - fixedWall - { - type zeroGradient; - } - - left - { - type inletOutlet; - inletValue $internalField; - } - - farField + nozzle { type zeroGradient; } back { - type wedge; + type empty; } front { - type wedge; + type empty; } } diff --git a/tutorials/compressible/sonicLiquidFoam/decompressionTank/0/U b/tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/0/U similarity index 100% rename from tutorials/compressible/sonicLiquidFoam/decompressionTank/0/U rename to tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/0/U diff --git a/tutorials/compressible/sonicLiquidFoam/decompressionTank/0/p b/tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/0/p similarity index 100% rename from tutorials/compressible/sonicLiquidFoam/decompressionTank/0/p rename to tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/0/p diff --git a/tutorials/compressible/sonicDyMFoam/movingCone/constant/thermophysicalProperties b/tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/constant/thermophysicalProperties similarity index 67% rename from tutorials/compressible/sonicDyMFoam/movingCone/constant/thermophysicalProperties rename to tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/constant/thermophysicalProperties index dcc08cba96..a096d6945b 100644 --- a/tutorials/compressible/sonicDyMFoam/movingCone/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/constant/thermophysicalProperties @@ -15,13 +15,26 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +thermoType0 +{ + type heRhoThermo; + mixture pureMixture; + properties liquid; + energy sensibleInternalEnergy; +} + +mixture0 +{ + H2O; +} + thermoType { - type hePsiThermo; + type heRhoThermo; mixture pureMixture; transport const; thermo hConst; - equationOfState perfectGas; + equationOfState perfectFluid; specie specie; energy sensibleInternalEnergy; } @@ -30,19 +43,23 @@ mixture { specie { - molWeight 28.9; + molWeight 18; + } + equationOfState + { + R 7342; + rho0 1000; } thermodynamics { - Cp 1007; - Hf 2.544e+06; + Cp 4185; + Hf 0; } transport { - mu 1e-3; - Pr 0.7; + mu 0.001; + Pr 1; } } - // ************************************************************************* // diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/constant/turbulenceProperties b/tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/constant/turbulenceProperties similarity index 99% rename from tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/constant/turbulenceProperties rename to tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/constant/turbulenceProperties index ff13edf0a6..46b3810858 100644 --- a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/constant/turbulenceProperties +++ b/tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/constant/turbulenceProperties @@ -17,5 +17,4 @@ FoamFile simulationType laminar; - // ************************************************************************* // diff --git a/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/blockMeshDict b/tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/system/blockMeshDict similarity index 100% rename from tutorials/compressible/sonicLiquidFoam/decompressionTank/system/blockMeshDict rename to tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/system/blockMeshDict diff --git a/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/controlDict b/tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/system/controlDict similarity index 96% rename from tutorials/compressible/sonicLiquidFoam/decompressionTank/system/controlDict rename to tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/system/controlDict index 7ba85ba397..c9dc09a2cc 100644 --- a/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/controlDict +++ b/tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application sonicLiquidFoam; +application rhoPimpleFoam; startFrom startTime; diff --git a/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/system/fvSchemes similarity index 85% rename from tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSchemes rename to tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/system/fvSchemes index fe3e7edc15..d1d604d3af 100644 --- a/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSchemes +++ b/tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/system/fvSchemes @@ -28,8 +28,14 @@ gradSchemes divSchemes { default none; + div(phi,U) Gauss limitedLinearV 1; div(phid,p) Gauss limitedLinear 1; + div(phi,e) Gauss limitedLinear 1; + div(phi,K) Gauss limitedLinear 1; + div(phiv,p) Gauss limitedLinear 1; + + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSolution b/tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/system/fvSolution similarity index 97% rename from tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSolution rename to tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/system/fvSolution index 92b6fb416a..74c8756436 100644 --- a/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSolution +++ b/tutorials/compressible/rhoPimpleFoam/laminar/decompressionTank/decompressionTank/system/fvSolution @@ -46,6 +46,8 @@ PIMPLE nOuterCorrectors 2; nCorrectors 1; nNonOrthogonalCorrectors 0; + + transonic yes; } diff --git a/tutorials/compressible/sonicFoam/laminar/forwardStep/0/T b/tutorials/compressible/rhoPimpleFoam/laminar/forwardStep/0/T similarity index 100% rename from tutorials/compressible/sonicFoam/laminar/forwardStep/0/T rename to tutorials/compressible/rhoPimpleFoam/laminar/forwardStep/0/T diff --git a/tutorials/compressible/sonicFoam/laminar/forwardStep/0/U b/tutorials/compressible/rhoPimpleFoam/laminar/forwardStep/0/U similarity index 100% rename from tutorials/compressible/sonicFoam/laminar/forwardStep/0/U rename to tutorials/compressible/rhoPimpleFoam/laminar/forwardStep/0/U diff --git a/tutorials/compressible/sonicFoam/laminar/forwardStep/0/p b/tutorials/compressible/rhoPimpleFoam/laminar/forwardStep/0/p similarity index 100% rename from tutorials/compressible/sonicFoam/laminar/forwardStep/0/p rename to tutorials/compressible/rhoPimpleFoam/laminar/forwardStep/0/p diff --git a/tutorials/compressible/sonicFoam/laminar/forwardStep/constant/thermophysicalProperties b/tutorials/compressible/rhoPimpleFoam/laminar/forwardStep/constant/thermophysicalProperties similarity index 100% rename from tutorials/compressible/sonicFoam/laminar/forwardStep/constant/thermophysicalProperties rename to tutorials/compressible/rhoPimpleFoam/laminar/forwardStep/constant/thermophysicalProperties diff --git a/tutorials/compressible/sonicDyMFoam/movingCone/constant/turbulenceProperties b/tutorials/compressible/rhoPimpleFoam/laminar/forwardStep/constant/turbulenceProperties similarity index 100% rename from tutorials/compressible/sonicDyMFoam/movingCone/constant/turbulenceProperties rename to tutorials/compressible/rhoPimpleFoam/laminar/forwardStep/constant/turbulenceProperties diff --git a/tutorials/compressible/sonicFoam/laminar/forwardStep/system/blockMeshDict b/tutorials/compressible/rhoPimpleFoam/laminar/forwardStep/system/blockMeshDict similarity index 100% rename from tutorials/compressible/sonicFoam/laminar/forwardStep/system/blockMeshDict rename to tutorials/compressible/rhoPimpleFoam/laminar/forwardStep/system/blockMeshDict diff --git a/tutorials/compressible/sonicFoam/laminar/forwardStep/system/controlDict b/tutorials/compressible/rhoPimpleFoam/laminar/forwardStep/system/controlDict similarity index 97% rename from tutorials/compressible/sonicFoam/laminar/forwardStep/system/controlDict rename to tutorials/compressible/rhoPimpleFoam/laminar/forwardStep/system/controlDict index d5f76482a3..c405b657a0 100644 --- a/tutorials/compressible/sonicFoam/laminar/forwardStep/system/controlDict +++ b/tutorials/compressible/rhoPimpleFoam/laminar/forwardStep/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application sonicFoam; +application rhoPimpleFoam; startFrom startTime; diff --git a/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/laminar/forwardStep/system/fvSchemes similarity index 100% rename from tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSchemes rename to tutorials/compressible/rhoPimpleFoam/laminar/forwardStep/system/fvSchemes diff --git a/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSolution b/tutorials/compressible/rhoPimpleFoam/laminar/forwardStep/system/fvSolution similarity index 96% rename from tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSolution rename to tutorials/compressible/rhoPimpleFoam/laminar/forwardStep/system/fvSolution index b5df026ea7..74c8756436 100644 --- a/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSolution +++ b/tutorials/compressible/rhoPimpleFoam/laminar/forwardStep/system/fvSolution @@ -25,7 +25,7 @@ solvers relTol 0; } - "U.*" + "(U|e).*" { $p; tolerance 1e-05; @@ -46,6 +46,8 @@ PIMPLE nOuterCorrectors 2; nCorrectors 1; nNonOrthogonalCorrectors 0; + + transonic yes; } diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/0/T.orig b/tutorials/compressible/rhoPimpleFoam/laminar/shockTube/0/T.orig similarity index 100% rename from tutorials/compressible/sonicFoam/laminar/shockTube/0/T.orig rename to tutorials/compressible/rhoPimpleFoam/laminar/shockTube/0/T.orig diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/0/U.orig b/tutorials/compressible/rhoPimpleFoam/laminar/shockTube/0/U.orig similarity index 100% rename from tutorials/compressible/sonicFoam/laminar/shockTube/0/U.orig rename to tutorials/compressible/rhoPimpleFoam/laminar/shockTube/0/U.orig diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/0/p.orig b/tutorials/compressible/rhoPimpleFoam/laminar/shockTube/0/p.orig similarity index 100% rename from tutorials/compressible/sonicFoam/laminar/shockTube/0/p.orig rename to tutorials/compressible/rhoPimpleFoam/laminar/shockTube/0/p.orig diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/Allrun b/tutorials/compressible/rhoPimpleFoam/laminar/shockTube/Allrun similarity index 100% rename from tutorials/compressible/sonicFoam/laminar/shockTube/Allrun rename to tutorials/compressible/rhoPimpleFoam/laminar/shockTube/Allrun diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/constant/thermophysicalProperties b/tutorials/compressible/rhoPimpleFoam/laminar/shockTube/constant/thermophysicalProperties similarity index 100% rename from tutorials/compressible/sonicFoam/laminar/shockTube/constant/thermophysicalProperties rename to tutorials/compressible/rhoPimpleFoam/laminar/shockTube/constant/thermophysicalProperties diff --git a/tutorials/compressible/sonicFoam/laminar/forwardStep/constant/turbulenceProperties b/tutorials/compressible/rhoPimpleFoam/laminar/shockTube/constant/turbulenceProperties similarity index 100% rename from tutorials/compressible/sonicFoam/laminar/forwardStep/constant/turbulenceProperties rename to tutorials/compressible/rhoPimpleFoam/laminar/shockTube/constant/turbulenceProperties diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/system/blockMeshDict b/tutorials/compressible/rhoPimpleFoam/laminar/shockTube/system/blockMeshDict similarity index 100% rename from tutorials/compressible/sonicFoam/laminar/shockTube/system/blockMeshDict rename to tutorials/compressible/rhoPimpleFoam/laminar/shockTube/system/blockMeshDict diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/system/controlDict b/tutorials/compressible/rhoPimpleFoam/laminar/shockTube/system/controlDict similarity index 97% rename from tutorials/compressible/sonicFoam/laminar/shockTube/system/controlDict rename to tutorials/compressible/rhoPimpleFoam/laminar/shockTube/system/controlDict index c5cd5358b8..c8aa6785ca 100644 --- a/tutorials/compressible/sonicFoam/laminar/shockTube/system/controlDict +++ b/tutorials/compressible/rhoPimpleFoam/laminar/shockTube/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application sonicFoam; +application rhoPimpleFoam; startFrom startTime; diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/laminar/shockTube/system/fvSchemes similarity index 100% rename from tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSchemes rename to tutorials/compressible/rhoPimpleFoam/laminar/shockTube/system/fvSchemes diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSolution b/tutorials/compressible/rhoPimpleFoam/laminar/shockTube/system/fvSolution similarity index 97% rename from tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSolution rename to tutorials/compressible/rhoPimpleFoam/laminar/shockTube/system/fvSolution index d6de4fab64..23d0943195 100644 --- a/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSolution +++ b/tutorials/compressible/rhoPimpleFoam/laminar/shockTube/system/fvSolution @@ -39,6 +39,8 @@ PIMPLE nOuterCorrectors 2; nCorrectors 1; nNonOrthogonalCorrectors 0; + + transonic yes; } diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/system/sample b/tutorials/compressible/rhoPimpleFoam/laminar/shockTube/system/sample similarity index 100% rename from tutorials/compressible/sonicFoam/laminar/shockTube/system/sample rename to tutorials/compressible/rhoPimpleFoam/laminar/shockTube/system/sample diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/system/setFieldsDict b/tutorials/compressible/rhoPimpleFoam/laminar/shockTube/system/setFieldsDict similarity index 100% rename from tutorials/compressible/sonicFoam/laminar/shockTube/system/setFieldsDict rename to tutorials/compressible/rhoPimpleFoam/laminar/shockTube/system/setFieldsDict diff --git a/tutorials/compressible/sonicDyMFoam/movingCone/0/U b/tutorials/compressible/sonicDyMFoam/movingCone/0/U deleted file mode 100644 index 96cc756f71..0000000000 --- a/tutorials/compressible/sonicDyMFoam/movingCone/0/U +++ /dev/null @@ -1,61 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: dev - \\/ M anipulation | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volVectorField; - object U; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 1 -1 0 0 0 0]; - -internalField uniform (0 0 0); - -boundaryField -{ - movingWall - { - type movingWallVelocity; - value $internalField; - } - - farFieldMoving - { - type noSlip; - } - - fixedWall - { - type noSlip; - } - - left - { - type pressureInletOutletVelocity; - value $internalField; - } - - farField - { - type noSlip; - } - - back - { - type wedge; - } - - front - { - type wedge; - } -} - -// ************************************************************************* // diff --git a/tutorials/compressible/sonicDyMFoam/movingCone/0/p b/tutorials/compressible/sonicDyMFoam/movingCone/0/p deleted file mode 100644 index 674ed7123a..0000000000 --- a/tutorials/compressible/sonicDyMFoam/movingCone/0/p +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: dev - \\/ M anipulation | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - object p; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [1 -1 -2 0 0 0 0]; - -internalField uniform 1e5; - -boundaryField -{ - movingWall - { - type zeroGradient; - } - - farFieldMoving - { - type zeroGradient; - } - - fixedWall - { - type zeroGradient; - } - - left - { - type totalPressure; - p0 $internalField; - } - - farField - { - type zeroGradient; - } - - back - { - type wedge; - } - - front - { - type wedge; - } -} - -// ************************************************************************* // diff --git a/tutorials/compressible/sonicDyMFoam/movingCone/0/pointMotionUx b/tutorials/compressible/sonicDyMFoam/movingCone/0/pointMotionUx deleted file mode 100644 index 0ff587d333..0000000000 --- a/tutorials/compressible/sonicDyMFoam/movingCone/0/pointMotionUx +++ /dev/null @@ -1,56 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: dev - \\/ M anipulation | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class pointScalarField; - object pointMotionU; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 1 -1 0 0 0 0]; - -internalField uniform 0; - -boundaryField -{ - movingWall - { - type uniformFixedValue; - uniformValue constant 160; - } - farFieldMoving - { - type slip; - } - fixedWall - { - type uniformFixedValue; - uniformValue constant 0; - } - left - { - type uniformFixedValue; - uniformValue constant 0; - } - farField - { - type slip; - } - back - { - type wedge; - } - front - { - type wedge; - } -} - -// ************************************************************************* // diff --git a/tutorials/compressible/sonicDyMFoam/movingCone/constant/dynamicMeshDict b/tutorials/compressible/sonicDyMFoam/movingCone/constant/dynamicMeshDict deleted file mode 100644 index 87b8556049..0000000000 --- a/tutorials/compressible/sonicDyMFoam/movingCone/constant/dynamicMeshDict +++ /dev/null @@ -1,28 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: dev - \\/ M anipulation | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object dynamicMeshDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dynamicFvMesh dynamicMotionSolverFvMesh; - -motionSolverLibs ("libfvMotionSolvers.so"); - -motionSolver velocityComponentLaplacian; - -component x; -diffusivity directional (1 200 0); - - -// ************************************************************************* // diff --git a/tutorials/compressible/sonicDyMFoam/movingCone/system/blockMeshDict b/tutorials/compressible/sonicDyMFoam/movingCone/system/blockMeshDict deleted file mode 100644 index 95dd3874cd..0000000000 --- a/tutorials/compressible/sonicDyMFoam/movingCone/system/blockMeshDict +++ /dev/null @@ -1,142 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: dev - \\/ M anipulation | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object blockMeshDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -convertToMeters 0.001; - -vertices -( - (-7.5 0 0) - (-7 0 0) - (-3.5 0 0) - (0 0 0) - (-7.5 0.75 -0.032745707) - (-7 0.75 -0.032745707) - (-3.5 2 -0.087321886) - (0 2 -0.087321886) - (-7.5 2.5 -0.10915236) - (-7 2.5 -0.10915236) - (-3.5 2.5 -0.10915236) - (0 2.5 -0.10915236) - (-7.5 0.75 0.032745707) - (-7 0.75 0.032745707) - (-3.5 2 0.087321886) - (0 2 0.087321886) - (-7.5 2.5 0.10915236) - (-7 2.5 0.10915236) - (-3.5 2.5 0.10915236) - (0 2.5 0.10915236) -); - -blocks -( - hex (0 1 5 4 0 1 13 12) (15 15 1) simpleGrading (1 1 1) - hex (2 3 7 6 2 3 15 14) (20 20 1) simpleGrading (2 0.25 1) - hex (4 5 9 8 12 13 17 16) (15 15 1) simpleGrading (1 1 1) - hex (5 6 10 9 13 14 18 17) (50 15 1) simpleGrading (1 1 1) - hex (6 7 11 10 14 15 19 18) (20 15 1) simpleGrading (2 1 1) -); - -edges -( -); - -boundary -( - movingWall - { - type wall; - faces - ( - (1 5 13 1) - (5 6 14 13) - (2 2 14 6) - ); - } - farFieldMoving - { - type patch; - faces - ( - (9 17 18 10) - ); - } - fixedWall - { - type wall; - faces - ( - (3 7 15 3) - (7 11 19 15) - ); - } - axis - { - type empty; - faces - ( - (0 1 1 0) - (2 3 3 2) - ); - } - left - { - type patch; - faces - ( - (0 0 12 4) - (4 12 16 8) - ); - } - farField - { - type patch; - faces - ( - (8 16 17 9) - (10 18 19 11) - ); - } - back - { - type wedge; - faces - ( - (0 4 5 1) - (2 6 7 3) - (4 8 9 5) - (5 9 10 6) - (6 10 11 7) - ); - } - front - { - type wedge; - faces - ( - (0 1 13 12) - (2 3 15 14) - (12 13 17 16) - (13 14 18 17) - (14 15 19 18) - ); - } -); - -mergePatchPairs -( -); - -// ************************************************************************* // diff --git a/tutorials/compressible/sonicDyMFoam/movingCone/system/controlDict b/tutorials/compressible/sonicDyMFoam/movingCone/system/controlDict deleted file mode 100644 index ae9628daf3..0000000000 --- a/tutorials/compressible/sonicDyMFoam/movingCone/system/controlDict +++ /dev/null @@ -1,52 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: dev - \\/ M anipulation | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "system"; - object controlDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -application sonicDyMFoam; - -startFrom startTime; - -startTime 0; - -stopAt endTime; - -endTime 0.00002; - -deltaT 1e-08; - -writeControl adjustableRunTime; - -writeInterval 5e-7; - -purgeWrite 0; - -writeFormat binary; - -writePrecision 6; - -writeCompression off; - -timeFormat general; - -timePrecision 6; - -runTimeModifiable true; - -adjustTimeStep yes; - -maxCo 0.2; - -// ************************************************************************* // diff --git a/tutorials/compressible/sonicDyMFoam/movingCone/system/cuttingPlane b/tutorials/compressible/sonicDyMFoam/movingCone/system/cuttingPlane deleted file mode 100644 index eabc6479c4..0000000000 --- a/tutorials/compressible/sonicDyMFoam/movingCone/system/cuttingPlane +++ /dev/null @@ -1,38 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: dev - \\/ M anipulation | -\*---------------------------------------------------------------------------*/ - -cuttingPlane -{ - type surfaces; - libs ("libsampling.so"); - - writeControl writeTime; - - surfaceFormat vtk; - fields ( p U ); - - interpolationScheme cellPoint; - - surfaces - ( - zNormal - { - type cuttingPlane; - planeType pointAndNormal; - pointAndNormalDict - { - point (0 0 0); - normal (0 0 1); - } - interpolate true; - } - ); -} - - -// ************************************************************************* // diff --git a/tutorials/compressible/sonicDyMFoam/movingCone/system/fvSchemes b/tutorials/compressible/sonicDyMFoam/movingCone/system/fvSchemes deleted file mode 100644 index 603105ab38..0000000000 --- a/tutorials/compressible/sonicDyMFoam/movingCone/system/fvSchemes +++ /dev/null @@ -1,58 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: dev - \\/ M anipulation | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "system"; - object fvSchemes; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -ddtSchemes -{ - default Euler; -} - -gradSchemes -{ - default Gauss linear; -} - -divSchemes -{ - default none; - - div(phi,U) Gauss vanLeerV; - div(phid,p) Gauss vanLeer; - div(phi,K) Gauss vanLeer; - div(phi,e) Gauss vanLeer; - - div(phiv,p) Gauss linear; - div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; -} - -laplacianSchemes -{ - default Gauss linear corrected; - - laplacian(diffusivity,cellMotionU) Gauss linear uncorrected; -} - -interpolationSchemes -{ - default linear; -} - -snGradSchemes -{ - default corrected; -} - -// ************************************************************************* // diff --git a/tutorials/compressible/sonicDyMFoam/movingCone/system/fvSolution b/tutorials/compressible/sonicDyMFoam/movingCone/system/fvSolution deleted file mode 100644 index 6d465225d1..0000000000 --- a/tutorials/compressible/sonicDyMFoam/movingCone/system/fvSolution +++ /dev/null @@ -1,94 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: dev - \\/ M anipulation | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "system"; - object fvSolution; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -solvers -{ - p - { - solver PBiCGStab; - preconditioner DILU; - tolerance 1e-06; - relTol 0.01; - } - - pFinal - { - $p; - relTol 0; - } - - "pcorr.*" - { - solver PCG; - preconditioner DIC; - tolerance 1e-2; - relTol 0; - } - - "rho.*" - { - solver diagonal; - tolerance 1e-05; - relTol 0; - } - - "(U|h|e|R|k|epsilon|omega)" - { - solver smoothSolver; - smoother symGaussSeidel; - tolerance 1e-05; - relTol 0.1; - } - - "(U|h|e|R|k|epsilon|omega)Final" - { - $U; - relTol 0; - } - - cellMotionUx - { - solver PCG; - preconditioner DIC; - tolerance 1e-08; - relTol 0; - } -} - -PIMPLE -{ - momentumPredictor yes; - correctPhi yes; - nOuterCorrectors 2; - nCorrectors 2; - transonic yes; - nNonOrthogonalCorrectors 0; - - rhoMin 0.1; - rhoMax 100.0; -} - -relaxationFactors -{ - equations - { - ".*" 1; - } -} - - -// ************************************************************************* // diff --git a/tutorials/compressible/sonicLiquidFoam/decompressionTank/constant/thermodynamicProperties b/tutorials/compressible/sonicLiquidFoam/decompressionTank/constant/thermodynamicProperties deleted file mode 100644 index 11e86319a0..0000000000 --- a/tutorials/compressible/sonicLiquidFoam/decompressionTank/constant/thermodynamicProperties +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: dev - \\/ M anipulation | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object thermodynamicProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -rho0 rho0 [1 -3 0 0 0 0 0] 1000; - -p0 p0 [1 -1 -2 0 0 0 0] 100000; - -psi psi [0 -2 2 0 0 0 0] 4.54e-07; - - -// ************************************************************************* // diff --git a/tutorials/compressible/sonicLiquidFoam/decompressionTank/constant/transportProperties b/tutorials/compressible/sonicLiquidFoam/decompressionTank/constant/transportProperties deleted file mode 100644 index f7a850a357..0000000000 --- a/tutorials/compressible/sonicLiquidFoam/decompressionTank/constant/transportProperties +++ /dev/null @@ -1,21 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: dev - \\/ M anipulation | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "constant"; - object transportProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -mu mu [1 -1 -1 0 0 0 0] 0.001; - - -// ************************************************************************* // diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/0/U b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/0/U similarity index 100% rename from tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/0/U rename to tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/0/U diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/Allrun b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/Allrun similarity index 100% rename from tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/Allrun rename to tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/Allrun diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/constant/dynamicMeshDict b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/constant/dynamicMeshDict similarity index 100% rename from tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/constant/dynamicMeshDict rename to tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/constant/dynamicMeshDict diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/constant/g b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/constant/g similarity index 100% rename from tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/constant/g rename to tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/constant/g diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/constant/kinematicCloudPositions b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/constant/kinematicCloudPositions similarity index 100% rename from tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/constant/kinematicCloudPositions rename to tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/constant/kinematicCloudPositions diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/constant/kinematicCloudProperties b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/constant/kinematicCloudProperties similarity index 100% rename from tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/constant/kinematicCloudProperties rename to tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/constant/kinematicCloudProperties diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/constant/transportProperties b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/constant/transportProperties similarity index 100% rename from tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/constant/transportProperties rename to tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/constant/transportProperties diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/constant/turbulenceProperties b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/constant/turbulenceProperties similarity index 100% rename from tutorials/compressible/sonicFoam/laminar/shockTube/constant/turbulenceProperties rename to tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/constant/turbulenceProperties diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/system/blockMeshDict.m4 b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/system/blockMeshDict.m4 similarity index 100% rename from tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/system/blockMeshDict.m4 rename to tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/system/blockMeshDict.m4 diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/system/controlDict b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/system/controlDict similarity index 95% rename from tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/system/controlDict rename to tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/system/controlDict index fe8a8821ba..02ba8e1af4 100644 --- a/tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/system/controlDict +++ b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application icoUncoupledKinematicParcelDyMFoam; +application icoUncoupledKinematicParcelFoam; startFrom startTime; diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/system/fvSchemes b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/system/fvSchemes similarity index 100% rename from tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/system/fvSchemes rename to tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/system/fvSchemes diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/system/fvSolution b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/system/fvSolution similarity index 100% rename from tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/system/fvSolution rename to tutorials/lagrangian/icoUncoupledKinematicParcelFoam/mixerVesselAMI2D/system/fvSolution diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/0/T b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/0/T similarity index 100% rename from tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/0/T rename to tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/0/T diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/0/U b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/0/U similarity index 100% rename from tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/0/U rename to tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/0/U diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/0/alpha.water.orig b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/0/alpha.water.orig similarity index 100% rename from tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/0/alpha.water.orig rename to tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/0/alpha.water.orig diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/0/p b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/0/p similarity index 100% rename from tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/0/p rename to tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/0/p diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/0/p_rgh b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/0/p_rgh similarity index 100% rename from tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/0/p_rgh rename to tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/0/p_rgh diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/Allclean b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/Allclean similarity index 100% rename from tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/Allclean rename to tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/Allclean diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/Allrun b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/Allrun similarity index 100% rename from tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/Allrun rename to tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/Allrun diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/constant/dynamicMeshDict b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/constant/dynamicMeshDict similarity index 100% rename from tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/constant/dynamicMeshDict rename to tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/constant/dynamicMeshDict diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/constant/g b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/constant/g similarity index 100% rename from tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/constant/g rename to tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/constant/g diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/constant/thermophysicalProperties b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/constant/thermophysicalProperties similarity index 100% rename from tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/constant/thermophysicalProperties rename to tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/constant/thermophysicalProperties diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/constant/thermophysicalProperties.air b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/constant/thermophysicalProperties.air similarity index 100% rename from tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/constant/thermophysicalProperties.air rename to tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/constant/thermophysicalProperties.air diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/constant/thermophysicalProperties.water b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/constant/thermophysicalProperties.water similarity index 100% rename from tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/constant/thermophysicalProperties.water rename to tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/constant/thermophysicalProperties.water diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/constant/transportProperties b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/constant/transportProperties similarity index 100% rename from tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/constant/transportProperties rename to tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/constant/transportProperties diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/constant/turbulenceProperties b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/constant/turbulenceProperties similarity index 100% rename from tutorials/lagrangian/icoUncoupledKinematicParcelDyMFoam/mixerVesselAMI2D/constant/turbulenceProperties rename to tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/constant/turbulenceProperties diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/system/blockMeshDict.m4 b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/system/blockMeshDict.m4 similarity index 100% rename from tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/system/blockMeshDict.m4 rename to tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/system/blockMeshDict.m4 diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/system/controlDict b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/system/controlDict similarity index 97% rename from tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/system/controlDict rename to tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/system/controlDict index 30b7312c49..0cbcc444fd 100644 --- a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/system/controlDict +++ b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application compressibleInterDyMFoam; +application compressibleInterFoam; startFrom startTime; diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/system/decomposeParDict b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/system/decomposeParDict similarity index 100% rename from tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/system/decomposeParDict rename to tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/system/decomposeParDict diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/system/fvSchemes b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/system/fvSchemes similarity index 100% rename from tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/system/fvSchemes rename to tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/system/fvSchemes diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/system/fvSolution b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/system/fvSolution similarity index 93% rename from tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/system/fvSolution rename to tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/system/fvSolution index 3dbd54b39e..56a18194b5 100644 --- a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/system/fvSolution +++ b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/system/fvSolution @@ -74,8 +74,8 @@ solvers U { - solver smoothSolver; - smoother GaussSeidel; + solver PBiCGStab; + preconditioner DILU; tolerance 1e-06; relTol 0; nSweeps 1; @@ -83,8 +83,8 @@ solvers "(T|k|B|nuTilda).*" { - solver smoothSolver; - smoother symGaussSeidel; + solver PBiCGStab; + preconditioner DILU; tolerance 1e-08; relTol 0; } diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/system/setFieldsDict b/tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/system/setFieldsDict similarity index 100% rename from tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/system/setFieldsDict rename to tutorials/multiphase/compressibleInterFoam/RAS/sloshingTank2D/system/setFieldsDict diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/controlDict b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/controlDict index a8b77e7264..a38883fce1 100644 --- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/controlDict +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/controlDict @@ -17,7 +17,7 @@ FoamFile application compressibleInterFoam; -startFrom startTime; +startFrom latestTime; startTime 0; diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/fvSolution b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/fvSolution index 916de59c23..5e17e65dff 100644 --- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/fvSolution +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/fvSolution @@ -79,8 +79,8 @@ solvers U { - solver smoothSolver; - smoother GaussSeidel; + solver PBiCGStab; + preconditioner DILU; tolerance 1e-06; relTol 0; nSweeps 1; @@ -88,8 +88,8 @@ solvers "(T|k|B|nuTilda).*" { - solver smoothSolver; - smoother symGaussSeidel; + solver PBiCGStab; + preconditioner DILU; tolerance 1e-08; relTol 0; } @@ -99,8 +99,8 @@ PIMPLE { momentumPredictor no; transonic no; - nOuterCorrectors 3; - nCorrectors 1; + nOuterCorrectors 2; + nCorrectors 2; nNonOrthogonalCorrectors 0; } diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/fvSolution b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/fvSolution index 15d7ee7250..2ce38a2017 100644 --- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/fvSolution +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/fvSolution @@ -56,7 +56,7 @@ solvers { solver GAMG; tolerance 1e-07; - relTol 0.01; + relTol 0; smoother DIC; } @@ -79,8 +79,8 @@ solvers U { - solver smoothSolver; - smoother GaussSeidel; + solver PBiCGStab; + preconditioner DILU; tolerance 1e-06; relTol 0; nSweeps 1; @@ -88,8 +88,8 @@ solvers "(T|k|B|nuTilda).*" { - solver smoothSolver; - smoother symGaussSeidel; + solver PBiCGStab; + preconditioner DILU; tolerance 1e-08; relTol 0; } @@ -100,7 +100,7 @@ PIMPLE momentumPredictor no; transonic no; nOuterCorrectors 2; - nCorrectors 1; + nCorrectors 2; nNonOrthogonalCorrectors 0; } diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/controlDict b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/controlDict index 248dc9ef9c..77de46b40b 100644 --- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/controlDict +++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/controlDict @@ -32,7 +32,7 @@ writeInterval 0.001; purgeWrite 0; -writeFormat ascii; +writeFormat binary; writePrecision 6; @@ -45,6 +45,6 @@ runTimeModifiable yes; adjustTimeStep on; maxCo 5; - +maxAlphaCo 2; // ************************************************************************* // diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0/U b/tutorials/multiphase/interPhaseChangeFoam/propeller/0/U similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0/U rename to tutorials/multiphase/interPhaseChangeFoam/propeller/0/U diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0/alpha.water b/tutorials/multiphase/interPhaseChangeFoam/propeller/0/alpha.water similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0/alpha.water rename to tutorials/multiphase/interPhaseChangeFoam/propeller/0/alpha.water diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0/epsilon b/tutorials/multiphase/interPhaseChangeFoam/propeller/0/epsilon similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0/epsilon rename to tutorials/multiphase/interPhaseChangeFoam/propeller/0/epsilon diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0/k b/tutorials/multiphase/interPhaseChangeFoam/propeller/0/k similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0/k rename to tutorials/multiphase/interPhaseChangeFoam/propeller/0/k diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0/nut b/tutorials/multiphase/interPhaseChangeFoam/propeller/0/nut similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0/nut rename to tutorials/multiphase/interPhaseChangeFoam/propeller/0/nut diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0/p_rgh b/tutorials/multiphase/interPhaseChangeFoam/propeller/0/p_rgh similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0/p_rgh rename to tutorials/multiphase/interPhaseChangeFoam/propeller/0/p_rgh diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allclean b/tutorials/multiphase/interPhaseChangeFoam/propeller/Allclean similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allclean rename to tutorials/multiphase/interPhaseChangeFoam/propeller/Allclean diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allmesh b/tutorials/multiphase/interPhaseChangeFoam/propeller/Allmesh similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allmesh rename to tutorials/multiphase/interPhaseChangeFoam/propeller/Allmesh diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun b/tutorials/multiphase/interPhaseChangeFoam/propeller/Allrun similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun rename to tutorials/multiphase/interPhaseChangeFoam/propeller/Allrun diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/dynamicMeshDict b/tutorials/multiphase/interPhaseChangeFoam/propeller/constant/dynamicMeshDict similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/dynamicMeshDict rename to tutorials/multiphase/interPhaseChangeFoam/propeller/constant/dynamicMeshDict diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/g b/tutorials/multiphase/interPhaseChangeFoam/propeller/constant/g similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/g rename to tutorials/multiphase/interPhaseChangeFoam/propeller/constant/g diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/transportProperties b/tutorials/multiphase/interPhaseChangeFoam/propeller/constant/transportProperties similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/transportProperties rename to tutorials/multiphase/interPhaseChangeFoam/propeller/constant/transportProperties diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/triSurface/innerCylinder.obj b/tutorials/multiphase/interPhaseChangeFoam/propeller/constant/triSurface/innerCylinder.obj similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/triSurface/innerCylinder.obj rename to tutorials/multiphase/interPhaseChangeFoam/propeller/constant/triSurface/innerCylinder.obj diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/triSurface/innerCylinderSmall.obj b/tutorials/multiphase/interPhaseChangeFoam/propeller/constant/triSurface/innerCylinderSmall.obj similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/triSurface/innerCylinderSmall.obj rename to tutorials/multiphase/interPhaseChangeFoam/propeller/constant/triSurface/innerCylinderSmall.obj diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/triSurface/outerCylinder.obj b/tutorials/multiphase/interPhaseChangeFoam/propeller/constant/triSurface/outerCylinder.obj similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/triSurface/outerCylinder.obj rename to tutorials/multiphase/interPhaseChangeFoam/propeller/constant/triSurface/outerCylinder.obj diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/triSurface/propellerStem1.obj b/tutorials/multiphase/interPhaseChangeFoam/propeller/constant/triSurface/propellerStem1.obj similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/triSurface/propellerStem1.obj rename to tutorials/multiphase/interPhaseChangeFoam/propeller/constant/triSurface/propellerStem1.obj diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/triSurface/propellerStem2.obj b/tutorials/multiphase/interPhaseChangeFoam/propeller/constant/triSurface/propellerStem2.obj similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/triSurface/propellerStem2.obj rename to tutorials/multiphase/interPhaseChangeFoam/propeller/constant/triSurface/propellerStem2.obj diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/triSurface/propellerStem3.obj b/tutorials/multiphase/interPhaseChangeFoam/propeller/constant/triSurface/propellerStem3.obj similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/triSurface/propellerStem3.obj rename to tutorials/multiphase/interPhaseChangeFoam/propeller/constant/triSurface/propellerStem3.obj diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/turbulenceProperties b/tutorials/multiphase/interPhaseChangeFoam/propeller/constant/turbulenceProperties similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/turbulenceProperties rename to tutorials/multiphase/interPhaseChangeFoam/propeller/constant/turbulenceProperties diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/blockMeshDict b/tutorials/multiphase/interPhaseChangeFoam/propeller/system/blockMeshDict similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/blockMeshDict rename to tutorials/multiphase/interPhaseChangeFoam/propeller/system/blockMeshDict diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/controlDict b/tutorials/multiphase/interPhaseChangeFoam/propeller/system/controlDict similarity index 96% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/controlDict rename to tutorials/multiphase/interPhaseChangeFoam/propeller/system/controlDict index 36e8818460..da214a14b2 100644 --- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/controlDict +++ b/tutorials/multiphase/interPhaseChangeFoam/propeller/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application interPhaseChangeDyMFoam; +application interPhaseChangeFoam; startFrom startTime; diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/createInletOutletSets.topoSetDict b/tutorials/multiphase/interPhaseChangeFoam/propeller/system/createInletOutletSets.topoSetDict similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/createInletOutletSets.topoSetDict rename to tutorials/multiphase/interPhaseChangeFoam/propeller/system/createInletOutletSets.topoSetDict diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/createPatchDict b/tutorials/multiphase/interPhaseChangeFoam/propeller/system/createPatchDict similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/createPatchDict rename to tutorials/multiphase/interPhaseChangeFoam/propeller/system/createPatchDict diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/decomposeParDict b/tutorials/multiphase/interPhaseChangeFoam/propeller/system/decomposeParDict similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/decomposeParDict rename to tutorials/multiphase/interPhaseChangeFoam/propeller/system/decomposeParDict diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/fvSchemes b/tutorials/multiphase/interPhaseChangeFoam/propeller/system/fvSchemes similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/fvSchemes rename to tutorials/multiphase/interPhaseChangeFoam/propeller/system/fvSchemes diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/fvSolution b/tutorials/multiphase/interPhaseChangeFoam/propeller/system/fvSolution similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/fvSolution rename to tutorials/multiphase/interPhaseChangeFoam/propeller/system/fvSolution diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/snappyHexMeshDict b/tutorials/multiphase/interPhaseChangeFoam/propeller/system/snappyHexMeshDict similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/snappyHexMeshDict rename to tutorials/multiphase/interPhaseChangeFoam/propeller/system/snappyHexMeshDict diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/surfaceFeaturesDict b/tutorials/multiphase/interPhaseChangeFoam/propeller/system/surfaceFeaturesDict similarity index 100% rename from tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/surfaceFeaturesDict rename to tutorials/multiphase/interPhaseChangeFoam/propeller/system/surfaceFeaturesDict diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/0.orig/U b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/0.orig/U similarity index 100% rename from tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/0.orig/U rename to tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/0.orig/U diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/0.orig/p b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/0.orig/p similarity index 100% rename from tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/0.orig/p rename to tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/0.orig/p diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/0.orig/p_gh b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/0.orig/p_gh similarity index 100% rename from tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/0.orig/p_gh rename to tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/0.orig/p_gh diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/0.orig/pointDisplacement b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/0.orig/pointDisplacement similarity index 100% rename from tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/0.orig/pointDisplacement rename to tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/0.orig/pointDisplacement diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allclean b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/Allclean similarity index 100% rename from tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allclean rename to tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/Allclean diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allrun b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/Allrun similarity index 100% rename from tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allrun rename to tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/Allrun diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/constant/dynamicMeshDict b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/constant/dynamicMeshDict similarity index 100% rename from tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/constant/dynamicMeshDict rename to tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/constant/dynamicMeshDict diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/constant/g b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/constant/g similarity index 100% rename from tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/constant/g rename to tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/constant/g diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/constant/transportProperties b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/constant/transportProperties similarity index 100% rename from tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/constant/transportProperties rename to tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/constant/transportProperties diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/constant/turbulenceProperties b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/constant/turbulenceProperties similarity index 100% rename from tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/constant/turbulenceProperties rename to tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/constant/turbulenceProperties diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/extractHeightData b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/extractHeightData similarity index 100% rename from tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/extractHeightData rename to tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/extractHeightData diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/blockMeshDict b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/system/blockMeshDict similarity index 100% rename from tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/blockMeshDict rename to tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/system/blockMeshDict diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/controlDict b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/system/controlDict similarity index 97% rename from tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/controlDict rename to tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/system/controlDict index 08ae7cf5c2..63faa2c74b 100644 --- a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/controlDict +++ b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application potentialFreeSurfaceDyMFoam; +application potentialFreeSurfaceFoam; startFrom startTime; diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/createPatchDict b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/system/createPatchDict similarity index 100% rename from tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/createPatchDict rename to tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/system/createPatchDict diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/fvSchemes b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/system/fvSchemes similarity index 100% rename from tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/fvSchemes rename to tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/system/fvSchemes diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/fvSolution b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/system/fvSolution similarity index 100% rename from tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/fvSolution rename to tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/system/fvSolution diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/topoSetDict b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/system/topoSetDict similarity index 100% rename from tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/topoSetDict rename to tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/system/topoSetDict diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/topoSetDict-selectBottom b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/system/topoSetDict-selectBottom similarity index 100% rename from tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/system/topoSetDict-selectBottom rename to tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/system/topoSetDict-selectBottom