Minmod is the default limiter function and specified with an explicit name e.g.:
gradSchemes
{
default Gauss linear;
limited cellLimited Gauss linear 1;
}
Venkatakrishnan and cubic limiter functions are also provided and may be
specified explicitly e.g.:
gradSchemes
{
default Gauss linear;
limited cellLimited<Venkatakrishnan> Gauss linear 1;
}
or
gradSchemes
{
default Gauss linear;
limited cellLimited<cubic> 1.5 Gauss linear 1;
}
The standard minmod function is recommended for most applications but if
convergence or stability problems arise it may be beneficial to use one of the
alternatives which smooth the gradient limiting. The Venkatakrishnan is not
well formulated and allows the limiter to exceed 1 whereas the cubic limiter is
designed to obey all the value and gradient constraints on the limiter function,
see
Michalak, K., & Ollivier-Gooch, C. (2008).
Limiters for unstructured higher-order accurate solutions
of the Euler equations.
In 46th AIAA Aerospace Sciences Meeting and Exhibit (p. 776).
The cubic limiter function requires the transition point at which the limiter
function reaches 1 is an input parameter which should be set to a value between
1 and 2 although values larger than 2 are physical but likely to significantly
reduce the accuracy of the scheme.
These BCs blend between typical inflow and outflow conditions based on the
velocity orientation.
airFoil2D tutorial updated to demonstrate these new BCs.
Now if a <field> file does not exist first the compressed <field>.gz file is
searched for and if that also does not exist the <field>.orig file is searched
for.
This simplifies case setup and run scripts as now setField for example can read
the <field>.orig file directly and generate the <field> file from it which is
then read by the solver. Additionally the cleanCase function used by
foamCleanCase and the Allclean scripts automatically removed <field> files if
there is a corresponding <field>.orig file. So now there is no need for the
Allrun scripts to copy <field>.orig files into <field> or for the Allclean
scripts to explicitly remove them.
A lower limit of one on the number of particles represented by a single
parcel has been removed from the injection models. It may be appropriate
to simulate the statistical behaviour of a particulate flow with more
lagrangian elements than physical particles. A unity lower limit does
not permit this.
The limit was, in some situations, also causing the large-diameter end
of an injected distribution to be clipped.
This resolves bug report https://bugs.openfoam.org/view.php?id=2837
The logic governing function objects' ability to change the time-step
has been modified so that it is compatible with the time-step adjustment
done in the Time class. The behaviour has been split into a method which
sets the step directly, and another which moidifies the time until the
next write operation (i.e., the time that the solver "aims" for).
This fixes an issue where the adjustments in Time and the function
objects interfere and cause the time step to decrease exponentially down
to machine precision. It also means that the set-time-step function
object now does not break the adjustable run-time setting.
This resolves bug report https://bugs.openfoam.org/view.php?id=2820
Splitting MPI_COMM_FOAM from MPI_COMM_WORLD allows OpenFOAM to be linked with
other libraries communicating via MPI.
Resolves feature request https://bugs.openfoam.org/view.php?id=2815
The solution controls have been rewritten for use in multi-region
solvers, and PIMPLE fluid/solid solution controls have been implemented
within this framework.
PIMPLE also now has time-loop convergence control which can be used to
end the simulation once a certain initial residual is reached. This
allows a PIMPLE solver to run with equivalent convergence control to a
SIMPLE solver. Corrector loop convergence control is still available,
and can be used at the same time as the time-loop control.
The "residualControl" sub-dictionary of PIMPLE contains the residual
values required on the first solve of a time-step for the simulation to
end. This behaviour is the same as SIMPLE. The
"outerCorrectorResidualControl" sub-dictionary contains the tolerances
required for the corrector loop to exit. An example specification with
both types of control active is shown below.
PIMPLE
{
// ...
residualControl
{
p 1e-3;
U 1e-4;
"(k|epsilon|omega)" 1e-3;
}
outerCorrectorResidualControl
{
U
{
tolerance 1e-4;
relTol 0.1;
}
"(k|epsilon|omega)"
{
tolerance 1e-3;
relTol 0.1;
}
}
}
Note that existing PIMPLE "residualControl" entries will need to be
renamed "outerCorrectorResidualControl".
Application within a solver has also changed slightly. In order to have
convergence control for the time loop as a whole, the
solutionControl::loop(Time&) method (or the equivalent run method) must
be used; i.e.,
while (simple.loop(runTime))
{
Info<< "Time = " << runTime.timeName() << nl << endl;
// solve ...
}
or,
while (pimple.run(runTime))
{
// pre-time-increment operations ...
runTime ++;
Info<< "Time = " << runTime.timeName() << nl << endl;
// solve ...
}
In constant/chemistryProperties in addition to the specification of the initial
ODE integration time-step used at the start of the run:
initialChemicalTimeStep 1e-12;
this time step may now also be specified for every chemistry integration by
setting the optional entry maxChemicalTimeStep, e.g.
maxChemicalTimeStep 1e-12;
OpenFOAM can now be compiled with single, double or long double scalars by
setting the WM_PRECISION_OPTION environment variable to either SP, DP or LP
respectively.
On most 64bit systems long double is stored as 128bit but computed in the
floating point hardware to 80bit. Due to the increased storage compared to
double precision cache and memory access is significantly more time consuming
causing a slow-down of floating point intensive operations by a factor of 2 to
3.
An unintended change in the running-state logic was introduced by commit
9a35ce69. The running state should only be re-evaluated when in the
simulation is not ending. The "execute/end" function object invocation
should not be permitted to change the running state. The simulation
should always end if this state is reached.
In early versions of OpenFOAM the scalar limits were simple macro replacements and the
names were capitalized to indicate this. The scalar limits are now static
constants which is a huge improvement on the use of macros and for consistency
the names have been changed to camel-case to indicate this and improve
readability of the code:
GREAT -> great
ROOTGREAT -> rootGreat
VGREAT -> vGreat
ROOTVGREAT -> rootVGreat
SMALL -> small
ROOTSMALL -> rootSmall
VSMALL -> vSmall
ROOTVSMALL -> rootVSmall
The original capitalized are still currently supported but their use is
deprecated.
Introduced thermalPhaseChangePopulationBalanceTwo- and MultiphaseSystem as
user-selectable phaseSystems which are the first to actually use multiple mass
transfer mechanisms enabled by
commit d3a237f560.
The functionality is demonstrated using the reactingTwoPhaseEulerFoam
wallBoilingPolydisperse tutorial.
Patch contributed by VTT Technical Research Centre of Finland Ltd and Institute
of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf (HZDR).
and optionally the CPU and clock times per time step.
Example of function object specification:
time
{
type time;
libs ("libutilityFunctionObjects.so");
writeControl timeStep;
writeInterval 1;
perTimeStep no;
}
Adding
#includeFunc time
to the functions list in the controlDict of the motorBike tutorial generates
0 1.190000e+00 1
1 1.640000e+00 1
2 1.940000e+00 2
Enabling the optional writing of the CPU and clock time per time step is
straight forward:
#includeFunc time(perTimeStep=yes)
With the writeJobInfo option in OpenFOAM-dev/etc/controlDict::InfoSwitches set
to 1 each OpenFOAM executable writes a <executable>.<pid> file containing the
job summary into the <case>/jobInfo directory, e.g. after running the
tutorials/incompressible/pisoFoam/RAS/cavity tutorials
tutorials/incompressible/pisoFoam/RAS/cavity/jobInfo contains
blockMesh.20169 pisoFoam.20170
When etc/controlDict::writeJobInfo is set to 1 jobInfo.<pid> files are written
to the case directory containing a summary of the execution of the job containing
startDate
startTime
userName
foamVersion
code
argList
currentDir
PPID
PGID
foamBuild
root
case
nProcs
When the job completes the following additional entries are written:
cpuTime
endDate
endTime
termination
The original etc/controlDict::writeJobInfo control has been renamed writeJobControl and when set
to 1 writes the ~/OpenFOAM/jobControl/runningJobs and finishedJobs files for job control.
The ramp function used to graduate the vertical damping force can now be
applied along a number of paths, rather than just one. The keywords
"origins" and "directions" can be used to define a list of paths.
verticalDamping1
{
type verticalDamping;
origins ((1200 0 0) (1200 100 0) (1200 -100 0));
directions ((1 0 0) (0 1 0) (0 -1 0));
// ...
}
The ramping function will be calculated along each of the paths defined
by the origin-direction pair, and the maximum of the calculated values
will be used.
The "origin" and "direction" keywords can still be used with non-list
values.
This work was supported by Jan Kaufmann and Jan Oberhagemann at DNV GL.
First run the surfaceFeatureExtract with the "closeness" option enabled in the
surfaceFeatureExtractDict to extract the surface closeness point field
// Out put the closeness of surface elements to other surface elements.
closeness yes;
Then enable cell sizing based on local surface closeness by specifying the
"internalCloseness" options in the foamyHexMeshDict e.g.
motionControl
{
defaultCellSize 4;
minimumCellSizeCoeff 0.1;
maxSmoothingIterations 100;
maxRefinementIterations 2;
shapeControlFunctions
{
geometry
{
type searchableSurfaceControl;
priority 1;
mode inside;
surfaceCellSizeFunction nonUniformField;
cellSizeCalculationType automatic;
curvature false;
curvatureFile dummy;
featureProximity false;
featureProximityFile dummy;
internalCloseness true;
internalClosenessFile geometry.internalPointCloseness;
internalClosenessCellSizeCoeff 25;
curvatureCellSizeCoeff 0;
maximumCellSizeCoeff 1;
cellSizeFunction uniform;
}
}
}
e.g.
postProcess -func sample -region bottomWater
will now search for the system/bottomWater/sample dictionary before searching
for system/sample so that the fields and type of sampling can optionally be
specified differently for the particular region.
Resolves feature request https://bugs.openfoam.org/view.php?id=2807
This function object will write a paraview-viewable field showing the
area-density of parcel collisions on every patch face. It also outputs
the rate of collisions hitting each patch face, calculated over an
interval equal to the time elapsed since the last output. It has an
optional entry to specify a minimum incident speed below which a
collision is not counted.
It can be enabled in the cloud properties file as follows:
cloudFunctions
{
patchCollisionDensity1
{
type patchCollisionDensity;
minSpeed 1e-3; // (optional)
}
}
This work was supported by Anton Kidess, at Hilti