Commit Graph

135 Commits

Author SHA1 Message Date
mattijs
0bc59af983 ENH: snappyHexMesh: allow cellZone erosion. Fixes #1528. 2020-02-03 09:29:10 +00:00
Kutalmis Bercin
152890d288 TUT: change residuals FO remnants to solverInfo FO (#1290) 2020-01-10 09:44:38 +00:00
Andrew Heather
ae2ab06312 REL: Release preparations 2019-12-23 09:49:23 +00:00
Andrew Heather
fdf8d10ab4 Merge commit 'e9219558d7' into develop-v1906 2019-12-05 11:47:19 +00:00
Mark Olesen
b0eb74c142 SUBMODULE: added adios submodule (ADIOS2) and control files 2019-08-07 16:50:47 +02:00
Mark Olesen
8dd3c7f2bc CONFIG: add postProcessing/fields/lambVector template (fixes #1386) 2019-07-29 10:06:26 +02:00
Andrew Heather
d2db25ad81 CONFIG: Updated pressure FO config wrappers. See #1356 2019-07-10 13:22:19 +01:00
Andrew Heather
be44dcaf1f RELEASE: Version clean-up for release 2019-06-25 11:51:19 +01:00
Mark Olesen
a2906d4302 ENH: improve handling of font sizes for scalarBar 2019-06-05 15:31:49 +02:00
Mark Olesen
e1bd3400ef ENH: allow selective disabling of parallel VTK rendering
- in case an individual geometry element has render issues in parallel

- additional debug information
2019-06-03 09:46:49 +02:00
Mark Olesen
7e29e165d7 STYLE: remove duplicate entries in annotated runTimePostProcessingDict 2019-05-31 12:02:56 +02:00
Mark Olesen
d2462d4d37 ENH: use areaAverage instead of average for -func patchAverage (#1303)
- this corresponds more closely to the expected behaviour of a
  patch-average value being independent of the local face
  discretization
2019-05-02 13:15:49 +02:00
mattijs
b6161f413f ENH: residuals: change FO name. See #1203 2019-04-15 10:01:35 +01:00
Mark Olesen
f0f4af16d2 Merge remote-tracking branch 'origin/master' into develop 2019-04-08 12:05:24 +02:00
Mark Olesen
a1fe76e749 STYLE: add 'coeffs' to annotated decomposeParDict 2019-03-26 08:27:33 +01:00
Mark Olesen
c04963c41e CONFIG: missing semicolon in config file (fixes #1246) 2019-03-22 09:08:35 +01:00
Mark Olesen
42fbf6d38c ENH: extended runTimePostProcessing (#1206)
- Extended runTimePostProcessing to include access to "live"
  simulation objects such a geometry patches and sampled surfaces
  stored on the "functionObjectObjects" registry.

- Add 'live' runTimePostProcessing of cloud data.
  Extracts position and fields from the cloud via its objectRegistry writer

- For the "live" simulation objects, there are two new volume filters
  that work directly with the OpenFOAM volume fields:
      * iso-surface
      * cutting planes
  Both use the VTK algorithms directly and support multiple values.
  Eg, can make multiple iso-levels or multiple planes parallel to each
  other.

- When VTK has been compiled with MPI-support, parallel rendering will
  be used.

- Additional title text properties (shadow, italic etc)

- Simplified handling of scalar-bar and visibility switches

- Support multiple text positions. Eg, for adding watermark text.
2019-02-13 11:22:46 +01:00
Andrew Heather
d329087473 ENH: Added fieldMinMax function object default config 2019-02-04 10:50:28 +00:00
Andrew Heather
96bb43ae00 DOC: Updated cloudName -> cloud 2019-01-29 09:53:58 +00:00
Mark Olesen
3b91160027 STYLE: centralize example dictionaries under etc/ (issue #1074)
- as well as being more convenient to find, this is necessary when the
  OpenFOAM installation is without sources or tutorials
2019-01-26 17:46:08 +01:00
Mark Olesen
2ce944a748 STYLE: documentation/comment typo 2019-01-02 16:16:45 +01:00
Andrew Heather
9231534efa STYLE: Updating version to v1812 2018-12-19 18:07:52 +00:00
Andrew Heather
a4dc9966ed ENH: Added new AMIWeights function object
Reports the min|max|average AMI weights to text file and optionally
writes VTK surfaces of the sum of the weights, and mask field for
ACMI patches.

Example usage:

    AMIWeights
    {
        type            AMIWeights;
        libs            ("libfieldFunctionObjects.so");
        writeControl    writeTime;
        writeFields     yes;
    }
2018-12-07 17:24:13 +00:00
Andrew Heather
4a26fb758e ENH: Added new function object to calculate the energy spectrum
Description
    Calculates the energy spectrum for a structured IJK mesh

Usage
    Example of function object specification:
    energySpectrum1
    {
        type        energySpectrum;
        libs        ("libfieldFunctionObjects.so");
    }

    Where the entries comprise:
    \table
        Property     | Description               | Required    | Default value
        type         | type name: energySpectrum | yes         |
        log          | write info to standard output | no      | yes
    \endtable

    Output data is written to the file \<timeDir\>/energySpectrum.dat
2018-11-16 15:22:48 +00:00
Mark Olesen
6697bb4735 ENH: improve, simplify, rationalize coordinate system handling (issue #863)
Previously the coordinate system functionality was split between
coordinateSystem and coordinateRotation. The coordinateRotation stored
the rotation tensor and handled all tensor transformations.

The functionality has now been revised and consolidated into the
coordinateSystem classes. The sole purpose of coordinateRotation
is now just to provide a selectable mechanism of how to define the
rotation tensor (eg, axis-angle, euler angles, local axes) for user
input, but after providing the appropriate rotation tensor it has
no further influence on the transformations.

--

The coordinateSystem class now contains an origin and a base rotation
tensor directly and various transformation methods.

  - The origin represents the "shift" for a local coordinate system.

  - The base rotation tensor represents the "tilt" or orientation
    of the local coordinate system in general (eg, for mapping
    positions), but may require position-dependent tensors when
    transforming vectors and tensors.

For some coordinate systems (currently the cylindrical coordinate system),
the rotation tensor required for rotating a vector or tensor is
position-dependent.

The new coordinateSystem and its derivates (cartesian, cylindrical,
indirect) now provide a uniform() method to define if the rotation
tensor is position dependent/independent.

The coordinateSystem transform and invTransform methods are now
available in two-parameter forms for obtaining position-dependent
rotation tensors. Eg,

      ... = cs.transform(globalPt, someVector);

In some cases it can be useful to use query uniform() to avoid
storage of redundant values.

      if (cs.uniform())
      {
          vector xx = cs.transform(someVector);
      }
      else
      {
          List<vector> xx = cs.transform(manyPoints, someVector);
      }

Support transform/invTransform for common data types:
   (scalar, vector, sphericalTensor, symmTensor, tensor).

====================
  Breaking Changes
====================

- These changes to coordinate systems and rotations may represent
  a breaking change for existing user coding.

- Relocating the rotation tensor into coordinateSystem itself means
  that the coordinate system 'R()' method now returns the rotation
  directly instead of the coordinateRotation. The method name 'R()'
  was chosen for consistency with other low-level entities (eg,
  quaternion).

  The following changes will be needed in coding:

      Old:  tensor rot = cs.R().R();
      New:  tensor rot = cs.R();

      Old:  cs.R().transform(...);
      New:  cs.transform(...);

  Accessing the runTime selectable coordinateRotation
  has moved to the rotation() method:

      Old:  Info<< "Rotation input: " << cs.R() << nl;
      New:  Info<< "Rotation input: " << cs.rotation() << nl;

- Naming consistency changes may also cause code to break.

      Old:  transformVector()
      New:  transformPrincipal()

  The old method name transformTensor() now simply becomes transform().

====================
  New methods
====================

For operations requiring caching of the coordinate rotations, the
'R()' method can be used with multiple input points:

       tensorField rots(cs.R(somePoints));

   and later

       Foam::transformList(rots, someVectors);

The rotation() method can also be used to change the rotation tensor
via a new coordinateRotation definition (issue #879).

The new methods transformPoint/invTransformPoint provide
transformations with an origin offset using Cartesian for both local
and global points. These can be used to determine the local position
based on the origin/rotation without interpreting it as a r-theta-z
value, for example.

================
  Input format
================

- Streamline dictionary input requirements

  * The default type is cartesian.
  * The default rotation type is the commonly used axes rotation
    specification (with e1/e2/3), which is assumed if the 'rotation'
    sub-dictionary does not exist.

    Example,

    Compact specification:

        coordinateSystem
        {
            origin  (0 0 0);
            e2      (0 1 0);
            e3      (0.5 0 0.866025);
        }

    Full specification (also accepts the longer 'coordinateRotation'
    sub-dictionary name):

        coordinateSystem
        {
            type    cartesian;
            origin  (0 0 0);

            rotation
            {
                type    axes;
                e2      (0 1 0);
                e3      (0.5 0 0.866025);
            }
        }

   This simplifies the input for many cases.

- Additional rotation specification 'none' (an identity rotation):

      coordinateSystem
      {
          origin  (0 0 0);
          rotation { type none; }
      }

- Additional rotation specification 'axisAngle', which is similar
  to the -rotate-angle option for transforming points (issue #660).
  For some cases this can be more intuitive.

  For example,

      rotation
      {
          type    axisAngle;
          axis    (0 1 0);
          angle   30;
      }
  vs.
      rotation
      {
          type    axes;
          e2      (0 1 0);
          e3      (0.5 0 0.866025);
      }

- shorter names (or older longer names) for the coordinate rotation
  specification.

     euler         EulerRotation
     starcd        STARCDRotation
     axes          axesRotation

================
  Coding Style
================
- use Foam::coordSystem namespace for categories of coordinate systems
  (cartesian, cylindrical, indirect). This reduces potential name
  clashes and makes a clearer declaration. Eg,

      coordSystem::cartesian csys_;

  The older names (eg, cartesianCS, etc) remain available via typedefs.

- added coordinateRotations namespace for better organization and
  reduce potential name clashes.
2018-10-01 13:54:10 +02:00
Henry Weller
48332c8f16 functionObjects::ddt: New functionObject which calculates and writes the Eulerian time derivative of a field
Based on patch contributed by Tobias Holzmann
Resolves feature-request https://bugs.openfoam.org/view.php?id=2525
2017-11-05 10:58:07 +00:00
Andrew Heather
6e35bcda70 ENH: Updated config for release v1806 2018-06-28 12:56:00 +01:00
Andrew Heather
14268bbcd1 COMP: Removed legacy file 2018-06-26 13:27:54 +01:00
Mark Olesen
d9568a4b56 SUBMODULE: updates for catalyst
- SIGFPE handling, cmake configuration

CONFIG: adjust for simplified Catalyst channel naming

- no sub-channels, select volField output based in the
  (internal | boundary) dictionary switches instead
2018-06-24 15:50:50 +02:00
mattijs
f7fa618e8f Merge remote-tracking branch 'origin/develop' into develop-pre-release 2018-05-21 09:53:10 +01:00
mattijs
447ee9e027 ENH: processorField: added etc/caseDicts file. Fixes #807. 2018-05-21 09:45:55 +01:00
Andrew Heather
f700bce878 Merge remote-tracking branch 'origin/develop' into develop-pre-release 2018-05-17 12:14:27 +01:00
Mark Olesen
28627250c6 CONFIG: update catalyst configuration files
- relocated from
    etc/caseDicts/postProcessing/catalyst/ -> etc/caseDicts/insitu/catalyst/

- adjusted for unified catalyst function object
2018-05-11 14:55:47 +02:00
Mark Olesen
5f88e4271e ENH: allow "<case>", "<system>" ... in the string expansions (issue #792)
- the expansions were previously required as slash to follow, but
  now either are possible.

    "<case>", "<case>/" both yield the same as "$FOAM_CASE" and
    will not have a trailing slash in the result. The expansion of
    "$FOAM_CASE/" will however have a trailing slash.

- adjust additional files using these expansions
2018-04-11 23:10:49 +02:00
Mark Olesen
6d8be52294 STYLE: provide caseDicts for the catalyst function object 2018-04-10 14:23:56 +02:00
Andrew Heather
6aa7b6ac2a STYLE: Header clean-up 2017-11-07 11:22:58 +00:00
Mark Olesen
4e48beffd4 ENH: support "one-shot" changes to the dictionary inputMode (issue #429)
- Instead of relying on #inputMode to effect a global change it is now
  possible (and recommended) to a temporary change in the inputMode
  for the following entry.

     #default   : provide default value if entry is not already defined
     #overwrite : silently remove a previously existing entry
     #warn      : warn about duplicate entries
     #error     : error if any duplicate entries occur
     #merge     : merge sub-dictionaries when possible (the default mode)

  This is generally less cumbersome than the switching the global
  inputMode. For example to provide a set of fallback values.

      #includeIfPresent "user-files"
      ...
      #default value uniform 10;

  vs.

      #includeIfPresent "user-files"
      #inputMode protect
      ...
      value uniform 10;
      #inputMode merge    // _Assuming_ we actually had this before

  These directives can also be used to suppress the normal dictionary
  merge semantics:

     #overwrite dict { entry val; ... }
2017-07-29 17:44:22 +02:00
Will Bainbridge
66b3934ab6 ENH: foamyHexMesh: Set no refinement iterations in global dictionary
ENH: foamyHexMesh: Made default region volume type that of it's parent

Foamy surface conformation entries have a "meshableSide" entry which
controls which side of the surface is to be meshed. Typically this is
set "inside" for boundaries and "both" for baffles. A sub-region's
default entry is now taken from it's parent, rather than a specific
value (it was "inside"). This is consistent with how other entries are
handled.

surfaceConformation
{
    locationInMesh      (0 0 0);

    geometryToConformTo
    {
        baffle
        {
            featureMethod           extractFeatures;
            includedAngle           120;
            meshableSide            both; // <-- per-surface setting

            regions
            {
                disk
                {
                    meshableSide    both; // <-- per-region setting*

                    // *in this example, this entry is not needed, as it
                    // is taken from the per-surface setting above
                }
            }
        }

        // ...
    }
}

ENH: foamyHexMesh: Added (reinstated) baffle patches

A patch can now be assigned to a baffle surface. This assignment will
take precedence over any face-zones.

surfaceConformation
{
    locationInMesh      (0 0 0);

    geometryToConformTo
    {
        disk
        {
            featureMethod           extractFeatures;
            includedAngle           120;
            meshableSide            both; // <-- baffle
            patchInfo
            {
                type wall;
                inGroups (walls);
            }
        }

        // ...
    }
}

STYLE: foamyHexMesh: Switched off output of all the secondary meshes
2017-09-15 15:04:16 +01:00
Henry Weller
50306c0bda flowRateFaceZone: faceZone configuration for the surfaceFieldValue functionObject 2017-05-05 18:29:14 +01:00
Will Bainbridge
743dea87d2 Lagrangian: Rewrite of the particle tracking algorithm to function in
terms of the local barycentric coordinates of the current tetrahedron,
rather than the global coordinate system.

Barycentric tracking works on any mesh, irrespective of mesh quality.
Particles do not get "lost", and tracking does not require ad-hoc
"corrections" or "rescues" to function robustly, because the calculation
of particle-face intersections is unambiguous and reproducible, even at
small angles of incidence.

Each particle position is defined by topology (i.e. the decomposed tet
cell it is in) and geometry (i.e. where it is in the cell). No search
operations are needed on restart or reconstruct, unlike when particle
positions are stored in the global coordinate system.

The particle positions file now contains particles' local coordinates
and topology, rather than the global coordinates and cell. This change
to the output format is not backwards compatible. Existing cases with
Lagrangian data will not restart, but they will still run from time
zero without any modification. This change was necessary in order to
guarantee that the loaded particle is valid, and therefore
fundamentally prevent "loss" and "search-failure" type bugs (e.g.,
2517, 2442, 2286, 1836, 1461, 1341, 1097).

The tracking functions have also been converted to function in terms
of displacement, rather than end position. This helps remove floating
point error issues, particularly towards the end of a tracking step.

Wall bounded streamlines have been removed. The implementation proved
incompatible with the new tracking algorithm. ParaView has a surface
LIC plugin which provides equivalent, or better, functionality.

Additionally, bug report <https://bugs.openfoam.org/view.php?id=2517>
is resolved by this change.
2017-04-28 08:03:44 +01:00
Andrew Heather
35090ebdc3 Merge branch 'master' into develop 2017-08-31 14:08:17 +01:00
Prashant
870a0a1d60 BugFix: keyword for caseDict also syncrhonized 2017-08-30 09:48:45 +05:30
Prashant
ffed13435a BugFix: corrected keyword for flowRateInletVelocity BC fixes #577 2017-08-30 09:38:36 +05:30
Mark Olesen
e7da4f0d07 TUT: adjust surfaceFeatureExtractDict to remove optional sub-dictionary
- as of v1706
  extractFromSurfaceCoeffs { ... } is an optional subdictionary
2017-07-07 15:41:18 +02:00
Mark Olesen
98cc0fc004 ENH: upgrade writeVTK function object -> vtkWrite function object
- user-selectable format (vtk or vtu, ascii or binary)
- dictionary syntax closer to ensightWrite
- tutorial example in windAroundBuildings
2017-06-14 01:48:32 +02:00
mattijs
fd665b4a3c ENH: overset: Initial release of overset capability.
Adds overset discretisation to selected physics:
- diffusion : overLaplacianDyMFoam
- incompressible steady : overSimpleFoam
- incompressible transient : overPimpleDyMFoam
- compressible transient: overRhoPimpleDyMFoam
- two-phase VOF: overInterDyMFoam

The overset method chosen is a parallel, fully implicit implementation
whereby the interpolation (from donor to acceptor) is inserted as an
adapted discretisation on the donor cells, such that the resulting matrix
can be solved using the standard linear solvers.

Above solvers come with a set of tutorials, showing how to create and set-up
simple simulations from scratch.
2017-06-14 09:51:02 +01:00
Andrew Heather
91b90da4f3 Integrated Foundation code to commit 104aac5 2017-05-17 16:35:18 +01:00
Henry Weller
5c51836501 The "<type>Coeffs" sub-dictionary is now optional for most model parameters
except turbulence and lagrangian which will also be updated shortly.

For example in the nonNewtonianIcoFoam offsetCylinder tutorial the viscosity
model coefficients may be specified in the corresponding "<type>Coeffs"
sub-dictionary:

transportModel  CrossPowerLaw;

CrossPowerLawCoeffs
{
    nu0         [0 2 -1 0 0 0 0]  0.01;
    nuInf       [0 2 -1 0 0 0 0]  10;
    m           [0 0 1 0 0 0 0]   0.4;
    n           [0 0 0 0 0 0 0]   3;
}

BirdCarreauCoeffs
{
    nu0         [0 2 -1 0 0 0 0]  1e-06;
    nuInf       [0 2 -1 0 0 0 0]  1e-06;
    k           [0 0 1 0 0 0 0]   0;
    n           [0 0 0 0 0 0 0]   1;
}

which allows a quick change between models, or using the simpler

transportModel  CrossPowerLaw;

nu0         [0 2 -1 0 0 0 0]  0.01;
nuInf       [0 2 -1 0 0 0 0]  10;
m           [0 0 1 0 0 0 0]   0.4;
n           [0 0 0 0 0 0 0]   3;

if quick switching between models is not required.

To support this more convenient parameter specification the inconsistent
specification of seedSampleSet in the streamLine and wallBoundedStreamLine
functionObjects had to be corrected from

    // Seeding method.
    seedSampleSet   uniform;  //cloud; //triSurfaceMeshPointSet;

    uniformCoeffs
    {
        type        uniform;
        axis        x;  //distance;

        // Note: tracks slightly offset so as not to be on a face
        start       (-1.001 -0.05 0.0011);
        end         (-1.001 -0.05 1.0011);
        nPoints     20;
    }

to the simpler

    // Seeding method.
    seedSampleSet
    {
        type        uniform;
        axis        x;  //distance;

        // Note: tracks slightly offset so as not to be on a face
        start       (-1.001 -0.05 0.0011);
        end         (-1.001 -0.05 1.0011);
        nPoints     20;
    }

which also support the "<type>Coeffs" form

    // Seeding method.
    seedSampleSet
    {
        type        uniform;

        uniformCoeffs
        {
            axis        x;  //distance;

            // Note: tracks slightly offset so as not to be on a face
            start       (-1.001 -0.05 0.0011);
            end         (-1.001 -0.05 1.0011);
            nPoints     20;
        }
    }
2017-04-20 09:14:48 +01:00
Andrew Heather
332c8acdcd ENH: Clean-up after latest Foundation integrations 2017-03-31 15:36:28 +01:00
Andrew Heather
fb724ce113 MRG: Integrated Foundation code to commit 9f37c3c 2017-03-31 15:34:28 +01:00