39 namespace solidBodyMotionFunctions
44 solidBodyMotionFunction,
77 scalar t = time_.value();
82 <<
"current time (" << t
83 <<
") is less than the minimum in the data table (" 88 if (t > times_.last())
91 <<
"current time (" << t
92 <<
") is greater than the maximum in the data table (" 93 << times_.last() <<
')' 130 if (newTimeDataFileName != timeDataFileName_)
132 timeDataFileName_ = newTimeDataFileName;
134 IFstream dataStream(timeDataFileName_);
136 if (dataStream.
good())
143 times_.setSize(timeValues.
size());
144 values_.setSize(timeValues.
size());
148 times_[i] = timeValues[i].
first();
149 values_[i] = timeValues[i].second();
155 <<
"Cannot open time data file " << timeDataFileName_
160 SBMFCoeffs_.lookup(
"CofG") >> CofG_;
virtual septernion transformation() const
Return the solid-body motion transformation septernion.
tabulated6DoFMotion(const dictionary &SBMFCoeffs, const Time &runTime)
Construct from components.
#define forAll(list, i)
Loop across all elements in list.
string expand(const string &, const HashTable< string, word, string::hash > &mapping, const char sigil='$')
Expand occurrences of variables according to the mapping.
A class for handling file names.
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...
#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...
void size(const label)
Override size to be inconsistent with allocated storage.
Interpolates y values from one curve to another with a different x distribution.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Septernion class used to perform translations and rotations in 3D space.
T & first()
Return the first element of the list.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
bool good() const
Return true if next operation might succeed.
Macros for easy insertion into run-time selection tables.
Field< Type > interpolateSplineXY(const scalarField &xNew, const scalarField &xOld, const Field< Type > &yOld)
bool read(const char *, int32_t &)
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.
Quaternion class used to perform rotations in 3D space.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
virtual ~tabulated6DoFMotion()
Destructor.
defineTypeNameAndDebug(combustionModel, 0)
virtual bool read(const dictionary &SBMFCoeffs)
Update properties from given dictionary.
#define R(A, B, C, D, E, F, K, M)
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).