diff --git a/applications/solvers/DNS/dnsFoam/Make/options b/applications/solvers/DNS/dnsFoam/Make/options
index 34c3503a51..e0e7a30d72 100644
--- a/applications/solvers/DNS/dnsFoam/Make/options
+++ b/applications/solvers/DNS/dnsFoam/Make/options
@@ -1,10 +1,7 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
- -I$(LIB_SRC)/randomProcesses/lnInclude \
- -I$(LIB_SRC)/sampling/lnInclude
+ -I$(LIB_SRC)/randomProcesses/lnInclude
EXE_LIBS = \
-lfiniteVolume \
- -lrandomProcesses \
- -lsampling \
- -lmeshTools
+ -lrandomProcesses
diff --git a/applications/solvers/combustion/PDRFoam/Make/options b/applications/solvers/combustion/PDRFoam/Make/options
index 135659c276..b6c6398fde 100644
--- a/applications/solvers/combustion/PDRFoam/Make/options
+++ b/applications/solvers/combustion/PDRFoam/Make/options
@@ -5,7 +5,6 @@ EXE_INC = \
-IPDRModels/dragModels/PDRDragModel \
-IlaminarFlameSpeed/SCOPE \
-I$(LIB_SRC)/engine/lnInclude \
- -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
diff --git a/applications/solvers/combustion/XiFoam/Make/options b/applications/solvers/combustion/XiFoam/Make/options
index 0812df5e3b..3a07a7de58 100644
--- a/applications/solvers/combustion/XiFoam/Make/options
+++ b/applications/solvers/combustion/XiFoam/Make/options
@@ -5,7 +5,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
- -I$(LIB_SRC)/sampling/lnInclude \
+ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \
@@ -17,5 +17,5 @@ EXE_LIBS = \
-lreactionThermophysicalModels \
-lspecie \
-llaminarFlameSpeedModels \
- -lfiniteVolume \
- -lmeshTools
+ -lmeshTools \
+ -lfiniteVolume
diff --git a/applications/solvers/combustion/coldEngineFoam/Make/options b/applications/solvers/combustion/coldEngineFoam/Make/options
index 25217ab23f..2eaea744b0 100644
--- a/applications/solvers/combustion/coldEngineFoam/Make/options
+++ b/applications/solvers/combustion/coldEngineFoam/Make/options
@@ -20,6 +20,5 @@ EXE_LIBS = \
-lfluidThermophysicalModels \
-lspecie \
-lfiniteVolume \
- -lsampling \
-lmeshTools \
-lfieldSources
diff --git a/applications/solvers/combustion/fireFoam/fireFoam.C b/applications/solvers/combustion/fireFoam/fireFoam.C
index 9f97843a96..021ed3c6f0 100644
--- a/applications/solvers/combustion/fireFoam/fireFoam.C
+++ b/applications/solvers/combustion/fireFoam/fireFoam.C
@@ -30,7 +30,6 @@ Description
\*---------------------------------------------------------------------------*/
-#include "mapDistribute.H"
#include "fvCFD.H"
#include "turbulenceModel.H"
#include "basicReactingCloud.H"
diff --git a/applications/solvers/incompressible/icoFoam/Make/options b/applications/solvers/incompressible/icoFoam/Make/options
index fa15f12452..d38cd8b180 100644
--- a/applications/solvers/incompressible/icoFoam/Make/options
+++ b/applications/solvers/incompressible/icoFoam/Make/options
@@ -1,5 +1,7 @@
EXE_INC = \
- -I$(LIB_SRC)/finiteVolume/lnInclude
+ -I$(LIB_SRC)/finiteVolume/lnInclude \
+ -I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \
- -lfiniteVolume
+ -lfiniteVolume \
+ -lsampling
diff --git a/applications/solvers/multiphase/bubbleFoam/DDtU.H b/applications/solvers/multiphase/bubbleFoam/DDtU.H
deleted file mode 100644
index 96b6a63a43..0000000000
--- a/applications/solvers/multiphase/bubbleFoam/DDtU.H
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- DDtU1 =
- fvc::ddt(U1)
- + fvc::div(phi1, U1)
- - fvc::div(phi1)*U1;
-
- DDtU2 =
- fvc::ddt(U2)
- + fvc::div(phi2, U2)
- - fvc::div(phi2)*U2;
-}
diff --git a/applications/solvers/multiphase/bubbleFoam/Make/files b/applications/solvers/multiphase/bubbleFoam/Make/files
deleted file mode 100644
index 1bc79aa226..0000000000
--- a/applications/solvers/multiphase/bubbleFoam/Make/files
+++ /dev/null
@@ -1,3 +0,0 @@
-bubbleFoam.C
-
-EXE = $(FOAM_APPBIN)/bubbleFoam
diff --git a/applications/solvers/multiphase/bubbleFoam/Make/options b/applications/solvers/multiphase/bubbleFoam/Make/options
deleted file mode 100644
index 39da2bd6db..0000000000
--- a/applications/solvers/multiphase/bubbleFoam/Make/options
+++ /dev/null
@@ -1,6 +0,0 @@
-EXE_INC = \
- -I$(LIB_SRC)/finiteVolume/lnInclude
-
-EXE_LIBS = \
- -lfiniteVolume \
- -lmeshTools
diff --git a/applications/solvers/multiphase/bubbleFoam/UEqns.H b/applications/solvers/multiphase/bubbleFoam/UEqns.H
deleted file mode 100644
index 703f6b6d8d..0000000000
--- a/applications/solvers/multiphase/bubbleFoam/UEqns.H
+++ /dev/null
@@ -1,74 +0,0 @@
-fvVectorMatrix U1Eqn(U1, U1.dimensions()*dimVol/dimTime);
-fvVectorMatrix U2Eqn(U2, U2.dimensions()*dimVol/dimTime);
-
-{
- volTensorField Rc1(-nuEff1*(T(fvc::grad(U1))));
- Rc1 = Rc1 + (2.0/3.0)*sqr(Ct)*I*k - (2.0/3.0)*I*tr(Rc1);
-
- surfaceScalarField phiR1
- (
- - fvc::interpolate(nuEff1)
- *mesh.magSf()*fvc::snGrad(alpha1)
- /fvc::interpolate(alpha1 + scalar(0.001))
- );
-
- U1Eqn =
- (
- (scalar(1) + Cvm*rho2*alpha2/rho1)*
- (
- fvm::ddt(U1)
- + fvm::div(phi1, U1, "div(phi1,U1)")
- - fvm::Sp(fvc::div(phi1), U1)
- )
-
- - fvm::laplacian(nuEff1, U1)
- + fvc::div(Rc1)
-
- + fvm::div(phiR1, U1, "div(phi1,U1)")
- - fvm::Sp(fvc::div(phiR1), U1)
- + (fvc::grad(alpha1)/(fvc::average(alpha1) + scalar(0.001)) & Rc1)
- ==
- // g // Buoyancy term transfered to p-equation
- - fvm::Sp(alpha2/rho1*dragCoef, U1)
- //+ alpha2/rho1*dragCoef*U2 // Explicit drag transfered to p-equation
- - alpha2/rho1*(liftCoeff - Cvm*rho2*DDtU2)
- );
-
- U1Eqn.relax();
-
-
- volTensorField Rc2(-nuEff2*T(fvc::grad(U2)));
- Rc2 = Rc2 + (2.0/3.0)*I*k - (2.0/3.0)*I*tr(Rc2);
-
- surfaceScalarField phiR2
- (
- - fvc::interpolate(nuEff2)
- *mesh.magSf()*fvc::snGrad(alpha2)
- /fvc::interpolate(alpha2 + scalar(0.001))
- );
-
- U2Eqn =
- (
- (scalar(1) + Cvm*rho2*alpha1/rho2)*
- (
- fvm::ddt(U2)
- + fvm::div(phi2, U2, "div(phi2,U2)")
- - fvm::Sp(fvc::div(phi2), U2)
- )
-
- - fvm::laplacian(nuEff2, U2)
- + fvc::div(Rc2)
-
- + fvm::div(phiR2, U2, "div(phi2,U2)")
- - fvm::Sp(fvc::div(phiR2), U2)
-
- + (fvc::grad(alpha2)/(fvc::average(alpha2) + scalar(0.001)) & Rc2)
- ==
- // g // Buoyancy term transfered to p-equation
- - fvm::Sp(alpha1/rho2*dragCoef, U2)
- //+ alpha1/rho2*dragCoef*U1 // Explicit drag transfered to p-equation
- + alpha1/rho2*(liftCoeff + Cvm*rho2*DDtU1)
- );
-
- U2Eqn.relax();
-}
diff --git a/applications/solvers/multiphase/bubbleFoam/alphaEqn.H b/applications/solvers/multiphase/bubbleFoam/alphaEqn.H
deleted file mode 100644
index 0ecab03016..0000000000
--- a/applications/solvers/multiphase/bubbleFoam/alphaEqn.H
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- word scheme("div(phi,alpha1)");
-
- surfaceScalarField phir(phi1 - phi2);
-
- Info<< "Max Ur Courant Number = "
- << (
- max
- (
- mesh.surfaceInterpolation::deltaCoeffs()*mag(phir)
- /mesh.magSf()
- )*runTime.deltaT()
- ).value()
- << endl;
-
- for (int acorr=0; acorr.
-
-Application
- bubbleFoam
-
-Description
- Solver for a system of 2 incompressible fluid phases with one phase
- dispersed, e.g. gas bubbles in a liquid.
-
-\*---------------------------------------------------------------------------*/
-
-#include "fvCFD.H"
-#include "nearWallDist.H"
-#include "wallFvPatch.H"
-#include "Switch.H"
-
-#include "pimpleControl.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-int main(int argc, char *argv[])
-{
- #include "setRootCase.H"
-
- #include "createTime.H"
- #include "createMesh.H"
- #include "readGravitationalAcceleration.H"
- #include "createFields.H"
- #include "initContinuityErrs.H"
- #include "readTimeControls.H"
- #include "CourantNo.H"
- #include "setInitialDeltaT.H"
-
- pimpleControl pimple(mesh);
-
- // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
- Info<< "\nStarting time loop\n" << endl;
-
- while (runTime.run())
- {
- #include "readBubbleFoamControls.H"
- #include "CourantNo.H"
- #include "setDeltaT.H"
-
- runTime++;
- Info<< "Time = " << runTime.timeName() << nl << endl;
-
- // --- Pressure-velocity PIMPLE corrector loop
- while (pimple.loop())
- {
- #include "alphaEqn.H"
- #include "liftDragCoeffs.H"
- #include "UEqns.H"
-
- // --- Pressure corrector loop
- while (pimple.correct())
- {
- #include "pEqn.H"
-
- if (correctAlpha && !pimple.finalIter())
- {
- #include "alphaEqn.H"
- }
- }
-
- #include "DDtU.H"
-
- if (pimple.turbCorr())
- {
- #include "kEpsilon.H"
- nuEff1 = sqr(Ct)*nut2 + nu1;
- }
- }
-
- #include "write.H"
-
- Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
- << " ClockTime = " << runTime.elapsedClockTime() << " s"
- << nl << endl;
- }
-
- Info<< "End\n" << endl;
-
- return 0;
-}
-
-
-// ************************************************************************* //
diff --git a/applications/solvers/multiphase/bubbleFoam/createFields.H b/applications/solvers/multiphase/bubbleFoam/createFields.H
deleted file mode 100644
index 9c33ee23a1..0000000000
--- a/applications/solvers/multiphase/bubbleFoam/createFields.H
+++ /dev/null
@@ -1,195 +0,0 @@
- Info<< "Reading field alpha1\n" << endl;
- volScalarField alpha1
- (
- IOobject
- (
- "alpha1",
- runTime.timeName(),
- mesh,
- IOobject::MUST_READ,
- IOobject::AUTO_WRITE
- ),
- mesh
- );
-
- volScalarField alpha2
- (
- IOobject
- (
- "alpha2",
- runTime.timeName(),
- mesh,
- IOobject::NO_READ,
- IOobject::NO_WRITE
- ),
- scalar(1) - alpha1
- //,alpha1.boundaryField().types()
- );
-
- Info<< "Reading field p\n" << endl;
- volScalarField p
- (
- IOobject
- (
- "p",
- runTime.timeName(),
- mesh,
- IOobject::MUST_READ,
- IOobject::AUTO_WRITE
- ),
- mesh
- );
-
- Info<< "Reading field U1\n" << endl;
- volVectorField U1
- (
- IOobject
- (
- "U1",
- runTime.timeName(),
- mesh,
- IOobject::MUST_READ,
- IOobject::AUTO_WRITE
- ),
- mesh
- );
-
- Info<< "Reading field U2\n" << endl;
- volVectorField U2
- (
- IOobject
- (
- "U2",
- runTime.timeName(),
- mesh,
- IOobject::MUST_READ,
- IOobject::AUTO_WRITE
- ),
- mesh
- );
-
- volVectorField U
- (
- IOobject
- (
- "U",
- runTime.timeName(),
- mesh,
- IOobject::NO_READ,
- IOobject::AUTO_WRITE
- ),
- alpha1*U1 + alpha2*U2
- );
-
-
- Info<< "Reading transportProperties\n" << endl;
-
- IOdictionary transportProperties
- (
- IOobject
- (
- "transportProperties",
- runTime.constant(),
- mesh,
- IOobject::MUST_READ_IF_MODIFIED,
- IOobject::NO_WRITE
- )
- );
-
- dimensionedScalar rho1
- (
- transportProperties.lookup("rho1")
- );
-
- dimensionedScalar rho2
- (
- transportProperties.lookup("rho2")
- );
-
- dimensionedScalar nu1
- (
- transportProperties.lookup("nu1")
- );
-
- dimensionedScalar nu2
- (
- transportProperties.lookup("nu2")
- );
-
- dimensionedScalar d1
- (
- transportProperties.lookup("d1")
- );
-
- dimensionedScalar d2
- (
- transportProperties.lookup("d2")
- );
-
- dimensionedScalar Cvm
- (
- transportProperties.lookup("Cvm")
- );
-
- dimensionedScalar Cl
- (
- transportProperties.lookup("Cl")
- );
-
- dimensionedScalar Ct
- (
- transportProperties.lookup("Ct")
- );
-
- #include "createPhi1.H"
- #include "createPhi2.H"
-
- surfaceScalarField phi
- (
- IOobject
- (
- "phi",
- runTime.timeName(),
- mesh
- ),
- fvc::interpolate(alpha1)*phi1
- + fvc::interpolate(alpha2)*phi2
- );
-
- volScalarField rho
- (
- IOobject
- (
- "rho",
- runTime.timeName(),
- mesh
- ),
- alpha1*rho1 + alpha2*rho2
- );
-
- #include "createRASTurbulence.H"
-
- Info<< "Calculating field DDtU1 and DDtU2\n" << endl;
-
- volVectorField DDtU1
- (
- fvc::ddt(U1)
- + fvc::div(phi1, U1)
- - fvc::div(phi1)*U1
- );
-
- volVectorField DDtU2
- (
- fvc::ddt(U2)
- + fvc::div(phi2, U2)
- - fvc::div(phi2)*U2
- );
-
-
- Info<< "Calculating field g.h\n" << endl;
- volScalarField gh("gh", g & mesh.C());
-
-
- label pRefCell = 0;
- scalar pRefValue = 0.0;
- setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);
diff --git a/applications/solvers/multiphase/bubbleFoam/createPhi1.H b/applications/solvers/multiphase/bubbleFoam/createPhi1.H
deleted file mode 100644
index 81bac77602..0000000000
--- a/applications/solvers/multiphase/bubbleFoam/createPhi1.H
+++ /dev/null
@@ -1,67 +0,0 @@
- IOobject phi1Header
- (
- "phi1",
- runTime.timeName(),
- mesh,
- IOobject::NO_READ
- );
-
- autoPtr phi1Ptr(NULL);
-
- if (phi1Header.headerOk())
- {
- Info<< "Reading face flux field phi1\n" << endl;
-
- phi1Ptr.reset
- (
- new surfaceScalarField
- (
- IOobject
- (
- "phi1",
- runTime.timeName(),
- mesh,
- IOobject::MUST_READ,
- IOobject::AUTO_WRITE
- ),
- mesh
- )
- );
- }
- else
- {
- Info<< "Calculating face flux field phi1\n" << endl;
-
- wordList phiTypes
- (
- U1.boundaryField().size(),
- calculatedFvPatchScalarField::typeName
- );
-
- forAll(U1.boundaryField(), i)
- {
- if (isA(U1.boundaryField()[i]))
- {
- phiTypes[i] = fixedValueFvPatchScalarField::typeName;
- }
- }
-
- phi1Ptr.reset
- (
- new surfaceScalarField
- (
- IOobject
- (
- "phi1",
- runTime.timeName(),
- mesh,
- IOobject::NO_READ,
- IOobject::AUTO_WRITE
- ),
- fvc::interpolate(U1) & mesh.Sf(),
- phiTypes
- )
- );
- }
-
- surfaceScalarField& phi1 = phi1Ptr();
diff --git a/applications/solvers/multiphase/bubbleFoam/createPhi2.H b/applications/solvers/multiphase/bubbleFoam/createPhi2.H
deleted file mode 100644
index ebba6a3f6c..0000000000
--- a/applications/solvers/multiphase/bubbleFoam/createPhi2.H
+++ /dev/null
@@ -1,67 +0,0 @@
- IOobject phi2Header
- (
- "phi2",
- runTime.timeName(),
- mesh,
- IOobject::NO_READ
- );
-
- autoPtr phi2Ptr(NULL);
-
- if (phi2Header.headerOk())
- {
- Info<< "Reading face flux field phi2\n" << endl;
-
- phi2Ptr.reset
- (
- new surfaceScalarField
- (
- IOobject
- (
- "phi2",
- runTime.timeName(),
- mesh,
- IOobject::MUST_READ,
- IOobject::AUTO_WRITE
- ),
- mesh
- )
- );
- }
- else
- {
- Info<< "Calculating face flux field phi2\n" << endl;
-
- wordList phiTypes
- (
- U2.boundaryField().size(),
- calculatedFvPatchScalarField::typeName
- );
-
- forAll(U2.boundaryField(), i)
- {
- if (isA(U2.boundaryField()[i]))
- {
- phiTypes[i] = fixedValueFvPatchScalarField::typeName;
- }
- }
-
- phi2Ptr.reset
- (
- new surfaceScalarField
- (
- IOobject
- (
- "phi2",
- runTime.timeName(),
- mesh,
- IOobject::NO_READ,
- IOobject::AUTO_WRITE
- ),
- fvc::interpolate(U2) & mesh.Sf(),
- phiTypes
- )
- );
- }
-
- surfaceScalarField& phi2 = phi2Ptr();
diff --git a/applications/solvers/multiphase/bubbleFoam/liftDragCoeffs.H b/applications/solvers/multiphase/bubbleFoam/liftDragCoeffs.H
deleted file mode 100644
index d2ebb75a2f..0000000000
--- a/applications/solvers/multiphase/bubbleFoam/liftDragCoeffs.H
+++ /dev/null
@@ -1,23 +0,0 @@
- volVectorField Ur(U1 - U2);
- volScalarField magUr(mag(Ur));
-
- volScalarField Cd1MagUr
- (
- (24.0*nu2/d1)*(scalar(1) + 0.15*pow(d1*magUr/nu2, 0.687))
- );
-
- volScalarField Cd2MagUr
- (
- (24.0*nu1/d2)*(scalar(1) + 0.15*pow(d2*magUr/nu1, 0.687))
- );
-
- volScalarField dragCoef
- (
- "Cd",
- 0.75*(alpha2*rho2*Cd1MagUr/d1 + alpha1*rho1*Cd2MagUr/d2)
- );
-
- volVectorField liftCoeff
- (
- Cl*(alpha2*rho2 + alpha1*rho1)*(Ur ^ fvc::curl(U))
- );
diff --git a/applications/solvers/multiphase/bubbleFoam/pEqn.H b/applications/solvers/multiphase/bubbleFoam/pEqn.H
deleted file mode 100644
index d438b1124f..0000000000
--- a/applications/solvers/multiphase/bubbleFoam/pEqn.H
+++ /dev/null
@@ -1,94 +0,0 @@
-{
- surfaceScalarField alpha1f(fvc::interpolate(alpha1));
- surfaceScalarField alpha2f(scalar(1) - alpha1f);
-
- volScalarField rAU1(1.0/U1Eqn.A());
- volScalarField rAU2(1.0/U2Eqn.A());
-
- surfaceScalarField rAU1f(fvc::interpolate(rAU1));
- surfaceScalarField rAU2f(fvc::interpolate(rAU2));
-
- volVectorField HbyA1("HbyA1", U1);
- HbyA1 = rAU1*U1Eqn.H();
-
- volVectorField HbyA2("HbyA2", U2);
- HbyA2 = rAU2*U2Eqn.H();
-
- surfaceScalarField phiDrag1
- (
- fvc::interpolate(alpha2/rho1*dragCoef*rAU1)*phi2
- + rAU1f*(g & mesh.Sf())
- );
- surfaceScalarField phiDrag2
- (
- fvc::interpolate(alpha1/rho2*dragCoef*rAU2)*phi1
- + rAU2f*(g & mesh.Sf())
- );
-
- forAll(p.boundaryField(), patchi)
- {
- if (isA(p.boundaryField()[patchi]))
- {
- phiDrag1.boundaryField()[patchi] = 0.0;
- phiDrag2.boundaryField()[patchi] = 0.0;
- }
- }
-
- surfaceScalarField phiHbyA1
- (
- (fvc::interpolate(HbyA1) & mesh.Sf())
- + fvc::ddtPhiCorr(rAU1, U1, phi1)
- );
-
- surfaceScalarField phiHbyA2
- (
- (fvc::interpolate(HbyA2) & mesh.Sf())
- + fvc::ddtPhiCorr(rAU2, U2, phi2)
- );
-
- phi = alpha1f*phiHbyA1 + alpha2f*phiHbyA2;
-
- phiHbyA1 += phiDrag1;
- phiHbyA2 += phiDrag2;
- surfaceScalarField phiHbyA("phiHbyA", alpha1f*phiHbyA1 + alpha2f*phiHbyA2);
-
- surfaceScalarField Dp
- (
- "Dp",
- alpha1f*rAU1f/rho1 + alpha2f*rAU2f/rho2
- );
-
- while (pimple.correctNonOrthogonal())
- {
- fvScalarMatrix pEqn
- (
- fvm::laplacian(Dp, p) == fvc::div(phiHbyA)
- );
-
- pEqn.setReference(pRefCell, pRefValue);
-
- pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
-
- if (pimple.finalNonOrthogonalIter())
- {
- surfaceScalarField SfGradp(pEqn.flux()/Dp);
-
- phi1 = phiHbyA1 - rAU1f*SfGradp/rho1;
- phi2 = phiHbyA2 - rAU2f*SfGradp/rho2;
- phi = alpha1f*phi1 + alpha2f*phi2;
-
- p.relax();
- SfGradp = pEqn.flux()/Dp;
-
- U1 = HbyA1 + (fvc::reconstruct(phiDrag1 - rAU1f*SfGradp/rho1));
- U1.correctBoundaryConditions();
-
- U2 = HbyA2 + (fvc::reconstruct(phiDrag2 - rAU2f*SfGradp/rho2));
- U2.correctBoundaryConditions();
-
- U = alpha1*U1 + alpha2*U2;
- }
- }
-}
-
-#include "continuityErrs.H"
diff --git a/applications/solvers/multiphase/bubbleFoam/readBubbleFoamControls.H b/applications/solvers/multiphase/bubbleFoam/readBubbleFoamControls.H
deleted file mode 100644
index 248f608f5c..0000000000
--- a/applications/solvers/multiphase/bubbleFoam/readBubbleFoamControls.H
+++ /dev/null
@@ -1,4 +0,0 @@
-
- int nAlphaCorr(readInt(pimple.dict().lookup("nAlphaCorr")));
-
- Switch correctAlpha(pimple.dict().lookup("correctAlpha"));
diff --git a/applications/solvers/multiphase/bubbleFoam/write.H b/applications/solvers/multiphase/bubbleFoam/write.H
deleted file mode 100644
index 303661beb6..0000000000
--- a/applications/solvers/multiphase/bubbleFoam/write.H
+++ /dev/null
@@ -1,17 +0,0 @@
- if (runTime.outputTime())
- {
- volVectorField Ur
- (
- IOobject
- (
- "Ur",
- runTime.timeName(),
- mesh,
- IOobject::NO_READ,
- IOobject::AUTO_WRITE
- ),
- U1 - U2
- );
-
- runTime.write();
- }
diff --git a/applications/solvers/multiphase/settlingFoam/createFields.H b/applications/solvers/multiphase/settlingFoam/createFields.H
index 8d161edd82..9a9fdee2df 100644
--- a/applications/solvers/multiphase/settlingFoam/createFields.H
+++ b/applications/solvers/multiphase/settlingFoam/createFields.H
@@ -12,12 +12,12 @@
mesh
);
- Info<< "Reading field alpha\n" << endl;
- volScalarField alpha
+ Info<< "Reading field Alpha\n" << endl;
+ volScalarField Alpha
(
IOobject
(
- "alpha",
+ "Alpha",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
@@ -100,21 +100,20 @@
IOobject::NO_READ,
IOobject::NO_WRITE
),
- (scalar(1) - alpha)*rhoc + alpha*rhod
+ rhoc/(scalar(1) + (rhoc/rhod - 1.0)*Alpha)
);
- volScalarField Alpha
+ volScalarField alpha
(
IOobject
(
- "Alpha",
+ "alpha",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
- alpha*rhod/rho,
- alpha.boundaryField().types()
+ rho*Alpha/rhod
);
#include "compressibleCreatePhi.H"
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/Make/options b/applications/solvers/multiphase/twoPhaseEulerFoam/Make/options
index 1bf97d106c..f4a6229714 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/Make/options
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/Make/options
@@ -1,5 +1,4 @@
EXE_INC = \
- -I../bubbleFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-IturbulenceModel \
diff --git a/applications/solvers/multiphase/bubbleFoam/createRASTurbulence.H b/applications/solvers/multiphase/twoPhaseEulerFoam/createRASTurbulence.H
similarity index 100%
rename from applications/solvers/multiphase/bubbleFoam/createRASTurbulence.H
rename to applications/solvers/multiphase/twoPhaseEulerFoam/createRASTurbulence.H
diff --git a/applications/solvers/multiphase/bubbleFoam/kEpsilon.H b/applications/solvers/multiphase/twoPhaseEulerFoam/kEpsilon.H
similarity index 100%
rename from applications/solvers/multiphase/bubbleFoam/kEpsilon.H
rename to applications/solvers/multiphase/twoPhaseEulerFoam/kEpsilon.H
diff --git a/applications/solvers/multiphase/bubbleFoam/wallDissipation.H b/applications/solvers/multiphase/twoPhaseEulerFoam/wallDissipation.H
similarity index 95%
rename from applications/solvers/multiphase/bubbleFoam/wallDissipation.H
rename to applications/solvers/multiphase/twoPhaseEulerFoam/wallDissipation.H
index 14224fd646..207fb40a32 100644
--- a/applications/solvers/multiphase/bubbleFoam/wallDissipation.H
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/wallDissipation.H
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
diff --git a/applications/solvers/multiphase/bubbleFoam/wallFunctions.H b/applications/solvers/multiphase/twoPhaseEulerFoam/wallFunctions.H
similarity index 100%
rename from applications/solvers/multiphase/bubbleFoam/wallFunctions.H
rename to applications/solvers/multiphase/twoPhaseEulerFoam/wallFunctions.H
diff --git a/applications/solvers/multiphase/bubbleFoam/wallViscosity.H b/applications/solvers/multiphase/twoPhaseEulerFoam/wallViscosity.H
similarity index 100%
rename from applications/solvers/multiphase/bubbleFoam/wallViscosity.H
rename to applications/solvers/multiphase/twoPhaseEulerFoam/wallViscosity.H
diff --git a/applications/utilities/mesh/advanced/combinePatchFaces/Make/options b/applications/utilities/mesh/advanced/combinePatchFaces/Make/options
index 7d4e1304f0..4f26f666de 100644
--- a/applications/utilities/mesh/advanced/combinePatchFaces/Make/options
+++ b/applications/utilities/mesh/advanced/combinePatchFaces/Make/options
@@ -5,4 +5,5 @@ EXE_INC = \
EXE_LIBS = \
-lmeshTools \
+ -lsampling \
-ldynamicMesh
diff --git a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C
index 877579fa5f..8c8be624f0 100644
--- a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C
+++ b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -53,105 +53,19 @@ Description
#include "polyMesh.H"
#include "mapPolyMesh.H"
#include "unitConversion.H"
+#include "motionSmoother.H"
using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-// Same check as snapMesh
-void checkSnapMesh
-(
- const Time& runTime,
- const polyMesh& mesh,
- labelHashSet& wrongFaces
-)
-{
- IOdictionary snapDict
- (
- IOobject
- (
- "snapMeshDict",
- runTime.system(),
- mesh,
- IOobject::MUST_READ_IF_MODIFIED,
- IOobject::NO_WRITE
- )
- );
-
- // Max nonorthogonality allowed
- scalar maxNonOrtho(readScalar(snapDict.lookup("maxNonOrtho")));
- // Max concaveness allowed.
- scalar maxConcave(readScalar(snapDict.lookup("maxConcave")));
- // Min volume allowed (factor of minimum cellVolume)
- scalar relMinVol(readScalar(snapDict.lookup("minVol")));
- const scalar minCellVol = min(mesh.cellVolumes());
- const scalar minPyrVol = relMinVol*minCellVol;
- // Min area
- scalar minArea(readScalar(snapDict.lookup("minArea")));
-
- if (maxNonOrtho < 180.0-SMALL)
- {
- Pout<< "Checking non orthogonality" << endl;
-
- label nOldSize = wrongFaces.size();
- mesh.setNonOrthThreshold(maxNonOrtho);
- mesh.checkFaceOrthogonality(false, &wrongFaces);
-
- Pout<< "Detected " << wrongFaces.size() - nOldSize
- << " faces with non-orthogonality > " << maxNonOrtho << " degrees"
- << endl;
- }
-
- if (minPyrVol > -GREAT)
- {
- Pout<< "Checking face pyramids" << endl;
-
- label nOldSize = wrongFaces.size();
- mesh.checkFacePyramids(false, minPyrVol, &wrongFaces);
- Pout<< "Detected additional " << wrongFaces.size() - nOldSize
- << " faces with illegal face pyramids" << endl;
- }
-
- if (maxConcave < 180.0-SMALL)
- {
- Pout<< "Checking face angles" << endl;
-
- label nOldSize = wrongFaces.size();
- mesh.checkFaceAngles(false, maxConcave, &wrongFaces);
- Pout<< "Detected additional " << wrongFaces.size() - nOldSize
- << " faces with concavity > " << maxConcave << " degrees"
- << endl;
- }
-
- if (minArea > -SMALL)
- {
- Pout<< "Checking face areas" << endl;
-
- label nOldSize = wrongFaces.size();
-
- const scalarField magFaceAreas(mag(mesh.faceAreas()));
-
- forAll(magFaceAreas, faceI)
- {
- if (magFaceAreas[faceI] < minArea)
- {
- wrongFaces.insert(faceI);
- }
- }
- Pout<< "Detected additional " << wrongFaces.size() - nOldSize
- << " faces with area < " << minArea << " m^2" << endl;
- }
-}
-
-
// Merge faces on the same patch (usually from exposing refinement)
// Can undo merges if these cause problems.
label mergePatchFaces
(
const scalar minCos,
const scalar concaveSin,
- const bool snapMeshDict,
+ const autoPtr& qualDictPtr,
const Time& runTime,
polyMesh& mesh
)
@@ -212,9 +126,9 @@ label mergePatchFaces
// Faces in error.
labelHashSet errorFaces;
- if (snapMeshDict)
+ if (qualDictPtr.valid())
{
- checkSnapMesh(runTime, mesh, errorFaces);
+ motionSmoother::checkMesh(false, mesh, qualDictPtr(), errorFaces);
}
else
{
@@ -437,8 +351,8 @@ int main(int argc, char *argv[])
);
argList::addBoolOption
(
- "snapMesh",
- "use system/snapMeshDict"
+ "meshQuality",
+ "read user-defined mesh quality criterions from system/meshQualityDict"
);
# include "setRootCase.H"
@@ -455,8 +369,8 @@ int main(int argc, char *argv[])
scalar concaveAngle = args.optionLookupOrDefault("concaveAngle", 30.0);
scalar concaveSin = Foam::sin(degToRad(concaveAngle));
- const bool snapMeshDict = args.optionFound("snapMesh");
const bool overwrite = args.optionFound("overwrite");
+ const bool meshQuality = args.optionFound("meshQuality");
Info<< "Merging all faces of a cell" << nl
<< " - which are on the same patch" << nl
@@ -468,23 +382,47 @@ int main(int argc, char *argv[])
<< " (sin:" << concaveSin << ')' << nl
<< endl;
+ autoPtr qualDict;
+ if (meshQuality)
+ {
+ Info<< "Enabling user-defined geometry checks." << nl << endl;
+
+ qualDict.reset
+ (
+ new IOdictionary
+ (
+ IOobject
+ (
+ "meshQualityDict",
+ mesh.time().system(),
+ mesh,
+ IOobject::MUST_READ,
+ IOobject::NO_WRITE
+ )
+ )
+ );
+ }
+
+
if (!overwrite)
{
runTime++;
}
+
+
// Merge faces on same patch
label nChanged = mergePatchFaces
(
minCos,
concaveSin,
- snapMeshDict,
+ qualDict,
runTime,
mesh
);
// Merge points on straight edges and remove unused points
- if (snapMeshDict)
+ if (qualDict.valid())
{
Info<< "Merging all 'loose' points on surface edges, "
<< "regardless of the angle they make." << endl;
diff --git a/applications/utilities/mesh/generation/cvMesh/Make/options b/applications/utilities/mesh/generation/cvMesh/Make/options
index 2255a9a271..27241b2965 100644
--- a/applications/utilities/mesh/generation/cvMesh/Make/options
+++ b/applications/utilities/mesh/generation/cvMesh/Make/options
@@ -17,6 +17,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \
+ -I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude
@@ -29,5 +30,6 @@ EXE_LIBS = \
-ldecompositionMethods \
-L$(FOAM_LIBBIN)/dummy -lptscotchDecomp \
-ledgeMesh \
+ -lfileFormats \
-ltriSurface \
-ldynamicMesh
diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/Make/options b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/Make/options
index 97e045f305..2082f88ff0 100644
--- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/Make/options
+++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/Make/options
@@ -17,6 +17,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \
+ -I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude \
-I../vectorTools
@@ -24,5 +25,6 @@ EXE_INC = \
EXE_LIBS = \
-lmeshTools \
-ledgeMesh \
+ -lfileFormats \
-ltriSurface \
-ldynamicMesh
diff --git a/applications/utilities/mesh/generation/cvMesh/cvMesh.C b/applications/utilities/mesh/generation/cvMesh/cvMesh.C
index ecd7f102ba..f15ebea29a 100644
--- a/applications/utilities/mesh/generation/cvMesh/cvMesh.C
+++ b/applications/utilities/mesh/generation/cvMesh/cvMesh.C
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -36,6 +36,7 @@ Description
#include "argList.H"
#include "conformalVoronoiMesh.H"
+#include "vtkSetWriter.H"
using namespace Foam;
@@ -48,6 +49,11 @@ int main(int argc, char *argv[])
"noFilter",
"Do not filter the mesh"
);
+ Foam::argList::addBoolOption
+ (
+ "checkGeometry",
+ "check all surface geometry for quality"
+ );
#include "setRootCase.H"
#include "createTime.H"
@@ -55,6 +61,7 @@ int main(int argc, char *argv[])
runTime.functionObjects().off();
const bool noFilter = !args.optionFound("noFilter");
+ const bool checkGeometry = args.optionFound("checkGeometry");
Info<< "Mesh filtering is " << (noFilter ? "on" : "off") << endl;
@@ -74,6 +81,29 @@ int main(int argc, char *argv[])
conformalVoronoiMesh mesh(runTime, cvMeshDict);
+
+ if (checkGeometry)
+ {
+ const searchableSurfaces& allGeometry = mesh.allGeometry();
+
+ // Write some stats
+ allGeometry.writeStats(List(0), Info);
+ // Check topology
+ allGeometry.checkTopology(true);
+ // Check geometry
+ allGeometry.checkGeometry
+ (
+ 100.0, // max size ratio
+ 1e-9, // intersection tolerance
+ autoPtr >(new vtkSetWriter()),
+ 0.01, // min triangle quality
+ true
+ );
+
+ return 0;
+ }
+
+
while (runTime.loop())
{
Info<< nl << "Time = " << runTime.timeName() << endl;
diff --git a/applications/utilities/mesh/generation/cvMesh/cvMeshBackgroundMesh/Make/options b/applications/utilities/mesh/generation/cvMesh/cvMeshBackgroundMesh/Make/options
index 2d1ad7bfda..ed71a80029 100644
--- a/applications/utilities/mesh/generation/cvMesh/cvMeshBackgroundMesh/Make/options
+++ b/applications/utilities/mesh/generation/cvMesh/cvMeshBackgroundMesh/Make/options
@@ -11,10 +11,11 @@ EXE_INC = \
-I../conformalVoronoiMesh/lnInclude \
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \
- -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
+ -I$(LIB_SRC)/fileFormats/lnInclude \
+ -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude
EXE_LIBS = \
@@ -24,8 +25,9 @@ EXE_LIBS = \
-lconformalVoronoiMesh \
-ldecompositionMethods /* -L$(FOAM_LIBBIN)/dummy -lscotchDecomp */ \
-ledgeMesh \
- -lsampling \
-ltriSurface \
-lmeshTools \
+ -lfileFormats \
+ -lsampling \
-ldynamicMesh \
-lfiniteVolume
diff --git a/applications/utilities/mesh/generation/cvMesh/cvMeshSurfaceSimplify/Make/options b/applications/utilities/mesh/generation/cvMesh/cvMeshSurfaceSimplify/Make/options
index c7c073ab17..7bd92a24ab 100644
--- a/applications/utilities/mesh/generation/cvMesh/cvMeshSurfaceSimplify/Make/options
+++ b/applications/utilities/mesh/generation/cvMesh/cvMeshSurfaceSimplify/Make/options
@@ -9,6 +9,7 @@ EXE_INC = \
-I$(FASTDUALOCTREE_SRC_PATH) \
-I../conformalVoronoiMesh/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \
+ -I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
@@ -21,6 +22,7 @@ EXE_LIBS = \
-lconformalVoronoiMesh \
-ldecompositionMethods -L$(FOAM_LIBBIN)/dummy -lscotchDecomp \
-ledgeMesh \
+ -lfileFormats \
-ltriSurface \
-lmeshTools \
-ldynamicMesh
diff --git a/applications/utilities/mesh/generation/snappyHexMesh/Make/options b/applications/utilities/mesh/generation/snappyHexMesh/Make/options
index b7fd6d3bd2..af056ec7cb 100644
--- a/applications/utilities/mesh/generation/snappyHexMesh/Make/options
+++ b/applications/utilities/mesh/generation/snappyHexMesh/Make/options
@@ -3,6 +3,7 @@ EXE_INC = \
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
-I$(LIB_SRC)/mesh/autoMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
+ -I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/edgeMesh/lnInclude \
@@ -13,5 +14,6 @@ EXE_LIBS = \
-ldecompositionMethods \
-L$(FOAM_LIBBIN)/dummy -lptscotchDecomp \
-lmeshTools \
+ -lfileFormats \
-ldynamicMesh \
-lautoMesh
diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C
index 2372b144ec..6b63430918 100644
--- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C
+++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C
@@ -46,7 +46,7 @@ Description
#include "refinementParameters.H"
#include "snapParameters.H"
#include "layerParameters.H"
-
+#include "vtkSetWriter.H"
using namespace Foam;
@@ -122,6 +122,12 @@ void writeMesh
int main(int argc, char *argv[])
{
# include "addOverwriteOption.H"
+ Foam::argList::addBoolOption
+ (
+ "checkGeometry",
+ "check all surface geometry for quality"
+ );
+
# include "setRootCase.H"
# include "createTime.H"
runTime.functionObjects().off();
@@ -131,6 +137,7 @@ int main(int argc, char *argv[])
<< runTime.cpuTimeIncrement() << " s" << endl;
const bool overwrite = args.optionFound("overwrite");
+ const bool checkGeometry = args.optionFound("checkGeometry");
// Check patches and faceZones are synchronised
mesh.boundaryMesh().checkParallelSync(true);
@@ -244,6 +251,56 @@ int main(int argc, char *argv[])
<< mesh.time().cpuTimeIncrement() << " s" << nl << endl;
+ // Checking only?
+
+ if (checkGeometry)
+ {
+ // Extract patchInfo
+ List patchTypes(allGeometry.size());
+
+ const PtrList& patchInfo = surfaces.patchInfo();
+ const labelList& surfaceGeometry = surfaces.surfaces();
+ forAll(surfaceGeometry, surfI)
+ {
+ label geomI = surfaceGeometry[surfI];
+ const wordList& regNames = allGeometry.regionNames()[geomI];
+
+ patchTypes[geomI].setSize(regNames.size());
+ forAll(regNames, regionI)
+ {
+ label globalRegionI = surfaces.globalRegion(surfI, regionI);
+
+ if (patchInfo.set(globalRegionI))
+ {
+ patchTypes[geomI][regionI] =
+ word(patchInfo[globalRegionI].lookup("type"));
+ }
+ else
+ {
+ patchTypes[geomI][regionI] = wallPolyPatch::typeName;
+ }
+ }
+ }
+
+ // Write some stats
+ allGeometry.writeStats(patchTypes, Info);
+ // Check topology
+ allGeometry.checkTopology(true);
+ // Check geometry
+ allGeometry.checkGeometry
+ (
+ 100.0, // max size ratio
+ 1e-9, // intersection tolerance
+ autoPtr >(new vtkSetWriter()),
+ 0.01, // min triangle quality
+ true
+ );
+
+ return 0;
+ }
+
+
+
// Read refinement shells
// ~~~~~~~~~~~~~~~~~~~~~~
diff --git a/applications/utilities/mesh/manipulation/setsToZones/Make/options b/applications/utilities/mesh/manipulation/setsToZones/Make/options
index 54c035b8f5..ec38e1cbdb 100644
--- a/applications/utilities/mesh/manipulation/setsToZones/Make/options
+++ b/applications/utilities/mesh/manipulation/setsToZones/Make/options
@@ -2,4 +2,5 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
- -lmeshTools
+ -lmeshTools \
+ -lsampling
diff --git a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C
index 2f56bb5693..c3d3d6297a 100644
--- a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C
+++ b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -48,6 +48,7 @@ Description
#include "IFstream.H"
#include "IOobjectList.H"
#include "SortableList.H"
+#include "timeSelector.H"
using namespace Foam;
@@ -57,6 +58,7 @@ using namespace Foam;
int main(int argc, char *argv[])
{
+ timeSelector::addOptions(true, false);
argList::addNote
(
"add point/face/cell Zones from similar named point/face/cell Sets"
@@ -76,15 +78,7 @@ int main(int argc, char *argv[])
const bool noFlipMap = args.optionFound("noFlipMap");
// Get times list
- instantList Times = runTime.times();
-
- label startTime = Times.size()-1;
- label endTime = Times.size();
-
- // check -time and -latestTime options
- #include "checkTimeOption.H"
-
- runTime.setTime(Times[startTime], startTime);
+ (void)timeSelector::selectIfPresent(runTime, args);
#include "createNamedPolyMesh.H"
diff --git a/applications/utilities/postProcessing/dataConversion/foamToGMV/Make/options b/applications/utilities/postProcessing/dataConversion/foamToGMV/Make/options
index 5c515d8f95..87b4324810 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToGMV/Make/options
+++ b/applications/utilities/postProcessing/dataConversion/foamToGMV/Make/options
@@ -1,15 +1,9 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
- -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
- -I$(LIB_SRC)/turbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
- -I$(LIB_SRC)/lagrangian/lnInclude \
- -I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
- -I$(LIB_SRC)/browser/lnInclude \
- -I$(LIB_SRC)/foam/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude
EXE_LIBS = \
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H
index 397dc7ecc2..363f09d7f3 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H
@@ -446,13 +446,6 @@ class vtkPV3Foam
template
vtkPolyData* patchVTKMesh(const word& name, const PatchType&);
- //- Add face zone mesh
- vtkPolyData* faceZoneVTKMesh
- (
- const fvMesh&,
- const labelList& faceLabels
- );
-
//- Add point zone
vtkPolyData* pointZoneVTKMesh
(
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C
index b229da9479..b80acb4949 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C
@@ -450,7 +450,8 @@ void Foam::vtkPV3Foam::convertMeshFaceZones
<< zoneName << endl;
}
- vtkPolyData* vtkmesh = faceZoneVTKMesh(mesh, zMesh[zoneId]);
+ vtkPolyData* vtkmesh = patchVTKMesh(zoneName, zMesh[zoneId]());
+
if (vtkmesh)
{
AddToBlock(output, vtkmesh, range, datasetNo, zoneName);
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C
index 28a1fd4c5f..bfa3e1acc9 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -35,78 +35,6 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
-vtkPolyData* Foam::vtkPV3Foam::faceZoneVTKMesh
-(
- const fvMesh& mesh,
- const labelList& faceLabels
-)
-{
- vtkPolyData* vtkmesh = vtkPolyData::New();
-
- if (debug)
- {
- Info<< " Foam::vtkPV3Foam::faceZoneVTKMesh" << endl;
- printMemory();
- }
-
- // Construct primitivePatch of faces in faceZone
-
- const faceList& meshFaces = mesh.faces();
- faceList patchFaces(faceLabels.size());
- forAll(faceLabels, faceI)
- {
- patchFaces[faceI] = meshFaces[faceLabels[faceI]];
- }
- primitiveFacePatch p(patchFaces, mesh.points());
-
-
- // The balance of this routine should be identical to patchVTKMesh
-
- // Convert OpenFOAM mesh vertices to VTK
- const pointField& points = p.localPoints();
-
- vtkPoints* vtkpoints = vtkPoints::New();
- vtkpoints->Allocate(points.size());
- forAll(points, i)
- {
- vtkInsertNextOpenFOAMPoint(vtkpoints, points[i]);
- }
-
- vtkmesh->SetPoints(vtkpoints);
- vtkpoints->Delete();
-
-
- // Add faces as polygons
- const faceList& faces = p.localFaces();
-
- vtkCellArray* vtkcells = vtkCellArray::New();
- vtkcells->Allocate(faces.size());
-
- forAll(faces, faceI)
- {
- const face& f = faces[faceI];
- vtkIdType nodeIds[f.size()];
-
- forAll(f, fp)
- {
- nodeIds[fp] = f[fp];
- }
- vtkcells->InsertNextCell(f.size(), nodeIds);
- }
-
- vtkmesh->SetPolys(vtkcells);
- vtkcells->Delete();
-
- if (debug)
- {
- Info<< " Foam::vtkPV3Foam::faceZoneVTKMesh" << endl;
- printMemory();
- }
-
- return vtkmesh;
-}
-
-
vtkPolyData* Foam::vtkPV3Foam::pointZoneVTKMesh
(
const fvMesh& mesh,
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H
index 78582fe7e3..e74937cd2f 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -129,6 +129,42 @@ void Foam::vtkPV3Foam::convertPointFields
datasetNo
);
}
+
+ //
+ // Convert faceZones - if activated
+ //
+ for
+ (
+ int partId = arrayRangeFaceZones_.start();
+ partId < arrayRangeFaceZones_.end();
+ ++partId
+ )
+ {
+ const word zoneName = getPartName(partId);
+ const label datasetNo = partDataset_[partId];
+ const label zoneId = mesh.faceZones().findZoneID(zoneName);
+
+ if (!partStatus_[partId] || datasetNo < 0 || zoneId < 0)
+ {
+ continue;
+ }
+
+ // Extract the field on the zone
+ Field fld
+ (
+ ptf.internalField(),
+ mesh.faceZones()[zoneId]().meshPoints()
+ );
+
+ convertPatchPointField
+ (
+ fieldName,
+ fld,
+ output,
+ arrayRangeFaceZones_,
+ datasetNo
+ );
+ }
}
}
diff --git a/applications/utilities/postProcessing/lagrangian/particleTracks/Make/options b/applications/utilities/postProcessing/lagrangian/particleTracks/Make/options
index 3bcea78b3b..b653926f93 100644
--- a/applications/utilities/postProcessing/lagrangian/particleTracks/Make/options
+++ b/applications/utilities/postProcessing/lagrangian/particleTracks/Make/options
@@ -1,12 +1,12 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
- -I$(LIB_SRC)/sampling/lnInclude \
+ -I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lmeshTools \
- -lsampling \
+ -lfileFormats \
-lgenericPatchFields \
-llagrangian
diff --git a/applications/utilities/postProcessing/sampling/sample/Make/options b/applications/utilities/postProcessing/sampling/sample/Make/options
index 88c6039b4e..4de726a20f 100644
--- a/applications/utilities/postProcessing/sampling/sample/Make/options
+++ b/applications/utilities/postProcessing/sampling/sample/Make/options
@@ -1,6 +1,7 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
+ -I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude
@@ -9,6 +10,7 @@ EXE_LIBS = \
-lfiniteVolume \
-lgenericPatchFields \
-lmeshTools \
+ -lfileFormats \
-lsampling \
-lsurfMesh \
-llagrangian
diff --git a/applications/utilities/postProcessing/velocityField/Pe/Make/options b/applications/utilities/postProcessing/velocityField/Pe/Make/options
index 29d9b4d8c3..1d984aa9b5 100644
--- a/applications/utilities/postProcessing/velocityField/Pe/Make/options
+++ b/applications/utilities/postProcessing/velocityField/Pe/Make/options
@@ -5,8 +5,7 @@ EXE_INC = \
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
- -I$(LIB_SRC)/meshTools/lnInclude \
- -I$(LIB_SRC)/sampling/lnInclude
+ -I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
$(FOAM_LIBBIN)/postCalc.o \
diff --git a/applications/utilities/preProcessing/boxTurb/Make/options b/applications/utilities/preProcessing/boxTurb/Make/options
index 749a3d5124..e24cee9cb9 100644
--- a/applications/utilities/preProcessing/boxTurb/Make/options
+++ b/applications/utilities/preProcessing/boxTurb/Make/options
@@ -1,10 +1,7 @@
EXE_INC = \
-I$(LIB_SRC)/randomProcesses/lnInclude \
- -I$(LIB_SRC)/finiteVolume/lnInclude \
- -I$(LIB_SRC)/sampling/lnInclude
+ -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \
-lrandomProcesses \
- -lsampling \
- -lmeshTools \
-lfiniteVolume
diff --git a/bin/tools/CleanFunctions b/bin/tools/CleanFunctions
index 758627a29a..8a6301a545 100644
--- a/bin/tools/CleanFunctions
+++ b/bin/tools/CleanFunctions
@@ -101,7 +101,7 @@ cleanCase()
rm -rf constant/tetDualMesh > /dev/null 2>&1
rm -rf VTK > /dev/null 2>&1
- rm -f 0/cellLevel 0/pointLevel
+ rm -f 0/cellLevel 0/pointLevel 0/cellDist constant/cellDecomposition
if [ -e constant/polyMesh/blockMeshDict.m4 ]
then
diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files
index 2fb7c7dfe2..d1061458e8 100644
--- a/src/OpenFOAM/Make/files
+++ b/src/OpenFOAM/Make/files
@@ -526,7 +526,7 @@ $(Fields)/symmTensorField/symmTensorField.C
$(Fields)/tensorField/tensorField.C
$(Fields)/complexFields/complexFields.C
-$(Fields)/labelField/labelIOField.
+$(Fields)/labelField/labelIOField.C
$(Fields)/labelField/labelFieldIOField.C
$(Fields)/scalarField/scalarIOField.C
$(Fields)/scalarField/scalarFieldIOField.C
diff --git a/src/OpenFOAM/algorithms/subCycle/subCycle.H b/src/OpenFOAM/algorithms/subCycle/subCycle.H
index a4a1ea1844..f0c8958dd0 100644
--- a/src/OpenFOAM/algorithms/subCycle/subCycle.H
+++ b/src/OpenFOAM/algorithms/subCycle/subCycle.H
@@ -51,8 +51,13 @@ class subCycleField
//- Reference to the field being sub-cycled
GeometricField& gf_;
+ //- Reference to the field old-time field being sub-cycled
+ // Needed to avoid calls to oldTime() which may cause
+ // unexpected updates of the old-time field
+ GeometricField& gf0_;
+
//- Copy of the "real" old-time value of the field
- GeometricField gf0_;
+ GeometricField gf_0_;
public:
@@ -63,19 +68,33 @@ public:
subCycleField(GeometricField& gf)
:
gf_(gf),
- gf0_(gf.oldTime())
+ gf0_(gf.oldTime()),
+ gf_0_(gf0_.name() + "_", gf0_)
{}
//- Destructor
~subCycleField()
{
+ // Reset the old-time field
+ gf0_ = gf_0_;
+
// Correct the time index of the field to correspond to the global time
gf_.timeIndex() = gf_.time().timeIndex();
+ gf0_.timeIndex() = gf_.time().timeIndex();
+ }
- // Reset the old-time field value
- gf_.oldTime() = gf0_;
- gf_.oldTime().timeIndex() = gf0_.timeIndex();
+
+ //- Correct the time index of the field to correspond to
+ // the sub-cycling time.
+ //
+ // The time index is incremented to protect the old-time value from
+ // being updated at the beginning of the time-loop in the case of
+ // outer iteration
+ void updateTimeIndex()
+ {
+ gf_.timeIndex() = gf_.time().timeIndex() + 1;
+ gf0_.timeIndex() = gf_.time().timeIndex() + 1;
}
};
@@ -106,16 +125,18 @@ public:
//- Construct field and number of sub-cycles
subCycle(GeometricField& gf, const label nSubCycles)
:
-
subCycleField(gf),
subCycleTime(const_cast