Commit Graph

26045 Commits

Author SHA1 Message Date
Andrew Heather
9c9088f191 ENH: CloudSubModelBase - added info() function to set log flag 2022-12-09 11:01:06 +01:00
Andrew Heather
1f393aefa8 ENH: subModelBase - added log data member 2022-12-09 11:01:06 +01:00
Andrew Heather
b94bf625a5 ENH: cloudSolution - added log/Info output control 2022-12-09 11:01:06 +01:00
Andrew Heather
161fab8d60 COMP: messageStream - use this->log 2022-12-09 11:01:06 +01:00
Mark Olesen
8afd6ff729 ENH: support format readOptions for surfaceReader types (#2609)
- similar to surface writing formats, also support optional
  dictionary of reading options. The main beneficiary of this is the
  ensight surface reader:

  readOptions
  {
      ensight
      {
          masterOnly true;
      }
  }

  This will restrict reading to the master rank. Surfaces and values
  read will be broadcast to the other ranks, with the intention of
  reducing load on the filesystem.

ENH: add writing of Dimensioned fields for areaWrite functionObject

- can be useful for examining finite-area source terms
2022-12-09 10:59:36 +01:00
Mark Olesen
b69db76b67 ENH: bundle together freed/outstanding MPI request handling
- improve communicator wrapping
- avoid indexing errors when using partial subranks
- UPstream::is_subrank (for testing partial subranks)
2022-12-09 10:59:32 +01:00
Mark Olesen
d5e82f072e CONFIG: handle string splitting [zsh] (#2640) 2022-12-08 14:04:13 +01:00
Mark Olesen
a8b0ec0c4e STYLE: remove stray forward declaration 2022-12-08 14:04:13 +01:00
Andrew Heather
d7de6a2772 Merge branch 'feature-fvOptions-writeFile' into 'develop'
ENH: fvOptions: add writeFile functionality

See merge request Development/openfoam!577
2022-12-08 11:37:56 +00:00
Kutalmis Bercin
48f8680941 ENH: fvOptions: add writeFile functionality
- velocityDampingConstraint
- limitTemperature
- limitVelocity
2022-12-08 11:37:33 +00:00
Kutalmis Bercin
4c8fc9dc6e ENH: writeFile: add new flags to write/reset files 2022-12-08 11:37:33 +00:00
Andrew Heather
5844463ba4 Merge branch 'feature-evapotranspiration' into 'develop'
ENH: Evapotranspiration utilities

See merge request Development/openfoam!571
2022-12-08 11:36:28 +00:00
Kutalmis Bercin
9479ab98eb ENH: solarLoad: remove unused vertical-direction object
STYLE: solarLoad: replace uppercase index variables with lowercase
2022-12-08 11:35:39 +00:00
Kutalmis Bercin
c29e67e5e5 ENH: solarCalculator: consolidate diffuseSolarRad calculations 2022-12-08 11:35:39 +00:00
Kutalmis Bercin
eaffe4c2cf ENH: solarLoadBase: new base class to access various solar-load data 2022-12-08 11:35:39 +00:00
Kutalmis Bercin
0fde8ac91d ENH: faceShading: enable hit-face calculations for face zones
This change enables face zones creating shades and interacting with shades.

ENH: solarLoad: initialise hit faces in ctor level
2022-12-08 11:35:39 +00:00
mattijs
d0061d6f54 ENH: cellToFaceZone: new topoSetSource 2022-12-08 11:35:39 +00:00
mattijs
c439968390 ENH: cellToFace: new selection option 'outside'
The new selection option 'outside' can be used to select
faces with only one neighbour in the specified cellSet.
2022-12-08 11:35:39 +00:00
Kutalmis Bercin
5fb0cd77f1 ENH: atmopshericModels: avoid storing common fields in fvOptions 2022-12-08 11:35:39 +00:00
Kutalmis Bercin
b50591166e STYLE: rename atmospheric-field names, plantCd->Cd and leafAreaDensity->LAD 2022-12-08 11:35:39 +00:00
Andrew Heather
ce10cc54c2 Merge branch 'feature-newObjectiveFunctions' into 'develop'
ENH: new objective functions for adjoint-based optimisation

See merge request Development/openfoam!578
2022-12-08 11:16:21 +00:00
Vaggelis Papoutsis
599b009b18 TUT: tutorials for the new objective functions
TUT: moved the nutSqr objective tutorial to the proper directory
2022-12-08 11:15:26 +00:00
Vaggelis Papoutsis
80f385a3b0 ENH: added new objective functions
- flowRate: volume flow-rate through given patches
- flowRatePartition: distribution of the inlet flow-rate to certain
  outlet patches, with given percentages
- uniformityPatch: uniformity of the velocity field at given (outlet) patches,
  expressed as (half) the variance of the velocity field
- uniformityCellZone: same as uniformityPatch, but defined over
  cellZones
- powerDissipation: the fluid power dissipation taking place within
  given cellZones. In the absence of viscous stress at the "inlets" and
  "outlets" of the cellZones, this corresponds to the volume flow-rate
  weighted total pressure losses through the cellZones

ENH: updated nutSqr so it can be used with adjointkOmegaSST too
2022-12-08 11:15:26 +00:00
Vaggelis Papoutsis
8127ec6a05 ENH: added some auxiliary functions in objective
to help allocate pointers related to contributions to the adjoint
turbulence model PDEs, populate them and check the validity of the
cellZones provided for cellZone-based objectives
2022-12-08 11:15:26 +00:00
Vaggelis Papoutsis
c9a10055e8 ENH: adjointRASModel now also returns the Jacobian of nut w.r.t. U 2022-12-08 11:15:26 +00:00
Andrew Heather
9018c94b90 Merge branch 'feature-parallelFvGeometryScheme' into 'develop'
ENH: Added new parallelFvGeometryScheme

See merge request Development/openfoam!576
2022-12-08 11:14:30 +00:00
Mattijs Janssens
d6204acd0e ENH: Added new parallelFvGeometryScheme 2022-12-08 11:14:30 +00:00
mattijs
3e260b84db ENH: vanDriest: change calcInterval to updateInterval 2022-12-07 16:15:53 +00:00
Kutalmis Bercin
9fbe2ef0b3 ENH: leastSquaresFaVectors: use pseudo inverse instead of direct inverse 2022-12-07 13:17:32 +00:00
Kutalmis Bercin
9b379398c5 ENH: tensor-symmTensor: new pseudo-inverse function
REVERT: add heuristic handling of tensor-field inverses - simplify algorithm
2022-12-07 13:17:26 +00:00
Kutalmis Bercin
b50850de56 COMP: DiagonalMatrix: avoid clang's over-eager optimisation (fixes #2650) 2022-12-07 13:17:03 +00:00
Mark Olesen
3ab182b1ae STYLE: prefer std::unique_ptr instead of (aliased) Foam::unique_ptr 2022-12-01 16:40:52 +00:00
Mark Olesen
3151dacccc ENH: include <algorithm> in stdFoam.H
- was already included in many places (via UList.C templates), but now
  formalise by placing in stdFoam.H
2022-12-01 15:52:48 +00:00
Mark Olesen
8ae2e5a969 ENH: fail-safe access of ITstream tokens as front(), back()
- more standard naming than peekFront() etc
2022-12-01 14:51:19 +00:00
Mark Olesen
bbd6bfbb7f ENH: additional 'other' category for profilingPstream
- eg, for user MPI operations that are to be tracked separately
2022-12-01 14:51:19 +00:00
Mark Olesen
8d4e32da22 COMP: fixup test applications 2022-12-01 14:51:19 +00:00
Andrew Heather
f9191b9377 Merge branch 'feature-fa-Brun-dripping-film-injection' into 'develop'
ENH: Brun dripping film injection

See merge request Development/openfoam!580
2022-12-01 13:58:33 +00:00
Andrew Heather
59811983db ENH: BrunDrippingInjection: new injection model for liquid films 2022-12-01 13:56:39 +00:00
Andrew Heather
dff4c3da05 ENH: limitHeight: new faOption to limit film height 2022-12-01 13:55:27 +00:00
Andrew Heather
e60d0997e6 Merge branch 'feature-conditional-absorption-kinematic-film' into 'develop'
ENH: KinematicSurfaceFilm: add option to specify interacting parcel types

See merge request Development/openfoam!581
2022-12-01 12:52:05 +00:00
Andrew Heather
ea44944037 ENH: KinematicSurfaceFilm: add option to specify interacting parcel types
This pack adds a new entry 'parcelTypes' which can specify the list of
parcel type IDs interacting with a surface film. If the entry
is omitted, all particle types are considered.

```
    surfaceFilmModel kinematicSurfaceFilm;

    kinematicSurfaceFilmCoeffs
    {
        interactionType absorb;

        // Optional list of participating parcel IDs
        parcelTypes     (10);
    }
```

To set the parcel type by injector, 'injectorID' entry can be used
when specifying the injector models, e.g.

```
injectionModels
{
    model1
    {
        type            <injectionModelType>;

        // Optional injector ID
        // - if ommitted, parcels use '-1'
        injectorID      10;

        ...
    }
}
```
2022-12-01 12:47:40 +00:00
Andrew Heather
4a01979fa8 Merge branch 'feature-fa-interpolation-scheme' into 'develop'
ENH: leastSquaresEdgeInterpolation: new edge interpolation method

See merge request Development/openfoam!575
2022-12-01 12:24:44 +00:00
Kutalmis Bercin
689b2ab2a9 ENH: leastSquaresEdgeInterpolation: new edge interpolation method 2022-12-01 12:24:27 +00:00
Andrew Heather
fbd14e42a2 Merge branch 'update-Pstream-comms-fileHandler' into 'develop'
Cleaner separation global/local/self communication, cleaner responsibility for fileHandler ownership

See merge request Development/openfoam!582
2022-12-01 12:18:50 +00:00
Mark Olesen
9711b7f1b9 ENH: more consistent single-ownership when swapping fileHandlers
- make fileHandler deletion mechanism more
  transparent by providing a nullptr signature. A nullptr parameter
  is already being used in the argList destructor for shutdown, but that
  relied on an implicit conversion to autoPtr to trigger things.

- improved handling of file handler replacement.

  Previously had a very basic check on old vs new handlers using their
  type() values (string comparison!!), which would unfortunately
  prevent proper swapping of the contents.
  Check the actual pointers instead.

  As part of the change, treat any empty autoPtr as no-op instead of as
  deletion (which is handled explicitly as nullptr instead).

  In addition to making the internal logic simpler, it means that the
  current file handler always changes to a valid state without
  inadvertently removing everything and falling back to creating a new
  default handler (again).

  This handling of no-ops also simplifies call code. For example,

  <code>
      autoPtr<fileHandler> oldHandler;
      autoPtr<fileHandler> writeHandler;
      word handlerName;

      if (arg.readIfPresent("writeHandler", handlerName))
      {
          writeHandler = fileOperation::New(handlerName);
      }

      oldHandler = fileHandler(std::move(writeHandler));

      ... do something

      writeHandler = fileHandler(std::move(oldHandler));
  </code>

  If the "writeHandler" is not specified, each call is a no-op.
  If it is specified, the handlers are swapped out each time.

- the management of the fileHandler communicators is now encapsulated
  privately (managedComm_) with the final layer being responsible for
  cleaning up after itself. This makes delegation/inheritance clearer
  and avoids the risk of freeing an MPI communicator twice.

STYLE: uniformFile static check relocated to fileOperation layer
2022-12-01 12:18:38 +00:00
Mark Olesen
ffeef76d8f ENH: cleaner separation of global and local world naming
- UPstream::globalComm constant always refers to MPI_COMM_WORLD but
  UPstream::worldComm could be MPI_COMM_WORLD (single world)
  or a dedicated local communicator (for multi-world).

- provide a Pstream wrapped version of MPI_COMM_SELF,
  references as UPstream::selfComm

- UPstream::isUserComm(label)
  test for additional user-defined communicators
2022-12-01 12:18:38 +00:00
Andrew Heather
7fe8bdcf99 Merge branch 'feature-fa-least-squares' into 'develop'
ENH: inv: fall back to pseudo-inverse for singular tensors

See merge request Development/openfoam!574
2022-12-01 12:09:05 +00:00
Kutalmis Bercin
e190df9033 ENH: inv: fall back to pseudo-inverse for singular tensors
- remove heuristic handling of tensor-field inverses
2022-11-30 12:24:32 +00:00
Andrew Heather
0b83d39500 BUG: removed stickiness of readFields function object in postProcess mode. Fixes #2647 2022-11-30 10:34:49 +00:00
Kutalmis Bercin
8495b86d8e BUG: solidIsothermalReactionRate: redefine the latent energy (fixes #2646) 2022-11-30 10:15:26 +00:00