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.
This commit is contained in:
Mark Olesen
2022-06-07 16:49:14 +02:00
parent 460b29b8c7
commit 7184de50df
26 changed files with 217 additions and 192 deletions

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2112 |
| \\ / O peration | Version: v2206 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -21,12 +21,9 @@ scale 0.001;
transform
{
origin (0 0 0);
rotation
{
type axisAngle;
axis (0 0 1);
angle 45;
}
rotation axisAngle;
axis (0 0 1);
angle 45;
}
// Geometric parameters

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2112 |
| \\ / O peration | Version: v2206 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -26,15 +26,12 @@ coeffs
transform
{
origin (-0.15 0.15 0);
rotation
{
type axisAngle;
axis (0 0 1);
angle 44.5;
rotation axisAngle;
// Or disabled
//rotation none;
// Or disabled
//type none;
}
axis (0 0 1);
angle 44.5;
}
}

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2112 |
| \\ / O peration | Version: v2206 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -20,13 +20,10 @@ scale 0.001;
transform
{
origin (0 0 0);
rotation
{
type axisAngle;
axis (0 0 1);
angle 45;
}
origin (0 0 0);
rotation axisAngle;
axis (0 0 1);
angle 45;
}
// Geometric parameters

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2112 |
| \\ / O peration | Version: v2206 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -32,11 +32,7 @@ porosity1
coordinateSystem
{
origin (0 0 0);
rotation
{
type none;
}
rotation none;
}
}
}

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2112 |
| \\ / O peration | Version: v2206 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -20,13 +20,10 @@ scale 0.001;
transform
{
origin (0 0 0);
rotation
{
type axisAngle;
axis (0 0 1);
angle 45;
}
origin (0 0 0);
rotation axisAngle;
axis (0 0 1);
angle 45;
}
// Geometric parameters

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2112 |
| \\ / O peration | Version: v2206 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -21,12 +21,9 @@ scale 0.001;
transform
{
origin (0 0 0);
rotation
{
type axisAngle;
axis (0 0 1);
angle 45;
}
rotation axisAngle;
axis (0 0 1);
angle 45;
}
// Geometric parameters