39 namespace solidBodyMotionFunctions
44 solidBodyMotionFunction,
54 Foam::solidBodyMotionFunctions::tabulated6DoFMotion::tabulated6DoFMotion
77 scalar t = time_.value();
83 "solidBodyMotionFunctions::tabulated6DoFMotion::transformation()" 84 ) <<
"current time (" << t
85 <<
") is less than the minimum in the data table (" 90 if (t > times_.last())
94 "solidBodyMotionFunctions::tabulated6DoFMotion::transformation()" 95 ) <<
"current time (" << t
96 <<
") is greater than the maximum in the data table (" 97 << times_.last() <<
')' 114 Info<<
"solidBodyMotionFunctions::tabulated6DoFMotion::transformation(): " 115 <<
"Time = " << t <<
" transformation: " << TR <<
endl;
135 if (newTimeDataFileName != timeDataFileName_)
137 timeDataFileName_ = newTimeDataFileName;
139 IFstream dataStream(timeDataFileName_);
141 if (dataStream.
good())
148 times_.setSize(timeValues.
size());
149 values_.setSize(timeValues.
size());
153 times_[i] = timeValues[i].
first();
154 values_[i] = timeValues[i].second();
161 "solidBodyMotionFunctions::tabulated6DoFMotion::read" 162 "(const dictionary&)" 163 ) <<
"Cannot open time data file " << timeDataFileName_
168 SBMFCoeffs_.lookup(
"CofG") >> CofG_;
virtual bool read(const dictionary &SBMFCoeffs)=0
Update properties from given dictionary.
Base class for defining solid-body motions.
#define R(A, B, C, D, E, F, K, M)
Quaternion class used to perform rotations in 3D space.
void size(const label)
Override size to be inconsistent with allocated storage.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual bool read(const dictionary &SBMFCoeffs)
Update properties from given dictionary.
T & first()
Return the first element of the list.
Septernion class used to perform translations and rotations in 3D space.
string expand(const string &, const HashTable< string, word, string::hash > &mapping, const char sigil= '$')
Expand occurences of variables according to the mapping.
Field< Type > interpolateSplineXY(const scalarField &xNew, const scalarField &xOld, const Field< Type > &yOld)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Interpolates y values from one curve to another with a different x distribution.
bool good() const
Return true if next operation might succeed.
virtual septernion transformation() const
Return the solid-body motion transformation septernion.
Macros for easy insertion into run-time selection tables.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
virtual ~tabulated6DoFMotion()
Destructor.
A class for handling file names.
bool read(const char *, int32_t &)
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
Templated 2D Vector derived from VectorSpace adding construction from 2 components, element access using x() and y() member functions and the inner-product (dot-product).