Commit Graph

25525 Commits

Author SHA1 Message Date
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
f00f236cb3 STYLE: use zero-gradient for cellDist field (reconstructParMesh)
- consistent with what decomposePar and redistributePar create
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
5e3295e596 Merge branch 'feature-norm-function-object' into 'develop'
ENH: norm: add new field function object

See merge request Development/openfoam!539
2022-05-27 11:58:43 +00:00
d8f0858a0b TUT: cavity: add an example for the norm function object 2022-05-27 12:51:51 +01: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
293df98df9 Merge branch 'feature-lagrangian-dose-FO' into 'develop'
Adding external heat to greyDiffusive BC and new Doses FO

See merge request Development/openfoam!543
2022-05-27 09:15:35 +00: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
c6d9c0317d Merge branch 'feature-function-objects-2206' into 'develop'
New function objects

See merge request Development/openfoam!541
2022-05-25 23:18:20 +00: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
34ef9ae342 ENH: controlDict: include missing library.
With libs it can run with disallowGeneric
2022-05-25 15:31:39 +01:00
50d99578b7 Merge branch 'feature-redistributePar' into 'develop'
redistributePar support for point fields and area fields

See merge request Development/openfoam!538
2022-05-25 13:13:03 +00:00
d58b811030 ENH: TUT: misspelled patch name
(happened to fall back to the 'empty' boundary condition)
2022-05-25 13:12:38 +00:00
69db18138d TUT: Cs: use PBiCGStab for tight tolerance 2022-05-25 13:12:38 +00:00
cc1e6c12bb ENH: redistributePar support for finiteArea (#2436) 2022-05-25 13:12:38 +00:00
6644cf8ddb ENH: cleanup/reorganize parts of redistributePar
- separate out lagrangian routines etc

- align names with regular decompose/reconstruct methods
2022-05-25 13:12:38 +00:00
f976a02bd0 ENH: redistributePar - add support for pointFields (#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
eccc998ed2 ENH: solidFoam: cleanup of sample case 2022-05-24 12:43:06 +01:00
4f4d333539 TUT: liquidFilmFoam - corrected cylinder h boundary condition 2022-05-23 09:42:42 +01: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
a11b5f2310 Merge branch 'feature-solid-body-mesh-motion-optimisation' into 'develop'
New solid body motion mesh update optimisations

See merge request Development/openfoam!537
2022-05-19 16:19:47 +00: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
6e644a1e8b ENH: solidFoam: energyCoupling tests 2022-05-19 14:28:45 +01:00
468f0a028a Merge branch 'feature-soft-wall-in-sixdof' into 'develop'
ENH: sixDoFRigidBodyMotion: add new softWall restraint

See merge request Development/openfoam!536
2022-05-19 10:58:40 +00:00
eb55af49dc ENH: sixDoFRigidBodyMotion: add new softWall restraint 2022-05-19 11:48:36 +01:00
da4827d7d2 Merge branch 'feature-extension-effectivenessHeatExchangerSource' into 'develop'
ENH: effectivenessHeatExchangerSource: add writeFile functionality

See merge request Development/openfoam!534
2022-05-18 16:08:05 +00: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
796715b029 Merge branch 'issue-1457-refcast' into 'develop'
ENH: Improve the handling of wall-function coefficients and blenders

See merge request Development/openfoam!486
2022-05-18 16:05:20 +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