Commit Graph

25957 Commits

Author SHA1 Message Date
Mark Olesen
f3ba6c6da0 ENH: linked-lists accept more familiar STL method names
- ie, front(), back(), push_front(), push_back(), pop_front()

ENH: add CircularBuffer flattening operator() and list() method

- useful if assigning content to a List etc

BUG: CircularBuffer find() did not return logical index
2022-11-24 12:21:01 +00:00
Andrew Heather
9f9b8fb662 Merge branch 'feature-resolution-index' into 'develop'
ENH: resolutionIndex: new function object to evaluate LES/DES resolution

See merge request Development/openfoam!569
2022-11-23 18:24:06 +00:00
Kutalmis Bercin
8ba1156a56 ENH: resolutionIndex: new function object to evaluate LES/DES resolution
Grid independency studies and grid adaptation for implicit LES/DES are
nontrivial and intractable due to the inherent coupling between spatial
resolution and subgrid-scale modelling.

To enable assessments for LES/DES resolution, a function object of
single-mesh resolution index with three submodels is introduced.
2022-11-23 13:41:20 +00:00
Kutalmis Bercin
13606d4e09 ENH: RASModelBaseName: new type name for RANS models 2022-11-23 13:41:20 +00:00
mattijs
90b61429f6 ENH: multiComponentMixture: fixes #2206
- added bit of tolerance
- write difference
2022-11-23 12:20:04 +00:00
Mark Olesen
d69ac516e8 ENH: allow configurable field send/receive for surfaceNoise (#2639)
- replaced PstreamBuffers mechanism with globalIndex for both gather
  and scatter operations. Use scheduled communication by default, but
  is selectable.

- reduced communication with ensemble averaging and no-write
2022-11-22 17:07:40 +01:00
Mark Olesen
9114e01de9 STYLE: align faceZone handling (functionObjects, sampling)
- pattern as per surfaceFieldValue::setFaceZoneFaces()

  1. define faceId, facePatchId assuming an internal face
  2. if actually a boundary face:
     - get facePatchId
     - ignore if emptyPolyPatch or coupledPolyPatch (neighbour side)
     - get patch relative faceId

  This currently seems to be the least amount of code clutter.

ENH: recover some memory my shrinking lists in fluxSummary

BUG: potentially trailing rubbish in the heatExchangerModel lists

- the final resize to length actually used was missing.
  Does not affect any released versions
2022-11-22 13:14:53 +01:00
Mark Olesen
a8f369fd2b ENH: region support for foamRestoreFields (#2638) 2022-11-22 13:14:53 +01:00
Andrew Heather
b5e6a42ded Merge branch 'feature-htc-facezone' into 'develop'
ENH: faceZoneReferenceTemperature: new heatTransferCoeff model

See merge request Development/openfoam!561
2022-11-21 15:59:45 +00:00
Kutalmis Bercin
b18a6675cb STYLE: heatTransferCoeff: minor cleanup of models
TUT: solidQuenching2D: correct libs for reactingEulerHtcModel
2022-11-21 15:58:58 +00:00
Kutalmis Bercin
354767c694 ENH: faceZoneReferenceTemperature: new heatTransferCoeff model 2022-11-21 15:58:58 +00:00
Mattijs Janssens
88e1932145 Merge branch 'feature-mappedPatchBase' into 'develop'
BUG: avoid excessive recalculation of map for moving meshes

See merge request Development/openfoam!572
2022-11-21 13:21:56 +00:00
Andrew Heather
945405c32d BUG: avoid excessive recalculation of map for moving meshes 2022-11-21 13:17:56 +00:00
Mark Olesen
013f3cccc4 ENH: improve handling of finiteArea mesh with distributed roots
- in makeFaMesh, the serial fields are now only read on the master
  process and broadcast to the other ranks. The read+distribute is
  almost identical to that used in redistributePar, except that in
  this case entire fields are sent and not a zero-sized subset.

- improved internal faMesh checking for files so that the TryNew
  method works with distributed roots.
2022-11-20 19:59:52 +01:00
Mark Olesen
21e7ce8f42 STYLE: place HashTable trivial methods in the header (reduce clutter) 2022-11-20 16:55:58 +01:00
Mark Olesen
94c7e180fb ENH: more fault-tolerance in makeFaMesh decomposition
- if the volume faceProcAddressing is missing, it is not readily
  possible to determine equivalent area procAddressing.

  Instead of throwing an error, be more fault-tolerant by having it
  create with READ_IF_PRESENT and then detect and warn
  if there are problems.
2022-11-19 20:49:12 +01:00
Mark Olesen
67b58c28c0 ENH: IOobjectList simpler construction of unregistered
- accept IOobjectOption::registerOption with (MUST_READ, NO_WRITE)
  being implicit. Direct handling of IOobjectOption itself, for
  consistency with IOobject.

  The disabling of object registration is currently the only case
  where IOobjectList doesn't use default construction parameters,
  but it was previously a bit awkward to specify.
2022-11-19 20:48:54 +01:00
Mark Olesen
db57c456f6 ENH: tutorials/Alltest -backup option
- for repeated tests (eg, during bisection) can be used to preserve
  the existing directory as tutorialsTest.bak01,
  tutorialsTest.bak02, ... (max of 10).

- preserve the commit information as tutorialsTest/commit-info
  to help document the current or backup test results.
2022-11-19 13:44:01 +01:00
Mark Olesen
1b11e4b3ac CONFIG: restrict wmakeLnInclude to header/template files
- source-code (.c, .cpp etc) only adds to clutter in the lnInclude
  directory
2022-11-19 12:41:55 +01:00
Mark Olesen
5e0a23edd5 STYLE: compacter help information for -debug-switch etc. 2022-11-18 21:24:17 +01:00
Mark Olesen
d7bf2d400d BUG: string wrapping (eg, argList help) truncates character (#2625)
- had an off-by-one in the accounting for some corner caes,
  partly because the logic was a bit convoluted

ENH: improved string wrapping (#2625)

- reworked logic (like a state machine) to handle backtracking
  with fallback of splitting near punctuation characters.

  Still doesn't compete with nroff or TeX, but does avoid long lines
  and many funny splits.  With this change the help for mapFieldsPar
  now like this:

  =====
      Specify the mapping method
      (direct|mapNearest|cellVolumeWeight|
      correctedCellVolumeWeight)
  =====

  Since the list of options is very long without any spaces, it takes
  '|' as the best split point, which definitely reads better
2022-11-18 21:14:22 +01:00
Mark Olesen
d9ab5d54ef ENH: ensightWrite, vtkWrite support for excluding fields and patches
- functionality similar to that provided by foamToEnsight, foamToVTK
  which allows blocking out patches (eg, outer walls, inlet/outlet)
  that are not particularly interesting to visualize
2022-11-18 15:28:14 +01:00
Mark Olesen
ec1d66d640 TUT: keyword updates 2022-11-18 10:31:00 +01:00
Mark Olesen
3b0af86448 STYLE: add notes where files are added into global/globals.C
ENH: use dictionary findDict() directly for debugSwitches

- the isDict() method is just a wrapper around the pointer anyhow
2022-11-17 15:26:51 +01:00
Mark Olesen
d009cb8bc1 CONFIG: set API level to 2208 to distinguish from previous release 2022-11-17 15:19:44 +01:00
Mark Olesen
1dafe5d393 ENH: use full scratch buffer capacity for ensight output
- improves overall buffering ability across parts
2022-11-17 14:03:25 +01:00
mattijs
225f548d2d ENH: pointHistory: cooperate with collated file format. Fixes #2636 2022-11-17 10:32:35 +00:00
mattijs
6cb8337345 BUG: faceReflecting: initialisation. Fixes #2634 2022-11-16 16:30:11 +00:00
Mark Olesen
3d81dd6277 COMP: forward declarations for uniformDimensionedFields 2022-11-16 14:14:59 +01:00
Mark Olesen
90c4ee7e12 ENH: support wmakeLnInclude of C++ template files (.tcc, .tpp, .txx)
- can be used to avoid confusion with source files

ENH: improve handling of '--' option termination (wmake scripts)
2022-11-16 13:11:40 +01:00
Kutalmış Berçin
5714a3606e Merge branch 'feature-atomic-stream' into 'develop'
Updates for ensight writing

See merge request Development/openfoam!570
2022-11-15 17:02:04 +00:00
Mark Olesen
0fabbcb404 ENH: direct ensight output of float/double
- since ensight format is always float and also always written
  component-wise, perform the double -> float narrowing when
  extracting the components.  This reduces the amount of data
  transferred between processors.

ENH: avoid vtk/ensight parallel communication of empty messages

- since ensight writes by element type (eg, tet, hex, polyhedral) the
  individual written field sections will tend to be relatively sparse.
  Skip zero-size messages, which should help reduce some of the
  synchronization bottlenecks.

ENH: use 'data chunking' when writing ensight files in parallel

- since ensight fields are written on a per-element basis, the
  corresponding segment can become rather sparsely distributed. With
  'data chunking', we attempt to get as many send/recv messages in
  before flushing the buffer for writing. This should make the
  sequential send/recv less affected by the IO time.

ENH: allow use of an external buffer when writing ensight components

STYLE: remove last vestiges of autoPtr<ensightFile> for output routines
2022-11-15 17:26:09 +01:00
Mark Olesen
5338e56c73 ENH: add support for OFstream atomic file creation (#2631)
- with ATOMIC, an intermediary file is created - eg, (fileAbc~tmp~)
  where all of the output is written to. When the stream goes out of
  scope, this intermediary file is moved/renamed to the actually
  output name - eg, (fileAbc~tmp~) -> (fileAbc).

  This adds some safety if the simulation crashes while writing the
  file, since it will the partial (corrupt) file will be left
  behind as (fileAbc~tmp~) and not as (fileAbc), which means it will
  will be treated as a backup file and not loaded again on restart.

ENH: provided enumeration for APPEND/NON_APPEND

- clearer than using bool (with comments).
  Since append mode is primarily only used by masterOFstream etc
  this change is unlikely to affect user coding.

ENH: use file atomic for ensight file creation

- avoids corrupt (truncated) files being referenced by the ensight
  case file if the simulation crashes while writing the ensight file.
2022-11-15 14:10:01 +01:00
Mark Olesen
9f7cfa9419 ENH: support libz disabling via WM_COMPILE_CONTROL (as ~libz)
- eg, for partially incomplete systems (without libz devel header)

ENH: clearer binding of dummy Pstream in OpenFOAM/Make/options

- link of dummy stub Pstream now contingent on linking libOpenFOAM as
  well. This makes the purpose slightly clearer

ENH: cleaner option naming/handling in wmake script

- allow special purpose -no-openfoam option.
  Eg, compiling test programs without OpenFOAM and Pstream libraries
  but using the rest of the wmake system.

ENH: add +openmp support into WM_COMPILE_CONTROL (#2633)

- this adds compile/link flags for openmp.
  For single-use, can also use 'wmake -openmp'.

  If both +openmp and ~openmp are specified in WM_COMPILE_CONTROL
  the ~openmp will have priority.

  This is actually done indirectly since ~openmp will set empty
  COMP_OPENMP, LINK_OPENMP internal variables, which the +openmp then
  adds to the c++FLAGS and linkexe targets (ie, won't actually add
  anything).

ENH: add +ccache or ccache=... support into WM_COMPILE_CONTROL (#2633)

- with the first version (+ccache), simply use ccache from the path
  without any extra options.

- with the second version (ccache=...), can be more specific about
  what is called.

  Using "+ccache" is identical to "ccache=ccache", but the later could
  be used in other ways. For example,

     ccache=/strange/install/path/ccache
     ccache=</path/my-tooling --option>

  Have the choice of unquoted, single or double quoted or '< >' quoted

STYLE: relocate FOAM_EXTRA_LDFLAGS in general makefile

- removes clutter for different linkers (eg, gold, mold, ldd)
  making it easier to extend for other linkers.

STYLE: protect makefile checks with 'strip' function
2022-11-15 14:00:18 +01:00
Mark Olesen
e15b103003 COMP: remove wmake rules for ARM7 (discontinued) arch 2022-11-15 14:00:18 +01:00
Mark Olesen
c2af76337e COMP: remove wmake rules for discontinued IA64 (itanium) arch 2022-11-15 14:00:18 +01:00
Mark Olesen
edc12c9ad9 COMP: remove fast-math and unsafe-math-optimizations for Fujitsu (#2564)
- was found to cause issues (snappyHexMesh specifically)
  on Fugaku. Reported by @azami
2022-11-15 14:00:18 +01:00
Mark Olesen
25e874a4f0 ENH: provide MPI native minOp, maxOp reduce multiple values
- consistent with sumOp

ENH: globalIndex with gatherNonLocal tag, and use leading dispatch tags

- useful for gather/write where the master data can be written
 separately.  Leading vs trailing dispatch tags for more similarity to
 other C++ conventions.
2022-11-15 14:00:18 +01:00
Andrew Heather
beea22b2f0 Merge branch 'feature-histogram-extension' into 'develop'
ENH: functionObjects: refactor and extend histogram

See merge request Development/openfoam!563
2022-11-14 17:34:54 +00:00
Mark Olesen
0624fb0181 STYLE: use MinMax for handling histogram ranges 2022-11-14 17:34:06 +00:00
Kutalmis Bercin
941cd7fef4 ENH: functionObjects: refactor and extend histogram
- new submodels:
  - 'equalBinWidth': groups data into bins of equal widths (previous behaviour)
  - 'unequalBinWidth': groups data into bins of unequal widths

- output files per time-step are replaced with a single output file

- silently deprecates the input entries: 'setFormat' and 'formatOptions'
2022-11-14 17:34:06 +00:00
Kutalmış Berçin
fd75d38757 Merge branch 'feature-overset-coupledPatch' into 'develop'
overset modifications: allow overset pacthes overlap, allow fringe faces walk, mass conservation update

See merge request Development/openfoam!555
2022-11-14 15:48:58 +00:00
Kutalmis Bercin
d5a973419a STYLE: overset: change massCorrection to fluxCorrection
COMP: overset: fixes for SPDP, int64
2022-11-14 15:41:40 +00:00
mattijs
ab6615c060 BUG: overset: support GAMG. Fixes #2559
Note that there is no support for using GAMG with mass-correction.
2022-11-11 10:19:52 +00:00
sergio
b48fd4f38a TUT: overset: add new tutorials and update existing tutorials 2022-11-11 10:19:51 +00:00
sergio
2a406bbb25 ENH: overset: various improvements in the framework
The improvements include:

- Allowing overset patches to be displaced outside background domain.
  - The approach does not support overlapping of multiple inset meshes
    on top of background domain.
- Allowing fringe faces to walk away from hole cells in background domain.
  - The approach was not extensibly tested with overlapping patches.
- Improving mass conservation.
- Various experimental entries are removed: massFluxInterpolation, ddtCorr.
- New entries:
  - oversetAdjustPhi: adds a flux correction outside the pressure equation.
  - massCorrection: adds an implicit correction.
2022-11-11 10:19:47 +00:00
mattijs
8c0679d25f BUG: Lagrangian: sync IO call. Fixes #2627 2022-11-09 15:31:20 +00:00
mattijs
6c6c8c5008 BUG: distributedTriSurfaceMesh: locally empty surface. Fixes #2612 2022-11-09 08:55:06 +00:00
Andrew Heather
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
Mark Olesen
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