Commit Graph

26110 Commits

Author SHA1 Message Date
7fa4f1ef76 Merge branch 'feature-mpi-updates' into 'develop'
More consistent use of combineReduce, simpler and/or reductions

See merge request Development/openfoam!566
2022-11-08 16:48:21 +00:00
5b29ff0e42 ENH: consolidate 'formatOptions' handling for coordSetWriter/surfaceWriter
- replaced ad hoc handling of formatOptions with coordSetWriter and
  surfaceWriter helpers.

  Accompanying this change, it is now possible to specify "default"
  settings to be inherited, format-specific settings and have a
  similar layering with surface-specific overrides.

- snappyHexMesh now conforms to setFormats

  Eg,

      formatOptions
      {
          default
          {
              verbose     true;
              format      binary;
          }
          vtk
          {
              precision   10;
          }
     }

     surfaces
     {
         surf1
         {
             ...

             formatOptions
             {
                 ensight
                 {
                     scale   1000;
                 }
             }
         }
     }
2022-11-08 16:48:08 +00:00
b7592c1ee8 ENH: preserve globalIndex merge information within mergedSurf
- for later reuse with fields (for example)

ENH: use 'scheduled' for surfaceWriter field merging (#2402)

- in tests with merging fields (surfaceWriter), 'scheduled' was
  generally faster than 'nonBlocking' for scalars, minorly faster for
  vectors.
  Thus make 'scheduled' the default for the surfaceWriter but with a
  user-option to adjust as required. Previously simply relied on
  whichever default globalIndex had (currently nonBlocking).

  Reuse globalIndex information from mergedSurf instead of
  globalIndex::gatherOp to avoid an extra MPI call to gather sizes
  each time.

  These changes will not be noticable unless surface sampling is done
  very frequently (eg, every iteration) and with large core counts.
2022-11-08 16:48:08 +00:00
799d247142 ENH: PatchTools::gatherAndMerge with recovery of the globalIndex
- support globalIndex for points/faces as an output parameter,
  which allows reuse in subsequent field merge operations.

- make pointMergeMap an optional parameter. This information is not
  always required. Eg, if only using gatherAndMerge to combine faces
  but without any point fields.

ENH: make globalIndex() noexcept, add globalIndex::clear() method
2022-11-08 16:48:08 +00:00
70208a7399 ENH: use returnReduceAnd(), returnReduceOr() functions
DOC: document which MPI send/recv are associated with commType
2022-11-08 16:48:08 +00:00
473e14418a ENH: more consistent use of broadcast, combineReduce etc.
- broadcast           : (replaces scatter)
  - combineReduce       == combineGather + broadcast
  - listCombineReduce   == listCombineGather + broadcast
  - mapCombineReduce    == mapCombineGather + broadcast
  - allGatherList       == gatherList + scatterList

  Before settling on a more consistent naming convention,
  some intermediate namings were used in OpenFOAM-v2206:

    - combineReduce       (2206: combineAllGather)
    - listCombineReduce   (2206: listCombineAllGather)
    - mapCombineReduce    (2206: mapCombineAllGather)
2022-11-08 16:48:08 +00:00
b9c15b8585 COMP: missing linkage for ensightToFoam (ldd linker) 2022-11-08 17:13:46 +01:00
18216a4639 BUG: zoneMotion: supply optional coeffs dict. Fixes #2630 2022-11-08 12:38:44 +00:00
99780bd7cd Merge branch 'feature-ensightToFoam' into 'develop'
ENH: ensightToFoam: Ensight Gold mesh converter

See merge request Development/openfoam!567
2022-11-07 21:26:37 +00:00
5163e52974 ENH: ensightToFoam: Ensight Gold mesh converter 2022-11-07 21:22:18 +00:00
35aa6140cc Merge branch 'feature-grey-area-turbulence' into 'develop'
Integration of grey area turbulence models from Upstream CFD

See merge request Development/openfoam!560
2022-11-07 11:33:31 +00:00
e510321a26 TUT: wallMountedHump: new DES tutorial 2022-11-07 10:59:18 +00:00
3a4537abc9 STYLE: various simplifications and changes
BUG: DEShybrid: reintroduce e28bed59
2022-11-07 10:59:18 +00:00
493bfdbdc4 ENH: DEShybrid - code refactoring/simplification 2022-11-07 10:59:18 +00:00
32507b3251 TUT: vortexShed case - added turbulenceFields example 2022-11-07 10:59:18 +00:00
81f783286c ENH: turbulenceFields FO - added LESRegion and DES shielding function, fd 2022-11-07 10:59:18 +00:00
7db69fc22e ENH: DES models - added access function for shielding function, fd 2022-11-07 10:59:18 +00:00
9557cde880 STYLE: Minor code formatting 2022-11-07 10:59:18 +00:00
c039a09e71 ENH: DEShybrid - restored inputs for backwards compatibility 2022-11-07 10:59:17 +00:00
e0f3993045 ENH: scalar - added readOrDefault(is, defaultValue) function 2022-11-07 10:59:17 +00:00
12ba22bebf ENH: DESModel - stabilisation of Ssigma function
- Code supplied by Marian Fuchs, Upstream CFD GmbH
2022-11-07 10:59:17 +00:00
07a9ee86f3 ENH: Code refactoring 2022-11-07 10:59:17 +00:00
9563607e01 ENH: Turbulence IDDES models - added option to switch fe term in dTilda calc
Default is fe = true, yielding the original form given be Shur (2008)
2022-11-07 10:59:17 +00:00
5b1c060e9e ENH: kOmegaSSTDES - added convenience functions for RAS|LES length scales 2022-11-07 10:59:17 +00:00
53397e6f3f ENH: Added deprecation warnings for SpalartAllmaras and kOmegaSST DES variants 2022-11-07 10:59:17 +00:00
67ba5acf18 ENH: Spalart-Allmaras model - added user switch for ft2 term (default = off) 2022-11-07 10:59:17 +00:00
e5cf96b0f9 INT: Integration of Upstream CFD's SLADelta - use hmaxPtr
- Initial code supplied by Marian Fuchs, Upstream CFD GmbH
- Code cleaned/refactored/integrated by OpenCFD
2022-11-07 10:59:17 +00:00
62f37b2a43 INT: Integration of Upstream CFD's sigma LES model
- Initial code supplied by Marian Fuchs, Upstream CFD GmbH
- Code cleaned/refactored/integrated by OpenCFD
2022-11-07 10:59:17 +00:00
619ddc2355 INT: Integration of Upstream CFD's DeltaOmegaTilde delta function
- Initial code supplied by Marian Fuchs, Upstream CFD GmbH
- Code cleaned/refactored/integrated by OpenCFD
2022-11-07 10:59:17 +00:00
4fc34c8a63 INT: Integration of Upstream CFD's DESHybrid updates
- Initial code supplied by Marian Fuchs, Upstream CFD GmbH
- Code cleaned/refactored/integrated by OpenCFD
2022-11-07 10:59:17 +00:00
2cc96ad7f4 INT: Integration of Upstream CFD's grey-area sigma into kOmegaSST models
- Initial code supplied by Marian Fuchs, Upstream CFD GmbH
- Code cleaned/refactored/integrated by OpenCFD
2022-11-07 10:59:17 +00:00
541b6eb28a INT: integration of Upstream CFD's grey-area sigma into S-A models
- Initial code supplied by Marian Fuchs, Upstream CFD GmbH
- Code cleaned/refactored/integrated by OpenCFD
2022-11-07 10:59:17 +00:00
10b724b10d INT: integration of Upstream CFD's grey-area sigma into base DESModel
- Initial code supplied by Marian Fuchs, Upstream CFD GmbH
- Code cleaned/refactored/integrated by OpenCFD
2022-11-07 10:59:17 +00:00
d2f2ab6d25 ENH: kOmegaSST - code refactoring and clean-up 2022-11-07 10:59:16 +00:00
b92fbd8f73 ENH: Refactored Spalart-Allmaras turbulence models
- Added a new S-A base class: SpalartAllmarasBase
- RAS and DES models derived from new base class
- Removed code duplication
2022-11-07 10:59:16 +00:00
3c214e99df ENH: propellerInfo - protection against Uref = 0 2022-11-03 09:43:39 +00:00
913c45afff ENH: faMatrix - added dot operator functions 2022-11-03 09:43:39 +00:00
fc19ca39f3 BUG: integratedNonUniformTable: correct offsets (fixes #2614) 2022-11-01 14:47:08 +00:00
2202995f5c ENH: expose IntRange {begin,end}_value() methods
- end_value() corresponds to the infrequently used after() method, but
  with naming that corresponds better to iterator naming conventions.

  Eg,

     List<Type> list = ...;
     labelRange range = ...;

     std::transform
     (
         (list.data() + range.begin_value()),
         (list.data() + range.end_value()),

         outIter,
         op
     );

- promote min()/max() methods from labelRange to IntRange base class

STYLE: change timeSelector from "is-a" to "has-a" scalarRanges.
2022-10-31 18:36:15 +01:00
21f037e3a0 ENH: single/double value reset method for MinMax
- resets min/max to be identical to the specified value,
  which can be more convenient (and slightly more efficient) than doing
  a full reset followed by add()

- additional MinMax intersects() query, which works like overlaps()
  but with exclusive checks at the ends

- provide MinMax::operator&=() to replace (unused) intersect() method

ENH: single/double value reset method for boundBox

- boundBox::operator&=() to replace (rarely used) intersect() method.
  Deprecate boundBox::intersect() to avoid confusion with various
  intersects() method

COMP: provide triangleFwd.H
2022-10-31 18:36:14 +01:00
c973066646 ENH: supplementary vector comparison methods
- background: for some application it can be useful to have fully
  sorted points. i.e., sorted by x, followed by y, followed by z.

  The default VectorSpace 'operator<' compares *all*
  components. This is seen by the following comparisons

  1.  a = (-2.2 -3.3 -4.4)
      b = (-1.1 -2.2 3.3)

      (a < b) : True
      Each 'a' component is less than each 'b' component

  2.  a = (-2.2 -3.3 -4.4)
      b = (-2.2 3.3 4.4)

      (a < b) : False
      The a.x() is not less than b.x()

  The static definitions 'less_xyz', 'less_yzx', 'less_zxy'
  instead use comparison of the next components as tie breakers
  (like a lexicographic sort).
  - same type of definition that Pair and Tuple2 use.

      a = (-2.2 -3.3 -4.4)
      b = (-2.2 3.3 4.4)

      vector::less_xyz(a, b) : True
      The a.x() == b.x(), but a.y() < b.y()

   They can be used directly as comparators:

      pointField points = ...;

      std::sort(points.begin(), points.end(), vector::less_zxy);

ENH: make VectorSpace named access methods noexcept.

   Since the addressing range is restricted to enumerated offsets
   (eg, X/Y/Z) into storage, always remains in-range.
   Possible to make constexpr with future C++ versions.

STYLE: VectorSpace 'operator>' defined using 'operator<'

- standard rewriting rule
2022-10-31 18:36:14 +01:00
371795840c ENH: bounding sphere calculation for PrimitivePatch face
- useful when a characteristic per-face search dimension is required.
  With PrimitivePatch we are certain to have consistent evaluations
  of the face centre.

STYLE: tag PrimitivePatch compatibility headers as such
2022-10-31 18:36:14 +01:00
7a43cac55a ENH: component/element access for zero/one return themselves
STYLE: more consistent access for uniform list/fields
2022-10-31 18:36:14 +01:00
9433898941 ENH: support construction of pointIndexHit from pointHit
STYLE: combine templated/non-templated headers (reduced clutter)

STYLE: use hitPoint(const point&) combined setter

- same as setHit() + setPoint(const point&)

ENH: expose and use labelOctBits::pack method for addressing
2022-10-31 18:36:14 +01:00
454f7960b0 STYLE: expand use of ListLoop macros (#2624)
- the old List_FOR_ALL macro only remained in use in relatively few
  places. Replace with the expanded equivalent and move the looping
  parameter out of the macro and give an explicit name (eg, loopLen)
  which simplifies the addition of any loop pragmas in the various
  TFOR_ALL... macros (for example).
2022-10-31 18:36:14 +01:00
9db3547bd3 ENH: support optional average value when reading rawIOField
ENH: simplify bookkeeping within MappedFile
2022-10-31 18:36:14 +01:00
278378031e ENH: add syncState() method to serial streams (#2623)
- in places where direct reading from the std::stream is used,
  this method can be used to ensure that the OpenFOAM Sstream state
  is properly updated from the std::stream.

ENH: restrict stream renaming to ISstream

- non-const access was previously declared at the top-level (IOstream)
  but that not only added in potentially odd setting of the static
  fileName, but also meant that the OFstream name() could potentially
  be altered after opening a file and thus be inconsistent with the
  underlying file that had been opened.

  Now restrict name modification to ISstream (and ITstream
  counterpart). Does not affect any existing valid code.

STYLE: non-default OFstream destructor (for future file staging)
2022-10-31 09:34:37 +01:00
bd000d89e9 COMP: include fileFormats, surfMesh for faOptions, fvOptions 2022-10-27 16:13:41 +02:00
ac25608fbd BUG: viewFactor: smoothing when zero visible faces. Fixes #2622 2022-10-27 11:58:36 +01:00
37e90dbad7 ENH: limitTemperature: obey 'active' flag. Fixes #2621 2022-10-27 10:00:00 +01:00