Commit Graph

24735 Commits

Author SHA1 Message Date
e2148b587e CONFIG: inline _foamEval within <etc/config.sh/setup>
- previously a function (unlike the csh version) but since bashrc and
  setup have been split -> replace with inline definition

STYLE: formatting/wording for openfoam starters

TUT: simplify controlDict modification, add default substitution

ENH: accept '/' for end-of-options terminator (etc/openfoam)

- makes the application or service more apparent.
  * eg.  /usr/bin/openfoam / blockMesh
  * vs.  /usr/bin/openfoam -- blockMesh

  Accept lone '-' as the end-of-options terminator, as per bash

- Adjust handling of openfoam '-c' option to flag that a command-string
  will appear, but continue with option parsing.
  Consistent with bash definition.
2021-06-18 17:14:22 +02:00
7d2a9fad1a ENH: add auto-detect 0/ to foamCleanTutorials
- in the 'auto' mode (now the default), it will use cleanCase and also
  remove the 0/ directory if a 0.orig/ directory also exists.

  This corresponds to a frequent idiom and can be used quite safely
  for most cases.

ENH: add -serial / -parallel preference for foamRunTutorials
2021-06-18 17:14:22 +02:00
096b9dc52e TUT: add parallel version for various squareBend cases
- adjust commented-out evaluation to avoid warnings.

  With code like this
  ```
  #if 0
  nxin    #eval{ round($nxin / 5) };
  #endif
  ```

  The handling of the "#if 0 / #endif" clause uses the plain ISstream
  parser to tokenize. This means that the "round(" is parsed as a word
  with a mismatched closing ')', whereas the "#eval" parser will slurp
  everything in until the closing brace and send it off as a string
  to the expression parser.
2021-06-18 17:14:22 +02:00
a3d90ae9b9 TUT: example of patch expressions (#2114) 2021-06-18 17:14:21 +02:00
f39fedb7f9 Merge branch 'issue-2091-PDRFOAM-End' into 'develop'
STYLE: PDRFOAM End of Program was inconsistent with other applications

See merge request Development/openfoam!447
2021-06-18 13:17:59 +00:00
36dd86f89a STYLE: PDRFOAM End of Program was inconsistent with other applications 2021-06-18 13:07:26 +00:00
a9f55f06ba Merge branch 'feature-ami-face-area-intersect' into 'develop'
AMI improvements

See merge request Development/openfoam!468
2021-06-18 10:32:18 +00:00
ba4d38da68 ENH: AMI improvements
- Added new faceAreaWeightAMI2D AMIMethod:
  - performs intersection using a new 2D triangle class;
  - candidate face matches set using an AABBTree method (vs advancing front for
    faceAreaWeightAMI).

  - Use by setting the AMIMethod entry when specifying the AMI in the
    constant/polyMesh/boundary file, e.g.

        AMI
        {
            type            cyclicACMI;
            AMIMethod       faceAreaWeightAMI2D; // new method
            Cbb             0.1; // optional coefficient
            nFaces          1000;
            startFace       100000;
            matchTolerance  0.0001;
            transform       noOrdering;
            neighbourPatch  AMI1;
            nonOverlapPatch AMI1_non_overlap;
        }

  - The optional Cbb coeffcient controls the size of the bounding box used when
    looking for candidate pairs; the value of 0.1 is the default and worked well
    for a large range of test cases. For badly matched AMI patches this may need
    to be increased.

- Deprecated the partialFaceAreaWeightAMI class - primarily used by ACMI:
  - functionality now offered by the AMI variants.
2021-06-18 10:31:58 +00:00
3e5056144d ENH: Vector2D - added isClose function 2021-06-18 10:31:58 +00:00
b8768e2878 Merge branch 'feature-prghTotalPressurePermeable' into 'develop'
ENH: Adding new permeable boundary conditions and a tutorial

See merge request Development/openfoam!471
2021-06-17 20:53:50 +00:00
775194bea1 TUT: new multiphase tutorial: damBreakPermeable 2021-06-17 18:21:25 +01:00
3f7c057712 ENH: Adding new permeable boundary conditions
- prghPermeableAlphaTotalPressure for p_rgh
- pressurePermeableAlphaInletOutletVelocity for U
- new helper class for pressure-related BCs: updateableSnGrad
2021-06-17 18:21:22 +01:00
371619bc7a BUG: rigidBodyMeshMotion: do not access uninitialised. Fixes #2127 2021-06-17 16:46:35 +01:00
9823ddd480 STYLE: createBafflesDict: not used. Built-in into blockMesh 2021-06-17 16:08:36 +01:00
f46c57951d STYLE: dynamicFvMesh: indentation, naming 2021-06-17 14:46:25 +01:00
0110e69018 BUG: tutorial: missing writing of phi. Fixes #2124 2021-06-17 11:48:46 +01:00
1f84dcbac6 ENH: blockMesh: avoid 'empty' for initial mesh. Fixes #2125. 2021-06-17 10:18:39 +01:00
ee4f7feb30 ENH: noiseModel - report missing octave bands 2021-06-16 20:48:30 +01:00
98abafccdb Merge branch 'feature-multiRegion' into 'develop'
ENH: Added new multiRegion function object

See merge request Development/openfoam!470
2021-06-16 11:48:20 +00:00
af86d19ea5 ENH: Added new multiRegion function object
Wrapper that clones the supplied object for each region.

Simplifies the setup of identical post-processing requirements for
multi-region cases.
Applies the supplied function to all regions by default.

Example of function object specification:

    multiRegion
    {
        type    multiRegion;
        libs    (utilityFunctionObjects);
        ...

        function
        {
            // Actual object specification
            type    fieldMinMax;
            libs    (fieldFunctionObjects);
            fields  (<field1> .. <fieldN>);
        }

        // Optional entries
        regions     (region1 region2);
    }

    Where the entries comprise:
        Property   | Description                    | Reqd | Default
        type       | Type name: multiRegion         | yes |
        function   | Function object sub-dictionary | yes |
        regions    | List of region names           | no  | all
2021-06-16 13:44:50 +02:00
89de932685 Merge branch 'feature-multifieldvalue' into 'develop'
ENH: new multiFieldValue function object

See merge request Development/openfoam!469
2021-06-16 09:25:13 +00:00
ea12bfdb0f ENH: new multiFieldValue function object
Computes a selected operation between multiple \c fieldValue function
    objects.

    The operation is applied to all results of each \c fieldValue object.

Note
    Each object must generate the same number and type of results.

Usage
    Minimal example by using \c system/controlDict.functions:

    multiFieldValue1
    {
        // Mandatory entries (unmodifiable)
        type            multiFieldValue;
        libs            (fieldFunctionObjects);

        // Mandatory entries (runtime modifiable)
        operation       subtract;

        // List of fieldValue function objects as dictionaries
        functions
        {
            region1
            {
                ...
            }
            region2
            {
                ...
            }

            ...

            regionN
            {
                ...
            }
        }

        // Optional (inherited) entries
        ...
    }

    where the entries mean:

      Property     | Description                         | Type | Req'd | Dflt
      type         | Type name: multiFieldValue          | word |  yes  | -
      libs         | Library name: fieldFunctionObjects  | word |  yes  | -
      operation    | Operation type to apply to values   | word |  yes  | -
      functions    | List of fieldValue function objects | dict |  yes  | -
    \endtable

    Options for the \c operation entry:

       add           | add
       subtract      | subtract
       min           | minimum
       max           | maximum
       average       | average

Deprecated fieldValueDelta

- The fieldValueDelta function object was originally written to compute the
difference between two fieldValue-type function objects. The multiFieldValue
object name better describes its purpose whilst being able to operate on an
arbitrary number of fieldValue-type objects.
2021-06-16 11:19:44 +02:00
b6e8768034 CONFIG: update compiler versions
TUT: add missing restore0Dir (finiteArea)

STYLE: doc spelling
2021-06-14 19:20:15 +02:00
82fdeaf679 BUG: redistributePar: preserve zone ordering. Fixes #2120 2021-06-14 16:36:48 +01:00
64fb07c5db Merge branch 'feature-relax-fan-jump' into 'develop'
ENH: Added under-relaxation to jump conditions

See merge request Development/openfoam!467
2021-06-14 15:34:43 +00:00
f54b190f31 ENH: Jump conditions - added optional minimum jump value
Example:

    plane
    {
        type            fan;
        patchType       cyclic;
        jump            uniform 0;
        value           uniform 0;
        uniformJump     false;

        relax           0.2;

        jumpTable       ( (1000 0) (-200 1) (20 2) (-0.75 3) );

        // Optional minimum jump value
        minJump         0;
    }
2021-06-14 14:52:35 +00:00
05e0749d0e ENH: Added under-relaxation to jump conditions
Currently only applied to the fanFvPatchField, e.g.

    plane
    {
        type            fan;
        patchType       cyclic;
        jump            uniform 0;
        value           uniform 0;
        uniformJump     false;

        // Optional under-relaxation
        relax           0.2;

        ...
    }
2021-06-14 14:52:35 +00:00
30da494e55 STYLE: PatchParticleHistogram: simplify output for further parsing
CONFIG: update completion_cache
2021-06-11 17:18:36 +02:00
ae02a86562 ENH: multi-region support for reconstructParMesh (#2072) 2021-06-11 17:18:35 +02:00
620fe96c02 ENH: multi-region support for rotateMesh (#2072) 2021-06-11 17:18:35 +02:00
c4b0f3c63d STYLE: direct inclusion of region options 2021-06-11 17:18:20 +02:00
2797a8be25 TUT: missing run-limit on tutorials/Alltest 2021-06-11 11:18:01 +02:00
596d8fab39 Merge branch 'feature-distanceSurface-filtering' into 'develop'
ENH: add proximityRegions filter to distanceSurface (#2108)

See merge request Development/openfoam!460
2021-06-10 19:13:40 +00:00
ca88abba7e ENH: add proximityRegions filter to distanceSurface (#2108)
- combines region-based and proximity-based filtering

  proxityRegions (post-filter):
    Checks the distance of the resulting faces against the original
    search surface. Filters based on the area-weighted distance
    of each topologically connected region.
    If the area-weighted distance of a region is greater than
    \c absProximity, the entire region is rejected.

STYLE: 'proxityFaces' as newer synonym for 'proximity' filter
2021-06-10 18:21:04 +02:00
b6b4ab071d ENH: additional patch expressions (#2114)
- snGrad, internalField, neighbourField.
  Functional use as per swak: "... + internalField(T) ..."

ENH: additional volume/patch expressions

- deltaT()

STYLE: rename exprDriverWriter -> fvExprDriverWriter

- the original class name was a misnomer since it holds a reference
  to fvExprDriver

BUG: expression faceToPoint/pointToFace definitions were flipped

ENH: refactor expression hierarchy and code style

- handle TimeState reference at the top-level for simpler derivations

- unified internal search parameters (cruft)
2021-06-10 18:02:16 +02:00
239a7884a6 ENH: more flexible finiteArea patch selection (#2084)
- support wordRes for selecting patch names

- ownerPolyPatch specification is now optional, which simplifies input
  and also supports a faMesh spanning different patches but with a
  single boundary condition.

  Alternatively, can specify more granularity if required.

  ```
  polyMeshPatches  ( "top.*" );

  boundary
  {
      inlet1
      {
          type patch;
          ownerPolyPatch top1;    // <- specific to this portion
          neighbourPolyPatch inlet;
      }
      inlet2
      {
          type patch;
          ownerPolyPatch top2;    // <- specific to this portion
          neighbourPolyPatch inlet;
      }
      outlet
      {
          type patch;
          neighbourPolyPatch outflow;
      }
      bound
      {
          type symmetry;
          neighbourPolyPatch bound;
      }
  }
  ```
2021-06-10 09:25:00 +02:00
7b14af4230 DOC: reorganize Requirements.md, additional note for openSUSE leap
- move unreferenced Config.md to wiki content
2021-06-10 08:38:20 +02:00
853010309d ENH: replace tutorials/AutoTest with bin/foamTestTutorial
- additional -serial/-parallel option:
  prefer Allrun-serial or Allrun-parallel if available

- optional -output=DIR to preserve output

ENH: report missing tutorials/ directory in RunFunctions
2021-06-10 08:38:20 +02:00
c7bde70ecb ENH: robustness, consistency for wmake -show-api, -version
- add to wmakeFunctions to ensure it works even without 'make' being
  installed. Exit immediately after -show-api for consistency with
  -version.

foamEtcFile:
  - drop warnings for some old (pre-v1812) defunct options
    and simply flag as unknown options.
  - handle -version, --version as equivalent to -show-api
2021-06-10 08:34:43 +02:00
1afa6f1b46 COMP: PengRobinsonGas: construction order. 2021-06-09 16:33:24 +01:00
2941d0387d Merge branch 'issue-1452-solverInfo-writeResidualFields' into 'develop'
BUG: fixing various bugs for v2106

See merge request Development/openfoam!420
2021-06-09 14:28:51 +00:00
d92edabcb6 ENH: atmBoundaryLayer: ensure PatchFunction1s are valid 2021-06-09 14:28:18 +00:00
ab49eaf983 BUG: cellLimited<cubic>: ensure the limiter is differentiable (fixes #2113) 2021-06-09 14:28:18 +00:00
b4724c37ad DOC: solverInfo FO: improve header-file documentation
- TUT: solverInfo FO: add an example to pisoFoam/cavity
2021-06-09 14:28:18 +00:00
02129b0846 BUG: solverInfo: ensure access to initial residual fields (#1452)
Prior to the commit, initial residual fields were registered by
the `setResidualField()` function of a linear solver with a field name
prefixed by `residual:`. However, `solverInfo` FO could only access to
the initial residual fields prefixed by `initialResidual:`.

Due to this discrepancy, using `solverInfo` FO with `writeResidualFields=true`
option was resulting in empty residual fields to be output.
2021-06-09 14:28:18 +00:00
4eba7481bc BUG: DEShybrid: replace hardcoded scalar with SMALL (#2082) 2021-06-09 14:28:18 +00:00
0cc201e2b8 ENH: turbulenceProperties: make turbulence switch optional (#2112) 2021-06-09 14:28:18 +00:00
348ae6f4be COMP: incGamma: adjustments for int64 (#2100) 2021-06-09 14:28:18 +00:00
9dda3626b3 Merge branch 'tutorial-finiteArea' into 'develop'
TUT: finiteArea: clean up tutorials

See merge request Development/openfoam!451
2021-06-09 13:41:54 +00:00
de9657dd20 TUT: finiteArea: clean up tutorials 2021-06-09 13:41:45 +00:00