diff --git a/applications/solvers/compressible/rhoPimpleFoam/Make/options b/applications/solvers/compressible/rhoPimpleFoam/Make/options
index 0bf2d5dee7..c3f820e3be 100644
--- a/applications/solvers/compressible/rhoPimpleFoam/Make/options
+++ b/applications/solvers/compressible/rhoPimpleFoam/Make/options
@@ -7,6 +7,8 @@ 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
EXE_LIBS = \
-lcompressibleTransportModels \
@@ -17,4 +19,7 @@ EXE_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lsampling \
- -lfvOptions
+ -lfvOptions \
+ -ldynamicFvMesh \
+ -ltopoChangerFvMesh \
+ -ldynamicMesh
diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/correctPhi.H b/applications/solvers/compressible/rhoPimpleFoam/correctPhi.H
similarity index 88%
rename from applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/correctPhi.H
rename to applications/solvers/compressible/rhoPimpleFoam/correctPhi.H
index 37072312ff..d71739f8fb 100644
--- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/correctPhi.H
+++ b/applications/solvers/compressible/rhoPimpleFoam/correctPhi.H
@@ -6,6 +6,6 @@ CorrectPhi
rho,
psi,
dimensionedScalar("rAUf", dimTime, 1),
- divrhoU,
+ divrhoU(),
pimple
);
diff --git a/applications/solvers/compressible/rhoPimpleFoam/createRhoUfIfPresent.H b/applications/solvers/compressible/rhoPimpleFoam/createRhoUfIfPresent.H
new file mode 100644
index 0000000000..0c22396db2
--- /dev/null
+++ b/applications/solvers/compressible/rhoPimpleFoam/createRhoUfIfPresent.H
@@ -0,0 +1,51 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2017 OpenFOAM Foundation
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+Global
+ createRhoUf
+
+Description
+ Creates and initialises the velocity field rhoUf if present.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+autoPtr rhoUf;
+
+IOobject rhoUfHeader
+(
+ "rhoUf",
+ runTime.timeName(),
+ mesh,
+ IOobject::MUST_READ,
+ IOobject::AUTO_WRITE
+);
+
+if (rhoUfHeader.typeHeaderOk(true))
+{
+ Info<< "Reading face momentum rhoUf\n" << endl;
+ rhoUf = new surfaceVectorField(rhoUfHeader, mesh);
+}
+
+// ************************************************************************* //
diff --git a/applications/solvers/compressible/rhoPimpleFoam/pEqn.H b/applications/solvers/compressible/rhoPimpleFoam/pEqn.H
index 83eeb8fc68..4bf0460876 100644
--- a/applications/solvers/compressible/rhoPimpleFoam/pEqn.H
+++ b/applications/solvers/compressible/rhoPimpleFoam/pEqn.H
@@ -20,9 +20,10 @@ surfaceScalarField phiHbyA
(
"phiHbyA",
fvc::interpolate(rho)*fvc::flux(HbyA)
- + rhorAUf*fvc::ddtCorr(rho, U, phi)
+ + 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
@@ -108,7 +109,15 @@ else if (pimple.SIMPLErho())
rho = thermo.rho();
}
+// 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/compressible/rhoPimpleFoam/pcEqn.H b/applications/solvers/compressible/rhoPimpleFoam/pcEqn.H
index e9b849bc05..8ec294f3cd 100644
--- a/applications/solvers/compressible/rhoPimpleFoam/pcEqn.H
+++ b/applications/solvers/compressible/rhoPimpleFoam/pcEqn.H
@@ -1,3 +1,5 @@
+InfoInFunction << "consistent" << endl;
+
if (!pimple.SIMPLErho())
{
rho = thermo.rho();
@@ -21,10 +23,11 @@ surfaceScalarField phiHbyA
"phiHbyA",
(
fvc::interpolate(rho)*fvc::flux(HbyA)
- + fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
+ + fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi, rhoUf)
)
);
+fvc::makeRelative(phiHbyA, rho, U);
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
volScalarField rhorAtU("rhorAtU", rho*rAtU);
@@ -119,7 +122,15 @@ else if (pimple.SIMPLErho())
rho = thermo.rho();
}
+// 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/compressible/rhoPimpleFoam/readControls.H b/applications/solvers/compressible/rhoPimpleFoam/readControls.H
new file mode 100644
index 0000000000..8a127d2bd2
--- /dev/null
+++ b/applications/solvers/compressible/rhoPimpleFoam/readControls.H
@@ -0,0 +1,10 @@
+#include "readTimeControls.H"
+
+bool correctPhi = pimple.dict().lookupOrDefault
+(
+ "correctPhi",
+ !isA(mesh)
+);
+
+bool checkMeshCourantNo =
+ pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/Make/files b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/Make/files
deleted file mode 100644
index 034b5c2b1b..0000000000
--- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/Make/files
+++ /dev/null
@@ -1,3 +0,0 @@
-rhoPimpleDyMFoam.C
-
-EXE = $(FOAM_APPBIN)/rhoPimpleDyMFoam
diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/Make/options b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/Make/options
deleted file mode 100644
index e94cf58c0f..0000000000
--- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/Make/options
+++ /dev/null
@@ -1,26 +0,0 @@
-EXE_INC = \
- -I.. \
- -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)/meshTools/lnInclude \
- -I$(LIB_SRC)/sampling/lnInclude \
- -I$(LIB_SRC)/dynamicFvMesh/lnInclude \
- -I$(LIB_SRC)/dynamicMesh/lnInclude
-
-EXE_LIBS = \
- -lcompressibleTransportModels \
- -lfluidThermophysicalModels \
- -lspecie \
- -lturbulenceModels \
- -lcompressibleTurbulenceModels \
- -lfiniteVolume \
- -lmeshTools \
- -lsampling \
- -lfvOptions \
- -ldynamicFvMesh \
- -ltopoChangerFvMesh \
- -ldynamicMesh
diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/createControls.H b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/createControls.H
deleted file mode 100644
index aed0e76956..0000000000
--- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/createControls.H
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "createTimeControls.H"
-
-bool correctPhi
-(
- pimple.dict().lookupOrDefault("correctPhi", true)
-);
-
-bool checkMeshCourantNo
-(
- pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
-);
diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H
deleted file mode 100644
index ed802ba6d2..0000000000
--- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H
+++ /dev/null
@@ -1,112 +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));
-
-if (pimple.nCorrPISO() <= 1)
-{
- tUEqn.clear();
-}
-
-surfaceScalarField phiHbyA
-(
- "phiHbyA",
- fvc::flux(rho*HbyA)
- + 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);
-
-if (pimple.transonic())
-{
- surfaceScalarField phid
- (
- "phid",
- (fvc::interpolate(psi)/fvc::interpolate(rho))*phiHbyA
- );
-
- phiHbyA -= fvc::interpolate(psi*p)*phiHbyA/fvc::interpolate(rho);
-
- while (pimple.correctNonOrthogonal())
- {
- fvScalarMatrix pEqn
- (
- fvc::ddt(rho) + psi*correction(fvm::ddt(p))
- + fvc::div(phiHbyA)
- + fvm::div(phid, p)
- - fvm::laplacian(rhorAUf, p)
- ==
- fvOptions(psi, p, rho.name())
- );
-
- // Relax the pressure equation to ensure diagonal-dominance
- pEqn.relax();
-
- pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
-
- if (pimple.finalNonOrthogonalIter())
- {
- phi = phiHbyA + pEqn.flux();
- }
- }
-}
-else
-{
- while (pimple.correctNonOrthogonal())
- {
- // Pressure corrector
- fvScalarMatrix pEqn
- (
- fvc::ddt(rho) + psi*correction(fvm::ddt(p))
- + fvc::div(phiHbyA)
- - fvm::laplacian(rhorAUf, p)
- ==
- 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();
-
-U = HbyA - rAU*fvc::grad(p);
-U.correctBoundaryConditions();
-fvOptions.correct(U);
-K = 0.5*magSqr(U);
-
-if (pressureControl.limit(p))
-{
- p.correctBoundaryConditions();
- rho = thermo.rho();
-}
-
-{
- 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/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/readControls.H b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/readControls.H
deleted file mode 100644
index ed2db49fb4..0000000000
--- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/readControls.H
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "readTimeControls.H"
-
-correctPhi = pimple.dict().lookupOrDefault("correctPhi", true);
-
-checkMeshCourantNo =
- pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/rhoPimpleDyMFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/rhoPimpleDyMFoam.C
deleted file mode 100644
index 7e23de61fa..0000000000
--- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/rhoPimpleDyMFoam.C
+++ /dev/null
@@ -1,167 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
- \\ / O peration |
- \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
- \\/ M anipulation |
--------------------------------------------------------------------------------
-License
- This file is part of OpenFOAM.
-
- OpenFOAM is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with OpenFOAM. If not, see .
-
-Application
- rhoPimpleDyMFoam
-
-Description
- Transient solver for turbulent flow of compressible fluids for HVAC and
- similar applications, with optional mesh motion and mesh topology changes.
-
- Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
- pseudo-transient simulations.
-
-\*---------------------------------------------------------------------------*/
-
-#include "fvCFD.H"
-#include "dynamicFvMesh.H"
-#include "fluidThermo.H"
-#include "turbulentFluidThermoModel.H"
-#include "bound.H"
-#include "pimpleControl.H"
-#include "pressureControl.H"
-#include "CorrectPhi.H"
-#include "fvOptions.H"
-#include "localEulerDdtScheme.H"
-#include "fvcSmooth.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-int main(int argc, char *argv[])
-{
- #include "postProcess.H"
-
- #include "setRootCase.H"
- #include "createTime.H"
- #include "createDynamicFvMesh.H"
- #include "createControl.H"
- #include "initContinuityErrs.H"
- #include "createFields.H"
- #include "createFieldRefs.H"
- #include "createRhoUf.H"
- #include "createControls.H"
-
- turbulence->validate();
-
- if (!LTS)
- {
- #include "compressibleCourantNo.H"
- #include "setInitialDeltaT.H"
- }
-
- // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
- Info<< "\nStarting time loop\n" << endl;
-
- while (runTime.run())
- {
- #include "readControls.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))
- );
-
- if (LTS)
- {
- #include "setRDeltaT.H"
- }
- else
- {
- #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/rhoPimpleFoam/rhoPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C
index b18975f10b..754e95bfcd 100644
--- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C
+++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C
@@ -26,7 +26,7 @@ Application
Description
Transient solver for turbulent flow of compressible fluids for HVAC and
- similar applications.
+ similar applications, with optional mesh motion and mesh topology changes.
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
pseudo-transient simulations.
@@ -34,11 +34,13 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
+#include "dynamicFvMesh.H"
#include "fluidThermo.H"
#include "turbulentFluidThermoModel.H"
#include "bound.H"
#include "pimpleControl.H"
#include "pressureControl.H"
+#include "CorrectPhi.H"
#include "fvOptions.H"
#include "localEulerDdtScheme.H"
#include "fvcSmooth.H"
@@ -51,12 +53,13 @@ int main(int argc, char *argv[])
#include "setRootCase.H"
#include "createTime.H"
- #include "createMesh.H"
+ #include "createDynamicFvMesh.H"
#include "createControl.H"
- #include "createTimeControls.H"
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createFieldRefs.H"
+ #include "createRhoUfIfPresent.H"
+ #include "createTimeControls.H"
turbulence->validate();
@@ -72,21 +75,69 @@ int main(int argc, char *argv[])
while (runTime.run())
{
- #include "readTimeControls.H"
+ #include "readControls.H"
- if (LTS)
{
- #include "setRDeltaT.H"
- }
- else
- {
- #include "compressibleCourantNo.H"
- #include "setDeltaT.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))
+ );
+ }
- runTime++;
+ if (LTS)
+ {
+ #include "setRDeltaT.H"
+ }
+ else
+ {
+ #include "compressibleCourantNo.H"
+ #include "setDeltaT.H"
+ }
- Info<< "Time = " << runTime.timeName() << nl << endl;
+ runTime++;
+
+ Info<< "Time = " << runTime.timeName() << nl << endl;
+
+ // 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();
+
+ #include "updateRhoUf.H"
+
+ 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"
+ }
+ }
+ }
if (pimple.nCorrPIMPLE() <= 1)
{
diff --git a/applications/solvers/compressible/rhoPimpleFoam/updateRhoUf.H b/applications/solvers/compressible/rhoPimpleFoam/updateRhoUf.H
new file mode 100644
index 0000000000..e3695732a2
--- /dev/null
+++ b/applications/solvers/compressible/rhoPimpleFoam/updateRhoUf.H
@@ -0,0 +1,55 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2017 OpenFOAM Foundation
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+Global
+ updateRhoUf
+
+Description
+ Constructs the face momentum field rhoUf if not already constructed.
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+if (mesh.changing())
+{
+ if (!rhoUf.valid())
+ {
+ Info<< "Constructing face momentum rhoUf" << endl;
+
+ rhoUf = new surfaceVectorField
+ (
+ IOobject
+ (
+ "rhoUf",
+ runTime.timeName(),
+ mesh,
+ IOobject::READ_IF_PRESENT,
+ IOobject::AUTO_WRITE
+ ),
+ fvc::interpolate(rho*U)
+ );
+ }
+}
+
+// ************************************************************************* //
diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/options b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/options
index 425e8db774..fdca074204 100644
--- a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/options
+++ b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/Make/options
@@ -1,6 +1,6 @@
EXE_INC = \
-I.. \
- -I../../rhoPimpleFoam/rhoPimpleDyMFoam \
+ -I../../rhoPimpleFoam \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C
index dd01be5530..89b216a6a0 100644
--- a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C
+++ b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C
@@ -51,7 +51,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "createControl.H"
- #include "createControls.H"
+ #include "createTimeControls.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createRhoUf.H"
diff --git a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/options b/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/options
index f6f65d7c6c..6cc0825481 100644
--- a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/options
+++ b/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/Make/options
@@ -1,7 +1,7 @@
EXE_INC = \
-I.. \
-I../../reactingParcelFoam \
- -I../../../compressible/rhoPimpleFoam/rhoPimpleDyMFoam \
+ -I../../../compressible/rhoPimpleFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I${LIB_SRC}/meshTools/lnInclude \
-I${LIB_SRC}/sampling/lnInclude \
diff --git a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/sprayDyMFoam.C b/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/sprayDyMFoam.C
index 5b614f8f4e..fc8ce4e1a3 100644
--- a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/sprayDyMFoam.C
+++ b/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/sprayDyMFoam.C
@@ -51,7 +51,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "createControl.H"
- #include "createControls.H"
+ #include "createTimeControls.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createRhoUf.H"
diff --git a/bin/rhoPimpleDyMFoam b/bin/rhoPimpleDyMFoam
new file mode 120000
index 0000000000..d9fcbed5a0
--- /dev/null
+++ b/bin/rhoPimpleDyMFoam
@@ -0,0 +1 @@
+mergedDyM
\ No newline at end of file
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/0.orig/T b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/0.orig/T
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/0.orig/T
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/0.orig/T
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/0.orig/U b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/0.orig/U
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/0.orig/U
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/0.orig/U
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/0.orig/alphat b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/0.orig/alphat
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/0.orig/alphat
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/0.orig/alphat
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/0.orig/epsilon b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/0.orig/epsilon
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/0.orig/epsilon
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/0.orig/epsilon
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/0.orig/k b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/0.orig/k
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/0.orig/k
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/0.orig/k
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/0.orig/nut b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/0.orig/nut
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/0.orig/nut
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/0.orig/nut
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/0.orig/p b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/0.orig/p
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/0.orig/p
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/0.orig/p
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allclean b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/Allclean
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allclean
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/Allclean
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allrun b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/Allrun
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/Allrun
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/Allrun
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/boundaryConditions b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/boundaryConditions
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/boundaryConditions
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/boundaryConditions
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/caseSettings b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/caseSettings
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/caseSettings
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/caseSettings
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/dynamicMeshDict b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/dynamicMeshDict
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/dynamicMeshDict
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/dynamicMeshDict
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/thermophysicalProperties b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/thermophysicalProperties
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/thermophysicalProperties
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/thermophysicalProperties
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/transportProperties b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/transportProperties
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/transportProperties
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/transportProperties
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/AMI.eMesh b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/AMI.eMesh
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/AMI.eMesh
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/AMI.eMesh
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/AMI.obj b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/AMI.obj
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/AMI.obj
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/AMI.obj
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/innerInlet.obj b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/innerInlet.obj
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/innerInlet.obj
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/innerInlet.obj
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/innerOutlet.obj b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/innerOutlet.obj
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/innerOutlet.obj
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/innerOutlet.obj
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/outerInlet.obj b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/outerInlet.obj
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/outerInlet.obj
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/outerInlet.obj
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/outerOutlet.obj b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/outerOutlet.obj
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/outerOutlet.obj
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/outerOutlet.obj
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/rotorBlades.eMesh b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/rotorBlades.eMesh
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/rotorBlades.eMesh
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/rotorBlades.eMesh
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/rotorBlades.obj b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/rotorBlades.obj
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/rotorBlades.obj
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/rotorBlades.obj
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/shaft.eMesh b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/shaft.eMesh
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/shaft.eMesh
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/shaft.eMesh
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/shaft.obj b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/shaft.obj
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/shaft.obj
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/shaft.obj
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/statorBlades.eMesh b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/statorBlades.eMesh
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/statorBlades.eMesh
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/statorBlades.eMesh
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/statorBlades.obj b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/statorBlades.obj
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/statorBlades.obj
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/statorBlades.obj
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/wall.eMesh b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/wall.eMesh
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/wall.eMesh
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/wall.eMesh
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/wall.obj b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/wall.obj
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/triSurface/wall.obj
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/triSurface/wall.obj
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/turbulenceProperties b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/turbulenceProperties
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/turbulenceProperties
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/constant/turbulenceProperties
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/blockMeshDict b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/system/blockMeshDict
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/blockMeshDict
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/system/blockMeshDict
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/controlDict b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/system/controlDict
similarity index 97%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/controlDict
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/system/controlDict
index 8dd5c62f0f..465bf360fb 100644
--- a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/controlDict
+++ b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/system/controlDict
@@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-application rhoPimpleDyMFoam;
+application rhoPimpleFoam;
startFrom latestTime;
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/createBafflesDict b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/system/createBafflesDict
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/createBafflesDict
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/system/createBafflesDict
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/system/fvSchemes
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/fvSchemes
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/system/fvSchemes
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/fvSolution b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/system/fvSolution
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/fvSolution
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/system/fvSolution
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/snappyHexMeshDict b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/system/snappyHexMeshDict
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/snappyHexMeshDict
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/system/snappyHexMeshDict
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/surfaceFeatureExtractDict b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/system/surfaceFeatureExtractDict
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/surfaceFeatureExtractDict
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/system/surfaceFeatureExtractDict
diff --git a/tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/surfaceFeatureExtractDictDefaults b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/system/surfaceFeatureExtractDictDefaults
similarity index 100%
rename from tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/system/surfaceFeatureExtractDictDefaults
rename to tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/system/surfaceFeatureExtractDictDefaults