Added member function to initialize force and moment in sixDOFODE
This commit is contained in:
parent
5a249bc26a
commit
65b8ad2fc7
2 changed files with 22 additions and 0 deletions
|
@ -316,6 +316,13 @@ public:
|
|||
const dimensionedVector& externalMoment
|
||||
);
|
||||
|
||||
//- Initialize force and moment for the first time step
|
||||
inline void initExternalForceAndMoment
|
||||
(
|
||||
const dimensionedVector& externalForce,
|
||||
const dimensionedVector& externalMoment
|
||||
);
|
||||
|
||||
|
||||
// Access to motion constraints
|
||||
|
||||
|
|
|
@ -114,6 +114,21 @@ void Foam::sixDOFODE::setExternalForceAndMoment
|
|||
}
|
||||
|
||||
|
||||
void Foam::sixDOFODE::initExternalForceAndMoment
|
||||
(
|
||||
const dimensionedVector& externalForce,
|
||||
const dimensionedVector& externalMoment
|
||||
)
|
||||
{
|
||||
// Initialise force and moment only for the first time step
|
||||
if (curTimeIndex_ == -1)
|
||||
{
|
||||
force_ = externalForce;
|
||||
moment_ = externalMoment;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const Foam::PtrList<Foam::translationalConstraint>&
|
||||
Foam::sixDOFODE::translationalConstraints() const
|
||||
{
|
||||
|
|
Reference in a new issue