Commit Graph

17013 Commits

Author SHA1 Message Date
01dfdc4794 ENH: objective: added function to output a blank line
to be used in separating instantaneous objective values of different
optimisation cycles.
2020-06-12 13:27:55 +01:00
dcc039ce80 ENH: Added the nutSqr surrogate noise objective
which qualitatively quantifies noise through a volume integral of the squared
turbulent viscosity.
2020-06-12 13:27:55 +01:00
ad76df43c3 ENH: refactoring and cleaning of optimisationType
Moved part common to all derived classes (e.g. update) to the base
class to avoid code duplication. Practically, only the protected
updateDesignVariables has to be overwritten in each derived class now.
steadyOptimisation was also affected in a minor way.
2020-06-12 13:27:54 +01:00
1eaa54ed2c ENH: Added optional suffix to the file names
holding the sensitivity maps
2020-06-12 13:27:54 +01:00
2048959bb4 ENH: volBSplinesBase: added function returning box ID
given a global control point ID
2020-06-12 13:27:54 +01:00
7192cc924c ENH: added function just returning the sensitivities
without recomputing them. Use with caution!
2020-06-12 13:27:54 +01:00
36b0c5ce15 ENH: changes in SIBase and derived classes
- Added function returning the underlaying surface sensitivities
- Added boolean to control whether to write the underlaying sensitivity
  map (defaults to false)
2020-06-12 13:27:54 +01:00
d5c8dd52bb ENH: introduced an incompressible::shapeSensitivities class
Encapsulates all terms that are common in both E(SI) and FI
formulations, like direct sensitivities and sensitivities due to
primal boundary conditions. Added the latter to all derived sensitivity
types, except for sensitivity maps.
2020-06-12 13:27:53 +01:00
0d9421c6a8 ENH: added the adjointRotatingWallVelocity boundary condition
Same as adjointWallVelocity but also returns the contribution
of the differentiation of the rotatingWallVelocity BC wrt the
face centres, to be added to the sensitivity derivatives.
2020-06-12 13:27:53 +01:00
d3938a79f4 ENH: made adjointBoundaryCondition templated
Main reason was the insertion of a templated virtual function
returning the contribution of the differentiation of the primal
boundary condition, in the case the latter directly depends on a
a geometric quantity (e.g. rotatingWallVelocity).
2020-06-12 13:27:52 +01:00
f21d0ea31e ENH: New cloud function object to remove parcels at face zones
Example usage:

    removeParcels1
    {
        type            removeParcels;
        log             yes;
        resetOnWrite    no;
        resetOnStart    no;
        faceZones       (cycLeft cycRight);
    }

Number and mass of particles removed are written to file
2020-06-12 10:40:52 +01:00
98a9cde998 ENH: fieldAverage - protect against numerical error when determining the next periodic restart 2020-06-12 09:55:52 +01:00
c712abad09 COMP: Taking out sampledInterface FO from sampling lib and adding it
to geometricVoF

sampledInterface was linked to interfaceProperties thorugh geometricVoF,
and interfaceProperties created a conflict on surfaceTension table
when linked in the reactingEuler solvers by the sampling lib
2020-06-11 12:54:56 -07:00
ffe07039e0 ENH: boundaryData: prefer output with header. See #1640. 2020-06-11 16:01:42 +01:00
1666180271 STYLE: directionalMeshWave: input renaming. 2020-06-11 15:39:25 +01:00
ee94720594 ENH: Cloud function objects - added Weber number calcuation and output
Example usage:

    cloudFunctions
    {
        WeberNumber1
        {
            type    WeberNumber;
        }
    }

This will calculate and write the Weber number field as a 'standard'
cloud field, available for post-processing alongside other lagrangian
fields in the lagrangian/<cloudName> directory.
2020-06-11 14:56:46 +01:00
13fa1b0517 ENH: Cloud function objects - pass trackingData into pre|post evolve functions
Might also consider passing through the remaining hooks, e.g. for postMove,
postPatch, postFace etc
2020-06-11 14:56:46 +01:00
60809c3f50 ENH: simplify turbulentDigitalFilterInlet BC 2020-06-11 13:30:30 +01:00
4a798b9ea5 ENH: add new 'pow' FO 2020-06-11 13:30:30 +01:00
8a188a1fd6 ENH-DOC: fix inconsistent Cmu lookup (fixes #647) 2020-06-11 13:30:30 +01:00
5cbdb7a3d7 INT: various integrations from openfoam.org
ENH: add log FO
  ENH: improve log with scale, and offset entries
  BUG: ensure extrueMesh does not fail in parallel with wedge extrusion
  BUG: add missing clone and mapping funcs to copiedFixedValue, fixedMultiPhaseHeatFlux
  ENH: meshToMesh0::cellAddressing slight speed up for some geometries
  BUG:0003495: Divide-by-zero in SHF particle break-up model
  BUG:0003492: The formula in the OF is inconsistent with the Rosin-Rammler distribution theory formula
2020-06-11 13:30:29 +01:00
5bf440956a ENH: timeVaryingMapped: abstract IFstream/regIOobject handling. See #1640.
This change abstracts out the reading of "boundaryData". It should
now support OpenFOAM headers and with that also binary input.
2020-06-11 12:00:51 +01:00
30ea38a77e ENH: shanppyHexMesh: disable gap detection on same surface. See #1463. 2020-06-10 15:36:33 +01:00
b6a953cfc9 STYLE: writeEntry instead of writeKeyword / END_STATEMENT pair 2020-06-10 15:29:07 +02:00
5a6f54f24b COMP: use files() method name in interfaceHeight function object
- avoid warnings about masked method names
2020-06-10 15:29:07 +02:00
b89e1f025c ENH: portable scoping char for fieldCoordinateSystemTransform (fixes #1675)
- replace ':' scoping with IOobject::scopedName(), which automatically
  uses '_' for Windows compilations where the ':' is a meta-character
  (drive separator)

- apply similar local change for the momentum function object.

*** This topic will be revisited in the future ***
2020-06-10 15:29:07 +02:00
076bcc25c9 ENH: relocate externalFileCoupler from finiteVolume to meshTools 2020-06-10 15:29:07 +02:00
e2ad9f08a8 COMP: Resolved compiler warning messages 2020-06-10 14:27:01 +01:00
003ec000e0 COMP: max: add explicit type. See #1726. 2020-06-10 12:21:00 +01:00
aa956f4b05 ENH: Pstream: Feed through outstanding requests more. See #1626.
This e.g. was giving a problem with using volPointInterpolation (in
functionObjects) with non-blocking global reductions.
2020-06-10 12:10:02 +01:00
07a5babdde ENH: add wall-function blending treatments
Please see the Extended Code Guide and header files for the details.

    ENH: add wall-function blending treatments to epsilonWallFunc
         adds `stepwise`, `max`, `binomial`, and `exponential` wall-function
         blending treatments:
    COMP: check backward compatibility for:
          `serial`
          `parallel`
          `serial restart`
          `parallel restart`
          computations in comparison to the following tutorials from v1906:
          `circuitBoardCooling  condensatingVessel  evaporationMultiComponent
           hotRoom  movingBox  multiRegionHeaterRadiation  reverseBurner
           solidQuenching2D`
    STYLE: simplify `forAll`s

    ENH: add new wall blending approaches into omegaWallFunction
         adds stepwise, max, binomial, and exponential wall function blending apprs.
         ensures/forces the backward compatibility:
           - blended = true    (blending:BINOMIAL2) (default)
           - blended = false   (blending:STEPWISE)
        simplifies forAlls
        deprecates objects:
           - "blended" - use "blending::" options
           - "includeG" - as was hardcoded

    ENH: add wall-func blending treatments into nutWallFuncs
    - nutWallFunction
    - nutUWallFunction
    - nutkWallFunction
    COMP: check backward compatibility for:
          - serial
          - parallel
          - serial restart
          - parallel restart
          computations in comparison to the following tutorials from v1906:
          - heatTransfer/buoyantSimpleFoam/buoyantCavity
          - compressible/rhoSimpleFoam/gasMixing/injectorPipe

    DOC: modify header docs in wallFuncs
    - nutUTabulatedWallFunction
    - nutUSpaldingWallFunction
    - nutURoughWallFunction
    - nutUBlendedWallFunction
      - REVERT: change write order
    - nutLowReWallFunction
    - kLowReWallFunction:
      - ENH: protect against zero-division error through 'Ceps2' entry
      - STYLE: remove few redundant empty lines
2020-06-10 10:09:31 +01:00
41e264f27d ENH: New atmospheric boundary layer (ABL) model suite (Part 1)
Please refer to the header file documentation for complete set of details.

  ENH: add new fvOptions for ABL modelling

    - atmAmbientTurbSource
    - atmBuoyancyTurbSource
    - atmCoriolisUSource
    - atmLengthScaleTurbSource
    - atmPlantCanopyTurbSource
    - atmPlantCanopyUSource
    - atmPlantCanopyTSource
    - atmNutSource

  ENH: add new boundary conditions for ABL modelling
       with PatchFunction1 and TimeFunction1 support

    - atmAlphatkWallFunction
    - atmEpsilonWallFunction
    - atmNutkWallFunction
    - atmNutUWallFunction
    - atmNutWallFunction
    - atmOmegaWallFunction
    - atmTurbulentHeatFluxTemperature

  STYLE: change names of nutkAtmRoughWallFunction -> atmNutkWallFunction by
         ensuring the bitwise backward compatibility

  ENH: add new variable-scaling force computation method to actuationDiskSource

  ENH: review actuationDiskSource and radialActuationDiskSource

  ENH: add new function object, ObukhovLength

  ENH: add new ABL tutorials/verifications

    - verificationAndValidation/atmosphericModels/atmFlatTerrain
      - verification with the Leipzig field experiment
      - illustration of precursor/successor field mapping
    - verificationAndValidation/atmosphericModels/atmForestStability
      - verification with the Sweden field experiment
    - update incompressible/simpleFoam/turbineSiting
2020-06-09 11:08:14 +01:00
44a84d4778 CONT: Addition of compressibleIsoInterFOam and PLIC
1) Implementation of the compressibleIsoInterFOam solver
   2) Implementation of a new PLIC interpolation scheme.
   3) New tutorials associated with the solvers

This implementation was carried out by Henning Scheufler (DLR) and Johan
Roenby (DHI), following :

\verbatim

Henning Scheufler, Johan Roenby,
Accurate and efficient surface reconstruction from volume fraction data
on general meshes, Journal of Computational Physics, 2019, doi
10.1016/j.jcp.2019.01.009

\endverbatim

The integration of the code was carried out by Andy Heather and Sergio
Ferraris from OpenCFD Ltd.
2020-06-09 08:11:04 +01:00
237f2e1076 STYLE: accept label for version in dictionary header
- refinement of commit 33f9ae5080.

  After foamDictionary -expand, the '2.0' becomes '2', so accept that
  as a reasonable token.
2020-06-09 00:55:58 +02:00
b2467ff442 STYLE: minor code style changes 2020-06-09 00:55:01 +02:00
f5874937eb ENH: copy assignment, bool comparison for polynomialFunction 2020-06-08 21:33:31 +02:00
9d1f39165b GIT: remove merge/rebase artifacts 2020-06-08 16:39:17 +01:00
3bf15d1b33 DOC: elaborate the usage of topoSet
TUT: add topoSet examples to pisoFoam/RAS/cavity tutorial
  BUG: fixes #1673
2020-06-08 15:46:18 +01:00
a5c6516e23 DOC: elaborate the usage of function objects
ENH: update libs of etc/caseDicts/postProcess items
  ENH: ensure destructor=default
  ENH: ensure constness
  ENH: ensure no 'copy construct' and 'no copy assignment' exist
  TUT: add examples of function objects with full set
       of settings into a TUT if unavailable
  TUT: update pisoFoam/RAS/cavity tutorial in terms of usage
2020-06-08 15:43:47 +01:00
775fe1d596 ENH: Adding finalOnLastPimpleIterOnly to allow Final solver in PIMPLE
The PIMPLE option finalOnLastPimpleIterOnly allows the call the Final
solver only in the last PIMPLE loop. The default is false which is
the present behavior.
2020-06-08 15:42:52 +01:00
8a27989cbf ENH: Added support for internal vol fields 2020-06-08 13:59:46 +01:00
4032ab5e15 DOC: waveMaker - removed references to unused x0 input parameter 2020-06-08 13:59:46 +01:00
934d0bd743 ENH: support FOAM_MODULE_PREFIX to guide location of module builds (#1721)
- When compiling additional modules or user code, we need more control
  for the installation locations beyond the usual FOAM_USER_LIBBIN,
  FOAM_SITE_LIBBIN, FOAM_LIBBIN, and wish to have these values be
  modifiable without editing files.

- provide wmake rules for handling standard defaults:
    * GENERAL_RULES/module-path-user
    * GENERAL_RULES/module-path-group
    * GENERAL_RULES/module-path-project
  which are incorporated as follows:

  Make/options:
      include $(GENERAL_RULES)/module-path-user

  Make/files:
      LIB = $(FOAM_MODULE_LIBBIN)/libMyLibrary

  By default these would compile into FOAM_USER_{APPBIN,LIBBIN} but
  could be adjusted at compilation time. For example,

```
wmake -module-prefix=/path/my-install-location
```
Or
```
./Allwmake -module-prefix=/path/my-install-location
./Allwmake -prefix=/path/my-install-location
```
Or
```
FOAM_MODULE_PREFIX=/path/my-install-location ./Allwmake
```

ENH: add -no-recursion option for AllwmakeParseArguments

- more descriptive naming than the -fromWmake option (still supported)

- remove wmake/scripts/wmake.{cmake,wmake}-args since the -prefix
  handling and -no-recursion is now directly handled by AllwmakeParseArguments
2020-06-08 13:51:26 +02:00
0f27a540be COMP: initialization order 2020-06-08 12:47:43 +02:00
636d2688a5 COMP: corrected code removed in 51c2329f97 2020-06-08 08:07:34 +01:00
bb2ae5c90d GIT: remove merge/rebase artifacts 2020-06-05 17:01:27 +02:00
336fb3bddf ENH: improve/verify atmBoundaryLayerInlet conditions
ENH: add generalised log-law type ground-normal inflow boundary conditions for
  wind velocity and turbulence quantities for homogeneous, two-dimensional,
  dry-air, equilibrium and neutral atmospheric boundary layer (ABL) modelling

  ENH: remove `zGround` entry, which is now automatically computed

  ENH: add `displacement height` entry, `d`

  ENH: add generalised atmBoundaryLayerInletOmega boundary condition

  ENH: add a verification case for atmBoundaryLayerInlet BCs

  DOC: improve atmBoundaryLayerInlet header documentation

  BUG: fix value-entry behaviour in atmBoundaryLayerInlet (fixes #1578)
  Without this change:
  - for serial-parallel computations, if `value` entry is available in
    an `atmBoundaryLayerInlet` BC, the theoretical ABL profile expressions
    are not computed, and the `value` entry content is used as a profile data
  - for parallel computations, if `value` entry is not available, `decomposePar`
    could not be executed.
  With this change:
  - assuming `value` entry is always be present, the use of `value` entry for
    the ABL profile specification is determined by a flag `initABL`
  - the default value of the optional flag `initABL` is `true`, but whenever
    `initABL=true` is executed, `initABL` is overwritten as `false` for the
    subsequent runs, so that `value` entry can be safely used.
  Thanks Per Jørgensen for the bug report.

  BUG: ensure atmBoundaryInlet conditions are Galilean-invariant (fixes #1692)

  Related references:

      The ground-normal profile expressions (tag:RH):
        Richards, P. J., & Hoxey, R. P. (1993).
        Appropriate boundary conditions for computational wind
        engineering models using the k-ε turbulence model.
        In Computational Wind Engineering 1 (pp. 145-153).
        DOI:10.1016/B978-0-444-81688-7.50018-8

    Modifications to preserve the profiles downstream (tag:HW):
        Hargreaves, D. M., & Wright, N. G. (2007).
        On the use of the k–ε model in commercial CFD software
        to model the neutral atmospheric boundary layer.
        Journal of wind engineering and
        industrial aerodynamics, 95(5), 355-369.
        DOI:10.1016/j.jweia.2006.08.002

    Expression generalisations to allow height
    variation for turbulence quantities (tag:YGCJ):
        Yang, Y., Gu, M., Chen, S., & Jin, X. (2009).
        New inflow boundary conditions for modelling the neutral equilibrium
        atmospheric boundary layer in computational wind engineering.
        J. of Wind Engineering and Industrial Aerodynamics, 97(2), 88-95.
        DOI:10.1016/j.jweia.2008.12.001

    The generalised ground-normal profile expression for omega (tag:YGJ):
        Yang, Y., Gu, M., & Jin, X., (2009).
        New inflow boundary conditions for modelling the
        neutral equilibrium atmospheric boundary layer in SST k-ω model.
        In: The Seventh Asia-Pacific Conference on Wind Engineering,
        November 8-12, Taipei, Taiwan.

  Reproduced benchmark:
      Rectangular prism shown in FIG 1 of
        Hargreaves, D. M., & Wright, N. G. (2007).
        On the use of the k–ε model in commercial CFD software
        to model the neutral atmospheric boundary layer.
        Journal of wind engineering and
        industrial aerodynamics, 95(5), 355-369.
        DOI:10.1016/j.jweia.2006.08.002
  Benchmark data:
      HW, 2007 FIG 6

  TUT: update simpleFoam/turbineSiting tutorial accordingly
2020-06-05 14:40:53 +01:00
1b45599b26 ENH: enable user to control re-writing of function object output file headers. See #1556 2020-06-05 14:37:21 +01:00
730233cd15 ENH: add new FO Streaming-Total Dynamic Mode Decomposition (STDMD)
STDMD (i.e. Streaming Total Dynamic Mode Decomposition) is a variant of
    a data-driven dimensionality reduction method.

    STDMD is being used as a mathematical post-processing tool to compute
    a set of dominant modes out of a given flow (or dataset) each of which is
    associated with a constant frequency and decay rate, so that dynamic
    features of a given flow may become interpretable, and tractable.
    Among other Dynamic Mode Decomposition (DMD) variants, STDMD is presumed
    to provide the general DMD method capabilities alongside economised and
    feasible memory and CPU usage.

    Please refer to the header file documentation for further details.

  ENH: add new STDMD tutorial, pimpleFoam/laminar/cylinder2D
2020-06-05 14:35:37 +01:00
ef9ee7a8b1 ENH: add iterative eigen decomposition solver, EigenMatrix
ENH: add Test-EigenMatrix application

  The new iterative eigen decomposition functionality is
  derived from:

    Passalacqua et al.'s OpenQBMM (openqbmm.org/),
    which is mostly derived from JAMA (math.nist.gov/javanumerics/jama/).
2020-06-05 14:35:36 +01:00