Commit Graph

21771 Commits

Author SHA1 Message Date
d2b32fcc84 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2018-10-08 15:42:19 -07:00
ba40eeec53 BUG: Correct initialization for psi and mu for solid thermo 2018-10-08 15:41:36 -07:00
ac886d054f Merge branch 'master' of develop.openfoam.com:Development/OpenFOAM-plus 2018-10-08 15:40:45 -07:00
4c2af2bb1e BUG: Correct initialization for psi and mu for solidThermo 2018-10-08 15:40:12 -07:00
6eb1f6fefc ENH: searchableSurface: handle multiple surfaces. Fixes #1034 2018-10-08 17:11:37 +01:00
3b77493abc ENH: wordRes matcher method that distinguishes literal vs. regex
- useful for customizing the behaviour of white/black lists depending
  on the type of the match.
2018-10-07 18:30:33 +02:00
8d6f83e666 ENH: isLiteral() method for keyType and wordRe
- same as !isPattern(), but can be more readable.

- add wordRe enum state 'UNKNOWN', which has the identical value as
  'DETECT' but used for a return value.
2018-10-07 17:28:11 +02:00
87cc19de82 STYLE: typo in comment 2018-10-07 17:23:45 +02:00
da10a8e676 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2018-10-05 08:26:51 -07:00
3eafee43c9 BUG: Correcting compilation error in createFields for
overPimpleDymFoam
2018-10-05 08:24:07 -07:00
efaa9f84be COMP: include fileFormats for paraview plugins 2018-10-05 16:50:23 +02:00
77753021df Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2018-10-04 09:14:08 -07:00
ba870ef7df ENH: Adding non-interplating fields to createFields for overPimpleDyMFoam 2018-10-04 09:13:22 -07:00
073770ddf2 ENH: dynamicOversetMesh: added debug writing. See #1028. 2018-10-04 14:27:46 +01:00
789d261f0e Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2018-10-01 17:14:39 -07:00
d0c39b0e27 ENH: Changing non-interpolation field in versetFvPatchField
for correct run time reading.
Setting up twoSimpleRotors tutorial for smooth pressure
fluctuations
2018-10-01 17:11:39 -07:00
ebdb227863 ENH: Modifications to overPimpleDyMFoam 2018-10-01 17:05:35 -07:00
496e1cd0d2 STYLE: enforce Cartesian transform (issue #1027)
- searchable surfaces
- pointToPointPlanarInterpolation
- sampled planes
- surfaceMeshConvert, surfaceMeshExport, surfaceMeshImport
2018-10-01 22:55:59 +02:00
b17bcd67b7 ENH: correct suspicious coordinate system conversions (issue #1027)
- arraySet :
     was translate + transform
     now use globalPosition (== transform + translate).

     Explicitly limit to Cartesian coordinate system for clarity.
2018-10-01 17:10:35 +02:00
501326b27a ENH: additional constructor and methods for regionProperties
- can now construct with READ_IF_PRESENT and use count() to determine
  if it was loaded. names() and sortedNames() for a collected overview.
2018-10-01 16:01:02 +02:00
e6a60f2de6 ENH: use intermediate constants for sin/cos in coordinate rotations
- makes an easier overview of the rotation matrix coefficients
  (issue #863).

  Provided as a distinct commit for easier examination of the lines changed.
2018-10-05 00:58:23 +02:00
b9c738dd10 ENH: expose calculation of coordinate rotations as static methods
- improve handling of degenerate cases for the two-axes specification.
2018-10-05 00:49:55 +02:00
95b95d7201 GIT: relocation of coordinate systems/rotation files 2018-10-04 23:46:57 +02:00
baf3e931de ENH: add GeometricField constructor for movable internal field
- the movable type is List&& or Field&&
2018-10-04 11:14:04 +02:00
8548009eee ENH: generalize instant to be templated, movable, etc
- allows reuse for other purposes
2018-10-03 14:05:45 +02:00
6c91048e8b ENH: fileName hasPath(), removePath() methods
- improved move constructors/assignments for fileName, string, etc
2018-10-03 14:05:45 +02:00
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
69f6f63810 ENH: add globalPath() to argList and TimePaths
- simply combines (rootPath()/globalCaseName())
2018-09-28 15:24:59 +02:00
911ea1087d meshSearch: Prevent hang in calculation of line-boundary intersections
This fix changes how the intersections loop ignores previously
intersected faces. It now marks them by their index so that subsequent
iterations ignore them.

Before this change, after an intersection was found the start point was
advanced by a small amount to move the past the intersection. The
problem with this was if multiple boundary faces or the end point were
in close proximity to the intersection then the move forward might span
them. This could lead to intersections being missed or counted multiple
times, in some cases indefinitely.

Based on a patch contributed by Mattijs Janssens
Resolves bug report https://bugs.openfoam.org/view.php?id=1147
2018-09-28 12:26:17 +01:00
b937a531bd STYLE: Allrun: use suffix option 2018-10-03 09:39:27 +01:00
c0460d3015 Merge remote-tracking branch 'Customer-VWG/wp3-directional-refinement' into develop 2018-10-04 13:43:33 +01:00
8855fdeb40 Merge branch 'wp3-directional-refinement' of develop.openfoam.com:/Customer-VWG/OpenFOAM-plus into wp3-directional-refinement 2018-10-04 12:07:36 +01:00
8076963c68 ENH: snappyHexMesh: directional smoothing. See #1031 2018-10-04 12:03:53 +01:00
16b7707c31 ENH: snappyHexMesh: directional smoothing. See #1031 2018-10-04 12:03:53 +01:00
6627515838 ENH: fieldMinMax function object - updated for case where there are no cells on a local processor, e.g. CHT 2018-10-03 13:06:31 +01:00
6141575532 BUG: cellCellStencil: use before mesh.update. Fixes #1028. 2018-10-03 09:35:13 +01:00
8e82e7b8e8 ENH: heatTransfer: allow free patch to be moved. See #1026. 2018-10-01 09:51:24 +01:00
d92d77cc84 Merge remote-tracking branch 'origin/master' into develop 2018-09-28 13:20:41 +02:00
4a61042f3f ENH: add column access and other methods for Tensor
- Can now retrieve or set a column/row of a tensor.
  Either compile-time or run-time checks.

  Get
     t.col<1>();   t.col(1);
     t.row<1>();   t.row(1);

  Set
     t.col<1>(vec);   t.col(1,vec);
     t.row<1>(vec);   t.row(1,vec);

  The templated versions are compile-time checked

     t.col<3>();
     t.col<3>(vec);

  The parameter versions are run-time checked

     t.col(3);
     t.col(3,vec);

ENH: provide named access to tensor/tensor inner product as inner()
2018-09-28 11:20:31 +02:00
2d5f77f2dd ENH: add invTransform in transform.H 2018-09-28 09:53:45 +02:00
a6473dca33 STYLE: minor coding/comments cleanup for transform, transformList 2018-09-28 09:29:12 +02:00
dde9ef4712 BUG: bad transform for transformList (fixes #1024) 2018-09-28 08:47:08 +02:00
1135f1572d TUT: Removed unused/misleading entries - see #1020 2018-09-27 16:34:44 +01:00
731ebc9126 ENH: Particle interaction lists - do not include partially open wall faces. See #957 2018-09-27 12:51:13 +01:00
0f4c6572bc ENH: polyPatch - added areaFraction method
Helper function to calculate the current face area vs the area returned
from the current point locations.  Useful for ACMI-type baffles where we
scale the face areas without moving points.
2018-09-27 12:46:48 +01:00
64c3e484bb STYLE: add nBoundaryFaces() method to primitiveMesh
- nBoundaryFaces() is often used and is identical to
  (nFaces() - nInternalFaces()).

- forward the mesh nInternalFaces() and nBoundaryFaces() to
  polyBoundaryMesh as nFaces() and start() respectively,
  for use when operating on a polyBoundaryMesh.

STYLE:

- use identity() function with starting offset when creating boundary maps.

     labelList map
     (
         identity(mesh.nBoundaryFaces(), mesh.nInternalFaces())
     );

  vs.

     labelList map(mesh.nBoundaryFaces());
     forAll(map, i)
     {
         map[i] = mesh.nInternalFaces() + i;
     }
2018-09-27 10:17:30 +02:00
3a641275d3 COMP: Allwmake: pass through targetType 2018-09-26 14:32:32 +01:00
89342b6ff3 COMP: Allwmake: pass through targetType 2018-09-26 14:32:32 +01:00
b23375ab3d Merge branch 'master' of develop.openfoam.com:Development/OpenFOAM-plus 2018-09-25 12:49:09 -07:00
8794b1955a BUG: Fix ticket 792. pRefCelli is set to -1 for
chtMultiRegionSimpleFoam
2018-09-25 12:48:04 -07:00