A coordinateRotation specified using global axes. More...
Public Types | |
enum | axisOrder { E1_E2 , E2_E3 , E3_E1 , E3_E1_COMPAT } |
The order/combination of local axes for the axes-rotation definition. More... | |
Public Member Functions | |
TypeNameNoDebug ("axes") | |
Runtime type information. More... | |
axes () | |
Default construct - an identity transform. More... | |
axes (const axes &crot) | |
Copy construct. More... | |
axes (const vector &axis1, const vector &axis2, axisOrder order=E3_E1) | |
Construct from two axes. More... | |
axes (const vector &axis) | |
axes (const dictionary &dict) | |
Construct from dictionary. More... | |
autoPtr< coordinateRotation > | clone () const |
Return clone. More... | |
virtual | ~axes ()=default |
Destructor. More... | |
virtual void | clear () |
Reset specification. More... | |
virtual tensor | R () const |
The rotation tensor calculated from the specified axes and order. More... | |
virtual void | write (Ostream &os) const |
Write information. More... | |
virtual void | writeEntry (const word &keyword, Ostream &os) const |
Write dictionary entry. More... | |
Public Member Functions inherited from coordinateRotation | |
TypeNameNoDebug ("coordinateRotation") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, coordinateRotation, dictionary,(const dictionary &dict),(dict)) | |
virtual autoPtr< coordinateRotation > | clone () const =0 |
Construct and return a clone. More... | |
virtual | ~coordinateRotation ()=default |
Destructor. More... | |
virtual void | clear ()=0 |
Reset specification. More... | |
virtual tensor | R () const =0 |
Calculate and return the rotation tensor. More... | |
virtual void | write (Ostream &os) const =0 |
Write information. More... | |
virtual void | writeEntry (const word &keyword, Ostream &os) const =0 |
Write dictionary entry. More... | |
Static Public Member Functions | |
static tensor | rotation (const vector &axis1, const vector &axis2, axisOrder order=E3_E1) |
The rotation tensor calculated from two axes and their order. More... | |
Static Public Member Functions inherited from coordinateRotation | |
static autoPtr< coordinateRotation > | New (word modelType, const dictionary &dict) |
Select construct the specified coordinate rotation type. More... | |
static autoPtr< coordinateRotation > | New (const dictionary &dict) |
Select construct from dictionary (requires the "type" entry) More... | |
Protected Member Functions | |
void | read (const dictionary &dict) |
Read from dictionary. More... | |
Protected Attributes | |
vector | axis1_ |
The primary axis. More... | |
vector | axis2_ |
The secondary axis. More... | |
axisOrder | order_ |
The axis order. More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from coordinateRotation | |
static vector | findOrthogonal (const vector &axis) |
Determine best-guess for an orthogonal axis. More... | |
A coordinateRotation specified using global axes.
The rotation is defined by a combination of vectors (e1/e2), (e2/e3) or (e3/e1). Any nonorthogonality is absorbed into the second vector.
rotation { type axes; e1 (1 0 0); e2 (0 1 0); }
Dictionary entries
Property | Description | Reqd | Default |
---|---|---|---|
type | Type name: axes | yes | |
e1 | local x-axis | partly | |
e2 | local y-axis | partly | |
e3 | local z-axis | partly |
axis
and direction
. For cylindrical coordinates, the axis
would correspond to the z-axis and the direction
to the r-axis. Also accepts "axesRotation" (OpenFOAM-v1806) for the type.Definition at line 105 of file axesRotation.H.
enum axisOrder |
The order/combination of local axes for the axes-rotation definition.
Note that these follow the right-hand rule.
Definition at line 113 of file axesRotation.H.
axes | ( | ) |
Default construct - an identity transform.
Definition at line 205 of file axesRotation.C.
Copy construct.
Definition at line 214 of file axesRotation.C.
Construct from two axes.
Definition at line 223 of file axesRotation.C.
Construct from a single axis (as e3) using a best-guess for the second axis.
The largest component and its sign are used when guessing an appropriate orientation (direction).
Definition at line 237 of file axesRotation.C.
|
explicit |
Construct from dictionary.
Definition at line 243 of file axesRotation.C.
References dict, and axes::read().
|
virtualdefault |
Destructor.
|
protected |
Read from dictionary.
Definition at line 160 of file axesRotation.C.
References dict, Foam::exit(), Foam::FatalIOError, and FatalIOErrorInFunction.
Referenced by axes::axes().
TypeNameNoDebug | ( | "axes" | ) |
Runtime type information.
|
inlinevirtual |
Return clone.
Implements coordinateRotation.
Reimplemented in cylindrical.
Definition at line 169 of file axesRotation.H.
|
static |
The rotation tensor calculated from two axes and their order.
The input axes will be normalised. If axis2 is zero, an axis orthogonal to axis1 will be guessed. The largest component and its sign are used when guessing an appropriate orientation (direction).
Definition at line 68 of file axesRotation.C.
References Foam::abort(), Tensor< Cmpt >::col(), axes::E1_E2, axes::E2_E3, axes::E3_E1, axes::E3_E1_COMPAT, Foam::endl(), Foam::FatalError, FatalErrorInFunction, coordinateRotation::findOrthogonal(), Foam::mag(), Foam::nl, Vector< Cmpt >::removeCollinear(), and WarningInFunction.
|
virtual |
|
virtual |
The rotation tensor calculated from the specified axes and order.
Implements coordinateRotation.
Definition at line 261 of file axesRotation.C.
References coordinateSystem::rotation().
|
virtual |
Write information.
Implements coordinateRotation.
Reimplemented in cylindrical.
Definition at line 269 of file axesRotation.C.
References os().
Write dictionary entry.
Implements coordinateRotation.
Reimplemented in cylindrical.
Definition at line 289 of file axesRotation.C.
References os(), and Foam::type().
|
protected |
The primary axis.
Definition at line 127 of file axesRotation.H.
|
protected |
The secondary axis.
Definition at line 130 of file axesRotation.H.
|
protected |
The axis order.
Definition at line 133 of file axesRotation.H.