Commit Graph

1069 Commits

Author SHA1 Message Date
413ccd5ce3 STYLE: adjust tests and one code instance for updated labelRange 2020-09-23 10:46:04 +02:00
1e95af4d57 STYLE: use more generic terms allow/deny for selections 2020-09-09 13:54:34 +02:00
7be3092414 BUG: Fixing parallel writing for interfaceHeight FO. Fixes #1788 2020-09-08 09:20:51 -07:00
0e6df58c70 STYLE: simpler construct for empty tmp field in volFieldValue
- originally (incorrectly) was a Field(0.0), which was generalized
  to Field(Zero), but Field() is the correct form

STYLE: rename 'mustGet' to more standard 'mandatory' variable
2020-09-03 09:26:37 +02:00
b2feb6a8d8 ENH: avoid redundant IO in readFields function object (fixes #1825)
- read header info once and reuse
- short-circuit logic to avoid unneeded checks
- additional debug information if field cannot be found

STYLE: remove unused old code remnants from #1206
2020-09-03 09:07:31 +02:00
03526e2097 ENH: centralize more libraries in src/phaseSystemModels
- prelude to code refactoring

NOTE
    no source code change in this commit, only relocation,
    renaming and adjustment of Make/{files,options}
2020-08-05 18:56:22 +01:00
12c91b9472 STYLE: check autoPtr as plain bool instead of valid()
- cleaner code, more similarity with unique_ptr

  Now
      if (ptr)
      if (!ptr)

  instead
      if (ptr.valid())
      if (!ptr.valid())
2020-07-16 11:39:24 +02:00
9af3f85cf9 STYLE: simplify short-circuit involving autoPtr (#1775)
- with '&&' conditions, often better to check for non-null autoPtr
  first (it is cheap)

- check as bool instead of valid() method for cleaner code, especially
  when the wrapped item itself has a valid/empty or good.
  Also when handling multiple checks.

  Now
      if (ptr && ptr->valid())
      if (ptr1 || ptr2)

  instead
      if (ptr.valid() && ptr->valid())
      if (ptr1.valid() || ptr2.valid())
2020-07-16 10:17:25 +02:00
3baebcb101 STYLE: replace uses of autoPtr::empty() with bool check (#1775)
- less clutter using plain tests with the bool operator:

      (!ptr)  vs  (ptr.empty())
      (ptr)   vs  (!ptr.empty())
2020-07-16 08:58:22 +02:00
1e7c6ea2f1 ENH: mutable libs() access in Time and other classes (#1737)
- This reflects the pre-existing coding situation where const_cast was
  used throughout to effect the same.

STYLE: fix private/protected access

- CodedField, codedMixedFvPatchField
2020-07-14 11:19:05 +02:00
b244cd1b21 Merge remote-tracking branch 'origin/master' into develop 2020-06-29 11:08:27 +01:00
6534245359 BUG: incorrect lookup name in ReynoldsAnalogy (fixes #1751)
- used fluidThermo::typeName instead of fluidThermo::dictName
  within the Cp() method.
2020-06-26 10:32:13 +02:00
c49d923392 BUG: Correcting htc definition to avoid negative values 2020-06-26 10:32:13 +02:00
7c1c9fee0c ENH: Updated AMI dependent code 2020-06-24 22:10:20 +01:00
f6deaeef33 STYLE: formatting, remove unused file(s) 2020-06-24 10:51:03 +02:00
ca540320df BUG: Correcting htc definition to avoid negative values 2020-06-23 08:19:54 -07:00
7065593b3f BUG: regression in fluxSummary cellZoneAndDirection (fixes #1736)
- related to change c3571b7357 (does not affect 1912 or older).

  Remnant check for data() should have used valid() method instead.

TUT: add fluxSummary cellZoneAndDirection to angledDuct/implicit
2020-06-19 12:52:00 +02:00
ceed53775d ENH: Updated Curle function object
The function object now computes the acoustic pressure at a list of user
specified locations, or from the face centres of a user-supplied surface.
When operating on an input surface, the output can be written back to the
surface or as a list of point values.

Example of function object specification:

    Curle1
    {
        type            Curle;
        libs            ("libfieldFunctionObjects.so");
        ...
        patches         (surface1 surface2);
        c0              330;

        // Input - either points or surface

        input           points;
        observerPositions ((0 0 0)(1 0 0));

        //input           surface;
        //surface         "inputSurface.obj"

        // Output - either points or surface
        output          points;

        //output          surface;
        //surfaceType     ensight;
    }

    Where the entries comprise:
        Property     | Description                  | Required | Default value
        type         | Type name: Curle             | yes      |
        p            | Pressure field name          | no       | p
        patches      | Sound generation patch names | yes      |
        c0           | Reference speed of sound     | yes      |
        input        | Input type                   | yes      |
        observerPositions | List of observer positions (x y z) | no      |
        surface      | Input surface file name      | no       |
        output       | Output type                  | yes      |
        surfaceType  | Output surface type          | no       |
2020-06-18 21:55:44 +01:00
01ec92fd35 GIT: remove leading/trailing blank lines, trailing whitespace 2020-06-17 10:46:26 +02:00
458cec60b1 ENH: support time-varying Tref for externalCoupledTemperature (#1729) 2020-06-15 15:41:05 +02:00
98a9cde998 ENH: fieldAverage - protect against numerical error when determining the next periodic restart 2020-06-12 09:55:52 +01:00
4a798b9ea5 ENH: add new 'pow' FO 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
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
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
9d1f39165b GIT: remove merge/rebase artifacts 2020-06-08 16:39:17 +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
8a27989cbf ENH: Added support for internal vol fields 2020-06-08 13:59:46 +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
95f7ed0342 COM: Separate htc FO from general FO and reactingEuler solvers (#1714)
The phase systems tables for multiphase solvers create conflict
between each other as they are defined in the same namespace and using
similar class names.

Therefore a special htc function object for reactingEulerSolver was
added (reactingEulerHtcModel), located under
src/phaseSystemModels/reactingEulerFoam/functionObjects/

This commit includes the following:

- Relocate solvers/reactingEulerFoam functionObjects to
  src/phaseSystemModels
- Remove links for fieldFunctionObject to multiphase libs to avoid
  conflicts
- New FO for htc for reactingEulerFoam called reactingEulerHtcModel
2020-06-03 20:58:02 +02:00
3e43edf056 ENH: unify use of dictionary method names
- previously introduced `getOrDefault` as a dictionary _get_ method,
  now complete the transition and use it everywhere instead of
  `lookupOrDefault`. This avoids mixed usage of the two methods that
  are identical in behaviour, makes for shorter names, and promotes
  the distinction between "lookup" access (ie, return a token stream,
  locate and return an entry) and "get" access (ie, the above with
  conversion to concrete types such as scalar, label etc).
2020-06-02 17:26:03 +02:00
8600d6ba1c COMP: change fieldsFunctionObject library link order (fixes #1714)
- before (-lreactingPhaseSystem -ltwoPhaseReactingTurbulenceModels)
  after  (-ltwoPhaseReactingTurbulenceModels -lreactingPhaseSystem)
  to fix symbol resolution issue on clang.
2020-05-29 15:58:08 +02:00
997c9a232c STYLE: use compact form for libs () entries 2020-05-23 18:42:47 +02:00
11965904b7 COMP: Avoiding double entry in runTime table TurbulenceModel
multiphaseReactingTurbulenceModels and twoPhaseReactingTurbulenceModels
add models to the same table TurbulenceModel. These two libs were removed
from libreactingPhaseSystem which created the conflict.

The multiphaseReactingTurbulenceModels was added to
reactingMultiPhaseEulerFoam solver and twoPhaseReactingTurbulenceModels to
twoPhaseReactingEulerFoam solver

The FO heatTransferCoeffs for libfieldFunctionObjects needs
twoPhaseReactingTurbulenceModels.

These change avoids linking conflict from multiphaseReactingTurbulenceModels
and twoPhaseReactingTurbulenceModels being linked in the same lib.
2020-05-22 11:01:55 -07:00
dc04980d5c STYLE: remove trailing space, tabs 2020-05-21 15:21:23 +01:00
8218923b8c ENH: Adding support for two phases Euler solver to heatTransferModel FO 2020-05-21 15:21:23 +01:00
8cfb483054 STYLE: some general spelling fixes 2020-05-04 09:15:21 +02:00
2a24bab057 STYLE: consistent looping of patchSet entries 2020-05-01 17:31:01 +02:00
0680416b59 COMP: tag lookupObjectPtr and lookupObjectRefPtr as deprecated
- were deprecated via comments (2018-10).
  Now mark with compilation warning
2020-05-01 16:42:55 +02:00
79048eb68f STYLE: use writeEntry(), beginBlock(), endBlock() methods
- use dictionary::get<..> instead of lookup in a few more places
2020-04-28 10:41:23 +02:00
c3571b7357 ENH: topoDistanceData: templated on passive data type.
Also adds pointTopoDistance, edgeTopoDistance.
2020-04-24 12:34:08 +01:00
9aae45fa51 Merge remote-tracking branch 'origin/master' into develop 2020-04-16 00:45:11 +02:00
2416599ea9 STYLE: format consistency for copyright 2020-04-15 23:28:41 +02:00
86e78ac3c1 BUG: forces - corrected moment field calculation 2020-04-09 10:00:43 +01:00
5425de66e4 ENH: adding momemtumErro FO 2020-04-08 12:19:23 -07:00
11a4a659cb STYLE: avoid spurious ddt warning about unknown field (#1643) 2020-03-23 12:21:32 +01:00
89c21888a9 ENH: 'mag' postOperation returns scalar (#1622) 2020-03-23 11:14:57 +01:00
6744a2102b Merge remote-tracking branch 'origin/master' into develop 2020-03-12 11:35:26 +01:00