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++ -*----------------------------------*\ /*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2112 | | \\ / O peration | Version: v2206 |
| \\ / A nd | Website: www.openfoam.com | | \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -174,25 +174,17 @@ surfaces
interpolatedPlane interpolatedPlane
{ {
type plane; // always triangulated type plane; // always triangulated
basePoint (0 0 0);
normalVector (0.1 0.1 1);
interpolate true;
// Make plane relative to the coordinateSystem (Cartesian) // Make plane relative to the coordinateSystem (Cartesian)
coordinateSystem coordinateSystem
{ {
origin (0.0501 0.0501 0.005); origin (0.0501 0.0501 0.005);
rotation none;
// Add a coordinate rotation
// (required, so here one that doesn't change anything)
coordinateRotation
{
type axesRotation;
e1 (1 0 0);
e2 (0 1 0);
} }
} }
basePoint (0 0 0);
normalVector (0.1 0.1 1);
interpolate true;
}
walls_constant walls_constant
{ {

View File

@ -48,13 +48,15 @@ namespace coordinateRotations
euler euler
); );
// Longer name - Compat 1806 // Long name - Compat 1806
addNamedToRunTimeSelectionTable addAliasToRunTimeSelectionTable
( (
coordinateRotation, coordinateRotation,
euler, euler,
dictionary, dictionary,
EulerRotation euler,
EulerRotation,
1806
); );
} // End namespace coordinateRotations } // End namespace coordinateRotations

View File

@ -48,7 +48,7 @@ Description
\heading Dictionary entries \heading Dictionary entries
\table \table
Property | Description | Reqd | Default Property | Description | Reqd | Default
type | Type name: euler (or EulerRotation) | yes | type | Type name: euler | yes |
angles | Rotation angles (usually z-x-z order) | yes | angles | Rotation angles (usually z-x-z order) | yes |
degrees | Angles are in degrees | no | true degrees | Angles are in degrees | no | true
order | Rotation order | no | zxz order | Rotation order | no | zxz
@ -57,6 +57,7 @@ Description
Note Note
The rotation order is usually z-x-z, but can also be something like The rotation order is usually z-x-z, but can also be something like
"rollPitchYaw" etc. "rollPitchYaw" etc.
Also accepts "EulerRotation" (OpenFOAM-v1806) for the type.
SourceFiles SourceFiles
EulerCoordinateRotation.C EulerCoordinateRotation.C

View File

@ -48,13 +48,15 @@ namespace coordinateRotations
starcd starcd
); );
// Longer name - Compat 1806 // Long name - Compat 1806
addNamedToRunTimeSelectionTable addAliasToRunTimeSelectionTable
( (
coordinateRotation, coordinateRotation,
starcd, starcd,
dictionary, dictionary,
STARCDRotation starcd,
STARCDRotation,
1806
); );
} // End namespace coordinateRotation } // End namespace coordinateRotation

View File

@ -46,12 +46,15 @@ Description
\heading Dictionary entries \heading Dictionary entries
\table \table
Property | Description | Required | Default Property | Description | Reqd | Default
type | Type name: starcd (or STARCDRotation) | yes | type | Type name: starcd | yes |
angles | The z-x-y rotation angles | yes | angles | The z-x-y rotation angles | yes |
degrees | Angles are in degrees | no | true degrees | Angles are in degrees | no | true
\endtable \endtable
Note
Also accepts "STARCDRotation" (OpenFOAM-v1806) for the type.
SourceFiles SourceFiles
STARCDCoordinateRotation.C STARCDCoordinateRotation.C

View File

@ -48,13 +48,15 @@ namespace coordinateRotations
axes axes
); );
// Longer name - Compat 1806 // Long name - Compat 1806
addNamedToRunTimeSelectionTable addAliasToRunTimeSelectionTable
( (
coordinateRotation, coordinateRotation,
axes, axes,
dictionary, dictionary,
axesRotation axes,
axesRotation,
1806
); );
} // End namespace coordinateRotations } // End namespace coordinateRotations

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2017-2021 OpenCFD Ltd. Copyright (C) 2017-2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -44,8 +44,8 @@ Description
\heading Dictionary entries \heading Dictionary entries
\table \table
Property | Description | Required | Default Property | Description | Reqd | Default
type | type name: axes (previously axesRotation) | yes | type | Type name: axes | yes |
e1 | local x-axis | partly | e1 | local x-axis | partly |
e2 | local y-axis | partly | e2 | local y-axis | partly |
e3 | local z-axis | partly | e3 | local z-axis | partly |
@ -55,6 +55,7 @@ Note
It is also possible to specify in terms of \c axis and \c direction. It is also possible to specify in terms of \c axis and \c direction.
For cylindrical coordinates, the \c axis would correspond to the For cylindrical coordinates, the \c axis would correspond to the
\a z-axis and the \c direction to the \a r-axis. \a z-axis and the \c direction to the \a r-axis.
Also accepts "axesRotation" (OpenFOAM-v1806) for the type.
SourceFiles SourceFiles
axesRotation.C axesRotation.C

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2013 OpenFOAM Foundation Copyright (C) 2011-2013 OpenFOAM Foundation
Copyright (C) 2017-2021 OpenCFD Ltd. Copyright (C) 2017-2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -27,6 +27,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "coordinateRotation.H" #include "coordinateRotation.H"
#include "axesRotation.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -45,7 +46,7 @@ Foam::vector Foam::coordinateRotation::findOrthogonal(const vector& axis)
direction maxCmpt = 0; direction maxCmpt = 0;
scalar maxVal = mag(axis[maxCmpt]); scalar maxVal = mag(axis[maxCmpt]);
for (direction cmpt=1; cmpt < vector::nComponents; ++cmpt) for (direction cmpt = 1; cmpt < vector::nComponents; ++cmpt)
{ {
const scalar val = mag(axis[cmpt]); const scalar val = mag(axis[cmpt]);
@ -69,10 +70,14 @@ Foam::vector Foam::coordinateRotation::findOrthogonal(const vector& axis)
Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New
( (
word modelType,
const dictionary& dict const dictionary& dict
) )
{ {
const word modelType(dict.get<word>("type")); if (modelType.empty())
{
modelType = coordinateRotations::axes::typeName_();
}
auto* ctorPtr = dictionaryConstructorTable(modelType); auto* ctorPtr = dictionaryConstructorTable(modelType);
@ -81,7 +86,7 @@ Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New
FatalIOErrorInLookup FatalIOErrorInLookup
( (
dict, dict,
"coordinateRotation", "rotation",
modelType, modelType,
*dictionaryConstructorTablePtr_ *dictionaryConstructorTablePtr_
) << exit(FatalIOError); ) << exit(FatalIOError);
@ -91,4 +96,13 @@ Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New
} }
Foam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New
(
const dictionary& dict
)
{
return coordinateRotation::New(dict.get<word>("type"), dict);
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -114,7 +114,16 @@ public:
// Selectors // Selectors
//- Select constructed from dictionary //- Select construct the specified coordinate rotation type
//
// An empty modelType will be treated as "axes" (eg, e1/e3)
static autoPtr<coordinateRotation> New
(
word modelType,
const dictionary& dict
);
//- Select construct from dictionary (requires the "type" entry)
static autoPtr<coordinateRotation> New(const dictionary& dict); static autoPtr<coordinateRotation> New(const dictionary& dict);

View File

@ -41,8 +41,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef cartesianCS_H #ifndef Foam_cartesianCS_H
#define cartesianCS_H #define Foam_cartesianCS_H
#include "coordinateSystem.H" #include "coordinateSystem.H"

View File

@ -74,23 +74,25 @@ void Foam::coordinateSystem::assign(const dictionary& dict)
note_.clear(); note_.clear();
dict.readIfPresent("note", note_); dict.readIfPresent("note", note_);
// Non-recursive, no pattern search for "rotation"
// or "coordinateRotation" (older) sub-dictionary.
// Don't warn about older naming for now (OCT-2018)
const auto finder = dict.csearchCompat const auto finder = dict.csearchCompat
( (
"rotation", {{"coordinateRotation", -1806}}, "rotation", {{"coordinateRotation", 1806}},
keyType::LITERAL keyType::LITERAL
); );
if (finder.good())
{
if (finder.isDict()) if (finder.isDict())
{ {
// Use the sub-dict, which is expected to contain "type"
spec_ = coordinateRotation::New(finder.dict()); spec_ = coordinateRotation::New(finder.dict());
} }
else if (finder.good() && (finder->stream().peek().isWord("none"))) else
{ {
spec_.reset(new coordinateRotations::identity()); // Use current dict. Type specified by "rotation" entry itself.
const word rotationType(finder->get<word>());
spec_.reset(coordinateRotation::New(rotationType, dict));
}
} }
else else
{ {
@ -106,7 +108,7 @@ void Foam::coordinateSystem::assign(const dictionary& dict)
Foam::coordinateSystem::coordinateSystem(std::nullptr_t) Foam::coordinateSystem::coordinateSystem(std::nullptr_t)
: :
spec_(), spec_(nullptr),
origin_(Zero), origin_(Zero),
rot_(sphericalTensor::I), rot_(sphericalTensor::I),
name_(), name_(),
@ -258,8 +260,10 @@ Foam::coordinateSystem::coordinateSystem
Foam::coordinateSystem::coordinateSystem(const dictionary& dict) Foam::coordinateSystem::coordinateSystem(const dictionary& dict)
: :
coordinateSystem(word::null, dict) coordinateSystem(nullptr)
{} {
assign(dict);
}
Foam::coordinateSystem::coordinateSystem Foam::coordinateSystem::coordinateSystem

View File

@ -52,7 +52,8 @@ Description
} }
\endverbatim \endverbatim
The same, but in more verbose format: However, a more verbose format with rotation provided as a dictionary entry
is possible:
\verbatim \verbatim
coordinateSystem coordinateSystem
{ {
@ -67,9 +68,20 @@ Description
} }
\endverbatim \endverbatim
For an identity rotation, can use a slightly more compact format: It also also possible to use the compact (single-dictionary) form
and specific a different type of rotation:
\verbatim \verbatim
coordinateSystem coordinateSystem
{
type cartesian;
origin (0 0 0);
rotation euler;
angles (90 0 0);
}
\endverbatim
This last form can be particularly readable for an identity rotation:
coordinateSystem
{ {
type cartesian; type cartesian;
origin (0 0 0); origin (0 0 0);
@ -132,12 +144,6 @@ class indirect;
class coordinateSystem class coordinateSystem
{ {
// Private Member Functions
//- Use 'coordinateSystem' sub-dictionary if present
static const dictionary* subDictCompat(const dictionary* dictPtr);
protected: protected:
//- Friendship with indirect for dispatching to its underlying system //- Friendship with indirect for dispatching to its underlying system
@ -434,9 +440,9 @@ public:
// Member Functions // Member Functions
// Access // Characteristics
//- Considered valid if it has a specification //- Consider valid if it has a specification
virtual bool valid() const virtual bool valid() const
{ {
return bool(spec_); return bool(spec_);
@ -448,6 +454,15 @@ public:
return true; return true;
} }
// Access
//- Return origin
virtual const point& origin() const
{
return origin_;
}
//- The rotation specification //- The rotation specification
virtual const coordinateRotation& rotation() const virtual const coordinateRotation& rotation() const
{ {
@ -466,12 +481,6 @@ public:
return note_; return note_;
} }
//- Return origin
virtual const point& origin() const
{
return origin_;
}
//- Return const reference to the rotation tensor //- Return const reference to the rotation tensor
virtual const tensor& R() const virtual const tensor& R() const
{ {

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2018-2021 OpenCFD Ltd. Copyright (C) 2018-2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -30,28 +30,34 @@ License
#include "cartesianCS.H" #include "cartesianCS.H"
#include "indirectCS.H" #include "indirectCS.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
namespace Foam
{
//- Handle a 'coordinateSystem' sub-dictionary // Handle a 'coordinateSystem' sub-dictionary
// In 1806 and earlier, this was handled (rather poorly) in the // In 1806 and earlier, this was handled (rather poorly) in the
// coordinateSystem constructor itself. // coordinateSystem constructor itself.
const Foam::dictionary* Foam::coordinateSystem::subDictCompat static const dictionary* subDictCompat
( (
const word& entryName,
const dictionary* dictPtr const dictionary* dictPtr
) )
{ {
if (dictPtr) if (entryName.empty() || !dictPtr)
{ {
// Non-recursive, no pattern matching in the search return nullptr;
const auto finder = }
dictPtr->csearch(coordinateSystem::typeName_(), keyType::LITERAL);
const auto finder = dictPtr->csearch(entryName, keyType::LITERAL);
if (finder.good())
{
if (finder.isDict()) if (finder.isDict())
{ {
return finder.dictPtr(); return finder.dictPtr();
} }
else if (finder.found()) else
{ {
const word csName(finder.ref().stream()); const word csName(finder.ref().stream());
@ -60,7 +66,7 @@ const Foam::dictionary* Foam::coordinateSystem::subDictCompat
{ {
std::cerr std::cerr
<< "--> FOAM IOWarning :" << nl << "--> FOAM IOWarning :" << nl
<< " Ignoring 'coordinateSystem' as a keyword." << " Ignoring '" << entryName << "' as a keyword."
" Perhaps you meant this instead?" << nl " Perhaps you meant this instead?" << nl
<< '{' << nl << '{' << nl
<< " type " << coordSystem::indirect::typeName_() << " type " << coordSystem::indirect::typeName_()
@ -77,6 +83,8 @@ const Foam::dictionary* Foam::coordinateSystem::subDictCompat
return dictPtr; return dictPtr;
} }
} // End namespace Foam
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
@ -162,8 +170,8 @@ Foam::autoPtr<Foam::coordinateSystem> Foam::coordinateSystem::New
} }
else else
{ {
// Use 'coordinateSystem' subDict if present // Fallback: 'coordinateSystem' subDict if present
dictPtr = coordinateSystem::subDictCompat(dictPtr); dictPtr = subDictCompat(coordinateSystem::typeName_(), dictPtr);
} }
word modelType = dictPtr->getOrDefault<word> word modelType = dictPtr->getOrDefault<word>
@ -190,8 +198,8 @@ Foam::autoPtr<Foam::coordinateSystem> Foam::coordinateSystem::New
} }
else else
{ {
// Use 'coordinateSystem' subDict if present // Fallback: 'coordinateSystem' subDict if present
dictPtr = coordinateSystem::subDictCompat(dictPtr); dictPtr = subDictCompat(coordinateSystem::typeName_(), dictPtr);
} }
const word modelType = dictPtr->getOrDefault<word> const word modelType = dictPtr->getOrDefault<word>

View File

@ -43,8 +43,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef cylindricalCS_H #ifndef Foam_cylindricalCS_H
#define cylindricalCS_H #define Foam_cylindricalCS_H
#include "coordinateSystem.H" #include "coordinateSystem.H"

View File

@ -68,12 +68,6 @@ class indirect
const coordinateSystem* backend_; const coordinateSystem* backend_;
// Private Member Functions
//- Construct null is disallowed
indirect() = delete;
protected: protected:
// Protected Member Functions // Protected Member Functions
@ -131,6 +125,9 @@ public:
// Constructors // Constructors
//- Default construct is disallowed
indirect() = delete;
//- Copy construct //- Copy construct
indirect(const indirect& csys); indirect(const indirect& csys);
@ -156,15 +153,9 @@ public:
// Member Functions // Member Functions
// Access // Characteristics
//- Reference to the underlying coordinate system //- Is coordinate system valid?
virtual const coordinateSystem& cs() const
{
return *backend_;
}
//- Is the coordinate system valid?
virtual bool valid() const virtual bool valid() const
{ {
return backend_ && backend_->valid(); return backend_ && backend_->valid();
@ -176,6 +167,21 @@ public:
return backend_->uniform(); return backend_->uniform();
} }
// Access
//- Reference to the underlying coordinate system
virtual const coordinateSystem& cs() const
{
return *backend_;
}
//- Return origin
virtual const point& origin() const
{
return backend_->origin();
}
//- The rotation specification //- The rotation specification
virtual const coordinateRotation& rotation() const virtual const coordinateRotation& rotation() const
{ {
@ -194,12 +200,6 @@ public:
return backend_->note(); return backend_->note();
} }
//- Return origin
virtual const point& origin() const
{
return backend_->origin();
}
//- Return const reference to the rotation tensor //- Return const reference to the rotation tensor
virtual const tensor& R() const virtual const tensor& R() const
{ {

View File

@ -207,23 +207,33 @@ Foam::searchableSurfaceCollection::searchableSurfaceCollection
sDict.readEntry("scale", scale_[surfI]); sDict.readEntry("scale", scale_[surfI]);
const dictionary& coordDict = sDict.subDict("transform"); const dictionary& coordDict = sDict.subDict("transform");
if (coordDict.found("coordinateSystem"))
{ const dictionary* compatDict =
// Backwards compatibility: use coordinateSystem subdictionary coordDict.findDict
transform_.set
( (
surfI, coordinateSystem::typeName_(),
new coordSystem::cartesian(coordDict, "coordinateSystem") keyType::LITERAL
); );
if (compatDict)
{
// Deprecated form
if (error::master())
{
std::cerr
<< "--> FOAM IOWarning :" << nl
<< " Found [v1806] '"
<< coordinateSystem::typeName_()
<< "' entry within transform dictionary" << nl
<< std::endl;
error::warnAboutAge("sub-dictionary", 1806);
}
transform_.set(surfI, new coordSystem::cartesian(*compatDict));
} }
else else
{ {
// New form: directly set from dictionary transform_.set(surfI, new coordSystem::cartesian(coordDict));
transform_.set
(
surfI,
new coordSystem::cartesian(sDict, "transform")
);
} }
const word subGeomName(sDict.get<word>("surface")); const word subGeomName(sDict.get<word>("surface"));

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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