49Foam::solidBodyMotionFunctions::SDA::SDA
56 CofG_(SBMFCoeffs_.get<
vector>(
"CofG"))
68 scalar Tpi = Tp_ + dTp_*(time/dTi_);
69 scalar wr =
twoPi/Tpi;
73 scalar u = Tp_ + r*time;
77 scalar phs = phr +
pi;
82 scalar rollA =
max(rollAmax_*
exp(-
sqr(Tpi - Tpn_)/(2*Q_)), rollAmin_);
87 swayA_*(
sin(wr*time + phs) -
sin(phs)),
88 heaveA_*(
sin(wr*time + phh) -
sin(phh))
103 SBMFCoeffs_.readEntry(
"CofG", CofG_);
104 SBMFCoeffs_.readEntry(
"lamda", lamda_);
105 SBMFCoeffs_.readEntry(
"rollAmax", rollAmax_);
106 SBMFCoeffs_.readEntry(
"rollAmin", rollAmin_);
107 SBMFCoeffs_.readEntry(
"heaveA", heaveA_);
108 SBMFCoeffs_.readEntry(
"swayA", swayA_);
109 SBMFCoeffs_.readEntry(
"Q", Q_);
110 SBMFCoeffs_.readEntry(
"Tp", Tp_);
111 SBMFCoeffs_.readEntry(
"Tpn", Tpn_);
112 SBMFCoeffs_.readEntry(
"dTi", dTi_);
113 SBMFCoeffs_.readEntry(
"dTp", dTp_);
116 if (lamda_ > 1 + SMALL)
121 Tpn_ /=
sqrt(lamda_);
122 dTi_ /=
sqrt(lamda_);
123 dTp_ /=
sqrt(lamda_);
#define R(A, B, C, D, E, F, K, M)
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const Type & value() const noexcept
Return const reference to value.
Quaternion class used to perform rotations in 3D space.
Septernion class used to perform translations and rotations in 3D space.
Base class for defining solid-body motions.
virtual bool read(const dictionary &SBMFCoeffs)=0
Update properties from given dictionary.
solidBodyMotionFunction(const solidBodyMotionFunction &)=delete
No copy construct.
Ship design analysis (SDA) 3DoF motion function.
virtual septernion transformation() const
Return the solid-body motion transformation septernion.
virtual bool read(const dictionary &SBMFCoeffs)
Update properties from given dictionary.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define DebugInFunction
Report an information message using Foam::Info.
constexpr scalar pi(M_PI)
constexpr scalar piByTwo(0.5 *M_PI)
constexpr scalar twoPi(2 *M_PI)
Namespace for solid-body motions.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedScalar exp(const dimensionedScalar &ds)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sin(const dimensionedScalar &ds)
dimensionedScalar log(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)