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(
"lamda") >> lamda_;
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 (lamda_ > 1 + small)
124 Tpn_ /=
sqrt(lamda_);
125 dTi_ /=
sqrt(lamda_);
126 dTp_ /=
sqrt(lamda_);
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar log(const dimensionedScalar &ds)
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual ~SDA()
Destructor.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Vector< scalar > vector
A scalar version of the templated Vector.
Septernion class used to perform translations and rotations in 3D space.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
bool read(const char *, int32_t &)
dimensionedScalar exp(const dimensionedScalar &ds)
Base class for defining solid-body motions.
#define DebugInFunction
Report an information message using Foam::Info.
virtual bool read(const dictionary &SBMFCoeffs)
Update properties from given dictionary.
virtual bool read(const dictionary &SBMFCoeffs)=0
Update properties from given dictionary.
Quaternion class used to perform rotations in 3D space.
const scalar twoPi(2 *pi)
dimensionedScalar sin(const dimensionedScalar &ds)
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
SDA(const dictionary &SBMFCoeffs, const Time &runTime)
Construct from components.
#define R(A, B, C, D, E, F, K, M)
virtual septernion transformation() const
Return the solid-body motion transformation septernion.
dimensioned< scalar > mag(const dimensioned< Type > &)
const scalar piByTwo(0.5 *pi)