41 Foam::tabulated6DoFAcceleration::tabulated6DoFAcceleration
48 accelerationCoeffs_(accelerationCoeffs)
50 read(accelerationCoeffs);
65 scalar t = time_.value();
70 <<
"current time (" << t
71 <<
") is less than the minimum in the data table (" 76 if (t > times_.last())
79 <<
"current time (" << t
80 <<
") is greater than the maximum in the data table (" 81 << times_.last() <<
')' 93 <<
"Time = " << t <<
" accelerations: " << avs <<
endl;
104 accelerationCoeffs_ = accelerationCoeffs;
113 if (newTimeDataFileName != timeDataFileName_)
115 timeDataFileName_ = newTimeDataFileName;
117 IFstream dataStream(timeDataFileName_);
119 if (dataStream.
good())
126 times_.setSize(timeValues.
size());
127 values_.setSize(timeValues.
size());
131 times_[i] = timeValues[i].
first();
132 values_[i] = timeValues[i].second();
138 <<
"Cannot open time data file " << timeDataFileName_
#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.
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.
Field< Type > interpolateSplineXY(const scalarField &xNew, const scalarField &xOld, const Field< Type > &yOld)
bool read(const char *, int32_t &)
virtual Vector< vector > acceleration() const
Return the solid-body accelerations.
virtual ~tabulated6DoFAcceleration()
Destructor.
defineTypeNameAndDebug(combustionModel, 0)
virtual bool read(const dictionary &accelerationCoeffs)
Update properties from given dictionary.
#define InfoInFunction
Report an information message using Foam::Info.