51 accelerationCoeffs_(accelerationCoeffs)
53 read(accelerationCoeffs);
62 scalar t = time_.value();
67 <<
"current time (" << t
68 <<
") is less than the minimum in the data table ("
73 if (t > times_.last())
76 <<
"current time (" << t
77 <<
") is greater than the maximum in the data table ("
78 << times_.last() <<
')'
89 Info <<
"Time = " << t <<
" accelerations: " << avs <<
endl;
100 accelerationCoeffs_ = accelerationCoeffs;
109 if (newTimeDataFileName != timeDataFileName_)
111 timeDataFileName_ = newTimeDataFileName;
113 IFstream dataStream(timeDataFileName_);
115 if (dataStream.
good())
122 times_.setSize(timeValues.
size());
123 values_.setSize(timeValues.
size());
127 times_[i] = timeValues[i].
first();
128 values_[i] = timeValues[i].second();
134 <<
"Cannot open time data file " << timeDataFileName_
Input from file stream, using an ISstream.
bool good() const noexcept
True if next operation might succeed.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
virtual bool read()
Re-read model coefficients if they have changed.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
T & first()
Return the first element of the list.
void size(const label n)
Older name for setAddressableSize.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A class for handling file names.
string & expand(const bool allowEmpty=false)
Tabulated 6DoF acceleration.
virtual bool read(const dictionary &accelerationCoeffs)
Update properties from given dictionary.
virtual Vector< vector > acceleration() const
Return the solid-body accelerations.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Interpolates y values from one curve to another with a different x distribution.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Field< Type > interpolateSplineXY(const scalarField &xNew, const scalarField &xOld, const Field< Type > &yOld)
#define forAll(list, i)
Loop across all elements in list.