36 namespace solidBodyMotionFunctions
41 solidBodyMotionFunction,
42 oscillatingLinearMotion,
51 Foam::solidBodyMotionFunctions::oscillatingLinearMotion::oscillatingLinearMotion
53 const dictionary& SBMFCoeffs,
57 solidBodyMotionFunction(SBMFCoeffs,
runTime),
58 omegaPtr_(Function1<scalar>::
New(
"omega", SBMFCoeffs_, &
runTime)),
61 Function1<scalar>::NewIfPresent
72 Function1<
vector>::NewIfPresent
88 Foam::solidBodyMotionFunctions::oscillatingLinearMotion::transformation()
const 90 const scalar t = time_.value();
92 const vector amplitude(amplitudePtr_->value(t));
93 const scalar omega = omegaPtr_->value(t);
95 scalar phaseShift = 0;
98 phaseShift = phaseShiftPtr_->value(t);
102 if (verticalShiftPtr_)
104 verticalShift = verticalShiftPtr_->value(t);
109 amplitude*
sin(omega*(t + phaseShift)) + verticalShift
113 septernion TR(septernion(-displacement)*
R);
123 const dictionary& SBMFCoeffs
133 Function1<scalar>::New(
"omega", SBMFCoeffs_, &time_)
149 Function1<vector>::New(
"amplitude", SBMFCoeffs_, &time_)
152 verticalShiftPtr_.reset
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
Septernion class used to perform translations and rotations in 3D space.
Macros for easy insertion into run-time selection tables.
defineTypeNameAndDebug(axisRotationMotion, 0)
#define DebugInFunction
Report an information message using Foam::Info.
virtual bool read(const dictionary &SBMFCoeffs)=0
Update properties from given dictionary.
static const word null
An empty word.
virtual bool read(const dictionary &SBMFCoeffs)
Update properties from given dictionary.
dimensionedScalar sin(const dimensionedScalar &ds)
static autoPtr< Function1< scalar > > NewIfPresent(const word &entryName, const dictionary &dict, const word &redirectType, const objectRegistry *obrPtr=nullptr)
An optional selector, with fallback redirection.
#define R(A, B, C, D, E, F, K, M)
addToRunTimeSelectionTable(solidBodyMotionFunction, axisRotationMotion, dictionary)
static constexpr const zero Zero
Global zero (0)