Commit Graph

17013 Commits

Author SHA1 Message Date
b7a1975ecd BUG: PlessisMasliyahDragForce: remove redundant CdRe function 2022-05-30 09:06:07 +01:00
96cc6024c0 ENH: handle uniform Su/Sp/SuSp source terms directly
- avoid any operations for zero sources

- explicit sources are applied to the entire mesh can be added directly,
  without an intermediate DimensionedField

- update some legacy faMatrix/fvMatrix methods that used Istream
  instead of dictionary or dimensionSet for their parameters.
  Simplify handling of tmps.

- align faMatrix methods with the updated their fvMatrix counterparts
  (eg, DimensionedField instead of GeometricField for sources)
2022-05-29 20:39:34 +02:00
21234ae296 ENH: support zip/unzip rows of symmTensor (#2487)
- was previously only implemented for tensor
2022-05-27 17:58:37 +02:00
082a0e687a ENH: support zone group selection for volRegion function objects 2022-05-27 17:50:29 +02:00
5461001d05 ENH: retain wordRe zone matching for porosity models
- parameter passing previously stripped it down to 'word' instead of
  'wordRe'
2022-05-27 15:52:21 +02:00
937b4898ae ENH: geometric selection mode for cellSetOption
- similar to the geometric decomposition constraint,
  allows a compositing selection of cells based on topoSet sources
  which also include various searchableSurface mechanisms.

  This makes for potentially easier placement of sources without
  resorting to defining a cellSet.

ENH: support zone group selection for fv::cellSetOption and fa::faceSetOption
2022-05-27 15:40:39 +02:00
f0f893c4b8 ENH: support multi-zone motion (#2484)
- select motion for the entire mesh, or restrict to a subset
  of points based on a specified cellSet or cellZone(s).

  Can now combine cellSet and cellZone specifications
  (uses an 'or' combination).

- move consistent use of keyType and wordRe to allow regex selection,
  possibly using zone groups

STYLE: remove duplicate code in solidBodyMotionSolver
2022-05-27 15:35:25 +02:00
525db80889 BUG: zones inGroup entry not read from dictionary (fixes #2485)
ENH: add ZoneMesh groupNames method
2022-05-27 15:33:28 +02:00
0efa5f062a ENH: DimensionedFields::New static constructors 2022-05-27 14:15:12 +02:00
93dcf732dd COMP: make ZeroConstant clonable 2022-05-27 14:15:03 +02:00
832fbd954f ENH: simplify code for searchableSurface topo sources
- shorter lookup names for more consistency

ENH: accept point1/point2 as alternative to p1/p2 for sources

- better alignment with searchable specification

- refactor so that cylinderAnnulus sources derive directly from
  cylinder sources (which handle an annulus as well).
  Accept radius or outerRadius as synonyms.

STYLE: noexcept on topoBitSet access methods

DOC: update description for geometricConstraint
2022-05-27 14:10:31 +02:00
ba10afea77 ENH: add 'filtered' polyMesh regionName() method
- in various situations with mesh regions it is also useful to
  filter out or remove the defaultRegion name (ie, "region0").

  Can now do that conveniently from the polyMesh itself or as a static
  function. Simply use this

      const word& regionDir = polyMesh::regionName(regionName);

  OR  mesh.regionName()

  instead of

      const word& regionDir =
      (
           regionName != polyMesh::defaultRegion
         ? regionName
         : word::null
      );

  Additionally, since the string '/' join operator filters out empty
  strings, the following will work correctly:

      (polyMesh::regionName(regionName)/polyMesh::meshSubDir)

      (mesh.regionName()/polyMesh::meshSubDir)
2022-05-27 14:10:31 +02:00
61f2f179a6 COMP: mismatch return value for fvMesh::checkImplicit - now return bool 2022-05-27 14:10:31 +02:00
14c8c312e8 ENH: norm: add new field function object
The 'norm' function object normalises an input field
with a chosen norm, and outputs a new normalised field.
2022-05-27 12:51:51 +01:00
77ab7510a8 ENH: dimensionedScalar: add stabilise function 2022-05-27 12:51:51 +01:00
e022e522ba ENH: Adding external heat to greyDiffusive BC and new ParticleDose FO
DOC: greyDiffusiveRadiationMixed: improve header documentation
2022-05-27 09:15:07 +00:00
cb4930d81f ENH: Changing implicit lduAssembly name. 2022-05-26 14:20:54 -07:00
5cb0dc9d8a ENH: Added new particleZoneInfo cloud function object.
Reports cloud information for particles passing through a specified cell
zone.

Example usage:

    cloudFunctions
    {
        particleZoneInfo1
        {
            type            particleZoneInfo;
            cellZone        leftFluid;

            // Optional entries
            //writer          vtk;
        }
    }

Results are written to file:
- \<case\>/postProcessing/lagrangian/\<cloudName\>/\<functionName\>/\<time\>

    \# cellZone        : leftFluid
    \# time            : 1.0000000000e+00
    \#
    \# origID    origProc    (x y z)    time0    age    d0    d    mass0    mass

Where
- origID : particle ID
- origProc : processor ID
- (x y z) : Cartesian co-ordinates
- time0 : time particle enters the cellZone
- age : time spent in the cellZone
- d0 : diameter on entry to the cellZone
- d : current diameter
- mass0 : mass on entry to the cellZone
- mass : current mass

If the optional \c writer entry is supplied, cloud data is written in the
specified format.

During the run, output statistics are reported after the cloud solution,
e.g.:

    particleZoneInfo:
        Cell zone                       = leftFluid
        Contributions                   = 257

Here, 'Contributions' refers to the number of incremental particle-move
contributions recorded during this time step. At write times, the output
is extended, e.g.:

    particleZoneInfo:
        Cell zone                       = leftFluid
        Contributions                   = 822
        Number of particles             = 199
        Written data to "postProcessing/lagrangian/reactingCloud1/

TUT: filter: add an example for the particleZoneInfo function object
2022-05-25 23:17:57 +00:00
8d90b16518 ENH: multiFieldValue - extended to operate on general function objects
- Previously, the multiFieldValue function object was limited to operate on
  lists of fieldValue function objects.
- Any function objects that generate results can now be used, e.g.

pressureAverage
{
    type    multiFieldValue;
    libs    (fieldFunctionObjects);

    operation   average;

    functions
    {
        inlet
        {
            type            surfaceFieldValue;
            operation       areaAverage;
            regionType      patch;
            name            inlet;
            fields          (p);

            writeFields     no;
            writeToFile     no;
            log             no;
            resultFields    (areaAverage(inlet,p));
        }
        outlet
        {
            type            surfaceFieldValue;
            operation       areaAverage;
            regionType      patch;
            name            outlet;
            fields          (p);

            writeFields     no;
            writeToFile     no;
            log             no;
        }
        average
        {
            type            valueAverage;
            functionObject  testSample1;
            fields          (average(p));

            writeToFile     no;
            log             no;
        }
    }
}

TUT: cavity: add an example for the multiFieldValue function object
2022-05-25 23:17:57 +00:00
cc1e6c12bb ENH: redistributePar support for finiteArea (#2436) 2022-05-25 13:12:38 +00:00
4c5c15664e ENH: faMeshDistributor for handling redistribution of finiteArea (#2436) 2022-05-25 13:12:38 +00:00
15535b8970 ENH: mapDistributeBase compaction based on a subset of elements (#2436)
- now have both compactData(),compactLocalData(), compactRemoteData()
  depending on where the compaction information is actually known.

  The compactData() performs a consistent union of local and remote
  values, which eliminates the danger of mapping to non-existent
  locations but does require a double communication to setup.
  Typically needed for point maps (for example).

  The compactLocalData() and compactRemoteData() work on the
  assumption that the source or target values are sufficent for
  creating unique compact maps.

  Can be used, for example, when compacting cell maps since there is
  no possibility of a source cell being represented on different
  target processors (ie, each cell is unique and only occurs once).

  The existing compact() is equivalent to compactRemoteData()
  and is now simply a redirect.

- use bitSet for defining compaction, but the existing compact()
  continues to use a boolList (for code compatibility).

BUG: compaction in non-parallel mode didn't compact anything.

STYLE: compact ascii output for procAddressing
2022-05-25 13:12:38 +00:00
3b6761afed ENH: code modernization for decompose/reconstruct
- simplify procAddressing read/write

- avoid accessing points in faMeshReconstructor.
  Can rely on the patch meshPoints (labelList), which does not need
  access to a pointField

- report number of points on decomposed mesh.
  Can be useful additional information.
  Additional statistics for finite area decomposition

- provide bundled reconstructAllFields for various reconstructors

- remove reconstructPar checks for very old face addressing
  (from foam2.0 - ie, older than OpenFOAM itself)

- bundle all reading into fieldsDistributor tools,
  where it can be reused by various utilities as required.

- combine decomposition fields as respective fieldsCache
  which eliminates most of the clutter from decomposePar
  and similfies reuse in the future.

STYLE: remove old wordHashSet selection (deprecated in 2018)

BUG: incorrect face flip handling for faMeshReconstructor

- a latent bug which is not yet triggered since the faMesh faces are
  currently only definable on boundary faces (which never flip)
2022-05-25 13:12:38 +00:00
e7fbb7e557 BUG: snappyHexMesh: unset moving flag. Fixes #2477
We want to use movePoints to update all the geometry
but do not want to have a meshPhi
2022-05-20 17:35:04 +01:00
daca02dfd1 BUG: snappyHexMesh: unset moving flag. Fixes #2477 2022-05-20 17:11:25 +01:00
ee6c241b69 BUG: atmBoundaryLayer: replace global groundMin with local min (fixes #2471) 2022-05-20 10:05:23 +01:00
b6390c2b75 COMP: resolved compiler warning 2022-05-19 15:48:31 +00:00
3a8a7cc6d4 ENH: snappyHexMesh: remove any left-over mesh data before topo change 2022-05-19 15:48:31 +00:00
6a8ddbb296 ENH: Added new solidBodyFvGeometryScheme
Geometry calculation scheme that performs geometry updates only in regions
where the mesh has changed, identified by comparing current and old points.

Example usage in fvSchemes:

    geometry
    {
        type            solidBody;

        // Optional entries

        // If set to false, update the entire mesh
        partialUpdate   yes;

        // Cache the motion addressing (changed points, faces, cells etc)
        cacheMotion     yes;
    }
2022-05-19 15:48:31 +00:00
f1dfaa90a7 ENH: Updated cyclicACMIPolyPatch following changes to geometry updates
The cell volumes are no longer deleted if already present; instead, cells
next to the patch are updated locally.
2022-05-19 15:48:31 +00:00
2493102044 ENH: added updateMesh(mpm) callback for surfaceInterpolation/fvGeometryScheme 2022-05-19 15:48:31 +00:00
823641ab9b ENH: refactored mesh movePoints to enable meshPhi update in the fvGeometryScheme 2022-05-19 15:48:31 +00:00
5a1307f41a STYLE: Code clean-up 2022-05-19 15:48:31 +00:00
0dc1faa2be ENH: primitiveMeshTools - added partial geometry update functions
Added new functions:
- updateFaceCentresAndAreas : update faces in faceIDs list
- updateCellCentresAndVols  : update cells in cellIDs list
2022-05-19 15:48:31 +00:00
ef14a415a9 ENH: ListOps - added uniqueSort function 2022-05-19 15:48:31 +00:00
053727d2d9 ENH: Enable Time objects for writeObjects FO 2022-05-19 15:48:31 +00:00
73d6fc9e91 ENH: Added profiling for dynamic mesh updates 2022-05-19 15:48:31 +00:00
eb55af49dc ENH: sixDoFRigidBodyMotion: add new softWall restraint 2022-05-19 11:48:36 +01:00
a2959b7586 STYLE: effectivenessHeatExchangerSource: modernise code
- removed redundant protected scope
- removed undefined 'calculateTotalArea' function
- reordered the constructor list

DOC: effectivenessHeatExchangerSource: improve header documentation
2022-05-18 16:07:25 +00:00
5bcf9b7997 ENH: effectivenessHeatExchangerSource: add secondaryOutletT functionality 2022-05-18 16:07:25 +00:00
9118ffb31e ENH: effectivenessHeatExchangerSource: add writeFile functionality 2022-05-18 16:07:25 +00:00
b2610f19db ENH: wall functions: remove redundant and inconsistent virtual specifiers 2022-05-18 16:07:56 +01:00
e2a1076129 STYLE: wall functions: use more modern coding practices
The most frequent changes have been as follows.

from:

    tmp<scalarField> tuTau(new scalarField(patch().size(), Zero));
    scalarField& uTau = tuTau.ref();

to:

    auto tuTau = tmp<scalarField>::New(patch().size(), Zero);
    auto& uTau = tuTau.ref();

- Other changes involved the addition of - wherever approapriate -:

    const
    noexcept
    auto
2022-05-18 16:07:56 +01:00
dcfbdd2cad DOC: wall functions: update header-file documentation 2022-05-18 16:07:56 +01:00
876fc94bc8 ENH: wall functions: new class for wall-function blending methods 2022-05-18 16:07:53 +01:00
c7836f9d83 BUG: nutWallFunction: prevent casting errors (fixes #1457, #1966)
Previously, a nutWallFunctionFvPatchScalarField ref should be
created in epsilon, k, and omega wall functions to fetch various
common wall-function coefficients necessary to carry out and complete
local operations inside these wall functions.

However, this arrangement required the use of a nut wall function,
even when unnecessary, when any of non-nut wall functions are being used.
Therefore, some users had been redundantly restrained and
obstructed with rather obscure casting-error messages.

Also, the wall-function coefficients Cmu, kappa and E have been obtained
from the specified nutWallFunction in order to ensure that each patch
possesses the same set of values for these coefficients.

Although the motivation sounds reasonable, it has also been putting redundant
restraints on users and disregarding the specifics of each wall-function.
For example, the variation of epsilon in near-wall regions is usually very
steep and non-monotonic specific - an expert user may therefore want to use
an epsilon-specific coefficient, and this was not allowed by the previous
arrangement.

This commit introduces a new class (i.e. wallFunctionCoefficients) comprising
all common wall-function coefficients and yPlus calculations.
2022-05-18 14:54:26 +01:00
486be34631 BUG: wall functions: ensure consistent writing of traits
Previously, a number of wall functions were not not writing
their boundary-condition entries in the defacto order
(i.e. from type to value) while writing a field. For example:

    <patchName>
    {
        lowReCorrection 1;
        blending    stepwise;
        n           2;
        type        epsilonWallFunction; <!-- expected to be the first entry
        value       uniform 1;           <!-- expected to be the last entry
    }

Also, various wall functions have been writing out entries that
have not been being used by the wall function. For example:

    <patchName>
    {
        type        nutUSpaldingWallFunction;
        ...
        blending    stepwise;     <!-- no blending treatment in nutUSpaldingWF
        ...
    }

Additionally, various derived wall functions (e.g. atmOmegaWallFunction)
have been failing to write some of the inherited entries even though
these entries have been being used in carrying out wall-function calculations.

Taken these into consideration, wall functions have been reworked to obtain
reliable and consistent way of writing their traits while writing out a field.

- writeLocalEntries uses writeIfDifferent if constructed with getOrDefault.
2022-05-18 14:54:22 +01:00
6f4196ae62 BUG: totalFlowRateAdvectiveDiffusive: missing autoMap. Fixes #2475 2022-05-18 12:19:33 +01:00
06b353f8cd ENH: add faMeshTools for new/load mesh, proc addressing etc
ENH: simple faMeshSubset (zero-sized meshes only)

ENH: additional access methods for faMesh, primitive geometry mode

- wrapped walking of boundary edgeLabels as list of list
  (similar to edgeFaces).

- primitive finiteArea geometry mode with reduced communication:
  primarily interesting for decomposition/redistribution (#2436)

ENH: extra vtk debug outputs for checkFaMesh

- report per-processor sizes in the mesh summary
2022-05-17 17:36:34 +02:00
68b692fdfc ENH: combine loadOrCreateMesh from redistributePar into fvMeshTools.
- similar functionality as newMesh etc.
  Relocated to finiteVolume since there are no dynamicMesh dependencies.

- use simpler procAddressing (with updated mapDistributeBase).
  separated from redistributePar
2022-05-17 17:35:51 +02:00