Added acceleration access function to sixDOFODE interface
1. Translational acceleration in absolute coordinate system (A) 2. Rotational acceleration in relative coordinate system (OmegaDot)
This commit is contained in:
parent
6cdc361218
commit
cee5c3e681
5 changed files with 58 additions and 0 deletions
|
@ -455,6 +455,20 @@ const Foam::dimensionedVector& Foam::geometricSixDOF::omegaAverage() const
|
|||
}
|
||||
|
||||
|
||||
Foam::dimensionedVector Foam::geometricSixDOF::translationalAcceleration() const
|
||||
{
|
||||
// Calculate and return translational acceleration in global c. s.
|
||||
return A(Xrel(), Uaverage(), rotation_, dict().time().value());
|
||||
}
|
||||
|
||||
|
||||
Foam::dimensionedVector Foam::geometricSixDOF::rotationalAcceleration() const
|
||||
{
|
||||
// Calculate and return rotational acceleration in relative c. s.
|
||||
return OmegaDot(rotation_, omegaAverage(), dict().time().value());
|
||||
}
|
||||
|
||||
|
||||
Foam::tensor Foam::geometricSixDOF::toRelative() const
|
||||
{
|
||||
return rotation_.T();
|
||||
|
|
|
@ -235,6 +235,15 @@ public:
|
|||
virtual const dimensionedVector& omegaAverage() const;
|
||||
|
||||
|
||||
// Accelerations in the current time-step
|
||||
|
||||
//- Translational acceleration in absolute coordinate system
|
||||
virtual dimensionedVector translationalAcceleration() const;
|
||||
|
||||
//- Rotational acceleration in relative coordinate system
|
||||
virtual dimensionedVector rotationalAcceleration() const;
|
||||
|
||||
|
||||
// Rotations
|
||||
|
||||
//- Return rotation tensor to relative coordinate system
|
||||
|
|
|
@ -376,6 +376,23 @@ const Foam::dimensionedVector& Foam::quaternionSixDOF::omegaAverage() const
|
|||
}
|
||||
|
||||
|
||||
Foam::dimensionedVector
|
||||
Foam::quaternionSixDOF::translationalAcceleration() const
|
||||
{
|
||||
// Calculate and return translational acceleration in global c. s.
|
||||
return A(Xrel(), Uaverage(), rotation_.eCurrent(), dict().time().value());
|
||||
}
|
||||
|
||||
|
||||
Foam::dimensionedVector
|
||||
Foam::quaternionSixDOF::rotationalAcceleration() const
|
||||
{
|
||||
// Calculate and return rotational acceleration in relative c. s.
|
||||
return
|
||||
OmegaDot(rotation_.eCurrent(), omegaAverage(), dict().time().value());
|
||||
}
|
||||
|
||||
|
||||
Foam::tensor Foam::quaternionSixDOF::toRelative() const
|
||||
{
|
||||
return rotation_.eCurrent().R();
|
||||
|
|
|
@ -202,6 +202,15 @@ public:
|
|||
virtual const dimensionedVector& omegaAverage() const;
|
||||
|
||||
|
||||
// Accelerations in the current time-step
|
||||
|
||||
//- Translational acceleration in absolute coordinate system
|
||||
virtual dimensionedVector translationalAcceleration() const;
|
||||
|
||||
//- Rotational acceleration in relative coordinate system
|
||||
virtual dimensionedVector rotationalAcceleration() const;
|
||||
|
||||
|
||||
// Rotations
|
||||
|
||||
//- Return rotation tensor to relative coordinate system
|
||||
|
|
|
@ -384,6 +384,15 @@ public:
|
|||
virtual const dimensionedVector& omegaAverage() const = 0;
|
||||
|
||||
|
||||
// Accelerations in the current time-step
|
||||
|
||||
//- Translational acceleration in absolute coordinate system
|
||||
virtual dimensionedVector translationalAcceleration() const = 0;
|
||||
|
||||
//- Rotational acceleration in relative coordinate system
|
||||
virtual dimensionedVector rotationalAcceleration() const = 0;
|
||||
|
||||
|
||||
// Rotations
|
||||
|
||||
//- Return rotation tensor to relative coordinate system
|
||||
|
|
Reference in a new issue