Commit Graph

23856 Commits

Author SHA1 Message Date
Andrew Heather
d6104bd497 INT: Minor integration updates 2020-06-12 15:01:09 +01:00
Vaggelis Papoutsis
c344520474 TUT: updated/cleaned the optimisation tutorials
- Removed some unnecessary dynamicMeshDicts.
- Removed the writeActiveDesignVariables execution from the Allrun
  scripts, since it is no longer necessary to execute it before
  adjointOptimisationFoam.
- Updated the entries in dynamicMeshDict according to efbc9fc99.
2020-06-12 13:27:55 +01:00
Vaggelis Papoutsis
1404b5ffe0 ENH: Homogenised the dynamicMeshDict entries for NURBS3DVolume
(old keywords are still valid, throwing a compatibility warning)

- using (U,V,W) instead of (X1,X2,X3)
- using confine instead of bound
2020-06-12 13:27:55 +01:00
Vaggelis Papoutsis
6ee7bc66c5 ENH: added a general framework for normalization and setting targets
for all objective functions.

- The normalization is useful for practically all update methods dealing
with constraints (e.g. SQP, MMA). The normalization factor can be either
given explicitly or, if not given, will be the value of the objective
function in the first optimisation cycle.
- The target value is useful when using the objective as a constraint in
constrained optimisation problems (e.g. drag - dragTarget). It should
only be used with update methods that understand the value of the
constraint (e.g. SQP, MMA) but not when the objective in hand is the
only objective of the optimisation problem. In such a case, a squared
objective should be used (e.g. sqr(drag - dragTarget))
2020-06-12 13:27:55 +01:00
Vaggelis Papoutsis
4d67819a2c ENH: changes related to when the objective value is written
- Objective now inherits from localIOdictionary and writes the mean
objective value under the uniform folder, each time mesh.write() is
called. This is crucial for getting the correct old merit function value
if the simulation is continued from a previous state and lineSearch is
used.
- Objectives are now computed and written even if the corresponding
adjoint solver is inactive. This, among others, is also essential for
getting the correct old merit function value in case of continuation.
- Writing of the objective function (and its mean, if present) history
has now moved to updatePrimalBasedQuantities, instead of the preLoop
part of the adjoint solvers. This was decided to get the objective
values to files, even if the adjoint solver is inactive. Arguably, an
even better place to write the objective functions would be the postLoop
part of the primal solvers, however this might cause multiple writes of
the objective value for the inner iterations of lineSearch, if one is
used.
2020-06-12 13:27:55 +01:00
Vaggelis Papoutsis
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
Vaggelis Papoutsis
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
Vaggelis Papoutsis
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
Vaggelis Papoutsis
1eaa54ed2c ENH: Added optional suffix to the file names
holding the sensitivity maps
2020-06-12 13:27:54 +01:00
Vaggelis Papoutsis
2048959bb4 ENH: volBSplinesBase: added function returning box ID
given a global control point ID
2020-06-12 13:27:54 +01:00
Vaggelis Papoutsis
7192cc924c ENH: added function just returning the sensitivities
without recomputing them. Use with caution!
2020-06-12 13:27:54 +01:00
Vaggelis Papoutsis
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
Vaggelis Papoutsis
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
Vaggelis Papoutsis
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
Vaggelis Papoutsis
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
Andrew Heather
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
Andrew Heather
01221babfc TUT: Corrected link in README - fixes #1698 2020-06-12 10:03:12 +01:00
Andrew Heather
98a9cde998 ENH: fieldAverage - protect against numerical error when determining the next periodic restart 2020-06-12 09:55:52 +01:00
sergio
ffa7bfb4f5 TUT: Setting up tutorials for change on planeImplicit function 2020-06-11 12:54:57 -07:00
sergio
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
mattijs
ffe07039e0 ENH: boundaryData: prefer output with header. See #1640. 2020-06-11 16:01:42 +01:00
mattijs
1666180271 STYLE: directionalMeshWave: input renaming. 2020-06-11 15:39:25 +01:00
Andrew Heather
14e561d212 Merge branch 'feature-weber-number' into 'develop'
New Weber number cloud function object

See merge request Development/openfoam!369
2020-06-11 15:00:36 +01:00
Andrew Heather
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
Andrew Heather
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
Andrew Heather
5c3059d218 Merge branch 'misc.0620.kbc' into 'develop'
ENH: Miscellaneous enhancement/features and bug fixes

See merge request Development/openfoam!364
2020-06-11 13:30:35 +01:00
Kutalmis Bercin
60809c3f50 ENH: simplify turbulentDigitalFilterInlet BC 2020-06-11 13:30:30 +01:00
Kutalmis Bercin
4a798b9ea5 ENH: add new 'pow' FO 2020-06-11 13:30:30 +01:00
Kutalmis Bercin
2803f765f5 BUG: decomposePar -decomposeParDict option (fixes #1649)
DOC: reorder the options of decomposePar in the header file
2020-06-11 13:30:30 +01:00
Kutalmis Bercin
8a188a1fd6 ENH-DOC: fix inconsistent Cmu lookup (fixes #647) 2020-06-11 13:30:30 +01:00
Kutalmis Bercin
d0d3670d01 ENH: add missing/improve annotated dictionaries
New:
  - blockMeshDict
  - sampleDict
  - boxTurbDict
  - createBoxTurbDict
  - dsmcInitialiseDict
  - mdEquilibrationDict
  - mdInitialiseDict
  - obstaclesDict
  - optimisationDict
  - potentialDict
  - probesDict
  - sampleDict
  - setExprBoundaryFieldsDict
  - setExprFieldsDict

  Improved:
  - extrudeMeshDict
  - topoSetSourcesDict
2020-06-11 13:30:29 +01:00
Kutalmis Bercin
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
mattijs
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
mattijs
30ea38a77e ENH: shanppyHexMesh: disable gap detection on same surface. See #1463. 2020-06-10 15:36:33 +01:00
Mark Olesen
34ee7b0b95 STYLE: use .template instead of .temp for tutorial template files
- avoids possible confusion with temporary files
2020-06-10 15:29:08 +02:00
Mark Olesen
0712beb21a ENH: relocate some PDRsetFields internals into library 2020-06-10 15:29:08 +02:00
Jonathan Cranford
8cf346a9c5 ENH: PDRsetFields adjustments
- missing minThreshold in activePressureForceBaffleVelocity

- update names of cyclics

- increase tolerance for zero-thickness baffles

- velocity field "U" instead of "UBet"

- viscosity field "nut" instead of "mut"
2020-06-10 15:29:07 +02:00
Mark Olesen
b6a953cfc9 STYLE: writeEntry instead of writeKeyword / END_STATEMENT pair 2020-06-10 15:29:07 +02:00
Mark Olesen
5a6f54f24b COMP: use files() method name in interfaceHeight function object
- avoid warnings about masked method names
2020-06-10 15:29:07 +02:00
Mark Olesen
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
Mark Olesen
b87dd8147a ENH: add moveMesh -deltaT option
- overrides normal deltaT for testing accelerated motion.

  Can be useful to test mesh motions with constant/dynamicMeshDict
  entries (updateControl, updateInterval) where the mesh motion is
  much slower than any of the fluid physics.

  see commit 87bba9ae14
2020-06-10 15:29:07 +02:00
Mark Olesen
076bcc25c9 ENH: relocate externalFileCoupler from finiteVolume to meshTools 2020-06-10 15:29:07 +02:00
Andrew Heather
e2ad9f08a8 COMP: Resolved compiler warning messages 2020-06-10 14:27:01 +01:00
mattijs
6a8dab0011 STYLE: tutorials: load in additional models. See #1726. 2020-06-10 12:56:55 +01:00
mattijs
003ec000e0 COMP: max: add explicit type. See #1726. 2020-06-10 12:21:00 +01:00
mattijs
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
Andrew Heather
ff568aa67f Merge branch 'feature-wall-functions' into 'develop'
ENH: New wall-function blending approaches

See merge request Development/openfoam!350
2020-06-10 10:24:25 +01:00
Kutalmis Bercin
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
Andrew Heather
324e85a9c9 Merge branch 'feature-atmospheric-boundary-layer-model-suite' into 'develop'
ENH: New atmospheric boundary layer (ABL) model suite (Part 1)

See merge request Development/openfoam!363
2020-06-09 11:09:10 +01:00
Kutalmis Bercin
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