This method waits until all the threads have completed IO operations and
then clears any cached information about the files on disk. This
replaces the deactivation of threading by means of zeroing the buffer
size when writing and reading of a file happen in sequence. It also
allows paraFoam to update the list of available times.
Patch contributed by Mattijs Janssens
Resolves bug report https://bugs.openfoam.org/view.php?id=2962
including third-body and pressure dependent derivatives, and derivative of the
temperature term. The complete Jacobian is more robust than the incomplete and
partially approximate form used previously and improves the efficiency of the
stiff ODE solvers which rely on the Jacobian.
Reaction rate evaluation moved from the chemistryModel to specie library to
simplfy support for alternative reaction rate expressions and associated
Jacobian terms.
Temperature clipping included in the Reaction class. This is inactive by default
but for most cases it is advised to provide temperature limits (high and
low). These are provided in the foamChemistryFile with the keywords Thigh and
Tlow. When using chemkinToFoam these values are set to the limits of the Janaf
thermodynamic data. With the new Jacobian this temperature clipping has proved
very beneficial for stability and for some cases essential.
Improvement of the TDAC MRU list better integrated in add and grow functions.
To get the most out of this significant development it is important to re-tune
the ODE integration tolerances, in particular the absTol in the odeCoeffs
sub-dictionary of the chemistryProperties dictionary:
odeCoeffs
{
solver seulex;
absTol 1e-12;
relTol 0.01;
}
Typically absTol can now be set to 1e-8 and relTol to 0.1 except for ignition
time problems, and with theses settings the integration is still robust but for
many cases a lot faster than previously.
Code development and integration undertaken by
Francesco Contino
Henry G. Weller, CFD Direct
This is faster than the library functionality that it replaces, as it
allows the compiler to do inlining. It also does not utilise any static
state so generators do not interfere with each other. It is also faster
than the the array lookup in cachedRandom. The cachedRandom class
therefore offers no advantage over Random and has been removed.
Tree bound boxes are expanded asymmetrically to reduce the liklihood of
octree faces aliging with mesh faces and edges. The asymmetry is now
generated using hard-coded irrational numbers, rather than using a
random generator.
The asymmetry was effectively already hard coded. The random numbers are
only pseudo random, so the same numbers were being applied to the bound
boxes every time. This change simply removes the overhead of creating
the generator, and also gets rid of some duplicated code.
Changed the default region name from "domain" to "region" for consistency with
the rest of OpenFOAM.
Changed the multiple default region numbering to start from 1 rather than 0
because the top-level mesh in the case directory is always named "region0".
Changed the default region numbering to only relate to the default named regions
and does not increment for explicitly named regions. This avoids a naming
dependency on the default and named region order.
Added new option "-defaultRegionName <name>"
to specify the base name of the unspecified regions, defaults to "region"
A new constraint patch has been added which permits AMI coupling in
cyclic geometries. The coupling is repeated with different multiples of
the cyclic transformation in order to achieve a full correspondence.
This allows, for example, a cylindrical AMI interface to be used in a
sector of a rotational geometry.
The patch is used in a similar manner to cyclicAMI, except that it has
an additional entry, "transformPatch". This entry must name a coupled
patch. The transformation used to repeat the AMI coupling is taken from
this patch. For example, in system/blockMeshDict:
boundary
(
cyclic1
{
type cyclic;
neighbourPatch cyclic2;
faces ( ... );
}
cyclic2
{
type cyclic;
neighbourPatch cyclic1;
faces ( ... );
}
cyclicRepeatAMI1
{
type cyclicRepeatAMI;
neighbourPatch cyclicRepeatAM2;
transformPatch cyclic1;
faces ( ... );
}
cyclicRepeatAMI2
{
type cyclicRepeatAMI;
neighbourPatch cyclicRepeatAMI1;
transformPatch cyclic1;
faces ( ... );
}
// other patches ...
);
In this example, the transformation between cyclic1 and cyclic2 is used
to define the repetition used by the two cyclicRepeatAMI patches.
Whether cyclic1 or cyclic2 is listed as the transform patch is not
important.
A tutorial, incompressible/pimpleFoam/RAS/impeller, has been added to
demonstrate the functionality. This contains two repeating AMI pairs;
one cylindrical and one planar.
A significant amount of maintenance has been carried out on the AMI and
ACMI patches as part of this work. The AMI methods now return
dimensionless weights by default, which prevents ambiguity over the
units of the weight field during construction. Large amounts of
duplicate code have also been removed by deriving ACMI classes from
their AMI equivalents. The reporting and writing of AMI weights has also
been unified.
This work was supported by Dr Victoria Suponitsky, at General Fusion
Surfaces are specified as a list and the controls applied to each, e.g. in the
rhoPimpleFoam/RAS/annularThermalMixer tutorial:
surfaces
(
"AMI.obj"
"shaft.obj"
"wall.obj"
"statorBlades.obj"
"rotorBlades.obj"
);
includedAngle 150; // Identifes a feature when angle
// between faces < includedAngle
trimFeatures
{
minElem 10; // minimum edges within a feature
}
writeObj yes; // writes out _edgeMesh.obj files to view features
If different controls are required for different surfaces multiple
sub-dictionaries can be used:
AMIsurfaces
{
surfaces
(
"AMI.obj"
);
includedAngle 140; // Identifes a feature when angle
// between faces < includedAngle
trimFeatures
{
minElem 8; // minimum edges within a feature
}
writeObj yes; // writes out _edgeMesh.obj files to view features
}
otherSurfaces
{
surfaces
(
"shaft.obj"
"wall.obj"
"statorBlades.obj"
"rotorBlades.obj"
);
includedAngle 150; // Identifes a feature when angle
// between faces < includedAngle
trimFeatures
{
minElem 10; // minimum edges within a feature
}
writeObj yes; // writes out _edgeMesh.obj files to view features
}
Existing feature edge files corresponding to particular surfaces can be specified using
the "files" association list:
surfaces
(
"AMI.obj"
"shaft.obj"
"wall.obj"
"statorBlades.obj"
"rotorBlades.obj"
);
files
(
"AMI.obj" "constant/triSurface/AMI.obj.eMesh";
);
includedAngle 150; // Identifes a feature when angle
// between faces < includedAngle
trimFeatures
{
minElem 10; // minimum edges within a feature
}
writeObj yes; // writes out _edgeMesh.obj files to view features