mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://hunt//home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -39,13 +39,43 @@
|
|||||||
*** DSMC
|
*** DSMC
|
||||||
*** Dynamic Mesh
|
*** Dynamic Mesh
|
||||||
*** Numerics
|
*** Numerics
|
||||||
|
*** *Updated* command line help, e.g. `snappyHexMesh -help' now gives:
|
||||||
|
|
||||||
|
Usage: snappyHexMesh [OPTIONS]
|
||||||
|
options:
|
||||||
|
-case <dir> 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
|
* Solvers
|
||||||
A number of new solvers have been developed for a range of engineering
|
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
|
applications. There has been a set of improvements to certain classes of
|
||||||
solver that are introduced in this release.
|
solver that are introduced in this release.
|
||||||
*** *New* Solvers
|
*** *New* Solvers
|
||||||
+ ...
|
+ =reactingParcelFilmFoam=: Lagrangian cloud and film transport in a
|
||||||
|
reacting gas phase system
|
||||||
*** Modifications to multiphase and buoyant solvers
|
*** Modifications to multiphase and buoyant solvers
|
||||||
+ ...
|
+ ...
|
||||||
*** Modifications to solvers for sensible enthalpy
|
*** Modifications to solvers for sensible enthalpy
|
||||||
@ -58,20 +88,43 @@
|
|||||||
* Boundary conditions
|
* Boundary conditions
|
||||||
New boundary conditions have been introduced to support new applications in
|
New boundary conditions have been introduced to support new applications in
|
||||||
OpenFOAM.
|
OpenFOAM.
|
||||||
+ ...
|
+ *New* wall functions:
|
||||||
|
+ kappatJayatillekeWallFunction: incompressible RAS thermal wall function
|
||||||
|
|
||||||
* Utilities
|
* Utilities
|
||||||
There have been some utilities added and updated in this release.
|
There have been some utilities added and updated in this release.
|
||||||
*** *New* utilities
|
*** *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 <zone>_sidePatch
|
||||||
|
+ extrude edges inbetween different faceZones as a
|
||||||
|
(nonuniformTransform)cyclic <zoneA>_<zoneB>
|
||||||
|
+ extrudes into master direction (i.e. away from the owner cell
|
||||||
|
if flipMap is false)
|
||||||
*** Updated utilities
|
*** Updated utilities
|
||||||
+ ...
|
+ ...
|
||||||
|
|
||||||
* Post-processing
|
* Post-processing
|
||||||
+ =foamToEnsight=: new =-nodeValues= option to generate and output nodal
|
+ =foamToEnsight=: new =-nodeValues= option to generate and output nodal
|
||||||
field data.
|
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
|
* New tutorials
|
||||||
There is a large number of new tutorials to support the new solvers in the
|
There is a large number of new tutorials to support the new solvers in the
|
||||||
release.
|
release.
|
||||||
+ ...
|
+ =reactingParcelFilmFoam= tutorials:
|
||||||
|
+ multipleBoxes, hotBoxes, panel, evaporationTest
|
||||||
|
|||||||
@ -39,9 +39,14 @@
|
|||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
#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;
|
Info<< "Creating turbulence model\n" << endl;
|
||||||
|
|||||||
@ -102,6 +102,8 @@ else
|
|||||||
p.relax();
|
p.relax();
|
||||||
|
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
|
rho = max(rho, rhoMin);
|
||||||
|
rho = min(rho, rhoMax);
|
||||||
rho.relax();
|
rho.relax();
|
||||||
Info<< "rho max/min : " << max(rho).value()
|
Info<< "rho max/min : " << max(rho).value()
|
||||||
<< " " << min(rho).value() << endl;
|
<< " " << min(rho).value() << endl;
|
||||||
@ -112,8 +114,6 @@ U.correctBoundaryConditions();
|
|||||||
|
|
||||||
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||||
|
|
||||||
bound(p, pMin);
|
|
||||||
|
|
||||||
// For closed-volume cases adjust the pressure and density levels
|
// For closed-volume cases adjust the pressure and density levels
|
||||||
// to obey overall mass continuity
|
// to obey overall mass continuity
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -70,16 +70,29 @@
|
|||||||
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
|
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
|
||||||
|
|
||||||
thermalPorousZones pZones(mesh);
|
thermalPorousZones pZones(mesh);
|
||||||
|
Switch pressureImplicitPorosity(false);
|
||||||
|
|
||||||
// nUCorrectors used for pressureImplicitPorosity
|
// nUCorrectors used for pressureImplicitPorosity
|
||||||
int nUCorr = 0;
|
int nUCorr = 0;
|
||||||
const bool pressureImplicitPorosity =
|
if (pZones.size())
|
||||||
(
|
{
|
||||||
pZones.size()
|
// nUCorrectors for pressureImplicitPorosity
|
||||||
&& mesh.solutionDict().subDict("SIMPLE").readIfPresent
|
if (mesh.solutionDict().subDict("SIMPLE").found("nUCorrectors"))
|
||||||
(
|
{
|
||||||
"nUCorrectors",
|
nUCorr = readInt
|
||||||
nUCorr
|
(
|
||||||
)
|
mesh.solutionDict().subDict("SIMPLE").lookup("nUCorrectors")
|
||||||
&& (nUCorr > 0)
|
);
|
||||||
);
|
}
|
||||||
|
|
||||||
|
if (nUCorr > 0)
|
||||||
|
{
|
||||||
|
pressureImplicitPorosity = true;
|
||||||
|
Info<< "Using pressure implicit porosity" << endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< "Using pressure explicit porosity" << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,8 +5,8 @@
|
|||||||
- fvm::Sp(fvc::div(phi), h)
|
- fvm::Sp(fvc::div(phi), h)
|
||||||
- fvm::laplacian(turbulence->alphaEff(), h)
|
- fvm::laplacian(turbulence->alphaEff(), h)
|
||||||
==
|
==
|
||||||
fvc::div(phi/fvc::interpolate(rho), rho/psi, "div(U,p)")
|
fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p, "div(U,p)"))
|
||||||
- (rho/psi)*fvc::div(phi/fvc::interpolate(rho))
|
- p*fvc::div(phi/fvc::interpolate(rho))
|
||||||
);
|
);
|
||||||
|
|
||||||
pZones.addEnthalpySource(thermo, rho, hEqn);
|
pZones.addEnthalpySource(thermo, rho, hEqn);
|
||||||
|
|||||||
@ -1,8 +1,3 @@
|
|||||||
rho = thermo.rho();
|
|
||||||
rho = max(rho, rhoMin);
|
|
||||||
rho = min(rho, rhoMax);
|
|
||||||
rho.relax();
|
|
||||||
|
|
||||||
if (pressureImplicitPorosity)
|
if (pressureImplicitPorosity)
|
||||||
{
|
{
|
||||||
U = trTU()&UEqn().H();
|
U = trTU()&UEqn().H();
|
||||||
|
|||||||
@ -30,15 +30,7 @@ if (transonic)
|
|||||||
|
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
pEqn.setReference(pRefCell, pRefValue);
|
||||||
|
|
||||||
// Retain the residual from the first iteration
|
pEqn.solve();
|
||||||
if (nonOrth == 0)
|
|
||||||
{
|
|
||||||
pEqn.solve();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pEqn.solve();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nonOrth == nNonOrthCorr)
|
if (nonOrth == nNonOrthCorr)
|
||||||
{
|
{
|
||||||
@ -60,15 +52,7 @@ else
|
|||||||
|
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
pEqn.setReference(pRefCell, pRefValue);
|
||||||
|
|
||||||
// Retain the residual from the first iteration
|
pEqn.solve();
|
||||||
if (nonOrth == 0)
|
|
||||||
{
|
|
||||||
pEqn.solve();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pEqn.solve();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nonOrth == nNonOrthCorr)
|
if (nonOrth == nNonOrthCorr)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -43,9 +43,14 @@
|
|||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
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;
|
Info<< "Creating turbulence model\n" << endl;
|
||||||
|
|||||||
@ -101,8 +101,6 @@ U -= (fvc::grad(p0)*(1.0/AU - 1.0/AtU) + fvc::grad(p)/AtU);
|
|||||||
|
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
|
|
||||||
bound(p, pMin);
|
|
||||||
|
|
||||||
// For closed-volume cases adjust the pressure and density levels
|
// For closed-volume cases adjust the pressure and density levels
|
||||||
// to obey overall mass continuity
|
// to obey overall mass continuity
|
||||||
if (closedVolume)
|
if (closedVolume)
|
||||||
@ -112,6 +110,8 @@ if (closedVolume)
|
|||||||
}
|
}
|
||||||
|
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
|
rho = max(rho, rhoMin);
|
||||||
|
rho = min(rho, rhoMax);
|
||||||
|
|
||||||
if (!transonic)
|
if (!transonic)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -43,16 +43,28 @@
|
|||||||
|
|
||||||
|
|
||||||
porousZones pZones(mesh);
|
porousZones pZones(mesh);
|
||||||
|
Switch pressureImplicitPorosity(false);
|
||||||
|
|
||||||
// nUCorrectors used for pressureImplicitPorosity
|
// nUCorrectors used for pressureImplicitPorosity
|
||||||
int nUCorr = 0;
|
int nUCorr = 0;
|
||||||
const bool pressureImplicitPorosity =
|
if (pZones.size())
|
||||||
(
|
{
|
||||||
pZones.size()
|
// nUCorrectors for pressureImplicitPorosity
|
||||||
&& mesh.solutionDict().subDict("SIMPLE").readIfPresent
|
if (mesh.solutionDict().subDict("SIMPLE").found("nUCorrectors"))
|
||||||
(
|
{
|
||||||
"nUCorrectors",
|
nUCorr = readInt
|
||||||
nUCorr
|
(
|
||||||
)
|
mesh.solutionDict().subDict("SIMPLE").lookup("nUCorrectors")
|
||||||
&& (nUCorr > 0)
|
);
|
||||||
);
|
}
|
||||||
|
|
||||||
|
if (nUCorr > 0)
|
||||||
|
{
|
||||||
|
pressureImplicitPorosity = true;
|
||||||
|
Info<< "Using pressure implicit porosity" << endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< "Using pressure explicit porosity" << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -15,15 +15,8 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
pEqn.setReference(pRefCell, pRefValue);
|
||||||
// retain the residual from the first iteration
|
|
||||||
if (nonOrth == 0)
|
pEqn.solve();
|
||||||
{
|
|
||||||
pEqn.solve();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pEqn.solve();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nonOrth == nNonOrthCorr)
|
if (nonOrth == nNonOrthCorr)
|
||||||
{
|
{
|
||||||
|
|||||||
4
applications/test/CompactIOList/Make/files
Normal file
4
applications/test/CompactIOList/Make/files
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
testCompactIOList.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/CompactIOList
|
||||||
3
applications/test/CompactIOList/Make/options
Normal file
3
applications/test/CompactIOList/Make/options
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
EXE_INC =
|
||||||
|
|
||||||
|
EXE_LIBS =
|
||||||
181
applications/test/CompactIOList/testCompactIOList.C
Normal file
181
applications/test/CompactIOList/testCompactIOList.C
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -116,7 +116,7 @@ int main(int argc, char *argv[])
|
|||||||
sampledSets::typeName,
|
sampledSets::typeName,
|
||||||
mesh,
|
mesh,
|
||||||
sampleDict,
|
sampleDict,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ_IF_MODIFIED,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ int main(int argc, char *argv[])
|
|||||||
sampledSurfaces::typeName,
|
sampledSurfaces::typeName,
|
||||||
mesh,
|
mesh,
|
||||||
sampleDict,
|
sampleDict,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ_IF_MODIFIED,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -77,24 +77,19 @@ Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField
|
|||||||
{
|
{
|
||||||
if (dict.found("value"))
|
if (dict.found("value"))
|
||||||
{
|
{
|
||||||
fvPatchScalarField::operator=
|
refValue() = scalarField("value", dict, p.size());
|
||||||
(
|
|
||||||
scalarField("value", dict, p.size())
|
|
||||||
);
|
|
||||||
refValue() = scalarField("refValue", dict, p.size());
|
|
||||||
refGrad() = scalarField("refGradient", dict, p.size());
|
|
||||||
valueFraction() = scalarField("valueFraction", dict, p.size());
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const scalarField& Tp =
|
refValue() = 0.0;
|
||||||
patch().lookupPatchField<volScalarField, scalar>(TName_);
|
|
||||||
|
|
||||||
refValue() = 4.0*constant::physicoChemical::sigma.value()*pow4(Tp);
|
|
||||||
refGrad() = 0.0;
|
|
||||||
|
|
||||||
fvPatchScalarField::operator=(refValue());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// zero gradient
|
||||||
|
refGrad() = 0.0;
|
||||||
|
|
||||||
|
valueFraction() = 1.0;
|
||||||
|
|
||||||
|
fvPatchScalarField::operator=(refValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -78,24 +78,15 @@ MarshakRadiationFixedTMixedFvPatchScalarField
|
|||||||
Trad_("Trad", dict, p.size()),
|
Trad_("Trad", dict, p.size()),
|
||||||
emissivity_(readScalar(dict.lookup("emissivity")))
|
emissivity_(readScalar(dict.lookup("emissivity")))
|
||||||
{
|
{
|
||||||
if (dict.found("value"))
|
// refValue updated on each call to updateCoeffs()
|
||||||
{
|
refValue() = 4.0*constant::physicoChemical::sigma.value()*pow4(Trad_);
|
||||||
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;
|
|
||||||
|
|
||||||
fvPatchScalarField::operator=(refValue());
|
// zero gradient
|
||||||
}
|
refGrad() = 0.0;
|
||||||
|
|
||||||
|
valueFraction() = 1.0;
|
||||||
|
|
||||||
|
fvPatchScalarField::operator=(refValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
thermalPorousZone/thermalPorousZone.C
|
thermalPorousZone/thermalPorousZone.C
|
||||||
thermalPorousZone/thermalPorousZones.C
|
thermalPorousZone/thermalPorousZones.C
|
||||||
|
|
||||||
|
thermalModel/thermalModel/thermalModel.C
|
||||||
|
thermalModel/thermalModel/thermalModelNew.C
|
||||||
|
thermalModel/fixedTemperature/fixedTemperature.C
|
||||||
|
thermalModel/noThermalModel/noThermalModel.C
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libthermalPorousZone
|
LIB = $(FOAM_LIBBIN)/libthermalPorousZone
|
||||||
|
|||||||
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#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_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
|
|
||||||
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#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
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
|
|
||||||
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#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()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
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<thermalModel> 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
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
|
|
||||||
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "thermalModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::autoPtr<Foam::thermalModel> 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<thermalModel>(cstrIter()(pZone));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -24,9 +24,9 @@ License
|
|||||||
\*----------------------------------------------------------------------------*/
|
\*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "thermalPorousZone.H"
|
#include "thermalPorousZone.H"
|
||||||
#include "fvMesh.H"
|
|
||||||
#include "fvMatrices.H"
|
|
||||||
#include "basicThermo.H"
|
#include "basicThermo.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
#include "fvMatrices.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -38,29 +38,8 @@ Foam::thermalPorousZone::thermalPorousZone
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
porousZone(key, mesh, dict),
|
porousZone(key, mesh, dict),
|
||||||
T_("T", dimTemperature, -GREAT)
|
model_(thermalModel::New(*this))
|
||||||
{
|
{}
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
@ -72,29 +51,7 @@ void Foam::thermalPorousZone::addEnthalpySource
|
|||||||
fvScalarMatrix& hEqn
|
fvScalarMatrix& hEqn
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const labelList& zones = this->zoneIds();
|
model_->addEnthalpySource(thermo, rho, hEqn);
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,8 @@ Description
|
|||||||
equations.
|
equations.
|
||||||
|
|
||||||
See Also
|
See Also
|
||||||
porousZone, thermalPorousZones and coordinateSystems
|
porousZone, thermalPorousZones and coordinateSystems with run-time
|
||||||
|
selectable thermal model
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
thermalPorousZone.C
|
thermalPorousZone.C
|
||||||
@ -40,6 +41,7 @@ SourceFiles
|
|||||||
#define thermalPorousZone_H
|
#define thermalPorousZone_H
|
||||||
|
|
||||||
#include "porousZone.H"
|
#include "porousZone.H"
|
||||||
|
#include "thermalModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -50,7 +52,7 @@ class fvMesh;
|
|||||||
class basicThermo;
|
class basicThermo;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class thermalPorousZone Declaration
|
Class thermalPorousZone Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class thermalPorousZone
|
class thermalPorousZone
|
||||||
@ -59,23 +61,27 @@ class thermalPorousZone
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Temperature in the porous-zone
|
|
||||||
dimensionedScalar T_;
|
|
||||||
|
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
thermalPorousZone(const thermalPorousZone&);
|
thermalPorousZone(const thermalPorousZone&);
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const thermalPorousZone&);
|
void operator=(const thermalPorousZone&);
|
||||||
|
|
||||||
|
//- Thermal model
|
||||||
|
autoPtr<thermalModel> model_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
thermalPorousZone(const keyType& key, const fvMesh&, const dictionary&);
|
thermalPorousZone
|
||||||
|
(
|
||||||
|
const keyType& key,
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const dictionary& dict
|
||||||
|
);
|
||||||
|
|
||||||
//- Return clone
|
//- Return clone
|
||||||
autoPtr<thermalPorousZone> clone() const
|
autoPtr<thermalPorousZone> clone() const
|
||||||
@ -118,20 +124,6 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// 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
|
//- Add the thermal source to the enthalpy equation
|
||||||
void addEnthalpySource
|
void addEnthalpySource
|
||||||
(
|
(
|
||||||
|
|||||||
10
tutorials/compressible/rhoPimpleFoam/ras/angledDuct/Allrun
Executable file
10
tutorials/compressible/rhoPimpleFoam/ras/angledDuct/Allrun
Executable file
@ -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
|
||||||
|
|
||||||
@ -94,7 +94,8 @@ PIMPLE
|
|||||||
nCorrectors 2;
|
nCorrectors 2;
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
momentumPredictor yes;
|
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;
|
pRefCell 0;
|
||||||
pRefValue 1e5;
|
pRefValue 1e5;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1 @@
|
|||||||
|
../angledDuctImplicit/Allrun
|
||||||
@ -47,5 +47,25 @@ graphFormat raw;
|
|||||||
|
|
||||||
runTimeModifiable true;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -34,7 +34,6 @@ divSchemes
|
|||||||
div(phi,h) Gauss upwind;
|
div(phi,h) Gauss upwind;
|
||||||
div(phi,epsilon) Gauss upwind;
|
div(phi,epsilon) Gauss upwind;
|
||||||
div(phi,k) Gauss upwind;
|
div(phi,k) Gauss upwind;
|
||||||
div(phid,p) Gauss linear;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
laplacianSchemes
|
laplacianSchemes
|
||||||
|
|||||||
@ -57,7 +57,8 @@ solvers
|
|||||||
SIMPLE
|
SIMPLE
|
||||||
{
|
{
|
||||||
nNonOrthogonalCorrectors 0;
|
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
|
relaxationFactors
|
||||||
|
|||||||
10
tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/Allrun
Executable file
10
tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/Allrun
Executable file
@ -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
|
||||||
|
|
||||||
@ -31,11 +31,11 @@ FoamFile
|
|||||||
f f [0 -1 0 0 0 0 0] (0 0 0);
|
f f [0 -1 0 0 0 0 0] (0 0 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
thermalModel
|
thermalModel none; // fixedTemperature;
|
||||||
{
|
|
||||||
type fixedTemperature;
|
|
||||||
|
|
||||||
T T [0 0 0 1 0] 350;
|
fixedTemperatureCoeffs
|
||||||
|
{
|
||||||
|
T 350;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@ -47,5 +47,25 @@ graphFormat raw;
|
|||||||
|
|
||||||
runTimeModifiable true;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -34,7 +34,6 @@ divSchemes
|
|||||||
div(phi,h) Gauss upwind;
|
div(phi,h) Gauss upwind;
|
||||||
div(phi,epsilon) Gauss upwind;
|
div(phi,epsilon) Gauss upwind;
|
||||||
div(phi,k) Gauss upwind;
|
div(phi,k) Gauss upwind;
|
||||||
div(phid,p) Gauss linear;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
laplacianSchemes
|
laplacianSchemes
|
||||||
|
|||||||
@ -51,7 +51,8 @@ SIMPLE
|
|||||||
{
|
{
|
||||||
nUCorrectors 2;
|
nUCorrectors 2;
|
||||||
nNonOrthogonalCorrectors 0;
|
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
|
relaxationFactors
|
||||||
|
|||||||
@ -171,9 +171,10 @@ solvers
|
|||||||
|
|
||||||
SIMPLE
|
SIMPLE
|
||||||
{
|
{
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
pMin pMin [1 -1 -2 0 0 0 0] 10000;
|
rhoMin rhoMin [1 -3 0 0 0] 0.1;
|
||||||
transonic yes;
|
rhoMax rhoMax [1 -3 0 0 0] 1.0;
|
||||||
|
transonic yes;
|
||||||
}
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
|
|||||||
@ -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<scalar>
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -56,8 +56,8 @@ functions
|
|||||||
maxResiduals
|
maxResiduals
|
||||||
{
|
{
|
||||||
p_rgh 1e-2;
|
p_rgh 1e-2;
|
||||||
U 1e-4;
|
U 1e-3;
|
||||||
T 1e-3;
|
h 1e-3;
|
||||||
|
|
||||||
// possibly check turbulence fields
|
// possibly check turbulence fields
|
||||||
"(k|epsilon|omega)" 1e-3;
|
"(k|epsilon|omega)" 1e-3;
|
||||||
|
|||||||
@ -57,8 +57,8 @@ functions
|
|||||||
maxResiduals
|
maxResiduals
|
||||||
{
|
{
|
||||||
p_rgh 1e-2;
|
p_rgh 1e-2;
|
||||||
U 1e-4;
|
U 1e-3;
|
||||||
T 1e-3;
|
h 1e-3;
|
||||||
|
|
||||||
// possibly check turbulence fields
|
// possibly check turbulence fields
|
||||||
"(k|epsilon|omega)" 1e-3;
|
"(k|epsilon|omega)" 1e-3;
|
||||||
|
|||||||
@ -57,8 +57,9 @@ functions
|
|||||||
maxResiduals
|
maxResiduals
|
||||||
{
|
{
|
||||||
p_rgh 1e-2;
|
p_rgh 1e-2;
|
||||||
U 1e-4;
|
U 1e-3;
|
||||||
T 1e-3;
|
h 1e-3;
|
||||||
|
G 1e-3;
|
||||||
|
|
||||||
// possibly check turbulence fields
|
// possibly check turbulence fields
|
||||||
"(k|epsilon|omega)" 1e-3;
|
"(k|epsilon|omega)" 1e-3;
|
||||||
|
|||||||
@ -57,8 +57,9 @@ functions
|
|||||||
maxResiduals
|
maxResiduals
|
||||||
{
|
{
|
||||||
p_rgh 1e-2;
|
p_rgh 1e-2;
|
||||||
U 1e-4;
|
U 1e-3;
|
||||||
T 1e-3;
|
h 1e-3;
|
||||||
|
G 1e-3;
|
||||||
|
|
||||||
// possibly check turbulence fields
|
// possibly check turbulence fields
|
||||||
"(k|epsilon|omega)" 1e-3;
|
"(k|epsilon|omega)" 1e-3;
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
cellSet heater new boxToCell (-0.01 0 -100 )(0.01 0.01 100)
|
cellSet heater new boxToCell (-0.01001 0 -100 )(0.01001 0.00999 100)
|
||||||
cellSet heater add boxToCell (-0.01 -100 -0.01)(0.01 0.01 0.01)
|
cellSet heater add boxToCell (-0.01001 -100 -0.01001)(0.01001 0.00999 0.01001)
|
||||||
cellZoneSet heater new setToCellZone heater
|
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
|
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
|
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
|
cellZoneSet topAir new setToCellZone topAir
|
||||||
cellSet bottomAir clear
|
cellSet bottomAir clear
|
||||||
cellSet bottomAir add cellToCell heater
|
cellSet bottomAir add cellToCell heater
|
||||||
|
|||||||
@ -18,9 +18,16 @@ solvers
|
|||||||
{
|
{
|
||||||
rho
|
rho
|
||||||
{
|
{
|
||||||
solver PCG
|
solver PCG;
|
||||||
preconditioner DIC;
|
preconditioner DIC;
|
||||||
tolerance 1e-8;
|
tolerance 1e-8;
|
||||||
|
relTol 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
rhoFinal
|
||||||
|
{
|
||||||
|
$rho;
|
||||||
|
tolerance 1e-8;
|
||||||
relTol 0;
|
relTol 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,9 +18,16 @@ solvers
|
|||||||
{
|
{
|
||||||
rho
|
rho
|
||||||
{
|
{
|
||||||
solver PCG
|
solver PCG;
|
||||||
preconditioner DIC;
|
preconditioner DIC;
|
||||||
tolerance 1e-7;
|
tolerance 1e-7;
|
||||||
|
relTol 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
rhoFinal
|
||||||
|
{
|
||||||
|
$rho;
|
||||||
|
tolerance 1e-7;
|
||||||
relTol 0;
|
relTol 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -35,8 +35,7 @@ solvers
|
|||||||
|
|
||||||
pFinal
|
pFinal
|
||||||
{
|
{
|
||||||
solver PCG;
|
$p;
|
||||||
preconditioner DIC;
|
|
||||||
tolerance 1e-06;
|
tolerance 1e-06;
|
||||||
relTol 0;
|
relTol 0;
|
||||||
}
|
}
|
||||||
@ -46,6 +45,13 @@ solvers
|
|||||||
solver PBiCG;
|
solver PBiCG;
|
||||||
preconditioner DILU;
|
preconditioner DILU;
|
||||||
tolerance 1e-05;
|
tolerance 1e-05;
|
||||||
|
relTol 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
UFinal
|
||||||
|
{
|
||||||
|
$U;
|
||||||
|
tolerance 1e-05;
|
||||||
relTol 0;
|
relTol 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -32,16 +32,9 @@ solvers
|
|||||||
|
|
||||||
pFinal
|
pFinal
|
||||||
{
|
{
|
||||||
solver GAMG;
|
$p;
|
||||||
tolerance 1e-7;
|
tolerance 1e-7;
|
||||||
relTol 0;
|
relTol 0;
|
||||||
smoother GaussSeidel;
|
|
||||||
nPreSweeps 0;
|
|
||||||
nPostSweeps 2;
|
|
||||||
cacheAgglomeration on;
|
|
||||||
agglomerator faceAreaPair;
|
|
||||||
nCellsInCoarsestLevel 10;
|
|
||||||
mergeLevels 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
"(U|k|omega)"
|
"(U|k|omega)"
|
||||||
@ -49,6 +42,13 @@ solvers
|
|||||||
solver PBiCG;
|
solver PBiCG;
|
||||||
preconditioner DILU;
|
preconditioner DILU;
|
||||||
tolerance 1e-06;
|
tolerance 1e-06;
|
||||||
|
relTol 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
"(U|k|omega)Final"
|
||||||
|
{
|
||||||
|
$U;
|
||||||
|
tolerance 1e-06;
|
||||||
relTol 0;
|
relTol 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1 @@
|
|||||||
|
../angledDuctImplicit/Allrun
|
||||||
10
tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/Allrun
Executable file
10
tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/Allrun
Executable file
@ -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
|
||||||
|
|
||||||
@ -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> <STANDARD DEFINTIONS>
|
||||||
|
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> </STANDARD DEFINTIONS>
|
||||||
|
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
|
||||||
|
(
|
||||||
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -46,4 +46,60 @@ timePrecision 6;
|
|||||||
|
|
||||||
runTimeModifiable true;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -33,7 +33,7 @@ PhaseChangeModel LiquidEvaporation;
|
|||||||
|
|
||||||
DevolatilisationModel ConstantRateDevolatilisation;
|
DevolatilisationModel ConstantRateDevolatilisation;
|
||||||
|
|
||||||
SurfaceReactionModel COxidationDiffusionLimitedRate;
|
SurfaceReactionModel COxidationKineticDiffusionLimitedRate;
|
||||||
|
|
||||||
PostProcessingModel none;
|
PostProcessingModel none;
|
||||||
|
|
||||||
@ -167,10 +167,12 @@ ConstantRateDevolatilisationCoeffs
|
|||||||
volatileResidualCoeff 0.001;
|
volatileResidualCoeff 0.001;
|
||||||
}
|
}
|
||||||
|
|
||||||
COxidationDiffusionLimitedRateCoeffs
|
COxidationKineticDiffusionLimitedRateCoeffs
|
||||||
{
|
{
|
||||||
Sb Sb [ 0 0 0 0 0 ] 1;
|
Sb Sb [ 0 0 0 0 0 ] 2.667;
|
||||||
D D [ 0 2 -1 0 0 ] 1.5e-05;
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -20,10 +20,10 @@ FoamFile
|
|||||||
{
|
{
|
||||||
active true;
|
active true;
|
||||||
timeStart 0.15;
|
timeStart 0.15;
|
||||||
duration 0.1;
|
duration 0.2;
|
||||||
selectionMode cellSet;
|
selectionMode cellSet;
|
||||||
volumeMode absolute;
|
volumeMode absolute;
|
||||||
fieldData 10000;
|
fieldData 15000;
|
||||||
cellSet ignitionCells;
|
cellSet ignitionCells;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@ -34,10 +34,17 @@ solvers
|
|||||||
|
|
||||||
p
|
p
|
||||||
{
|
{
|
||||||
solver PBiCG;
|
solver GAMG;
|
||||||
preconditioner DILU;
|
|
||||||
tolerance 1e-06;
|
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
|
pFinal
|
||||||
@ -82,7 +89,7 @@ solvers
|
|||||||
PISO
|
PISO
|
||||||
{
|
{
|
||||||
transonic yes;
|
transonic yes;
|
||||||
nCorrectors 2;
|
nCorrectors 3;
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
momentumPredictor yes;
|
momentumPredictor yes;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,38 +15,18 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
//surfaceFilmModel kinematicSingleLayer;
|
|
||||||
surfaceFilmModel thermoSingleLayer;
|
surfaceFilmModel thermoSingleLayer;
|
||||||
|
|
||||||
filmRegionName wallFilmRegion;
|
filmRegionName wallFilmRegion;
|
||||||
|
|
||||||
active true;
|
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
|
thermoSingleLayerCoeffs
|
||||||
{
|
{
|
||||||
thermoModel singleComponent; // constant
|
thermoModel singleComponent; // constant
|
||||||
liquid H2O;
|
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;
|
Cf 0.005;
|
||||||
|
|
||||||
upperSurfaceModels
|
upperSurfaceModels
|
||||||
@ -75,7 +55,9 @@ thermoSingleLayerCoeffs
|
|||||||
{
|
{
|
||||||
cloudName reactingCloud1;
|
cloudName reactingCloud1;
|
||||||
|
|
||||||
particlesPerParcel 100.0;
|
deltaStable 0.0;
|
||||||
|
|
||||||
|
particlesPerParcel 100.0;
|
||||||
|
|
||||||
parcelPDF
|
parcelPDF
|
||||||
{
|
{
|
||||||
|
|||||||
@ -288,9 +288,6 @@ meshQualityControls
|
|||||||
// Set to 180 to disable.
|
// Set to 180 to disable.
|
||||||
maxConcave 80;
|
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.
|
//- Minimum pyramid volume. Is absolute volume of cell pyramid.
|
||||||
// Set to very negative number (e.g. -1E30) to disable.
|
// Set to very negative number (e.g. -1E30) to disable.
|
||||||
minVol 1e-20;
|
minVol 1e-20;
|
||||||
|
|||||||
Reference in New Issue
Block a user