ENH: foamyHexMesh: Made default region volume type that of it's parent
Foamy surface conformation entries have a "meshableSide" entry which
controls which side of the surface is to be meshed. Typically this is
set "inside" for boundaries and "both" for baffles. A sub-region's
default entry is now taken from it's parent, rather than a specific
value (it was "inside"). This is consistent with how other entries are
handled.
surfaceConformation
{
locationInMesh (0 0 0);
geometryToConformTo
{
baffle
{
featureMethod extractFeatures;
includedAngle 120;
meshableSide both; // <-- per-surface setting
regions
{
disk
{
meshableSide both; // <-- per-region setting*
// *in this example, this entry is not needed, as it
// is taken from the per-surface setting above
}
}
}
// ...
}
}
ENH: foamyHexMesh: Added (reinstated) baffle patches
A patch can now be assigned to a baffle surface. This assignment will
take precedence over any face-zones.
surfaceConformation
{
locationInMesh (0 0 0);
geometryToConformTo
{
disk
{
featureMethod extractFeatures;
includedAngle 120;
meshableSide both; // <-- baffle
patchInfo
{
type wall;
inGroups (walls);
}
}
// ...
}
}
STYLE: foamyHexMesh: Switched off output of all the secondary meshes
The integration of force and heat transfer onto the particle is
facilitated by a run-time-selectable integration scheme. These schemes
were written to generate the value at the end of an intregration step
and also an average value over the step from which the total transfer
was computed.
The average value in the Euler scheme was implemented incorrectly, which
resulted in the momentum and heat transfer processes being
non-conservative. Implementing the average correctly, however, would
have inteoduced a number of trancendental functions which would have
negated the purpose of the Euler scheme as the cheap and stable option.
The schemes have been rewritten to generate changes over the step,
rather than the final value. This change is then used to calculate the
transfers. Regardless of the scheme, this formulation is guaranteed to
be conservative, and the Euler scheme remains computationally
inexpensive.
This change was made with help from Timo Niemi, VTT
This resolves bug report https://bugs.openfoam.org/view.php?id=2666
ENH: integrationSchemes: Further simplification and optimisation
Removed templating from integration schemes, improved the name
convention, and optimised the utilisation so that the virtual call is
only made once per integration in the KinematicParcel and the
ThermoParcel.
BUG: integrationSchemes: Corrections to coupled/non-coupled force splitting
The integration splitting implemented in commit a5806207 has been shown
to be incorrect in some cases. A new procedure has been implemented
which can correctly split the implicit-explicit integral into a number
of pieces, in order to calculate the contribution of each. This is
intended for integrating coupled and non-coupled particle momentum and
heat transfers.
However, currently there is only ever one implicit coefficient used in
these transfers (there is no implicit non-coupled contribution). The
evaluation has therefore been short-cutted to only do the integration
with respect to the coupled contributions. The splitting functionality
has been retained in case additional separate implicit coefficients are
required in the future.
This change was made with help from Timo Niemi, VTT
This resolves bug report https://bugs.openfoam.org/view.php?id=2666
XiEngineFoam is a premixed/partially-premixed combustion engine solver which
exclusively uses the Xi flamelet combustion model.
engineFoam is a general engine solver for inhomogeneous combustion with or
without spray supporting run-time selection of the chemistry-based combustion
model.
Standard crank-connecting rod and the new free-piston kinematics motion options
are provides, others can easily be added.
Contributed by Francesco Contino and Nicolas Bourgeois, BURN Research Group.
Calculates and outputs a field whose values are offset to a reference
value obtained by sampling the field at a user-specified location.
The field values are calculated using:
\f[
f_c = s(f_{c,t} - f_p + f_{off})
\f]
where
\vartable
f_c | field values at cell
s | optional scale factor (default = 1)
f_{c,t} | current field values at cell at this time
f_p | field value at position
f_{off} | offset field value (default = 0)
\endvartable
Usage
Example of function object specification to calculate the reference
field:
\verbatim
pRef
{
type reference;
libs ("libfieldFunctionObjects.so");
...
field p;
result pRef;
position (0 0 0);
scale 1.2;
offset 100000;
}
\endverbatim
- the problem arises since the various surface writers are stateless.
The collated output format hacks around this limitation by adding in
its own fieldDict caching (to disk).
Now include an updateMesh() method to hook into geometry changes.
This is considered a stop-gap measure until the surface output
handling is improved.
- improvement documentation for surface sampling.
- can now specify alternative sampling scheme for obtaining the
face values instead of just using the "cell" value. For example,
sampleScheme cellPoint;
This can be useful for cases when the surface is close to a boundary
cell and there are large gradients in the sampled field.
- distanceSurface now handles non-closed surfaces more robustly.
Unknown regions (not inside or outside) are marked internally and
excluded from consideration. This allows use of 'signed' surfaces
where not previously possible.
- a -valgrind option for logging with valgrind
- determine number of processors from system/decomposeParDict
or -decomposeParDict if -np was not specified
- this should normally not be triggered, provided that setRefCell was
used. However, if getRefCellValue() was called without any previous
checking on refCelli, it is possible to provoke errors.
- The iterator for a HashSet dereferences directly to its key.
- Eg,
for (const label patchi : patchSet)
{
...
}
vs.
forAllConstIter(labelHashSet, patchSet, iter)
{
const label patchi = iter.key();
...
}
- the algorithm was last used in OpenFOAM-2.4, after which it was
replaced with a FaceCellWave version.
Whereas the original (2.4.x) version exhibited performance
degradation on very large meshes (with explicit constraints), the
FaceCellWave version exhibited performance issues with large numbers
of blocked faces.
With large numbers of blocked faces, the FaceCellWave regionSplit
could take between 10 to 100 times longer due to the slow
propagation speed through blocked faces.
The 2.4 regionSplit has been revamped to avoid local memory
allocations, which appears to have been the source of the original
performance issues on large meshes.
For additional performance, intermediate renumbering is also avoided
during the consolidation of regions over processor domains.
- controlled by the the 'printExecutionFormat' InfoSwitch in
etc/controlDict
// Style for "ExecutionTime = " output
// - 0 = seconds (with trailing 's')
// - 1 = day-hh:mm:ss
ExecutionTime = 112135.2 s ClockTime = 113017 s
ExecutionTime = 1-07:08:55.20 ClockTime = 1-07:23:37
- Callable via the new Time::printExecutionTime() method,
which also helps to reduce clutter in the applications.
Eg,
runTime.printExecutionTime(Info);
vs
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
--
ENH: return elapsedClockTime() and clockTimeIncrement as double
- previously returned as time_t, which is less portable.
For example, with some HashTable or Map container of models
{ model0 => 1, model1 => 4, model2 => 5, model3 => 12, model4 => 15, }
specify the remapping
Map<label> mapper({{1, 3}, {2, 6}, {3, 12}, {5, 8}});
inplaceMapValue(mapper, models) then yields
{ model0 => 3, model1 => 4, model2 => 8, model3 => 12, model4 => 15, }
--
ENH: extend bitSet::count() to optionally count unset bits instead.
--
ENH: BitOps compatibility methods for boolList.
- These ease coding that uses a boolList instead of bitSet and use
short-circuit logic when possible.
Eg, when 'bitset' and 'bools' contain the same information
bitset.count() <-> BitOps::count(bools)
bitset.all() <-> BitOps::all(bools)
bitset.any() <-> BitOps::any(bools)
bitset.none() <-> BitOps::none(bools)
These methods can then be used directly in parameters or in logic.
Eg,
returnReduce(bitset.any(), orOp<bool>());
returnReduce(BitOps::any(bools), orOp<bool>());
if (BitOps::any(bools)) ...