41 namespace solidBodyMotionFunctions
46 solidBodyMotionFunction,
56 Foam::solidBodyMotionFunctions::tabulated6DoFMotion::tabulated6DoFMotion
73 scalar t = time_.value();
78 <<
"current time (" << t
79 <<
") is less than the minimum in the data table (" 84 if (t > times_.last())
87 <<
"current time (" << t
88 <<
") is greater than the maximum in the data table (" 89 << times_.last() <<
')' 104 septernion TR(septernion(-CofG_ + -TRV[0])*
R*septernion(CofG_));
126 if (newTimeDataFileName != timeDataFileName_)
128 timeDataFileName_ = newTimeDataFileName;
130 IFstream dataStream(timeDataFileName_);
132 if (dataStream.
good())
139 times_.setSize(timeValues.
size());
140 values_.setSize(timeValues.
size());
144 times_[i] = timeValues[i].
first();
145 values_[i] = timeValues[i].second();
151 <<
"Cannot open time data file " << timeDataFileName_
156 SBMFCoeffs_.readEntry(
"CofG", CofG_);
virtual septernion transformation() const
Return the solid-body motion transformation septernion.
void size(const label n)
Older name for setAddressableSize.
A class for handling file names.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Unit conversion functions.
Interpolates y values from one curve to another with a different x distribution.
T & first()
Access first element of the list, position [0].
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
defineTypeNameAndDebug(axisRotationMotion, 0)
#define forAll(list, i)
Loop across all elements in list.
Field< Type > interpolateSplineXY(const scalarField &xNew, const scalarField &xOld, const Field< Type > &yOld)
Base class for defining solid-body motions.
#define DebugInFunction
Report an information message using Foam::Info.
virtual bool read(const dictionary &SBMFCoeffs)=0
Update properties from given dictionary.
virtual bool read(const dictionary &SBMFCoeffs)
Update properties from given dictionary.
Input from file stream as an ISstream, normally using std::ifstream for the actual input...
#define R(A, B, C, D, E, F, K, M)
string & expand(const bool allowEmpty=false)
Inplace expand initial tags, tildes, and all occurrences of environment variables as per stringOps::e...
bool good() const noexcept
True if next operation might succeed.
addToRunTimeSelectionTable(solidBodyMotionFunction, axisRotationMotion, dictionary)
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.