36 namespace solidBodyMotionFunctions
54 CofG_(SBMFCoeffs_.
lookup(
"CofG"))
70 scalar
time = time_.value();
72 scalar Tpi = Tp_ + dTp_*(
time/dTi_);
73 scalar wr =
twoPi/Tpi;
77 scalar u = Tp_ + r*
time;
81 scalar phs = phr +
pi;
86 scalar rollA =
max(rollAmax_*
exp(-
sqr(Tpi - Tpn_)/(2*Q_)), rollAmin_);
107 SBMFCoeffs_.lookup(
"CofG") >> CofG_;
108 SBMFCoeffs_.lookup(
"lambda") >> lambda_;
109 SBMFCoeffs_.lookup(
"rollAmax") >> rollAmax_;
110 SBMFCoeffs_.lookup(
"rollAmin") >> rollAmin_;
111 SBMFCoeffs_.lookup(
"heaveA") >> heaveA_;
112 SBMFCoeffs_.lookup(
"swayA") >> swayA_;
113 SBMFCoeffs_.lookup(
"Q") >> Q_;
114 SBMFCoeffs_.lookup(
"Tp") >> Tp_;
115 SBMFCoeffs_.lookup(
"Tpn") >> Tpn_;
116 SBMFCoeffs_.lookup(
"dTi") >> dTi_;
117 SBMFCoeffs_.lookup(
"dTp") >> dTp_;
120 if (lambda_ > 1 + small)
124 Tp_ /=
sqrt(lambda_);
125 Tpn_ /=
sqrt(lambda_);
126 dTi_ /=
sqrt(lambda_);
127 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 keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
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 &dict)=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 word &name, const dictionary &SBMFCoeffs, const Time &runTime)
Construct from components.
virtual bool read(const dictionary &SBMFCoeffs)
Update properties from given dictionary.
A class for handling words, derived from string.
#define DebugInFunction
Report an information message using Foam::Info.
const scalar piByTwo(0.5 *pi)
const scalar twoPi(2 *pi)
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
dimensionedScalar exp(const dimensionedScalar &ds)
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar sin(const dimensionedScalar &ds)
dimensionedScalar log(const dimensionedScalar &ds)
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
Vector< scalar > vector
A scalar version of the templated Vector.
static scalar R(const scalar a, const scalar x)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
tmp< DimensionedField< scalar, GeoMesh, Field > > mag(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
void sqrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)
void T(GeometricField< Type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type, GeoMesh, PrimitiveField2 > &gf1)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)