Commit Graph

517 Commits

Author SHA1 Message Date
Andrew Heather
d3949086ce RELEASE: Updated headers to v2412 2024-12-24 11:17:31 +00:00
Andrew Heather
630d60de3b RELEASE: Updated headers to v2406 2024-06-24 09:58:36 +01:00
Kutalmis Bercin
9d6b8a9c28 TUT: mixerVessel2D: add missing MRF-related keyword 2024-06-11 14:15:29 +01:00
Mark Olesen
4cfa2ea304 TUT: update for new finite-area location (with foamUpgradeFiniteArea) 2024-04-19 17:20:09 +02:00
Andrew Heather
c4328296b0 TUT: Corrected legacy muTilda -> nuTilda. Fixes 3057 2024-01-03 09:43:23 +00:00
Andrew Heather
28aad3a03e RELEASE: Updated headers to v2312 2023-12-20 19:42:55 +01:00
Mark Olesen
36f8542e01 TUT: use '/' dictionary scoping for variables and foamDictionary (#1073)
- leave windAroundBuildings blockMeshDict with older '.' syntax
  (to test compatibility)
2023-08-21 12:12:41 +02:00
Andrew Heather
763bf4674d RELEASE: Updated headers to v2306 2023-06-28 16:35:48 +01:00
Kutalmis Bercin
41cb168649 TUT: scalarTransport: avoid excessive number of output directories (fixes #2806) 2023-06-19 09:01:37 +01:00
mattijs
6a66a15b8f ENH: generalise masterCoarsest restart (GAMG) 2023-06-01 08:17:58 +00:00
Mark Olesen
e8bcf4cb1b ENH: additional uniform boundary conditions (#2703)
- provide uniformMixed conditions for finite-area and finite-volume.

  These are intended to replace the exprMixed condition but allow
  the full range of different PatchFunction1 and Function1 types.

- add uniformFixedGradient to finite-area for completeness.

Note:
   - still some possible difficulties with the order of evaluation.
   - eg, using an expression within the 'U' field that depends
     of the surface 'phi' field before that is constructed.
     In this case, the 'value' entry is really needed.
2023-05-09 19:30:58 +02:00
Mark Olesen
ee39e3d276 STYLE: use explicit REGISTER option when storing fields 2023-04-25 13:45:08 +02:00
Mark Olesen
2b1061420c STYLE: remove trailing space, tabs 2023-04-24 15:37:33 +02:00
Mark Olesen
9577a0f6b5 ENH: extend parProfiling (#2737)
- separate broadcast times from reduce/gather/scatter time
- separate wait times from all-to-all time
- support invocation counts, split off requests time/count
  from others to avoid flooding the counts

- support 'detail' switch to increase the output information.
  Format may change in the future
2023-04-05 11:33:39 +02:00
Mark Olesen
27a7ae2d1d ENH: use simpler lookupPatchField form 2023-02-13 20:08:48 +01:00
Mark Olesen
b93f038ea3 TUT: replace exprFixedValue with uniformFixedValue
- wish to deprecate and remove exprFixedValue in the future since the
  same functionality is possible using patch expressions with a
  uniformFixedValue condition.
2023-01-31 13:45:21 +01:00
Andrew Heather
7e61f36c12 RELEASE: Updated headers to v2212 2022-12-21 16:16:18 +00:00
mattijs
09f4d8513f ENH: processorAgglomerator: test nMasters 2022-12-12 13:29:37 +00:00
Mark Olesen
126d831f6e TUT: use filter/mapping with ensight data (#2609) 2022-11-24 13:30:16 +01:00
sergio
b48fd4f38a TUT: overset: add new tutorials and update existing tutorials 2022-11-11 10:19:51 +00:00
Mark Olesen
5b29ff0e42 ENH: consolidate 'formatOptions' handling for coordSetWriter/surfaceWriter
- replaced ad hoc handling of formatOptions with coordSetWriter and
  surfaceWriter helpers.

  Accompanying this change, it is now possible to specify "default"
  settings to be inherited, format-specific settings and have a
  similar layering with surface-specific overrides.

- snappyHexMesh now conforms to setFormats

  Eg,

      formatOptions
      {
          default
          {
              verbose     true;
              format      binary;
          }
          vtk
          {
              precision   10;
          }
     }

     surfaces
     {
         surf1
         {
             ...

             formatOptions
             {
                 ensight
                 {
                     scale   1000;
                 }
             }
         }
     }
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
1695f2f5b9 TUT: use simpler faMeshDefinition 2022-09-22 16:09:14 +02:00
Mark Olesen
4393ffa8dc ENH: template invariant base classes for {fa,fae,fv,fvs,point}PatchField
- simplifies construction/inheritance

ENH: add {fa,fv}PatchField::zeroGradientType() static

- can be used to avoid literal "zeroGradient" in places

STYLE: adjust naming of pointPatch runtime selection table

- simply use 'patch' as per fa/fv fields

STYLE: add zero-size guard to patch constraintType(const word&)
2022-09-22 16:09:14 +02:00
Mark Olesen
7ea185b0b5 ENH: support rotationCentre for surface output formats (#2565)
- as an alternative output transform (supplementary to the regular
  coordinate system specification - issue #2505) it is now possible to
  specify the rotation centre directly.

  Example:

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

   This behaves like the transformPoints and surfaceTransformPoints
   '-centre' option (formerly '-origin') in that it removes the
   specified amount from the point locations, applies the rotation and
   finally adds the specified amount back to the newly rotated point
   locations.

   The results of specifying a `rotationCentre` and a non-zero
   coordinate system `origin` may not be intuitively evident.
2022-08-19 12:52:29 +02:00
Kutalmis Bercin
5894874920 TUT: faSchemes: replace snGradSchemes with lnGradSchemes (fixes #2543)
When a finite-area case could not find an entry for "lnGradSchemes"
in the "faSchemes" file, the "corrected" scheme has been picked up
by default. Therefore, any changes in "snGradSchemes" entry will not
be read by finite-area models.
2022-07-25 15:06:51 +01:00
Andrew Heather
7792501a01 RELEASE: Updated headers for v2206 2022-06-24 15:41:02 +01:00
Mark Olesen
ad0235a751 ENH: support surface writer output transform (#2505)
- this allows the "relocation" of sampled surfaces. For example,
  to reposition into a different coordinate system for importing
  into CAD.

- incorporate output scaling for all surface writer types.

  This was previously done on an adhoc basis for different writers,
  but with now included in the base-level so that all writers
  can automatically use scale + transform.

  Example:

  formatOptions
  {
      vtk
      {
          scale 1000;  // m -> mm
          transform
          {
              origin  (0.05 0 0);
              rotation axisAngle;
              axis    (0 0 1);
              angle   -45;
          }
      }
  }
2022-06-13 08:22:52 +00:00
Mark Olesen
9a75ce8434 ENH: support coordinateSystem/transform for sampled planes
- previously only defined for cell-cutting version, now for
  iso-surface version too

TUT: remove old transform/coordinateSystem syntax
2022-06-08 16:43:05 +02:00
Mark Olesen
fbaadf3a94 ENH: make 'planeType' optional for dictionary construct of a plane
- simpler to write for sampled cutting planes etc.
  For example,

      slice
      {
          type        cuttingPlane;
          point       (0 0 0);
          normal      (0 0 1);
          interpolate true;
      }

  instead of

      slice
      {
          type        cuttingPlane;
          planeType   pointAndNormal;
          pointAndNormalDict
          {
              point   (0 0 0);
              normal  (0 0 1);
          }
          interpolate true;
      }

STYLE: add noexcept to some plane methods
2022-06-08 16:43:05 +02: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
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
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
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
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
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
8a7221cf50 TUT: update tutorials to use dictionary-style sets
- can now specify sampled sets as dictionary entries instead of a list
  entry.
    can now use:  sets { ... }
    instead of:   sets ( ... );

  This is similar to sampled surfaces and makes it easier to
  manage with dictionary manipulation tools.

TUT: update to use writeTime instead of outputTime
2022-03-10 19:45:20 +01:00
Mark Olesen
1a55829ef9 ENH: add fieldLevel handling for surface writers (#2382)
- this can be used to apply a uniform field level to remove from
  a sampled field. For example,

      fieldLevel
      {
          "p.*"   1e5;        // Absolute -> gauge [Pa]
          T       273.15;     // [K] -> [C]
          U       #eval{ 10/sqrt(3) };  // Uniform mag(U)=10
      }

  After the fieldLevel has been removed, any fieldScale is applied.
  For example

      fieldScale
      {
          "p.*"   0.01;       // [Pa] -> [mbar]
      }

  The fieldLevel for vector and tensor fields may still need some
  further refinement.
2022-02-28 19:08:39 +01:00
mattijs
13b6898661 ENH: tutorials: added dummy fv* files
(createPatch now operates on fvMesh)
2022-02-10 13:45:21 +00:00
Andrew Heather
a2014242cf RELEASE: Updated headers for v2112 2021-12-20 14:18:01 +00:00
Kutalmis Bercin
c47eb2fe80 TUT: replace turbulentTemperatureCoupledBaffleMixed boundary condition
The turbulentTemperatureCoupledBaffleMixed boundary condition
has been superseded by the turbulentTemperatureRadCoupledMixed condition

TUT: injectorPipe: remove an unused entry

TUT: waveMakerFlap: remove uncompressed entry
2021-12-15 10:17:04 +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
mattijs
644bd11a93 BUG: GAMG: manual processorAgglomerator incorrect input. See #2281. 2021-12-13 14:24:53 +00:00
Mark Olesen
8d4ad0438d ENH: add exprField function object
- provides a simple means of defining/modifying fields. For example,

  ```
  <name1>
  {
      type    exprField;
      libs    (fieldFunctionObjects);
      field   pTotal;

      expression  "p + 0.5*(rho*magSqr(U))";
      dimensions  [ Pa ];
  }
  ```
  It is is also possible to modify an existing field.
  For example, to modify the previous one.
  ```
  <name2>
  {
      type    exprField;
      libs    (fieldFunctionObjects);
      field   pTotal;
      action  modify;

      // Static pressure only in these regions
      fieldMask
      #{
          (mag(pos()) < 0.05) && (pos().y() > 0)
       || cellZone(inlet)
      #};
      expression  "p";
  }
  ```

  To use as a simple post-process calculator, simply avoid storing the
  result and only generate on write:
  ```
  <name2>
  {
      store            false;
      executionControl none;
      writeControl     writeTime;
      ...
  }
  ```
2021-12-10 14:46:21 +00:00
Mark Olesen
a6cbfcb9ba STYLE: qualify expression debug flags
- for debug/tracing handle the following keywords:

   * debug.driver   (was "debugBaseDriver")
   * debug.scanner  (was "debugScanner")
   * debug.parser   (was "debugParser")
2021-12-10 14:46:21 +00:00
Mark Olesen
510ffb3322 ENH: code reduction, improvements for expressions
- literal lookups only for expression strings

- code reduction for setExprFields.

- changed keyword "condition" to "fieldMask" (option -field-mask).
  This is a better description of its purpose and avoids possible
  naming ambiguities with functionObject triggers (for example)
  if we apply similar syntax elsewhere.

BUG: erroneous check in volumeExpr::parseDriver::isResultType()

- not triggered since this method is not used anywhere
  (may remove in future version)
2021-12-10 14:46:21 +00:00
Mark Olesen
9a5125111e ENH: add coded Function1 (#2282)
- update coded templates with qualified names

GIT: add in missing PatchFunction1 constant() method

- was missed in a previous commit
2021-12-03 20:56:10 +01:00
mattijs
6abbcb3eac BUG: GAMG: processorAgglomerator crashes. Fixes #2281.
Problem was extending the storage, copying the
original contents.
2021-11-29 14:44:24 +00:00
mattijs
53e8f2a807 ENH: fvSolution: allow Function1 for all scalars
TUT: demonstrate some ramping

- compressible/rhoPimpleFoam/RAS/angledDuct
2021-11-10 17:28:52 +01:00
Mark Olesen
52be5d0428 TUT: use mergeType points for wedge geometries (#2241) 2021-10-21 15:31:11 +02:00