Commit Graph

25107 Commits

Author SHA1 Message Date
f19883c0c6 ENH: patchProbes: output patch. Fixes #2291. 2021-12-09 09:20:19 +00:00
aaf4f40bf7 Merge branch 'feature-adjoint-smoothed-sensitivity-map' into 'develop'
Added functionality for smoothing the sensitivity derivatives

See merge request Development/openfoam!504
2021-12-09 09:18:36 +00:00
f6dfa76f6d TUT: updated the motorbike tutorial
to also compute smoothed sensitivity maps
2021-12-09 09:18:02 +00:00
90d62c33e4 INT: Minor integration updates 2021-12-09 09:18:02 +00:00
3ef0d19ef4 ENH: added functionality for smoothing the sensitivity derivatives
A Helmholtz-like filter is applied to the original field of sensitivity
derivatives. The corresponding PDE is solved on the sensitivity patches,
using the finite area infrastructure. A smoothing radius is needed,
which is computed based on the average 'length' of the boundary faces,
if not provided by the user explicitly.

If an faMesh is provided, it will be used; otherwise it will be created
on the fly based on either an faMeshDefinition dictionary in system or
one constructed internally based on the sensitivity patches.
2021-12-09 09:18:02 +00:00
0343d3d7e9 Merge branch 'feature-nonorthogonal-correction-schemes' into 'develop'
ENH: New schemes for non-orthogonal meshes

See merge request Development/openfoam!502
2021-12-08 12:08:01 +00:00
ada3d1c77e TUT: nonOrthogonalChannel: new non-orthogonality test case 2021-12-08 12:07:26 +00:00
86da88cdfd ENH: Added relaxed nonOrthogonal laplacian corrector scheme 2021-12-08 12:07:26 +00:00
391c1eaa40 ENH: snGradSchemes: new scheme relaxedSnGrad
Surface gradient scheme with under-/over-relaxed
full or limited explicit non-orthogonal correction.

A minimal example by using system/fvSchemes:

  snGradSchemes
  {
      snGrad(<term>)       relaxed;
  }

and by using system/fvSolution:

  relaxationFactors
  {
      fields
      {
          snGrad(<term>)   <relaxation factor>;
      }
  }
2021-12-08 12:07:26 +00:00
37a6fc8db3 STYLE: snGradSchemes: modernise and clean up code
ENH: removes an unused scalarField from skewCorrectedSnGrad

DOC: snGradSchemes: improve header-file documentation
2021-12-08 12:07:26 +00:00
96821f70cd Merge branch 'feature-skew-corrected-gradient' into 'develop'
ENH: New gradient scheme iterativeGaussGrad

See merge request Development/openfoam!500
2021-12-08 11:05:43 +00:00
cac0bf856b TUT: skewnessCavity: new skewness test case 2021-12-08 11:05:06 +00:00
adf6869bba ENH: gradSchemes: new gradient scheme iterativeGaussGrad
A second-order gradient scheme using face-interpolation,
Gauss' theorem and iterative skew correction.

Minimal example by using system/fvSchemes:

  gradSchemes
  {
    grad(<term>) iterativeGauss <interpolation scheme> <number of iters>;
  }
2021-12-08 11:05:06 +00:00
563456087c STYLE: gradSchemes: modernise and clean up code 2021-12-08 11:05:06 +00:00
41b30af01a TUT: pisoFoam/RAS/cavity - updated FOreference 2021-12-08 10:00:46 +00:00
f6ccd77d8c BUG: sampledSets - ensure results are written on all procs 2021-12-07 21:09:14 +00:00
65bc8d1140 STYLE: remove local version of momentum::scopedName
BUG: incorrect return for unscoped functionObject name
2021-12-07 15:48:19 +01:00
b25e1486de CONFIG: adjust paraview libs, intelmpi handling
- fix overly aggressive match in the API value

- allow `INTELMPI*` generic value, this can be used to specify something
  like INTELMPI_custom and populate the corresponding wmake rule
  manually

STYLE: mention FOAM_BUILDROOT in wmake -help-full output

STYLE: adjust openfoam shell session welcome information

- adjust internal variable names to reduce collision potential

- improve handling of openfoam -etc=...
2021-12-07 15:22:32 +01:00
810d0c72ee Merge branch 'feature-sampled-sets-extension' into 'develop'
sampledSets - enable writer construction from dictionary; glTF export

See merge request Development/openfoam!503
2021-12-06 13:14:09 +00:00
34b4770949 TUT: Added glTF export example for field and track data 2021-12-06 12:26:49 +01:00
85b405206d ENH: Added new glTF sammpled set writer
Description
    Writes point data in glTF v2 format

    Two files are generated:
    - filename.bin  : a binary file containing all scene entities
    - filename.gltf : a JSON file that ties fields to the binary data

    The output can contain both geometry and fields, with additional support
    for colours using a user-supplied colour map, and animation of particle
    tracks.

    Controls are provided via the optional formatOptions dictionary.

    For non-particle track data:

    \verbatim
    formatOptions
    {
        // Apply colours flag (yes | no ) [optional]
        colours     yes;

        // List of options per field
        fieldInfo
        {
            p
            {
                // Colour map [optional]
                colourMap       <colourMap>;

                // Colour map minimum and maximum limits [optional]
                // Uses field min and max if not specified
                min             0;
                max             1;

                // Alpha channel [optional] (uniform | field)
                alpha           uniform;
                alphaValue      0.5;

                //alpha           field;
                //alphaField      T;
                //normalise       yes;
            }
        }
    }
    \verbatim

    For particle tracks:

    \verbatim
    formatOptions
    {
        // Apply colours flag (yes | no) [optional]
        colours     yes;

        // Animate tracks (yes | no) [optional]
        animate     yes;

        // Animation properties [optional]
        animationInfo
        {
            // Colour map [optional]
            colourMap       <colourMap>;

            // Colour [optional] (uniform | field)
            colour          uniform;
            colourValue     (1 0 0); // RGB in range [0-1]

            //colour          field;
            //colourField     d;

            // Colour map minimum and maximum limits [optional]
            // Note: for colour = field option
            // Uses field min and max if not specified
            min             0;
            max             1;

            // Alpha channel [optional] (uniform | field)
            alpha           uniform;
            alphaValue      0.5;

            //alpha           field;
            //alphaField      T;
            //normalise       yes;
        }
    }
    \endverbatim

Note
    When writing particle animations, the particle field and colour properties
    correspond to initial particle state (first data point) and cannot be
    animated (limitation of the file format).

    For more information on the specification see
    https://www.khronos.org/registry/glTF/
2021-12-06 12:26:49 +01:00
0f155daf86 ENH: particleTracks - updated to include field data
The utility will now add field data to all tracks (previous version only
created the geometry)

The new 'fields' entry can be used to output specific fields.

Example

    cloud           reactingCloud1;

    sampleFrequency 1;

    maxPositions    1000000;

    fields          (d U); // includes wildcard support

STYLE: minor typo fix
2021-12-06 12:26:49 +01:00
98c25d163a ENH: sampledSets - enable writer construction from dictionary
Users can now include additional controls via a new formatOptions dictionary.
2021-12-06 12:26:48 +01:00
e5267bf81d ENH: sampledSetWriters - updated writing of particle tracks 2021-12-06 12:26:48 +01:00
79fafda22c ENH: Cloud - added function to read cloud fields from disk to obr 2021-12-06 12:26:48 +01:00
f5f93e81d8 COMP: temperatureCoupledBase: make API consistent. Fixes #2287. 2021-12-06 10:54:43 +00:00
29f7fcc515 COMP: workaround clang-13 optimization issue (vtk handling) 2021-12-03 21:23:44 +01:00
9a5125111e ENH: add coded Function1 (#2282)
- update coded templates with qualified names

GIT: add in missing PatchFunction1 constant() method

- was missed in a previous commit
2021-12-03 20:56:10 +01:00
8624d65c5a ENH: support alternative build-root location (#2286)
- specify any of these

    ./Allwmake -build-root=...
    wmake -build-root=...
    FOAM_BUILDROOT=... wmake

  these specify an alternative root where build artifacts are to land.
  Currently only used as an alternative for the 'build/' hierarchy
  since the 'platforms/' target normally includes inputs as well.

  Possible use:
  ```
  (
      export WM_MPLIB="%{foam_mplib}"
      export FOAM_MPI="%{foam_mpi}"
      export MPI_ARCH_PATH="%{mpi_prefix}"

      export FOAM_BUILDROOT=/tmp/mpibuild
      export FOAM_MPI_LIBBIN="$FOAM_BUILDROOT/platforms/$WM_OPTIONS/lib/$FOAM_MPI"

      src/Pstream/Allwmake-mpi
   )
   ```
2021-12-03 17:10:22 +01:00
27e57c29f7 BUG: dangling dictionary reference for expression BCs
- exposed by the new embedded function handling.

  Requires local copies of dictionary content instead
  (similar to coded BCs handling)

BUG: incorrect formatting for expression function output

ENH: simpler copyDict version taking wordList instead of wordRes

- corresponds to the most common use case at the moment

ENH: expression string writeEntry method

- write as verbatim for better readability
2021-12-03 17:10:22 +01:00
e09298092d ENH: support negated regular expressions (#2283)
- extendes the prefix syntax to handle '!' values.

  For example,  "(?!).*processor.*" or "(?!i)inlet.*"
2021-12-03 17:10:22 +01:00
49e26dd7d2 ENH: consistent specification of fan conditions (fixes #2279) 2021-12-03 17:10:22 +01:00
31a7c2a9cd ENH: initial use of ReactionTable to wrap information 2021-12-03 17:10:22 +01:00
c7f30a0989 STYLE: use Hash<word> instead of string::hasher for runTimeSelectionTables 2021-12-03 15:55:19 +01:00
bdf77bbdd1 ENH: simplify hashing overloads of string-types
- this revises the changes made in 95cd8ee75c to replace the
  SFINAE-type of handling of string hashes with direct definitions.

  This places a bit more burden on the developer if creating hashable
  classes derived from std::string or variants of Foam::string, but
  improves reliability when linking.

STYLE: drop template key defaulting from HashSet

- this was never used and `HashSet<>` is much less transparent
  than writing `HashSet<word>` or `wordHashSet`
2021-12-03 15:55:19 +01:00
939c335504 INT: liquidProperties: support for user defined liquid properties (#2141)
- Generic thermophysical properties class for a liquid in which the
  functions and coefficients for each property are run-time selected.

  Code adapted from openfoam.org
2021-12-03 15:54:48 +01:00
e9054ec636 COMP: consistent FatalError/FatalIOError exit types
STYLE: hostName() is short name, don't need parameter
2021-12-03 15:32:37 +01:00
ed5dee71a4 BUG: ccm region merge fails (fixes #2048)
- had lookups into the merge-point map instead of
  determining/remapping the duplicate points directly.
  The result was a jumble of face/point addressing.

STYLE: additional debug/verbosity comment for mergePoints
2021-12-03 15:32:37 +01:00
e6f4ae927a LINT: script not marked as bash-specific
CONFIG: cleanup additional build-related env variables
2021-12-03 15:32:37 +01:00
8ed6a61106 CONFIG: set API level to 2109
- Function1, sampledSets, expressions, runTime selection tables
2021-12-03 15:32:37 +01:00
78cc5f8676 SUBMODULE: entries marked as removable, compilation fixes 2021-12-03 15:32:37 +01:00
f7c7fa94a3 ENH: add Function1 constant() member
- marks if the value is considered to be independent of 'x'.
  Propagate into PatchFunction1 instead ad hoc checks there.

- adjust method name in PatchFunction1 to 'whichDb()' to reflect
  final changes in Function1 method names.

ENH: add a Function1 'none' placeholder function

- This is principally useful for interfaces that expect a Function1
  but where it is not necessarily used by a particular submodel.

TUT: update Function1 creation to use objectRegistry
2021-12-03 15:32:37 +01:00
b96cef1339 ENH: [sampled]DistanceSurface - added construct from searchableSurface 2021-12-03 13:48:34 +00:00
9cf26ac7c5 BUG: InjectionModel::findCellAtPosition - celli can be zero 2021-12-03 13:48:34 +00:00
9833e614da BUG: surfaceAlignedSBRStressFvMotionSolver - corrected units (see #2265)
Note - this resolves the reported dimensions error, but it is not clear
if this code (has ever?) run or if this change is appropriate...
2021-12-03 13:48:34 +00:00
6aa608cf33 ENH: MRF - exposed origin and axis; added lookup from name 2021-12-03 13:48:33 +00:00
53e9c8eb5a ENH: forces|Coeffs FO - updated coordinate system 2021-12-03 13:48:33 +00:00
8fc4501c46 Merge branch 'feature-turbulentTemperature_Function1' into 'develop'
ENH: coupling BC: allow Function1. Fixes #2277.

See merge request Development/openfoam!507
2021-12-02 18:03:17 +00:00
29c70e9bbb ENH: coupling BC: allow Function1. Fixes #2277. 2021-12-02 18:03:16 +00:00
6abbcb3eac BUG: GAMG: processorAgglomerator crashes. Fixes #2281.
Problem was extending the storage, copying the
original contents.
2021-11-29 14:44:24 +00:00