diff --git a/ReleaseNotes-dev b/ReleaseNotes-dev
index 18a61718b0..d35d1b518e 100644
--- a/ReleaseNotes-dev
+++ b/ReleaseNotes-dev
@@ -39,13 +39,43 @@
*** DSMC
*** Dynamic Mesh
*** Numerics
+*** *Updated* command line help, e.g. `snappyHexMesh -help' now gives:
+
+ Usage: snappyHexMesh [OPTIONS]
+ options:
+ -case
specify alternate case directory, default is the cwd
+ -overwrite overwrite existing mesh/results files
+ -parallel run in parallel
+ -srcDoc display source code in browser
+ -doc display application documentation in browser
+ -help print the usage
+
+*** *New* Surface film library
+ + Creation of films by particle addition, or initial film distribution
+ + Coupled with the lagrangian/intermediate cloud hierarchy library
+ + Hierarchical design, consisting of
+ + kinematic film: mass, momentum
+ + constant thermodynamic properties
+ + thermodynamic film: mass, momentum and enthalpy
+ + constant, or temperature dependant thermodynamic properties
+ + Sub-models:
+ + detachment/dripping whereby particles (re)enter the originating cloud
+ + particle sizes set according to PDF
+ + other properties set to ensure mass, momentum and energy conservation
+ + heat transfer to/from walls and film surface
+ + film evaporation and boiling
+ + Additional wall functions for primary region momentum and temperature
+ taking film into account
+ + Parallel aware
+*** *Updated* particle tracking algorithm
* Solvers
A number of new solvers have been developed for a range of engineering
applications. There has been a set of improvements to certain classes of
solver that are introduced in this release.
*** *New* Solvers
- + ...
+ + =reactingParcelFilmFoam=: Lagrangian cloud and film transport in a
+ reacting gas phase system
*** Modifications to multiphase and buoyant solvers
+ ...
*** Modifications to solvers for sensible enthalpy
@@ -58,20 +88,43 @@
* Boundary conditions
New boundary conditions have been introduced to support new applications in
OpenFOAM.
- + ...
+ + *New* wall functions:
+ + kappatJayatillekeWallFunction: incompressible RAS thermal wall function
* Utilities
There have been some utilities added and updated in this release.
*** *New* utilities
- + ...
+ + =extrudeToRegionMesh=: Extrude faceZones into separate mesh (as a
+ different region)
+ + used to e.g. extrude baffles (extrude internal faces) or create
+ liquid film regions
+ + if extruding internal faces:
+ + create baffles in original mesh with directMappedWall patches
+ + if extruding boundary faces:
+ + convert boundary faces to directMappedWall patches
+ + extrude edges of faceZone as a _sidePatch
+ + extrude edges inbetween different faceZones as a
+ (nonuniformTransform)cyclic _
+ + extrudes into master direction (i.e. away from the owner cell
+ if flipMap is false)
*** Updated utilities
+ ...
* Post-processing
+ =foamToEnsight=: new =-nodeValues= option to generate and output nodal
field data.
+ + Function objects:
+ + =residualControl=: new function object to allow users to terminate steady
+ state calculations when the defined residual levels are achieved
+ + =abortCalculation=: watches for presence of the named file in the
+ $FOAM_CASE directory and aborts the calculation if it is present
+ + =timeActivatedFileUpdate=: performs a file copy/replacement once a
+ specified time has been reached, e.g. to automagically change fvSchemes and
+ fvSolution during a calculation
+ + =streamLine=: generate streamlines; ouputs both trajectory and field data
* New tutorials
There is a large number of new tutorials to support the new solvers in the
release.
- + ...
+ + =reactingParcelFilmFoam= tutorials:
+ + multipleBoxes, hotBoxes, panel, evaporationTest
diff --git a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/createFields.H b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/createFields.H
index b9a86ef995..cc8f6436a1 100644
--- a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/createFields.H
+++ b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/createFields.H
@@ -39,9 +39,14 @@
#include "compressibleCreatePhi.H"
- dimensionedScalar pMin
+ dimensionedScalar rhoMax
(
- mesh.solutionDict().subDict("PIMPLE").lookup("pMin")
+ mesh.solutionDict().subDict("PIMPLE").lookup("rhoMax")
+ );
+
+ dimensionedScalar rhoMin
+ (
+ mesh.solutionDict().subDict("PIMPLE").lookup("rhoMin")
);
Info<< "Creating turbulence model\n" << endl;
diff --git a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/pEqn.H b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/pEqn.H
index 56f8e9f3b5..6be6584202 100644
--- a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/pEqn.H
+++ b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/pEqn.H
@@ -102,6 +102,8 @@ else
p.relax();
rho = thermo.rho();
+ rho = max(rho, rhoMin);
+ rho = min(rho, rhoMax);
rho.relax();
Info<< "rho max/min : " << max(rho).value()
<< " " << min(rho).value() << endl;
@@ -112,8 +114,6 @@ U.correctBoundaryConditions();
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
-bound(p, pMin);
-
// For closed-volume cases adjust the pressure and density levels
// to obey overall mass continuity
/*
diff --git a/applications/solvers/compressible/rhoPorousSimpleFoam/createFields.H b/applications/solvers/compressible/rhoPorousSimpleFoam/createFields.H
index d7a6b97ac1..1a242bdfff 100644
--- a/applications/solvers/compressible/rhoPorousSimpleFoam/createFields.H
+++ b/applications/solvers/compressible/rhoPorousSimpleFoam/createFields.H
@@ -70,16 +70,29 @@
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
thermalPorousZones pZones(mesh);
+ Switch pressureImplicitPorosity(false);
// nUCorrectors used for pressureImplicitPorosity
int nUCorr = 0;
- const bool pressureImplicitPorosity =
- (
- pZones.size()
- && mesh.solutionDict().subDict("SIMPLE").readIfPresent
- (
- "nUCorrectors",
- nUCorr
- )
- && (nUCorr > 0)
- );
+ if (pZones.size())
+ {
+ // nUCorrectors for pressureImplicitPorosity
+ if (mesh.solutionDict().subDict("SIMPLE").found("nUCorrectors"))
+ {
+ nUCorr = readInt
+ (
+ mesh.solutionDict().subDict("SIMPLE").lookup("nUCorrectors")
+ );
+ }
+
+ if (nUCorr > 0)
+ {
+ pressureImplicitPorosity = true;
+ Info<< "Using pressure implicit porosity" << endl;
+ }
+ else
+ {
+ Info<< "Using pressure explicit porosity" << endl;
+ }
+ }
+
diff --git a/applications/solvers/compressible/rhoPorousSimpleFoam/hEqn.H b/applications/solvers/compressible/rhoPorousSimpleFoam/hEqn.H
index ff0b91bcb7..9e5138de8a 100644
--- a/applications/solvers/compressible/rhoPorousSimpleFoam/hEqn.H
+++ b/applications/solvers/compressible/rhoPorousSimpleFoam/hEqn.H
@@ -5,8 +5,8 @@
- fvm::Sp(fvc::div(phi), h)
- fvm::laplacian(turbulence->alphaEff(), h)
==
- fvc::div(phi/fvc::interpolate(rho), rho/psi, "div(U,p)")
- - (rho/psi)*fvc::div(phi/fvc::interpolate(rho))
+ fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p, "div(U,p)"))
+ - p*fvc::div(phi/fvc::interpolate(rho))
);
pZones.addEnthalpySource(thermo, rho, hEqn);
diff --git a/applications/solvers/compressible/rhoPorousSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoPorousSimpleFoam/pEqn.H
index 0386899612..fe69384c8b 100644
--- a/applications/solvers/compressible/rhoPorousSimpleFoam/pEqn.H
+++ b/applications/solvers/compressible/rhoPorousSimpleFoam/pEqn.H
@@ -1,8 +1,3 @@
-rho = thermo.rho();
-rho = max(rho, rhoMin);
-rho = min(rho, rhoMax);
-rho.relax();
-
if (pressureImplicitPorosity)
{
U = trTU()&UEqn().H();
diff --git a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H
index f43ec6cf62..96d8280559 100644
--- a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H
+++ b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H
@@ -30,15 +30,7 @@ if (transonic)
pEqn.setReference(pRefCell, pRefValue);
- // Retain the residual from the first iteration
- if (nonOrth == 0)
- {
- pEqn.solve();
- }
- else
- {
- pEqn.solve();
- }
+ pEqn.solve();
if (nonOrth == nNonOrthCorr)
{
@@ -60,15 +52,7 @@ else
pEqn.setReference(pRefCell, pRefValue);
- // Retain the residual from the first iteration
- if (nonOrth == 0)
- {
- pEqn.solve();
- }
- else
- {
- pEqn.solve();
- }
+ pEqn.solve();
if (nonOrth == nNonOrthCorr)
{
diff --git a/applications/solvers/compressible/rhoSimplecFoam/createFields.H b/applications/solvers/compressible/rhoSimplecFoam/createFields.H
index d97ee4705b..fab7b70048 100644
--- a/applications/solvers/compressible/rhoSimplecFoam/createFields.H
+++ b/applications/solvers/compressible/rhoSimplecFoam/createFields.H
@@ -43,9 +43,14 @@
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
- dimensionedScalar pMin
+ dimensionedScalar rhoMax
(
- mesh.solutionDict().subDict("SIMPLE").lookup("pMin")
+ mesh.solutionDict().subDict("SIMPLE").lookup("rhoMax")
+ );
+
+ dimensionedScalar rhoMin
+ (
+ mesh.solutionDict().subDict("SIMPLE").lookup("rhoMin")
);
Info<< "Creating turbulence model\n" << endl;
diff --git a/applications/solvers/compressible/rhoSimplecFoam/pEqn.H b/applications/solvers/compressible/rhoSimplecFoam/pEqn.H
index a0f17e78bc..43443a507b 100644
--- a/applications/solvers/compressible/rhoSimplecFoam/pEqn.H
+++ b/applications/solvers/compressible/rhoSimplecFoam/pEqn.H
@@ -101,8 +101,6 @@ U -= (fvc::grad(p0)*(1.0/AU - 1.0/AtU) + fvc::grad(p)/AtU);
U.correctBoundaryConditions();
-bound(p, pMin);
-
// For closed-volume cases adjust the pressure and density levels
// to obey overall mass continuity
if (closedVolume)
@@ -112,6 +110,8 @@ if (closedVolume)
}
rho = thermo.rho();
+rho = max(rho, rhoMin);
+rho = min(rho, rhoMax);
if (!transonic)
{
diff --git a/applications/solvers/incompressible/porousSimpleFoam/createFields.H b/applications/solvers/incompressible/porousSimpleFoam/createFields.H
index d9bd0b5bac..2de8fbf737 100644
--- a/applications/solvers/incompressible/porousSimpleFoam/createFields.H
+++ b/applications/solvers/incompressible/porousSimpleFoam/createFields.H
@@ -43,16 +43,28 @@
porousZones pZones(mesh);
+ Switch pressureImplicitPorosity(false);
// nUCorrectors used for pressureImplicitPorosity
int nUCorr = 0;
- const bool pressureImplicitPorosity =
- (
- pZones.size()
- && mesh.solutionDict().subDict("SIMPLE").readIfPresent
- (
- "nUCorrectors",
- nUCorr
- )
- && (nUCorr > 0)
- );
+ if (pZones.size())
+ {
+ // nUCorrectors for pressureImplicitPorosity
+ if (mesh.solutionDict().subDict("SIMPLE").found("nUCorrectors"))
+ {
+ nUCorr = readInt
+ (
+ mesh.solutionDict().subDict("SIMPLE").lookup("nUCorrectors")
+ );
+ }
+
+ if (nUCorr > 0)
+ {
+ pressureImplicitPorosity = true;
+ Info<< "Using pressure implicit porosity" << endl;
+ }
+ else
+ {
+ Info<< "Using pressure explicit porosity" << endl;
+ }
+ }
diff --git a/applications/solvers/incompressible/simpleFoam/pEqn.H b/applications/solvers/incompressible/simpleFoam/pEqn.H
index 91f4e1a140..313f20cbb4 100644
--- a/applications/solvers/incompressible/simpleFoam/pEqn.H
+++ b/applications/solvers/incompressible/simpleFoam/pEqn.H
@@ -15,15 +15,8 @@
);
pEqn.setReference(pRefCell, pRefValue);
- // retain the residual from the first iteration
- if (nonOrth == 0)
- {
- pEqn.solve();
- }
- else
- {
- pEqn.solve();
- }
+
+ pEqn.solve();
if (nonOrth == nNonOrthCorr)
{
diff --git a/applications/test/CompactIOList/Make/files b/applications/test/CompactIOList/Make/files
new file mode 100644
index 0000000000..7e2cf985bf
--- /dev/null
+++ b/applications/test/CompactIOList/Make/files
@@ -0,0 +1,4 @@
+
+testCompactIOList.C
+
+EXE = $(FOAM_APPBIN)/CompactIOList
diff --git a/applications/test/CompactIOList/Make/options b/applications/test/CompactIOList/Make/options
new file mode 100644
index 0000000000..4c3dd783cb
--- /dev/null
+++ b/applications/test/CompactIOList/Make/options
@@ -0,0 +1,3 @@
+EXE_INC =
+
+EXE_LIBS =
diff --git a/applications/test/CompactIOList/testCompactIOList.C b/applications/test/CompactIOList/testCompactIOList.C
new file mode 100644
index 0000000000..e8c8248aae
--- /dev/null
+++ b/applications/test/CompactIOList/testCompactIOList.C
@@ -0,0 +1,181 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
+ \\/ 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
+ testCompactIOList
+
+Description
+ Simple demonstration and test application for the CompactIOList container
+
+\*---------------------------------------------------------------------------*/
+
+#include "IOstreams.H"
+#include "argList.H"
+#include "Time.H"
+#include "polyMesh.H"
+
+using namespace Foam;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+
+// Main program:
+
+int main(int argc, char *argv[])
+{
+# include "setRootCase.H"
+# include "createTime.H"
+
+ IOstream::streamFormat format=IOstream::BINARY;
+ // IOstream::streamFormat format=IOstream::ASCII;
+
+ const label size = 20000000;
+
+ // Old format
+ // ~~~~~~~~~~
+
+ {
+ // Construct big faceList in old format
+ faceIOList faces2
+ (
+ IOobject
+ (
+ "faces2",
+ runTime.constant(),
+ polyMesh::meshSubDir,
+ runTime,
+ IOobject::NO_READ,
+ IOobject::NO_WRITE,
+ false
+ ),
+ size
+ );
+
+ const face f(identity(4));
+
+ forAll(faces2, i)
+ {
+ faces2[i] = f;
+ }
+
+ Info<< "Constructed faceList in = "
+ << runTime.cpuTimeIncrement() << " s" << nl << endl;
+
+
+ // Write binary
+ faces2.writeObject
+ (
+ format,
+ IOstream::currentVersion,
+ IOstream::UNCOMPRESSED
+ );
+
+ Info<< "Written old format faceList in = "
+ << runTime.cpuTimeIncrement() << " s" << nl << endl;
+
+ // Read
+ faceIOList faces3
+ (
+ IOobject
+ (
+ "faces2",
+ runTime.constant(),
+ polyMesh::meshSubDir,
+ runTime,
+ IOobject::MUST_READ,
+ IOobject::NO_WRITE,
+ false
+ )
+ );
+
+ Info<< "Read old format " << faces3.size() << " faceList in = "
+ << runTime.cpuTimeIncrement() << " s" << nl << endl;
+ }
+
+
+ // New format
+ // ~~~~~~~~~~
+
+ {
+ // Construct big faceList in new format
+ faceCompactIOList faces2
+ (
+ IOobject
+ (
+ "faces2",
+ runTime.constant(),
+ polyMesh::meshSubDir,
+ runTime,
+ IOobject::NO_READ,
+ IOobject::NO_WRITE,
+ false
+ ),
+ size
+ );
+
+ const face f(identity(4));
+
+ forAll(faces2, i)
+ {
+ faces2[i] = f;
+ }
+
+ Info<< "Constructed new format faceList in = "
+ << runTime.cpuTimeIncrement() << " s" << nl << endl;
+
+
+ // Write binary
+ faces2.writeObject
+ (
+ format,
+ IOstream::currentVersion,
+ IOstream::UNCOMPRESSED
+ );
+
+ Info<< "Written new format faceList in = "
+ << runTime.cpuTimeIncrement() << " s" << nl << endl;
+
+ // Read
+ faceCompactIOList faces3
+ (
+ IOobject
+ (
+ "faces2",
+ runTime.constant(),
+ polyMesh::meshSubDir,
+ runTime,
+ IOobject::MUST_READ,
+ IOobject::NO_WRITE,
+ false
+ )
+ );
+
+ Info<< "Read new format " << faces3.size() << " faceList in = "
+ << runTime.cpuTimeIncrement() << " s" << nl << endl;
+ }
+
+ return 0;
+}
+
+
+// ************************************************************************* //
diff --git a/applications/utilities/postProcessing/sampling/sample/sample.C b/applications/utilities/postProcessing/sampling/sample/sample.C
index a68ab0b8fb..2b4f7ab008 100644
--- a/applications/utilities/postProcessing/sampling/sample/sample.C
+++ b/applications/utilities/postProcessing/sampling/sample/sample.C
@@ -116,7 +116,7 @@ int main(int argc, char *argv[])
sampledSets::typeName,
mesh,
sampleDict,
- IOobject::MUST_READ,
+ IOobject::MUST_READ_IF_MODIFIED,
true
);
@@ -125,7 +125,7 @@ int main(int argc, char *argv[])
sampledSurfaces::typeName,
mesh,
sampleDict,
- IOobject::MUST_READ,
+ IOobject::MUST_READ_IF_MODIFIED,
true
);
diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationMixedFvPatchScalarField.C
index 9ae7b435ca..9bc80d5c9f 100644
--- a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationMixedFvPatchScalarField.C
+++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiation/MarshakRadiationMixedFvPatchScalarField.C
@@ -77,24 +77,19 @@ Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField
{
if (dict.found("value"))
{
- fvPatchScalarField::operator=
- (
- scalarField("value", dict, p.size())
- );
- refValue() = scalarField("refValue", dict, p.size());
- refGrad() = scalarField("refGradient", dict, p.size());
- valueFraction() = scalarField("valueFraction", dict, p.size());
+ refValue() = scalarField("value", dict, p.size());
}
else
{
- const scalarField& Tp =
- patch().lookupPatchField(TName_);
-
- refValue() = 4.0*constant::physicoChemical::sigma.value()*pow4(Tp);
- refGrad() = 0.0;
-
- fvPatchScalarField::operator=(refValue());
+ refValue() = 0.0;
}
+
+ // zero gradient
+ refGrad() = 0.0;
+
+ valueFraction() = 1.0;
+
+ fvPatchScalarField::operator=(refValue());
}
diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiationFixedT/MarshakRadiationFixedTMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiationFixedT/MarshakRadiationFixedTMixedFvPatchScalarField.C
index 99b5c68267..cb8cc7db97 100644
--- a/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiationFixedT/MarshakRadiationFixedTMixedFvPatchScalarField.C
+++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/MarshakRadiationFixedT/MarshakRadiationFixedTMixedFvPatchScalarField.C
@@ -78,24 +78,15 @@ MarshakRadiationFixedTMixedFvPatchScalarField
Trad_("Trad", dict, p.size()),
emissivity_(readScalar(dict.lookup("emissivity")))
{
- if (dict.found("value"))
- {
- fvPatchScalarField::operator=
- (
- scalarField("value", dict, p.size())
- );
- refValue() = scalarField("refValue", dict, p.size());
- refGrad() = scalarField("refGradient", dict, p.size());
- valueFraction() = scalarField("valueFraction", dict, p.size());
- }
- else
- {
- refValue() = 4.0*constant::physicoChemical::sigma.value()*pow4(Trad_);
- refGrad() = 0.0;
- valueFraction() = 1.0;
+ // refValue updated on each call to updateCoeffs()
+ refValue() = 4.0*constant::physicoChemical::sigma.value()*pow4(Trad_);
- fvPatchScalarField::operator=(refValue());
- }
+ // zero gradient
+ refGrad() = 0.0;
+
+ valueFraction() = 1.0;
+
+ fvPatchScalarField::operator=(refValue());
}
diff --git a/src/thermophysicalModels/thermalPorousZone/Make/files b/src/thermophysicalModels/thermalPorousZone/Make/files
index 046355feaf..32e0e201f5 100644
--- a/src/thermophysicalModels/thermalPorousZone/Make/files
+++ b/src/thermophysicalModels/thermalPorousZone/Make/files
@@ -1,4 +1,9 @@
thermalPorousZone/thermalPorousZone.C
thermalPorousZone/thermalPorousZones.C
+thermalModel/thermalModel/thermalModel.C
+thermalModel/thermalModel/thermalModelNew.C
+thermalModel/fixedTemperature/fixedTemperature.C
+thermalModel/noThermalModel/noThermalModel.C
+
LIB = $(FOAM_LIBBIN)/libthermalPorousZone
diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C
new file mode 100644
index 0000000000..512746722c
--- /dev/null
+++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C
@@ -0,0 +1,98 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
+ \\/ 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 .
+
+\*---------------------------------------------------------------------------*/
+
+#include "fixedTemperature.H"
+#include "addToRunTimeSelectionTable.H"
+#include "basicThermo.H"
+#include "volFields.H"
+#include "fvMatrices.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+ defineTypeNameAndDebug(fixedTemperature, 0);
+
+ addToRunTimeSelectionTable
+ (
+ thermalModel,
+ fixedTemperature,
+ pZone
+ );
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
+
+Foam::fixedTemperature::fixedTemperature(const porousZone& pZone)
+:
+ thermalModel(pZone, typeName),
+ T_(readScalar(coeffDict_.lookup("T")))
+{}
+
+
+// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
+
+Foam::fixedTemperature::~fixedTemperature()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
+
+void Foam::fixedTemperature::addEnthalpySource
+(
+ const basicThermo& thermo,
+ const volScalarField& rho,
+ fvScalarMatrix& hEqn
+) const
+{
+ const labelList& zones = pZone_.zoneIds();
+ if (zones.empty() || T_ < 0.0)
+ {
+ return;
+ }
+
+ const fvMesh& mesh = pZone_.mesh();
+ const scalarField& V = mesh.V();
+ scalarField& hDiag = hEqn.diag();
+ scalarField& hSource = hEqn.source();
+
+ // TODO: generalize for non-fixedTemperature methods
+ const scalar rate = 1e6;
+
+ forAll(zones, zoneI)
+ {
+ const labelList& cells = mesh.cellZones()[zones[zoneI]];
+
+ forAll(cells, i)
+ {
+ hDiag[cells[i]] += rate*V[cells[i]]*rho[cells[i]];
+ hSource[cells[i]] += rate*V[cells[i]]*rho[cells[i]]*T_;
+ }
+ }
+}
+
+
+// ************************************************************************* //
diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.H b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.H
new file mode 100644
index 0000000000..11c1c7c442
--- /dev/null
+++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.H
@@ -0,0 +1,98 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
+ \\/ 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 .
+
+Class
+ Foam::fixedTemperature
+
+Description
+ Fixed temperature model
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef fixedTemperature_H
+#define fixedTemperature_H
+
+#include "thermalModel.H"
+#include "autoPtr.H"
+#include "runTimeSelectionTables.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+ Class fixedTemperature Declaration
+\*---------------------------------------------------------------------------*/
+
+class fixedTemperature
+:
+ public thermalModel
+{
+
+protected:
+
+ // Protected data
+
+ //- Fixed temperature
+ const scalar T_;
+
+
+public:
+
+ //- Runtime type information
+ TypeName("fixedTemperature");
+
+
+ // Constructors
+
+ //- Construct from porous zone
+ fixedTemperature(const porousZone& pZone);
+
+
+ //- Destructor
+ virtual ~fixedTemperature();
+
+
+ // Member Functions
+
+ //- Add the thermal source to the enthalpy equation
+ virtual void addEnthalpySource
+ (
+ const basicThermo& thermo,
+ const volScalarField& rho,
+ fvScalarMatrix& hEqn
+ ) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
+
diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.C b/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.C
new file mode 100644
index 0000000000..a7c3dfd017
--- /dev/null
+++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.C
@@ -0,0 +1,74 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
+ \\/ 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 .
+
+\*---------------------------------------------------------------------------*/
+
+#include "noThermalModel.H"
+#include "addToRunTimeSelectionTable.H"
+#include "basicThermo.H"
+#include "volFields.H"
+#include "fvMatrices.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+ defineTypeNameAndDebug(noThermalModel, 0);
+
+ addToRunTimeSelectionTable
+ (
+ thermalModel,
+ noThermalModel,
+ pZone
+ );
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
+
+Foam::noThermalModel::noThermalModel(const porousZone& pZone)
+:
+ thermalModel(pZone)
+{}
+
+
+// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
+
+Foam::noThermalModel::~noThermalModel()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
+
+void Foam::noThermalModel::addEnthalpySource
+(
+ const basicThermo&,
+ const volScalarField&,
+ fvScalarMatrix&
+) const
+{
+ // do nothing
+}
+
+
+// ************************************************************************* //
diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.H b/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.H
new file mode 100644
index 0000000000..af23d09feb
--- /dev/null
+++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/noThermalModel/noThermalModel.H
@@ -0,0 +1,90 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
+ \\/ 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 .
+
+Class
+ Foam::noThermalModel
+
+Description
+ Dummy model for 'none' option
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef noThermalModel_H
+#define noThermalModel_H
+
+#include "thermalModel.H"
+#include "autoPtr.H"
+#include "runTimeSelectionTables.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+ Class noThermalModel Declaration
+\*---------------------------------------------------------------------------*/
+
+class noThermalModel
+:
+ public thermalModel
+{
+
+public:
+
+ //- Runtime type information
+ TypeName("none");
+
+
+ // Constructors
+
+ //- Construct from porous zone
+ noThermalModel(const porousZone& pZone);
+
+
+ //- Destructor
+ virtual ~noThermalModel();
+
+
+ // Member Functions
+
+ //- Add the thermal source to the enthalpy equation
+ virtual void addEnthalpySource
+ (
+ const basicThermo& thermo,
+ const volScalarField& rho,
+ fvScalarMatrix& hEqn
+ ) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
+
diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.C b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.C
new file mode 100644
index 0000000000..e8ba858b8c
--- /dev/null
+++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.C
@@ -0,0 +1,63 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
+ \\/ 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 .
+
+\*---------------------------------------------------------------------------*/
+
+#include "thermalModel.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+ defineTypeNameAndDebug(thermalModel, 0);
+ defineRunTimeSelectionTable(thermalModel, pZone);
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
+
+Foam::thermalModel::thermalModel(const porousZone& pZone)
+:
+ pZone_(pZone),
+ coeffDict_(dictionary::null)
+{}
+
+
+Foam::thermalModel::thermalModel
+(
+ const porousZone& pZone,
+ const word& modelType
+)
+:
+ pZone_(pZone),
+ coeffDict_(pZone_.dict().subDict(modelType + "Coeffs"))
+{}
+
+
+// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
+
+Foam::thermalModel::~thermalModel()
+{}
+
+
+// ************************************************************************* //
diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.H b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.H
new file mode 100644
index 0000000000..c6bd861919
--- /dev/null
+++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModel.H
@@ -0,0 +1,122 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
+ \\/ 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 .
+
+Class
+ Foam::thermalModel
+
+Description
+ Base class for selecting the temperature specification models
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef thermalModel_H
+#define thermalModel_H
+
+#include "porousZone.H"
+#include "autoPtr.H"
+#include "runTimeSelectionTables.H"
+#include "volFieldsFwd.H"
+#include "fvMatricesFwd.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+class basicThermo;
+
+/*---------------------------------------------------------------------------*\
+ Class thermalModel Declaration
+\*---------------------------------------------------------------------------*/
+
+class thermalModel
+{
+
+protected:
+
+ // Protected data
+
+ //- Reference to the porous zone
+ const porousZone& pZone_;
+
+ //- Sub-model coefficients dictionary
+ const dictionary coeffDict_;
+
+
+public:
+
+ //- Runtime type information
+ TypeName("thermalModel");
+
+ //- Declare runtime constructor selection table
+ declareRunTimeSelectionTable
+ (
+ autoPtr,
+ thermalModel,
+ pZone,
+ (
+ const porousZone& pZone
+ ),
+ (pZone)
+ );
+
+
+ // Constructors
+
+ //- Construct null from porous zone
+ thermalModel(const porousZone& pZone);
+
+ //- Construct from porous zone and model type name
+ thermalModel(const porousZone& pZone, const word& modelType);
+
+
+ //- Destructor
+ virtual ~thermalModel();
+
+
+ //- Selector
+ static autoPtr New(const porousZone& pZone);
+
+
+ // Member Functions
+
+ //- Add the thermal source to the enthalpy equation
+ virtual void addEnthalpySource
+ (
+ const basicThermo& thermo,
+ const volScalarField& rho,
+ fvScalarMatrix& hEqn
+ ) const = 0;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
+
diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModelNew.C b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModelNew.C
new file mode 100644
index 0000000000..e97685a3fc
--- /dev/null
+++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/thermalModel/thermalModelNew.C
@@ -0,0 +1,58 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
+ \\/ 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 .
+
+\*---------------------------------------------------------------------------*/
+
+#include "thermalModel.H"
+
+// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
+
+Foam::autoPtr Foam::thermalModel::New
+(
+ const porousZone& pZone
+)
+{
+ const word modelType(pZone.dict().lookup("thermalModel"));
+
+ Info<< "Selecting thermalModel " << modelType << endl;
+
+ pZoneConstructorTable::iterator cstrIter =
+ pZoneConstructorTablePtr_->find(modelType);
+
+ if (cstrIter == pZoneConstructorTablePtr_->end())
+ {
+ FatalErrorIn
+ (
+ "thermalModel::New(const porousZone&)"
+ ) << "Unknown thermalModel type "
+ << modelType << nl << nl
+ << "Valid thermalModel types are :" << endl
+ << pZoneConstructorTablePtr_->sortedToc()
+ << abort(FatalError);
+ }
+
+ return autoPtr(cstrIter()(pZone));
+}
+
+
+// ************************************************************************* //
diff --git a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C
index df6a32d84b..6e19d7a177 100644
--- a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C
+++ b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C
@@ -24,9 +24,9 @@ License
\*----------------------------------------------------------------------------*/
#include "thermalPorousZone.H"
-#include "fvMesh.H"
-#include "fvMatrices.H"
#include "basicThermo.H"
+#include "volFields.H"
+#include "fvMatrices.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@@ -38,29 +38,8 @@ Foam::thermalPorousZone::thermalPorousZone
)
:
porousZone(key, mesh, dict),
- T_("T", dimTemperature, -GREAT)
-{
- if (const dictionary* dictPtr = dict.subDictPtr("thermalModel"))
- {
- const word thermalModel(dictPtr->lookup("type"));
-
- if (thermalModel == "fixedTemperature")
- {
- dictPtr->lookup("T") >> T_;
- }
- else
- {
- FatalIOErrorIn
- (
- "thermalPorousZone::thermalPorousZone"
- "(const keyType&, const fvMesh&, const dictionary&)",
- *dictPtr
- ) << "thermalModel " << thermalModel << " is not supported" << nl
- << " Supported thermalModels are: fixedTemperature"
- << exit(FatalIOError);
- }
- }
-}
+ model_(thermalModel::New(*this))
+{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
@@ -72,29 +51,7 @@ void Foam::thermalPorousZone::addEnthalpySource
fvScalarMatrix& hEqn
) const
{
- const labelList& zones = this->zoneIds();
- if (zones.empty() || T_.value() < 0.0)
- {
- return;
- }
-
- const scalarField& V = mesh().V();
- scalarField& hDiag = hEqn.diag();
- scalarField& hSource = hEqn.source();
-
- // TODO: generalize for non-fixedTemperature methods
- const scalar rate = 1e6;
-
- forAll(zones, zoneI)
- {
- const labelList& cells = mesh().cellZones()[zones[zoneI]];
-
- forAll(cells, i)
- {
- hDiag[cells[i]] += rate*V[cells[i]]*rho[cells[i]];
- hSource[cells[i]] += rate*V[cells[i]]*rho[cells[i]]*T_.value();
- }
- }
+ model_->addEnthalpySource(thermo, rho, hEqn);
}
diff --git a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.H b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.H
index 7278f4ec98..3264194939 100644
--- a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.H
+++ b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.H
@@ -29,7 +29,8 @@ Description
equations.
See Also
- porousZone, thermalPorousZones and coordinateSystems
+ porousZone, thermalPorousZones and coordinateSystems with run-time
+ selectable thermal model
SourceFiles
thermalPorousZone.C
@@ -40,6 +41,7 @@ SourceFiles
#define thermalPorousZone_H
#include "porousZone.H"
+#include "thermalModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -50,7 +52,7 @@ class fvMesh;
class basicThermo;
/*---------------------------------------------------------------------------*\
- Class thermalPorousZone Declaration
+ Class thermalPorousZone Declaration
\*---------------------------------------------------------------------------*/
class thermalPorousZone
@@ -59,23 +61,27 @@ class thermalPorousZone
{
// Private data
- //- Temperature in the porous-zone
- dimensionedScalar T_;
-
-
//- Disallow default bitwise copy construct
thermalPorousZone(const thermalPorousZone&);
//- Disallow default bitwise assignment
void operator=(const thermalPorousZone&);
+ //- Thermal model
+ autoPtr model_;
+
public:
// Constructors
//- Construct from components
- thermalPorousZone(const keyType& key, const fvMesh&, const dictionary&);
+ thermalPorousZone
+ (
+ const keyType& key,
+ const fvMesh& mesh,
+ const dictionary& dict
+ );
//- Return clone
autoPtr clone() const
@@ -118,20 +124,6 @@ public:
// Member Functions
- // Access
-
- //- Return the temperature in the porous-zone
- const dimensionedScalar& T() const
- {
- return T_;
- }
-
- //- Edit access to the temperature in the porous-zone
- dimensionedScalar& T()
- {
- return T_;
- }
-
//- Add the thermal source to the enthalpy equation
void addEnthalpySource
(
diff --git a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/Allrun b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/Allrun
new file mode 100755
index 0000000000..13c8195c59
--- /dev/null
+++ b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/Allrun
@@ -0,0 +1,10 @@
+cd ${0%/*} || exit 1 # run from this directory
+
+m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict
+
+# Source tutorial run functions
+. $WM_PROJECT_DIR/bin/tools/RunFunctions
+
+runApplication blockMesh
+runApplication rhoPimpleFoam
+
diff --git a/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/system/fvSolution b/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/system/fvSolution
index 2e74c6af29..4efd7804cc 100644
--- a/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/system/fvSolution
+++ b/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/system/fvSolution
@@ -94,7 +94,8 @@ PIMPLE
nCorrectors 2;
nNonOrthogonalCorrectors 0;
momentumPredictor yes;
- pMin pMin [ 1 -1 -2 0 0 0 0 ] 1000;
+ rhoMin rhoMin [ 1 -3 0 0 0 ] 0.5;
+ rhoMax rhoMax [ 1 -3 0 0 0 ] 2.0;
pRefCell 0;
pRefValue 1e5;
}
diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/Allrun b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/Allrun
new file mode 120000
index 0000000000..09efeaf930
--- /dev/null
+++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/Allrun
@@ -0,0 +1 @@
+../angledDuctImplicit/Allrun
\ No newline at end of file
diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/controlDict b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/controlDict
index 83de517420..4b8c2697ad 100644
--- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/controlDict
+++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/controlDict
@@ -47,5 +47,25 @@ graphFormat raw;
runTimeModifiable true;
+functions
+{
+ residualControl1
+ {
+ type residualControl;
+ functionObjectLibs ( "libjobControl.so" );
+ outputControl timeStep;
+ outputInterval 1;
+
+ maxResiduals
+ {
+ p 1e-2;
+ U 1e-4;
+ T 1e-3;
+
+ // possibly check turbulence fields
+ "(k|epsilon|omega)" 1e-3;
+ }
+ }
+}
// ************************************************************************* //
diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSchemes b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSchemes
index a1376603cf..4d843cfccb 100644
--- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSchemes
+++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSchemes
@@ -34,7 +34,6 @@ divSchemes
div(phi,h) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,k) Gauss upwind;
- div(phid,p) Gauss linear;
}
laplacianSchemes
diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSolution b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSolution
index 817bbc39b4..f9e889652c 100644
--- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSolution
+++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSolution
@@ -57,7 +57,8 @@ solvers
SIMPLE
{
nNonOrthogonalCorrectors 0;
- pMin pMin [ 1 -1 -2 0 0 0 0 ] 100;
+ rhoMin rhoMin [ 1 -3 0 0 0 ] 1.0;
+ rhoMax rhoMax [ 1 -3 0 0 0 ] 1.5;
}
relaxationFactors
diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/Allrun b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/Allrun
new file mode 100755
index 0000000000..ad77d33e3d
--- /dev/null
+++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/Allrun
@@ -0,0 +1,10 @@
+cd ${0%/*} || exit 1 # run from this directory
+
+m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict
+
+# Source tutorial run functions
+. $WM_PROJECT_DIR/bin/tools/RunFunctions
+
+runApplication blockMesh
+runApplication rhoPorousSimpleFoam
+
diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/constant/porousZones b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/constant/porousZones
index 4a14bc6eee..e4d251bf9e 100644
--- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/constant/porousZones
+++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/constant/porousZones
@@ -31,11 +31,11 @@ FoamFile
f f [0 -1 0 0 0 0 0] (0 0 0);
}
- thermalModel
- {
- type fixedTemperature;
+ thermalModel none; // fixedTemperature;
- T T [0 0 0 1 0] 350;
+ fixedTemperatureCoeffs
+ {
+ T 350;
}
}
)
diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/controlDict b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/controlDict
index 3b3db3d164..fd58f436b9 100644
--- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/controlDict
+++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/controlDict
@@ -47,5 +47,25 @@ graphFormat raw;
runTimeModifiable true;
+functions
+{
+ residualControl1
+ {
+ type residualControl;
+ functionObjectLibs ( "libjobControl.so" );
+ outputControl timeStep;
+ outputInterval 1;
+
+ maxResiduals
+ {
+ p 1e-3;
+ U 1e-4;
+ T 1e-3;
+
+ // possibly check turbulence fields
+ "(k|epsilon|omega)" 1e-3;
+ }
+ }
+}
// ************************************************************************* //
diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSchemes b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSchemes
index c03ccb3612..a432624360 100644
--- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSchemes
+++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSchemes
@@ -34,7 +34,6 @@ divSchemes
div(phi,h) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,k) Gauss upwind;
- div(phid,p) Gauss linear;
}
laplacianSchemes
diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSolution b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSolution
index 19a717dfb3..f74815a0bf 100644
--- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSolution
+++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSolution
@@ -51,7 +51,8 @@ SIMPLE
{
nUCorrectors 2;
nNonOrthogonalCorrectors 0;
- pMin pMin [ 1 -1 -2 0 0 0 0 ] 100;
+ rhoMin rhoMin [ 1 -3 0 0 0 ] 0.5;
+ rhoMax rhoMAx [ 1 -3 0 0 0 ] 2.0;
}
relaxationFactors
diff --git a/tutorials/compressible/rhoSimplecFoam/squareBend/system/fvSolution b/tutorials/compressible/rhoSimplecFoam/squareBend/system/fvSolution
index c036b0a655..58aea4483e 100644
--- a/tutorials/compressible/rhoSimplecFoam/squareBend/system/fvSolution
+++ b/tutorials/compressible/rhoSimplecFoam/squareBend/system/fvSolution
@@ -171,9 +171,10 @@ solvers
SIMPLE
{
- nNonOrthogonalCorrectors 0;
- pMin pMin [1 -1 -2 0 0 0 0] 10000;
- transonic yes;
+ nNonOrthogonalCorrectors 0;
+ rhoMin rhoMin [1 -3 0 0 0] 0.1;
+ rhoMax rhoMax [1 -3 0 0 0] 1.0;
+ transonic yes;
}
relaxationFactors
diff --git a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/T b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/T
deleted file mode 100644
index 98cc191af7..0000000000
--- a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/T
+++ /dev/null
@@ -1,443 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| ========= | |
-| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
-| \\ / O peration | Version: dev |
-| \\ / A nd | Web: www.OpenFOAM.com |
-| \\/ M anipulation | |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
- version 2.0;
- format ascii;
- class volScalarField;
- object T;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-dimensions [0 0 0 1 0 0 0];
-
-internalField uniform 300;
-
-boundaryField
-{
- floor
- {
- type fixedValue;
- value nonuniform List
-400
-(
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-600
-600
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-600
-600
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-300
-)
-;
- }
- ceiling
- {
- type fixedValue;
- value uniform 300;
- }
- fixedWalls
- {
- type zeroGradient;
- }
-}
-
-// ************************************************************************* //
diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/T b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/T
deleted file mode 100644
index 77b58a1a00..0000000000
--- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/T
+++ /dev/null
@@ -1,39 +0,0 @@
-/*--------------------------------*- C++ -*----------------------------------*\
-| ========= | |
-| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
-| \\ / O peration | Version: dev |
-| \\ / A nd | Web: www.OpenFOAM.com |
-| \\/ M anipulation | |
-\*---------------------------------------------------------------------------*/
-FoamFile
-{
- version 2.0;
- format ascii;
- class volScalarField;
- object T;
-}
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-dimensions [0 0 0 1 0 0 0];
-
-internalField uniform 300;
-
-boundaryField
-{
- floor
- {
- type fixedValue;
- value uniform 300;
- }
- ceiling
- {
- type fixedValue;
- value uniform 300;
- }
- fixedWalls
- {
- type zeroGradient;
- }
-}
-
-// ************************************************************************* //
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/controlDict b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/controlDict
index 599204b449..a936e37b0f 100644
--- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/controlDict
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/controlDict
@@ -56,8 +56,8 @@ functions
maxResiduals
{
p_rgh 1e-2;
- U 1e-4;
- T 1e-3;
+ U 1e-3;
+ h 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/controlDict b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/controlDict
index 242675a288..f43238ba65 100644
--- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/controlDict
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/controlDict
@@ -57,8 +57,8 @@ functions
maxResiduals
{
p_rgh 1e-2;
- U 1e-4;
- T 1e-3;
+ U 1e-3;
+ h 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/system/controlDict b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/system/controlDict
index 80041f81dc..5dea594b3c 100644
--- a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/system/controlDict
+++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/system/controlDict
@@ -57,8 +57,9 @@ functions
maxResiduals
{
p_rgh 1e-2;
- U 1e-4;
- T 1e-3;
+ U 1e-3;
+ h 1e-3;
+ G 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/controlDict b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/controlDict
index 64496570c2..d66c31284a 100644
--- a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/controlDict
+++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/controlDict
@@ -57,8 +57,9 @@ functions
maxResiduals
{
p_rgh 1e-2;
- U 1e-4;
- T 1e-3;
+ U 1e-3;
+ h 1e-3;
+ G 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/makeCellSets.setSet b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/makeCellSets.setSet
index 7e0c2bd522..8f85c9ef23 100644
--- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/makeCellSets.setSet
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/makeCellSets.setSet
@@ -1,11 +1,11 @@
-cellSet heater new boxToCell (-0.01 0 -100 )(0.01 0.01 100)
-cellSet heater add boxToCell (-0.01 -100 -0.01)(0.01 0.01 0.01)
+cellSet heater new boxToCell (-0.01001 0 -100 )(0.01001 0.00999 100)
+cellSet heater add boxToCell (-0.01001 -100 -0.01001)(0.01001 0.00999 0.01001)
cellZoneSet heater new setToCellZone heater
-cellSet leftSolid new boxToCell (-100 0 -100 )(-0.01 0.01 100)
+cellSet leftSolid new boxToCell (-100 0 -100 )(-0.01001 0.00999 100)
cellZoneSet leftSolid new setToCellZone leftSolid
-cellSet rightSolid new boxToCell (0.01 0 -100 )(100 0.01 100)
+cellSet rightSolid new boxToCell (0.01001 0 -100 )(100 0.00999 100)
cellZoneSet rightSolid new setToCellZone rightSolid
-cellSet topAir new boxToCell (-100 0.01 -100 )(100 100 100)
+cellSet topAir new boxToCell (-100 0.00999 -100 )(100 100 100)
cellZoneSet topAir new setToCellZone topAir
cellSet bottomAir clear
cellSet bottomAir add cellToCell heater
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSolution
index 1e968f0aea..036a4b0cb0 100644
--- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSolution
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSolution
@@ -18,9 +18,16 @@ solvers
{
rho
{
- solver PCG
+ solver PCG;
preconditioner DIC;
tolerance 1e-8;
+ relTol 0.1;
+ }
+
+ rhoFinal
+ {
+ $rho;
+ tolerance 1e-8;
relTol 0;
}
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSolution
index d2d44df4fc..3217c345e8 100644
--- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSolution
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSolution
@@ -18,9 +18,16 @@ solvers
{
rho
{
- solver PCG
+ solver PCG;
preconditioner DIC;
tolerance 1e-7;
+ relTol 0.1;
+ }
+
+ rhoFinal
+ {
+ $rho;
+ tolerance 1e-7;
relTol 0;
}
diff --git a/tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSolution b/tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSolution
index cc1c2297d1..6bc425e2f6 100644
--- a/tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSolution
+++ b/tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSolution
@@ -35,8 +35,7 @@ solvers
pFinal
{
- solver PCG;
- preconditioner DIC;
+ $p;
tolerance 1e-06;
relTol 0;
}
@@ -46,6 +45,13 @@ solvers
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
+ relTol 0.1;
+ }
+
+ UFinal
+ {
+ $U;
+ tolerance 1e-05;
relTol 0;
}
diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/fvSolution b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/fvSolution
index 2400b59b39..02becd019b 100644
--- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/fvSolution
+++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/system/fvSolution
@@ -32,16 +32,9 @@ solvers
pFinal
{
- solver GAMG;
+ $p;
tolerance 1e-7;
relTol 0;
- smoother GaussSeidel;
- nPreSweeps 0;
- nPostSweeps 2;
- cacheAgglomeration on;
- agglomerator faceAreaPair;
- nCellsInCoarsestLevel 10;
- mergeLevels 1;
}
"(U|k|omega)"
@@ -49,6 +42,13 @@ solvers
solver PBiCG;
preconditioner DILU;
tolerance 1e-06;
+ relTol 0.1;
+ }
+
+ "(U|k|omega)Final"
+ {
+ $U;
+ tolerance 1e-06;
relTol 0;
}
diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuctExplicit/Allrun b/tutorials/incompressible/porousSimpleFoam/angledDuctExplicit/Allrun
new file mode 120000
index 0000000000..09efeaf930
--- /dev/null
+++ b/tutorials/incompressible/porousSimpleFoam/angledDuctExplicit/Allrun
@@ -0,0 +1 @@
+../angledDuctImplicit/Allrun
\ No newline at end of file
diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/Allrun b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/Allrun
new file mode 100755
index 0000000000..689a832a04
--- /dev/null
+++ b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/Allrun
@@ -0,0 +1,10 @@
+cd ${0%/*} || exit 1 # run from this directory
+
+m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict
+
+# Source tutorial run functions
+. $WM_PROJECT_DIR/bin/tools/RunFunctions
+
+runApplication blockMesh
+runApplication porousSimpleFoam
+
diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/constant/polyMesh/blockMeshDict.m4 b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/constant/polyMesh/blockMeshDict.m4
new file mode 100644
index 0000000000..fb67da75da
--- /dev/null
+++ b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/constant/polyMesh/blockMeshDict.m4
@@ -0,0 +1,165 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+| ========= | |
+| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
+| \\ / O peration | Version: dev |
+| \\ / A nd | Web: www.OpenFOAM.com |
+| \\/ M anipulation | |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ `format' ascii;
+ class dictionary;
+ object blockMeshDict;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+// block definition for a porosity with an angled inlet/outlet
+// the porosity is not aligned with the main axes
+//
+dnl> -----------------------------------------------------------------
+dnl>
+dnl>
+changecom(//)changequote([,]) dnl>
+define(calc, [esyscmd(perl -e 'print ($1)')]) dnl>
+define(VCOUNT, 0) dnl>
+define(vlabel, [[// ]pt VCOUNT ($1) define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) dnl>
+dnl>
+define(hex2D, hex ($1b $2b $3b $4b $1f $2f $3f $4f)) dnl>
+define(quad2D, ($1f $1b $2b $2f)) dnl>
+define(frontQuad, ($1f $2f $3f $4f)) dnl>
+define(backQuad, ($4b $3b $2b $1b)) dnl>
+dnl>
+dnl>
+dnl> -----------------------------------------------------------------
+dnl>
+define(ncells, 20) dnl>
+define(ninlet, 15) dnl>
+define(nporo, 20) dnl>
+define(noutlet, 20) dnl>
+dnl>
+define(x0,0) dnl>
+define(y0,0) dnl>
+define(y0,0) dnl>
+define(Cos,0.7071067812) dnl> == cos(45)
+define(Sin,0.7071067812) dnl> == sin(45)
+dnl>
+define(width,50) dnl>
+define(zBack,calc(-width/2)) dnl>
+define(zFront,calc(width/2)) dnl>
+define(leninlet,150)dnl>
+define(lenporo,100)dnl>
+define(lenoutlet,100)dnl>
+dnl>
+define(xhyp,calc(Sin*width)) dnl>
+define(yhyp,calc(Cos*width)) dnl>
+define(xinlet,leninlet)dnl>
+define(xporo,calc(Cos*lenporo)) dnl>
+define(yporo,calc(Sin*lenporo)) dnl>
+define(xoutlet,calc(xporo + Cos*lenoutlet)) dnl>
+define(youtlet,calc(yporo + Sin*lenoutlet)) dnl>
+dnl>
+
+convertToMeters 0.001;
+
+vertices
+(
+ // inlet region
+ ( -xinlet y0 zBack ) vlabel(in1b)
+ ( -xinlet yhyp zBack ) vlabel(in2b)
+ ( -xinlet y0 zFront ) vlabel(in1f)
+ ( -xinlet yhyp zFront ) vlabel(in2f)
+
+ // join inlet->outlet
+ ( x0 y0 zBack ) vlabel(join1b)
+ ( -xhyp yhyp zBack ) vlabel(join2b)
+ ( x0 y0 zFront ) vlabel(join1f)
+ ( -xhyp yhyp zFront ) vlabel(join2f)
+
+ // porosity ends ->outlet
+ ( xporo yporo zBack ) vlabel(poro1b)
+ ( calc(xporo - xhyp) calc(yporo + yhyp) zBack ) vlabel(poro2b)
+ ( xporo yporo zFront ) vlabel(poro1f)
+ ( calc(xporo - xhyp) calc(yporo + yhyp) zFront ) vlabel(poro2f)
+
+ // outlet
+ ( xoutlet youtlet zBack ) vlabel(out1b)
+ ( calc(xoutlet - xhyp) calc(youtlet + yhyp) zBack ) vlabel(out2b)
+ ( xoutlet youtlet zFront ) vlabel(out1f)
+ ( calc(xoutlet - xhyp) calc(youtlet + yhyp) zFront ) vlabel(out2f)
+);
+
+blocks
+(
+ // inlet block
+ hex2D(in1, join1, join2, in2)
+ inlet ( ninlet ncells ncells ) simpleGrading (1 1 1)
+
+ // porosity block
+ hex2D(join1, poro1, poro2, join2)
+ porosity ( nporo ncells ncells ) simpleGrading (1 1 1)
+
+ // outlet block
+ hex2D(poro1, out1, out2, poro2)
+ outlet ( noutlet ncells ncells ) simpleGrading (1 1 1)
+);
+
+edges
+(
+);
+
+patches
+(
+ // is there no way of defining all my 'defaultFaces' to be 'wall'?
+ wall front
+ (
+ // inlet block
+ frontQuad(in1, join1, join2, in2)
+ // outlet block
+ frontQuad(poro1, out1, out2, poro2)
+ )
+
+ wall back
+ (
+ // inlet block
+ backQuad(in1, join1, join2, in2)
+ // outlet block
+ backQuad(poro1, out1, out2, poro2)
+ )
+
+ wall wall
+ (
+ // inlet block
+ quad2D(in1, join1)
+ quad2D(join2, in2)
+ // outlet block
+ quad2D(poro1, out1)
+ quad2D(out2, poro2)
+ )
+
+ wall porosityWall
+ (
+ // porosity block
+ frontQuad(join1, poro1, poro2, join2)
+ // porosity block
+ backQuad(join1, poro1, poro2, join2)
+ // porosity block
+ quad2D(join1, poro1)
+ quad2D(poro2, join2)
+ )
+
+ patch inlet
+ (
+ quad2D(in2, in1)
+ )
+
+ patch outlet
+ (
+ quad2D(out2, out1)
+ )
+);
+
+mergePatchPairs
+(
+);
+
+// ************************************************************************* //
diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/controlDict b/tutorials/incompressible/simpleFoam/motorBike/system/controlDict
index 17167a646f..7be247e079 100644
--- a/tutorials/incompressible/simpleFoam/motorBike/system/controlDict
+++ b/tutorials/incompressible/simpleFoam/motorBike/system/controlDict
@@ -46,4 +46,60 @@ timePrecision 6;
runTimeModifiable true;
+
+functions
+{
+ // Make sure all fields for functionObjects are loaded. Prevents any
+ // problems running with execFlowFunctionObjects.
+ readFields
+ {
+ // Where to load it from (if not already in solver)
+ functionObjectLibs ("libfieldFunctionObjects.so");
+
+ type readFields;
+ fields (p U k);
+ }
+
+ streamLines
+ {
+ type streamLine;
+
+ // Output every
+ outputControl outputTime;
+ // outputInterval 10;
+
+ setFormat vtk; //gnuplot; //xmgr; //raw; //jplot;
+
+ // Velocity field to use for tracking.
+ U U;
+
+ // Tracked forwards (+U) or backwards (-U)
+ trackForward true;
+
+ // Names of fields to sample. Should contain above velocity field!
+ fields (p U k);
+
+ // Cells particles can travel before being removed
+ lifeTime 1000;
+
+ // Cloud name to use
+ cloudName particleTracks;
+
+ // Seeding method. See the sampleSets in sampleDict.
+ seedSampleSet uniform; //cloud;//triSurfaceMeshPointSet;
+
+ uniformCoeffs
+ {
+ type uniform;
+ axis x; //distance;
+
+ // Note: tracks slightly offset so as not to be on a face
+ start (-1.001 1E-7 0.0011);
+ end (-1.001 1E-7 1.0011);
+ nPoints 20;
+ }
+ }
+}
+
+
// ************************************************************************* //
diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties
index 5624bb507b..8ea186c54b 100644
--- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties
+++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties
@@ -33,7 +33,7 @@ PhaseChangeModel LiquidEvaporation;
DevolatilisationModel ConstantRateDevolatilisation;
-SurfaceReactionModel COxidationDiffusionLimitedRate;
+SurfaceReactionModel COxidationKineticDiffusionLimitedRate;
PostProcessingModel none;
@@ -167,10 +167,12 @@ ConstantRateDevolatilisationCoeffs
volatileResidualCoeff 0.001;
}
-COxidationDiffusionLimitedRateCoeffs
+COxidationKineticDiffusionLimitedRateCoeffs
{
- Sb Sb [ 0 0 0 0 0 ] 1;
- D D [ 0 2 -1 0 0 ] 1.5e-05;
+ Sb Sb [ 0 0 0 0 0 ] 2.667;
+ C1 C1 [ 0 0 0 0 0] 5.0E-12;
+ C2 C2 [ 0 0 0 0 0] 0.002;
+ E E [ 0 0 0 0 0] 7.9E+07;
}
diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/energySourceProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/energySourceProperties
index 4c28e875b3..ba68f2616f 100644
--- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/energySourceProperties
+++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/energySourceProperties
@@ -20,10 +20,10 @@ FoamFile
{
active true;
timeStart 0.15;
- duration 0.1;
+ duration 0.2;
selectionMode cellSet;
volumeMode absolute;
- fieldData 10000;
+ fieldData 15000;
cellSet ignitionCells;
}
);
diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution
index 20d0f46217..aa49989c5b 100644
--- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution
+++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution
@@ -34,10 +34,17 @@ solvers
p
{
- solver PBiCG;
- preconditioner DILU;
+ solver GAMG;
tolerance 1e-06;
- relTol 0.1;
+ relTol 0.01;
+ smoother GaussSeidel;
+ nPreSweeps 0;
+ nPostSweeps 2;
+ nBottomSweeps 2;
+ cacheAgglomeration false;
+ nCellsInCoarsestLevel 10;
+ agglomerator faceAreaPair;
+ mergeLevels 1;
}
pFinal
@@ -82,7 +89,7 @@ solvers
PISO
{
transonic yes;
- nCorrectors 2;
+ nCorrectors 3;
nNonOrthogonalCorrectors 0;
momentumPredictor yes;
}
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/surfaceFilmProperties b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/surfaceFilmProperties
index 1045475fae..4099a1fff3 100644
--- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/surfaceFilmProperties
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/surfaceFilmProperties
@@ -15,38 +15,18 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-//surfaceFilmModel kinematicSingleLayer;
surfaceFilmModel thermoSingleLayer;
filmRegionName wallFilmRegion;
active true;
-kinematicSingleLayerCoeffs
-{
- thermoModel constant;
- rho0 rho0 [1 -3 0 0 0] 1000;
- mu0 mu0 [1 -1 -1 0 0] 1e-3;
- sigma0 sigma0 [1 0 -2 0 0] 0.07;
-
- deltaStable deltaStable [0 1 0 0 0] 0.0005;
- Cf 0.005;
-
- injectionModel removeInjection; // none; // cloudInjection;
-}
-
thermoSingleLayerCoeffs
{
thermoModel singleComponent; // constant
liquid H2O;
-// thermoModel constant;
-// rho0 rho0 [1 -3 0 0 0] 1000;
-// mu0 mu0 [1 -1 -1 0 0] 1e-3;
-// sigma0 sigma0 [1 0 -2 0 0] 0.07;
-// cp0 cp0 [0 2 -2 -1 0] 4187;
- deltaStable deltaStable [0 1 0 0 0] 0;
Cf 0.005;
upperSurfaceModels
@@ -75,7 +55,9 @@ thermoSingleLayerCoeffs
{
cloudName reactingCloud1;
- particlesPerParcel 100.0;
+ deltaStable 0.0;
+
+ particlesPerParcel 100.0;
parcelPDF
{
diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/snappyHexMeshDict b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/snappyHexMeshDict
index 1131e5288c..3cb346dcf3 100644
--- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/snappyHexMeshDict
+++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/snappyHexMeshDict
@@ -288,9 +288,6 @@ meshQualityControls
// Set to 180 to disable.
maxConcave 80;
- //- Minimum projected area v.s. actual area. Set to -1 to disable.
- minFlatness 0.5;
-
//- Minimum pyramid volume. Is absolute volume of cell pyramid.
// Set to very negative number (e.g. -1E30) to disable.
minVol 1e-20;