Commit Graph

2439 Commits

Author SHA1 Message Date
Mark Olesen
5042d1296f ENH: consistent UniformDimensionedField naming
- construct from components, or use word::null to ensure
  consistent avoid naming between IOobject vs dimensioned type.

- support construct with parameter ordering as per DimensionedField

ENH: instantiate a uniformDimensionedLabelField

- eg, for registering standalone integer counters
2023-04-24 15:46:04 +02:00
Mark Olesen
87eed5e3b8 ENH: place more patch field attributes under template invariant Base
- attributes such as assignable(), coupled() etc

- common patchField types: calculatedType(), zeroGradientType() etc.
  This simplifies reference to these types without actually needing a
  typed patchField version.

ENH: add some basic patchField types to fieldTypes namespace

- allows more general use of the names

ENH: set extrapolated/calculated from patchInternalField directly

- avoids intermediate tmp
2023-04-03 13:33:56 +02:00
Mark Olesen
25bc7d65f7 STYLE: prefer REGISTER/NO_REGISTER instead of true/false for IOobject
- self-documenting
2023-03-10 14:16:32 +00:00
Mark Olesen
b17422ef1a ENH: use readValueEntry, readMixedEntries for simpler program control 2023-03-08 15:30:04 +00:00
Mark Olesen
68bbd8f3a8 Merge remote-tracking branch 'origin/master' into develop 2023-02-21 10:21:31 +01:00
Mark Olesen
1cc72ea7e3 STYLE: use clamp/clamp_range instead of min(max(..., upper), lower) 2023-02-21 10:10:43 +01:00
Mark Olesen
ba6667a344 STYLE: use clamp/clamp_range instead of max(min(..., upper), lower) 2023-02-21 10:10:43 +01:00
Mark Olesen
3d8a6a5433 ENH: use GeometricField clamp_min, clamp_max, clamp_range
- newer naming allows for less confusing code.
  Eg,
      max(lower)  ->  clamp_min(lower)
      min(upper)  ->  clamp_max(upper)

- prefer combined method, for few operations.
  Eg,
      max(lower) + min(upper) -> clamp_range(lower, upper)

  The updated naming also helps avoid some obvious coding errors.
  Eg,

     Re.min(1200.0);
     Re.max(18800.0);

  instead of
     Re.clamp_range(1200.0, 18800.0);

- can also use implicit conversion of zero_one to MinMax<Type> for
  this type of code:

      lambda_.clamp_range(zero_one{});
2023-02-21 10:05:26 +01:00
Mark Olesen
fe4688c27f ENH: patch fields writeValueEntry method (frequently used)
- add base-level readValueEntry, readMixedEntries methods
  that allow optional or mandatory reading.

STYLE: wording for patch fields comments
2023-02-20 11:13:43 +01:00
Mark Olesen
27a7ae2d1d ENH: use simpler lookupPatchField form 2023-02-13 20:08:48 +01:00
Mark Olesen
35dae3fc3b STYLE: simpler mass-flow/volume-flow dimension check
* (dimMass/dimTime)    instead of  (dimDensity*dimVelocity*dimArea)
* (dimVolume/dimTime)  instead of  (dimVelocity*dimArea)
2023-02-13 20:08:48 +01:00
Mark Olesen
d597b3f959 STYLE: check iterator validity with good() instead of found()
- aligns better with other container checks
2023-02-10 17:12:48 +01:00
mattijs
f713f74855 ENH: overPotentialFoam: Make consistent. see #1749.
- createFields extends potentialFoam
- (so registers 'p' field, same as potentialFoam)
- writephi is optional as in potentialFoam
2023-02-02 10:34:47 +00:00
Mark Olesen
988ec18ecc COMP: backslash instead of slash in Make/options 2023-01-30 11:55:35 +01:00
Mark Olesen
eb8b51b475 ENH: use back(), pop_back() instead remove()
- adjust looping to resemble LIFO pattern

STYLE: adjust some string includes
2023-01-27 09:50:46 +01:00
Andrew Heather
48973bad83 ENH: chtMultiRegionFoam - add frozenFlow option
Also for 'chtMultiRegionSimpleFoam' and 'chtMultiRegionTwoPhaseEulerFoam'.
2022-12-14 10:54:40 +00:00
Kutalmis Bercin
a0f1e98d24 ENH: finiteArea: improve robustness in code sections vulnerable to math errors
It has been observed that the finite-area framework is prone to numerical
issues when zero-valued edge lenghts, edge/face normals and face areas exist.

To improve exception handling at identified code sections to gracefully
overcome math errors, the problematic entities are lower-bounded by SMALL.
2022-12-14 10:18:23 +00:00
Mark Olesen
ed5690ffbc STYLE: volSurfaceMapping is const 2022-12-13 11:18:16 +01:00
sergio
2a406bbb25 ENH: overset: various improvements in the framework
The improvements include:

- Allowing overset patches to be displaced outside background domain.
  - The approach does not support overlapping of multiple inset meshes
    on top of background domain.
- Allowing fringe faces to walk away from hole cells in background domain.
  - The approach was not extensibly tested with overlapping patches.
- Improving mass conservation.
- Various experimental entries are removed: massFluxInterpolation, ddtCorr.
- New entries:
  - oversetAdjustPhi: adds a flux correction outside the pressure equation.
  - massCorrection: adds an implicit correction.
2022-11-11 10:19:47 +00:00
Mark Olesen
70208a7399 ENH: use returnReduceAnd(), returnReduceOr() functions
DOC: document which MPI send/recv are associated with commType
2022-11-08 16:48:08 +00:00
Mark Olesen
7b2bcfda0b ENH: improved handling of coordinateSystems
- in continuation of #2565 (rotationCentre for surface output formats)
  it is helpful to also support READ_IF_PRESENT behaviour for the
  'origin' keyword.

  This can be safely used wherever the coordinate system definition
  is embedded within a sub-dictionary scope.

  Eg,
      dict1
      {
          coordinateSystem
          {
              origin (0 0 0);  // now optional here
              rotation ...;
          }
      }

   but remains mandatory if constructed without a sub-dict:

      dict2
      {
          origin (0 0 0);   // still mandatory
          e1  (1 0 0);
          e3  (0 0 1);
      }

   With this change, the "transform" sub-dictionary can written
   more naturally:

       formatOptions
       {
           vtk
           {
               scale 1000;  // m -> mm
               transform
               {
                   rotationCentre  (1 0 0);
                   rotation axisAngle;
                   axis    (0 0 1);
                   angle   -45;
               }
           }
       }

ENH: simplify handling of "coordinateSystem" dictionary lookups

- coordinateSystems::NewIfPresent method for optional entries:

    coordSysPtr_ = coordinateSystem::NewIfPresent(mesh, dict);

  Instead of

    if (dict.found(coordinateSystem::typeName, keyType::LITERAL))
    {
        coordSysPtr_ =
            coordinateSystem::New
            (
                mesh_,
                dict,
                coordinateSystem::typeName
            );
    }
    else
    {
        coordSysPtr_.reset();
    }

ENH: more consistent handling of priorities for binModels, forces (#2598)

- if the dictionaries are overspecified, give a 'coordinateSystem'
  entry a higher prioriy than the 'CofR' shortcuts.

  Was previously slightly inconsistent between the different models.
2022-10-04 15:51:27 +02:00
Mark Olesen
716d330547 COMP: link finiteArea whenever regionFaModel is used 2022-09-22 11:50:50 +02:00
Mark Olesen
097008544c STYLE: adjust range check in Foam::factorial (FULLDEBUG)
STYLE: consistent use of $(LIB_SRC) in Make/options
2022-09-07 16:25:45 +02:00
Mark Olesen
c4d18e97a3 ENH: additional methods for OBJstream
- write point fields
- writeLine (takes two points)
- writeFace (takes list of face loop points)
2022-07-19 11:17:51 +02:00
Mark Olesen
3d892ace29 STYLE: set readOpt(..), writeOpt(..) by parameter, not by assignment
STYLE: qualify format/version/compression with IOstreamOption not IOstream

STYLE: reduce number of lookups when scanning {fa,fv}Solution

STYLE: call IOobject::writeEndDivider as static
2022-07-19 11:17:47 +02:00
Mark Olesen
71246b94b7 ENH: minor update of particle methods 2022-07-08 11:13:00 +02:00
sergio
0f0a5c5c0f BUG: interfaceHeatResistance: remove max condensation limiter 2022-06-21 09:30:02 +01:00
sergio
45c3ba0e8e ENH: phaseSystemModels: new namespaces for various submodels
Co-authored-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
2022-06-21 09:29:57 +01:00
sergio
9a80d0d5ef ENH: thermoTools: new library for thermophysics tools
thermoTools is a relocation of various existing tools:

- src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/
- src/semiPermeableBaffle/derivedFvPatchFields/
- src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/

ENH: Allwmake: reordering various compilation steps

Co-authored-by: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
2022-06-21 09:29:13 +01:00
Vaggelis Papoutsis
6d2c7ff96b ENH: changes towards a machine-accurate continuation
Each solver now writes its sensitivity derivatives to its dictionary,
enabling also a binary format. If present, the sensitivities are then
re-read from the dictionary, avoiding thus possible loss of information
due to re-computation.

As a side-effect, sensitivities are computed after the completion of
each adjoint solver, instead of being computed after all adjoint solvers
have been completed.
2022-06-10 13:00:52 +00:00
Mark Olesen
8b63b8cdfe ENH: add hashedWordList find, appendUniq methods
- aligns calling signatures with wordList, for possible future
  replacement

- drop construct from const char** (can use initializer_list instead)

ENH: replace hashedWordList with plain wordList in triSurfaceLoader

- additional hashing optimisation (and overhead) is not worth it for
  the comparatively small lists of surfaces used.
2022-06-02 11:14:10 +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
a4ef891594 COMP: missing linkage, unneeded linkage
- dynamicMesh, finiteVolume, regionFaModels, thermophysicalProperties
2022-04-29 13:26:36 +02:00
Mark Olesen
430281bced ENH: align fileOperations/masterUncollatedFileOperation findInstance()
- adds handling of negative start times for masterUncollatedFileOperation
  as well (#1112).

- handle failures *after* restoring non-parRun mode.
  This ensures exit(FatalError) will exit MPI properly as well.

STYLE: replace "polyMesh" with polyMesh::meshSubDir

STYLE: adjust IOobject read/write enumerated values

- provision for possible bitwise handling
2022-04-29 11:44:28 +02:00
mattijs
c78101a9ae ENH: chtMultiRegionFoam: support for -dry-run. Fixes #2446 2022-04-14 15:47:39 +01:00
sergio
02b8862de7 BUG: Making surfaceFilmProperties optional for postProcessing. Fixes #2372 2022-04-13 15:55:29 -07:00
mattijs
6dac06dd38 ENH: solidFoam: allow time-step control. Fixes #2415. 2022-04-07 13:57:21 +01:00
Mark Olesen
3721a61fe0 COMP: link twoPhaseProperties library (#2424) 2022-03-31 16:01:41 +02:00
Andrew Heather
529f6aa022 COMP: Resolved compiler warnings 2022-03-24 13:36:06 +00:00
Mark Olesen
af8161925b ENH: use mpi gather for list values in a few places
- avoid gatherList/scatterList when value are only need on master
2022-03-04 17:49:23 +00:00
sergio
af864cdcd1 ENH: Adding option mesh flux correction to solidFoam 2021-12-16 11:59:36 -08:00
sergio
cd2e69923e STY: Function names and arguments order 2021-12-15 10:16:20 +00:00
sergio
13b1417710 ENH: Adding new access to basic thermo for rho and Cp 2021-12-15 10:16:20 +00:00
Kutalmis Bercin
18bc876c93 ENH: rhoCentralFoam: add dynamic-mesh motion capabilities
ENH: discard rhoCentralDyMFoam by merging it with rhoCentralFoam
2021-12-15 10:15:37 +00:00
Kutalmis Bercin
445baaf277 ENH: buoyantPimpleFoam: add dynamic-mesh motion capabilities 2021-12-15 10:15:37 +00:00
Kutalmis Bercin
19705bdd64 ENH: buoyantBoussinesqPimpleFoam: add dynamic-mesh motion capabilities 2021-12-15 10:15:37 +00:00
Johan Roenby
0bf7758dd4 ENH: interIsoFoam/isoAdvection: new porosity extension
Co-authored-by: Niels Gjøl Jacobsen <>
Co-authored-by: Konstantinos Missios <>
Co-authored-by: Henning Scheufler <henning.scheufler@dlr.de>
Co-authored-by: Johan Roenby <johan.roenby@gmail.com>
2021-12-13 17:09:10 +00:00
Andrew Heather
c46216e645 COMP: Added missed file 2021-12-10 15:43:22 +00:00
Andrew Heather
6be31e3feb ENH: pimpleFoam - added LTS support 2021-12-10 14:34:05 +00:00
Kutalmis Bercin
cad325f41f BUG: icoReactingMultiphaseInterFoam: enable phasesSystem surface tension models (Fixes #2228) 2021-12-09 18:49:02 +00:00