Commit Graph

25580 Commits

Author SHA1 Message Date
Kutalmis Bercin
745fc42dee ENH: turbulentDFSEMInlet: improve Reynolds-stress realizability checks
ENH: turbulentDFSEMInlet: new realizability checking function for scalar fields
2022-06-07 20:12:03 +00:00
Kutalmis Bercin
29acac9f97 ENH: turbulentDigitalFilter: refactor the boundary condition
- Previous state of the condition was largely inoperative
due to bugs and lack of functionalities
- New state of the condition is more versatile, elegant, robust and faster

ENH: turbulentDigitalFilter: add new scalar-based synthetic turbulence condition

- Realistic temperature and/or concentration fluctuations
can be generated based on given input statistics
2022-06-07 20:12:03 +00:00
Mark Olesen
7184de50df ENH: simplify coordinate rotation specification (#2505)
- can specify rotations that are not "axes" in a compact form:

      transform
      {
          origin  (0 0 0);
          rotation none;
      }

      transform
      {
          origin  (0 0 0);
          rotation axisAngle;
          axis    (0 0 1);
          angle   45;
      }

   An expanded dictionary form also remains possible:

      transform
      {
          origin  (0 0 0);
          rotation
          {
              type  axisAngle;
              axis  (0 0 1);
              angle 45;
          }
      }

STYLE: verbose deprecation for "coordinateRotation" keyword

- the "coordinateRotation" keyword was replaced by the "rotation"
  keyword (OpenFOAM-v1812 and later) but was handled silently.
  Now elevated to non-silent.

STYLE: alias lookups "axesRotation", "EulerRotation", "STARCDRotation"

- these warn and report the equivalent short form, which aids in
  upgrading. Previously had silent lookups.
2022-06-07 17:25:30 +02:00
Mark Olesen
460b29b8c7 STYLE: missing quote when reporting selection table aliases 2022-06-07 15:01:40 +02:00
Mark Olesen
cc47a37ed1 ENH: add external surface handling to meshedSurfRef (#2505)
- previously just handled surface components
- move/scale mesh points (copy)

STYLE: pass in dummy faces/points to writer

STYLE: use tensor is_identity()
2022-06-03 17:26:38 +02:00
Mark Olesen
264c09c365 Merge remote-tracking branch 'origin/master' into develop 2022-06-03 14:11:00 +02:00
Mark Olesen
68599d552d ENH: minor code cleanup for SHA1 calculation
- append single character
- make append() methods void: methods are never chained anyhow
- refactor digest comparison (code reduction)

COMP: add overflow handling for OSHA1stream
2022-06-03 11:18:08 +02:00
Mark Olesen
40cadfd2f2 COMP: references to temporaries
COMP: include <limits>
2022-06-03 10:04:38 +02:00
Mark Olesen
91198eaf6a COMP: gcc-12 buffer check bypasses xsputn (#2481, #2496)
- add overflow() method to the SHA1 streambuf. Previously could rely
  on xsputn for adding to sha1 content, but streams now check pptr()
  first to test for the buffering range and thus overflow() is needed.
2022-06-03 10:04:35 +02:00
Mark Olesen
2c77514417 CONFIG: support wmake -debug-O0, -debug-O1 etc.
- rearranged order of flags so that FOAM_EXTRA_CXXFLAGS is added
  after the WARN/OPT/DBUG flags

CONFIG: drop wmake rules for PGI compiler (defunct)
2022-06-02 22:37:00 +02:00
Mark Olesen
a465e4db85 ENH: support Euler rotation rollPitchYaw/yawPitchRoll ordering
- can be more intuitive to specify for some cases:

      rotation
      {
          type    euler;
          order   rollPitchYaw;
          angles  (0 20 45);
      }

- refactor starcd rotation to reuse Euler ZXY ordering
  (code reduction)

ENH: add -rotate-x, -rotate-y, -rotate-z for transformPoints etc

- easier to specify for simple rotations
2022-06-02 16:47:40 +02:00
Mark Olesen
eba7a485ba ENH: quaternion ROLL_PITCH_YAW and YAW_PITCH_ROLL aliases/lookups
COMP: define labelSphericalTensor::I

- remove spurious 'labelI' global constant (labelSphericalTensor::I)

STYLE: replace use of deprecated Tensor vectorComponent

STYLE: avoid bit-wise assignment of bool (VectorSpace compare ops)
2022-06-02 11:14:10 +02: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
mattijs
49d0e82842 ENH: patchSeed: fix debug message 2022-06-02 09:21:37 +01:00
mattijs
903f45dcdc ENH: snappyHexMesh: early exit of leak detection. See #2403 2022-06-01 15:30:11 +01:00
Kutalmis Bercin
11b0d70b2d COMP: use the template disambiguator for dependent names (clang-9.0.1) 2022-06-01 10:00:50 +01:00
Mark Olesen
9b30e4fd81 Merge branch 'feature-qrmatrix' into 'develop'
ENH: QRMatrix: refactor the QR decomposition algorithms

See merge request Development/openfoam!540
2022-05-31 16:59:51 +00:00
Kutalmis Bercin
aaa25d105b ENH: STDMD: apply QRMatrix changes 2022-05-31 16:11:20 +00:00
Kutalmis Bercin
1ef855cf0b ENH: QRMatrix: refactor the QR decomposition algorithms (fixes #2212) 2022-05-31 16:11:20 +00:00
Kutalmis Bercin
cf492d42a1 ENH: Matrix: improve row access in inner/outer products 2022-05-31 16:11:20 +00:00
Kutalmis Bercin
98b4779793 ENH: Rectangular/SquareMatrix: add move assignment 2022-05-31 16:11:20 +00:00
Kutalmis Bercin
96cb473305 ENH: Matrix: add non-conjugate transpose function 2022-05-31 16:11:20 +00:00
Bernhard F.W. Gschaider
addfcf1bc2 ENH: handle chemical equations parsing errors (#2440)
- catch extra punctuation tokens in chemical equations
- catch unknown species

- simplify generation of reaction string (output)

ENH: allow access of solid concentrations from sub-classes (#2441)
2022-05-31 17:52:16 +02:00
Mark Olesen
796145ee4c CONFIG: set API level to 2204
- redistributePar, expression sources, objectRegistry::sorted(),
  wallFunctions, solid motion updates, etc
2022-05-31 17:19:49 +02:00
Mark Olesen
37e1da82ff CONFIG: add ARM64 nvidia rules
CONFIG: revise Pstream/OpenFOAM linkage (nvidia)

- double-pass linkage seems to be unnecessary
2022-05-31 17:19:49 +02:00
Mark Olesen
8081fc7234 ENH: refactor cell selections into cellBitSet
- ensightWrite, vtkWrite, fv::cellSetOption

ENH: additional topoSet "ignore" action

- this no-op can be used to skip an action step, instead of removing
  the entire entry
2022-05-31 13:04:43 +02:00
Mark Olesen
1845c28ee4 BUG: ensightWrite has out-of-date subMesh reference (fixes #2499)
- triggered with cell selections (especially with manifold cells).
  The ensightMesh was still holding an old subMesh reference.
2022-05-31 13:04:43 +02:00
Mark Olesen
520001bafb TUT: use "sources" for SemiImplicit in a few places
TUT: removed xxxCoeffs clutter for atmospheric sources

GIT: renamed liquidFilmStepWithSprinklers
2022-05-31 13:04:43 +02:00
Mark Olesen
d2e10bca40 ENH: support exprField specification for SemiImplicitSource
- this allows more flexibility when defining the location or intensity
  of sources.

  For example,

  {
      type            scalarSemiImplicitSource;
      volumeMode      specific;
      selectionMode   all;

      sources
      {
          tracer0
          {
              explicit
              {
                  type       exprField;

                  functions<scalar>
                  {
                      square
                      {
                          type square;
                          scale 0.0025;
                          level 0.0025;
                          frequency 10;
                      }
                  }

                  expression
                  #{
                      (hypot(pos().x() + 0.025, pos().y()) < 0.01)
                    ? fn:square(time())
                    : 0
                  #};
              }
          }
      }
  }

ENH: SemiImplicitSource: handle "sources" with explicit/implicit entries

- essentially the same as injectionRateSuSp with Su/Sp,
  but potentially clearer in purpose.

ENH: add Function1 good() method to define if function can be evaluated

- for example, provides a programmatic means of avoiding the 'none'
  function
2022-05-31 13:04:39 +02:00
Mark Olesen
ef743147ea GIT: relocate coordinate from meshTools -> OpenFOAM
- supports use of coordinate systems in fileFormats, surfMesh etc.

GIT: remove remnant dependency check placeholders
2022-05-31 10:05:17 +02:00
mattijs
11d5677368 ENH: snappyHexMesh: better messages. See #2403. 2022-05-30 11:57:43 +01:00
mattijs
1a6e9030fa ENH: fvMesh: maintain mesh.phi(). See #2492 2022-05-30 11:57:42 +01:00
Mattijs Janssens
4ea3944ab9 Merge branch 'issue-2070-drag-forces' into 'develop'
Improve the Lagrangian drag models

See merge request Development/openfoam!495
2022-05-30 08:25:58 +00:00
Kutalmis Bercin
6acbd98231 STYLE: DragForce: modernise the code content 2022-05-30 09:15:28 +01:00
Kutalmis Bercin
eab0a11079 DOC: DragForce: improve header file documentation 2022-05-30 09:06:08 +01:00
Kutalmis Bercin
b7a1975ecd BUG: PlessisMasliyahDragForce: remove redundant CdRe function 2022-05-30 09:06:07 +01:00
Mark Olesen
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
Mark Olesen
21234ae296 ENH: support zip/unzip rows of symmTensor (#2487)
- was previously only implemented for tensor
2022-05-27 17:58:37 +02:00
Mark Olesen
082a0e687a ENH: support zone group selection for volRegion function objects 2022-05-27 17:50:29 +02:00
Mark Olesen
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
Mark Olesen
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
Mark Olesen
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
Mark Olesen
525db80889 BUG: zones inGroup entry not read from dictionary (fixes #2485)
ENH: add ZoneMesh groupNames method
2022-05-27 15:33:28 +02:00
Mark Olesen
0efa5f062a ENH: DimensionedFields::New static constructors 2022-05-27 14:15:12 +02:00
Mark Olesen
93dcf732dd COMP: make ZeroConstant clonable 2022-05-27 14:15:03 +02:00
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