Commit Graph

25527 Commits

Author SHA1 Message Date
Mark Olesen
500c7047b2 TUT: remove superfluous 'sourceInfo' (topo sets)
- update annotated dicts, remove tabs

- use point1/point2 for cylinder sources
2022-05-27 14:10:31 +02:00
Mark Olesen
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
Mark Olesen
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
Mark Olesen
f00f236cb3 STYLE: use zero-gradient for cellDist field (reconstructParMesh)
- consistent with what decomposePar and redistributePar create
2022-05-27 14:10:31 +02:00
Mark Olesen
61f2f179a6 COMP: mismatch return value for fvMesh::checkImplicit - now return bool 2022-05-27 14:10:31 +02:00
Andrew Heather
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
Kutalmis Bercin
d8f0858a0b TUT: cavity: add an example for the norm function object 2022-05-27 12:51:51 +01:00
Kutalmis Bercin
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
Kutalmis Bercin
77ab7510a8 ENH: dimensionedScalar: add stabilise function 2022-05-27 12:51:51 +01:00
Andrew Heather
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
sergio
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
sergio
cb4930d81f ENH: Changing implicit lduAssembly name. 2022-05-26 14:20:54 -07:00
Sergio Ferraris
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
Andrew Heather
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
Andrew Heather
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
mattijs
34ef9ae342 ENH: controlDict: include missing library.
With libs it can run with disallowGeneric
2022-05-25 15:31:39 +01:00
Andrew Heather
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
mattijs
d58b811030 ENH: TUT: misspelled patch name
(happened to fall back to the 'empty' boundary condition)
2022-05-25 13:12:38 +00:00
mattijs
69db18138d TUT: Cs: use PBiCGStab for tight tolerance 2022-05-25 13:12:38 +00:00
Mark Olesen
cc1e6c12bb ENH: redistributePar support for finiteArea (#2436) 2022-05-25 13:12:38 +00:00
Mark Olesen
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
mattijs
f976a02bd0 ENH: redistributePar - add support for pointFields (#2436) 2022-05-25 13:12:38 +00:00
Mark Olesen
4c5c15664e ENH: faMeshDistributor for handling redistribution of finiteArea (#2436) 2022-05-25 13:12:38 +00:00
Mark Olesen
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
Mark Olesen
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
mattijs
eccc998ed2 ENH: solidFoam: cleanup of sample case 2022-05-24 12:43:06 +01:00
Andrew Heather
4f4d333539 TUT: liquidFilmFoam - corrected cylinder h boundary condition 2022-05-23 09:42:42 +01:00
mattijs
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
mattijs
daca02dfd1 BUG: snappyHexMesh: unset moving flag. Fixes #2477 2022-05-20 17:11:25 +01:00
Tom Chen
ee6c241b69 BUG: atmBoundaryLayer: replace global groundMin with local min (fixes #2471) 2022-05-20 10:05:23 +01:00
Mattijs Janssens
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
Andrew Heather
b6390c2b75 COMP: resolved compiler warning 2022-05-19 15:48:31 +00:00
mattijs
3a8a7cc6d4 ENH: snappyHexMesh: remove any left-over mesh data before topo change 2022-05-19 15:48:31 +00:00
Andrew Heather
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
Andrew Heather
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
Andrew Heather
2493102044 ENH: added updateMesh(mpm) callback for surfaceInterpolation/fvGeometryScheme 2022-05-19 15:48:31 +00:00
Andrew Heather
823641ab9b ENH: refactored mesh movePoints to enable meshPhi update in the fvGeometryScheme 2022-05-19 15:48:31 +00:00
Andrew Heather
5a1307f41a STYLE: Code clean-up 2022-05-19 15:48:31 +00:00
Andrew Heather
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
Andrew Heather
ef14a415a9 ENH: ListOps - added uniqueSort function 2022-05-19 15:48:31 +00:00
Andrew Heather
053727d2d9 ENH: Enable Time objects for writeObjects FO 2022-05-19 15:48:31 +00:00
Andrew Heather
73d6fc9e91 ENH: Added profiling for dynamic mesh updates 2022-05-19 15:48:31 +00:00
mattijs
6e644a1e8b ENH: solidFoam: energyCoupling tests 2022-05-19 14:28:45 +01:00
Andrew Heather
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
Kutalmis Bercin
eb55af49dc ENH: sixDoFRigidBodyMotion: add new softWall restraint 2022-05-19 11:48:36 +01:00
Andrew Heather
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
Kutalmis Bercin
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
Kutalmis Bercin
5bcf9b7997 ENH: effectivenessHeatExchangerSource: add secondaryOutletT functionality 2022-05-18 16:07:25 +00:00
Kutalmis Bercin
9118ffb31e ENH: effectivenessHeatExchangerSource: add writeFile functionality 2022-05-18 16:07:25 +00:00
Andrew Heather
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