36 namespace solidBodyMotionFunctions
53 CofG_(SBMFCoeffs_.lookup(
"CofG"))
69 scalar time = time_.value();
71 scalar Tpi = Tp_ + dTp_*(time/dTi_);
72 scalar wr =
twoPi/Tpi;
76 scalar u = Tp_ + r*time;
80 scalar phs = phr +
pi;
85 scalar rollA =
max(rollAmax_*
exp(-
sqr(Tpi - Tpn_)/(2*Q_)), rollAmin_);
90 swayA_*(
sin(wr*time + phs) -
sin(phs)),
91 heaveA_*(
sin(wr*time + phh) -
sin(phh))
106 SBMFCoeffs_.lookup(
"CofG") >> CofG_;
107 SBMFCoeffs_.lookup(
"lambda") >> lambda_;
108 SBMFCoeffs_.lookup(
"rollAmax") >> rollAmax_;
109 SBMFCoeffs_.lookup(
"rollAmin") >> rollAmin_;
110 SBMFCoeffs_.lookup(
"heaveA") >> heaveA_;
111 SBMFCoeffs_.lookup(
"swayA") >> swayA_;
112 SBMFCoeffs_.lookup(
"Q") >> Q_;
113 SBMFCoeffs_.lookup(
"Tp") >> Tp_;
114 SBMFCoeffs_.lookup(
"Tpn") >> Tpn_;
115 SBMFCoeffs_.lookup(
"dTi") >> dTi_;
116 SBMFCoeffs_.lookup(
"dTp") >> dTp_;
119 if (lambda_ > 1 + small)
123 Tp_ /=
sqrt(lambda_);
124 Tpn_ /=
sqrt(lambda_);
125 dTi_ /=
sqrt(lambda_);
126 dTp_ /=
sqrt(lambda_);
Macros for easy insertion into run-time selection tables.
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 any number of values (e....
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.
Ship design analysis (SDA) 3DoF motion function.
virtual ~SDA()
Destructor.
virtual septernion transformation() const
Return the solid-body motion transformation septernion.
SDA(const dictionary &SBMFCoeffs, const Time &runTime)
Construct from components.
virtual bool read(const dictionary &SBMFCoeffs)
Update properties from given dictionary.
#define DebugInFunction
Report an information message using Foam::Info.
const scalar piByTwo(0.5 *pi)
const scalar twoPi(2 *pi)
dimensionedScalar exp(const dimensionedScalar &ds)
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar sin(const dimensionedScalar &ds)
dimensionedScalar log(const dimensionedScalar &ds)
Vector< scalar > vector
A scalar version of the templated Vector.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< scalar > mag(const dimensioned< Type > &)
defineTypeNameAndDebug(combustionModel, 0)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
static scalar R(const scalar a, const scalar x)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)