The SPL can now be weighted according to the new 'SPLweighting' entry
that can be set to:
- none: no weighting
- dBA : dB(A)
- dBB : dB(B)
- dBC : dB(C)
- dBD : dB(D)
This commit also includes code refactoring of the noiseModel class to
remove the dependency on noiseFFT/declutter.
Affected only the first optimisation cycle, if line search was enabled
If eta was not set explicitly, it was computed after evaluating the
directional derivative of the merit function, which was computed
wrongly, leading to an erroneous value of the extrapolated merit
function value.
fvOptionsAdjoint was needlessly duplicating a lot of the functionality
of fvOptions in order to add an interface for computing sensitivity
contributions emerging from fvOptions. To reduce this code duplication:
- fvOptionsAdjoint was removed
- the corresponding sensitivity contributions have moved to fvOptions through
virtual functions (returning a zero contribution in the base so
backwards compatibility is retained)
- all sensitivity classes that were using fvOptionsAdjoint have been
modified appropriately
- all adjoint solvers are now grabbing a reference to an fvOptionList
from the database instead of constructing an fvOptionsAdjointList
Hence, all fvOptions contributions to the adjoint equations
or the sensitivity derivatives can be given through system/fvOptions,
removing the need for separate sub-dictionaries within optimisationDict.
- Expanded the write function in the base class so that it can manage
input coming from the derived ones. This reduces a lot of code
duplication in the latter but keeps the functionality.
- Added a default width for all entries in the objective files.
- If a normalisation factor or a target is set, they are written on the
header of the objective file.
- Cosmetic/code consistency changes in various files.
- Added preLoop, loop and postLoop functions
- Added preIter, mainIter and postIter functions for each SIMPLE
iteration
- Added addMomentumSource and addPressureSource virtual functions, to
allow for additions by derived classes
fvOptions are no longer a member of incompressiblePrimalSolver but are
looked up from the registry in each iteration of each primal solver.
This means that the main system/fvOptions dictionary is read by ALL
instances of the primal solvers and the latter no longer have their
own fvOptions dict in optimisationDict. This is safe since each fvOption
is applied to a specific field and in case of many primal solvers, the
primal fields are named differently for each of them.
In addition, simple is now split in preLoop, loop and postLoop phase.
Furthermore, each SIMPLE iteration is broken down to
a preIter, mainIter and postIter phase, to allow for different behaviour
by derived classes.
Part of the (E)SI shape sensitivities depends of grad(Ua) & nf computed
on the boundary. Up to now, the code was only computing the normal part
of grad(Ua), to avoid the potentially spurious tangential component
which is computed on the cell center and extrapolated to the boundary
faces. However, for some objectives that are strongly related to the
stresses (e.g. moment, stresses), including also the tangential part of
grad(Ua) is necessary for E-SI to replicate the outcome of FI.
Extensive testing on a number of objectives/cases showed
- No regression when including the tangential part
- Improved behaviour in some rare cases (moment, stresses)
Hence, the tangential part is now included by default. The previous code
behaviour can be replicated by setting the useSnGradInTranposeStresses
flag to true.
- controlPointsDefinition is now controled by a class with
runTimeSelection.
- Added a new controlPointsDefinition option that translates, rotates
and scales a given box. The required entries have the same meaning as
in the Paraview 'Transform' filter, facilitating the transition between the
visual placement of control boxes (e.g. in Paraview) and their setup
in the code.
- Improved performance during the parameterization, sensitivity
computation and grid displacement phases by re-using already computed
basis functions.
- adds topology-based segmentation of the surfaces generated with
distance surfaces. This can occur when the surface terminates
close to a thin wall gap in the mesh; resulting in a cuts that
extend into the next region.
The cutting algorithm does not normally distinguish between these
types of "ragged" cuts, and legitimate ones (eg, cutting multiple
pipes). The additional segmentation controls provide for two common
scenarios:
largestRegion (pre-filter):
- The cut cells are checked for topological connectivity and the
region with the most number of cut cells is retained.
This handles the "ragged" edge problem.
nearestPoints (pre-filter):
- The cut cells split into regions, the regions closest to the
user-defined points are retained.
Uses maxDistance for additional control.
proximity (post-filter):
- Checks the resulting faces against the original search surface
and rejects faces with a distance greater than absProximity.
ENH: restructure distance surface geometric filtering
- prefilter cells, which can be used to adjust the distance
calculation in the far field to the real distance
(not the normal distance).
This can also be used to artificially sharpen the transition
between near/far regions, if required in the future.
- generic isoSurfaceBase. Provides simpler cell-cut detection and
various functions that can be used for iso-surfaces or when
preparing prefiltered input for iso-surfaces.
- rudimentary runtime selection
ENH: isoSurface Cell/Topo uses the isoSurfaceBase infrastructure
- simpler cell cut detection, common routines
- ensure that tetMatcher is only called once per cell
ENH: use indirect patch during edge erosion
- lower overhead, allows backtracking (future) if needed
This adds a 'geometry' scheme section to the system/fvSchemes:
geometry
{
type highAspectRatio;
}
These 'fvGeometryMethod's are used to calculate
- deltaCoeffs
- nonOrthoCoeffs
etc and can even modify the basic face/cellCentres calculation.
Creates volume fields whose boundaries are used to store patch interaction
statistics.
Current field output per patch face:
- \<cloud\>\<model\>:count - cumulative particle hits
- \<cloud\>\<model\>:mass - cumuluative mass of hitting particles
Fields can be reset according to:
- none: fields are not reset
- timeStep: reset at each time step
- writeTime: reset at each write time
Usage
patchInteractionFields1
{
type patchInteractionFields;
resetMode writeTime;
}
Member function dKcdTbyKc in thermo.H is calculated from S and G at Pstd.
Thus dGdT was removed from the thermos.
- Add optional hRef, eRef and Tref as optional.
- Use new thermo to multiphase solver icoReactingMuliPhaseFoam
- Remove hRefConst and eRefConst thermos.
TUT: Updated tutorials