Commit Graph

154 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
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
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
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
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
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
Andrew Heather
7792501a01 RELEASE: Updated headers for v2206 2022-06-24 15:41:02 +01: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
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
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
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
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
Mark Olesen
a530b505ed TUT: replace m4 versions of angledDuct blockMeshDict with native forms
- dictionary parameters to change the bend angle

- blockMesh transform parameters to allow different orientations
2021-07-28 13:14:44 +02:00
Mark Olesen
847b61d1f9 GIT: fix some merge and edit rubbish 2021-07-28 10:02:27 +02:00
Andrew Heather
e3796745ed CONFIG: Updated headers to v2106
Minor clean-up
2021-06-28 09:14:42 +01:00
sergio
6101272133 ENH: Adding subMesh option to momentumError and div FOs
1) Adding subMesh capabilities to momentumError and div FOs.
	- A subMesh is created from cellZones.
	- The operators (div, etc) are only calculated in the subMesh.

2) Optionally, halo cells can be added to the cellZones.

3) New helper class to handle the subMesh creation and field mapping.
2021-06-23 08:11:12 +00:00
Mark Olesen
096b9dc52e TUT: add parallel version for various squareBend cases
- adjust commented-out evaluation to avoid warnings.

  With code like this
  ```
  #if 0
  nxin    #eval{ round($nxin / 5) };
  #endif
  ```

  The handling of the "#if 0 / #endif" clause uses the plain ISstream
  parser to tokenize. This means that the "round(" is parsed as a word
  with a mismatched closing ')', whereas the "#eval" parser will slurp
  everything in until the closing brace and send it off as a string
  to the expression parser.
2021-06-18 17:14:22 +02:00
Getnet Agegnehu
a3d90ae9b9 TUT: example of patch expressions (#2114) 2021-06-18 17:14:21 +02:00
mattijs
1f84dcbac6 ENH: blockMesh: avoid 'empty' for initial mesh. Fixes #2125. 2021-06-17 10:18:39 +01:00
Kutalmis Bercin
7ce111809e TUT: compressible: clean up tutorials 2021-05-27 08:59:28 +00:00
Mark Olesen
ec81436cce TUT: generalize (parameterize) blockMeshDict for half-cylinder geometries
- profit from some of the recent modifications to parser expansion

TUT: adjust some #eval statements for less clutter
2021-05-19 17:33:25 +02:00
Mark Olesen
ce45a12918 TUT: improve parameterization of squareBend geometry
- orient blocks in global x/y/z.
  Provisioning for coarser/smaller geometries.
2021-03-08 17:31:18 +01:00
Mark Olesen
1bb7afc7fe ENH: raw format with optional output for face area normals (#2003)
- the raw surface writer simply outputs x/y/z and field values.
  This additional flag allows recovery of some geometric information.

- optional user-specified output precision

Example,
```
formatOptions
{
    raw
    {
        normal      yes;
        precision   10;
    }
}
```
2021-02-17 13:36:16 +01:00
Andrew Heather
79e353b84e RELEASE: Updated version to v2012 2020-12-23 10:01:39 +01:00
sergio
c3c4f30a55 ENH: adding generalizedNewtonian to laminar turbulence model
The generalizedNewtonian viscocity models were ported from
the org version and added to the laminar turbulence framework.

This allows use in compressible and incompressible solvers
through the turbulence dictionary under the laminar sub-dictionary.

The thermal laminar viscosity is taken from the thermo for solvers
that use thermo library or from the transportProperties dictionary
for incompressible solvers.

At the moment the option to include viscocity models through the
transportDict is still available.

The icoTabulated equation of state was ported from the org version.

STYLE: use 'model' instead of 'laminarModel' in tutorials
2020-12-10 13:40:12 +00:00
Mark Olesen
8ad61f8e9d ENH: optional innerRadius for searchable disk
- can be used directly, or in special cases like a searchable plane
  with a gap of things in the centre that are not to be sampled.
2020-12-08 15:32:50 +01:00
Mark Olesen
ab692caf7c ENH: support multiple weights on some field function objects (#1930)
- weight fields are combined by multiplication

  - volFieldValue:
    * 0-N scalar fields

  - surfaceFieldValue:
    * 0-N scalar fields
    * 0-1 vector fields

  In some cases this can be used to avoid creating additional
  fields.

      weightFields  (rho U);
  vs.
      derivedFields (rhoU);
      weightField   rhoU;
2020-11-30 13:59:10 +01:00
Mark Olesen
f8d08a805b ENH: additional handling for out-of-range sampling (#1891)
- when sampling onto a meshed surface, the sampling surface may be
  outside of the mesh region, or simply too far away to be considered
  reasonable.

  Can now specify a max search distance and default values for samples
  that are too distant.
  If a default value is not specified, uses Type(Zero).

  Eg,

      maxDistance     0.005;
      defaultValue
      {
          "p.*"   1e5;
          T       273.15;
          U       (-100 -100 -100);
      }
2020-11-30 13:59:10 +01:00
Mark Olesen
9eb73a92e2 TUT: fix use of "constant/triSurface" etc (#1887)
- use bracketed syntax (eg, "<constant>/triSurface") instead for
  implicit case resolution.
2020-10-28 16:04:12 +01:00
Mark Olesen
51b2490258 ENH: additional options for transformPoints and surfaceRefineRedGreen
- add -recentre option to shift points according to the bounding box
  centre before performing other operations

- add -auto-origin to use the bounding box centre as the origin for
  rotations. Has lower priority than the -origin option.

- surfaceTransformPoints now has distinct -read-scale, -write-scale
  options (as per surfaceMeshConvert). Silently accepts -scale as
  equivalent to -write-scale, for backwards compatibility and
  similarity with transformPoints

- add -steps option for surfaceRefineRedGreen for successive
  refinement
2020-10-22 14:59:12 +02:00
Mark Olesen
121c69ef2e TUT: use new 'arc' specification in several tutorials
- in most cases this eliminates manually calculation of circumferential
  points.

TUT: improve parameterization of sphere blockMeshDict

- allow separate parameterization of radius, ratio of inner to outer,
  and the number of divisions in x/y/z and radial directions
2020-10-05 15:45:39 +02:00
Andrew Heather
538d749220 REL: Updated headers to version v2006 2020-06-29 17:27:54 +01:00
Mark Olesen
5b6969fce3 TUT: fluxSummary surfaces as list (inadvertently changed in 5982a1aa) 2020-06-22 08:44:46 +02:00
Mark Olesen
5982a1aab4 STYLE: update tutorials
- use simpler decomposeParDict in tutorials, several had old
  'boilerplate' decomposeParDict

- use simpler libs () format

- update surface sampling to use dictionary format
2020-06-17 10:11:33 +02:00
Kutalmis Bercin
a5c6516e23 DOC: elaborate the usage of function objects
ENH: update libs of etc/caseDicts/postProcess items
  ENH: ensure destructor=default
  ENH: ensure constness
  ENH: ensure no 'copy construct' and 'no copy assignment' exist
  TUT: add examples of function objects with full set
       of settings into a TUT if unavailable
  TUT: update pisoFoam/RAS/cavity tutorial in terms of usage
2020-06-08 15:43:47 +01:00