|
| | Crowfoot (const std::string &simObjectName, ISimObjectCreator *const creator) |
| | Reads parameters, registers states, input/output ports and shared resources.
|
| |
|
void | OdeFcn (const double T, const double *const X, double *const XDot) const override |
| |
|
void | PreOdeFcn (double T, const double *X) override |
| |
|
void | AcceptedStep (const double T, const double *const X) override |
| |
| void | UpdateVelocity (const double T) |
| | Backward-differences the solved collecting point position.
|
| |
| void | Solve (const double T, const double *const X) const |
| | Solves the collecting point at (T, X) and stores it and the line forces.
|
| |
|
void | SeedFilterOnce (const double T, const double *const X) const |
| | Seeds the force filter with the external force at (T, X), the first time it is called.
|
| |
|
virtual const double * | PositionOut (const double t, const double *const x) |
| |
|
virtual const double * | VelocityOut (const double t, const double *const x) |
| |
|
virtual const double * | LineForceOut (const double t, const double *const x, int lineIndex) |
| |
|
virtual const double * | LineTensionOut (const double t, const double *const x, int lineIndex) |
| |
|
|
int | m_numLines |
| |
|
std::vector< const double * > | m_linesPos |
| |
|
std::vector< std::array< double, 3 > > | m_linesForce |
| |
|
std::vector< double > | m_linesTension |
| |
|
std::vector< ISignalPort * > | m_inFasteningPositions |
| |
|
std::vector< ISignalPort * > | m_inLengths |
| |
|
ISignalPort * | m_inExternalForce |
| |
|
CrowfootMath * | m_crowfoot |
| |
|
ICommonComputation * | m_solve = nullptr |
| | Solve, once per evaluation.
|
| |
|
bool | m_filterSeeded = false |
| | Whether the force filter holds the force of the first solve.
|
| |
|
double | m_velocity [3] |
| |
|
double | m_instantPos [3] |
| |
|
double | m_prevPos [3] |
| | Solved position at the previous accepted step.
|
| |
|
double | m_prevTime |
| | Time of the previous accepted step.
|
| |
|
bool | m_hasPrevPos |
| | Whether an accepted step has been seen yet.
|
| |
|
sfh::filters::FIR | m_filter |
| |
◆ Crowfoot()
| Crowfoot::Crowfoot |
( |
const std::string & |
simObjectName, |
|
|
ISimObjectCreator *const |
creator |
|
) |
| |
The constructor performs all initial setup for a crow foot simobject. Reading in parameters, setting up communication interface i.e. output ports, input ports, and states, plus additional 'one time only' resource setup.
Reads the "NumLines" parameter. Registers the input ports "ExternalForce", "LinePos<N>" and "LineLength<N>" and the output ports "LineForce<N>", "LineTension<N>", "ExternalPos" and "ExternalVel". Registers no states.
- Parameters
-
| [in] | simObjectName | -> The name of the simobject |
| [in] | creator | -> Retrieve parameters. Register states, ports and shared resources |
◆ Solve()
| void Crowfoot::Solve |
( |
const double |
T, |
|
|
const double *const |
X |
|
) |
| const |
Reads the fastening positions and lengths at (T, X) and solves the crow foot with the filtered external force. The filter is seeded before, by SeedFilterOnce. Registered as a common computation; every output port and OdeFcn call it.
◆ UpdateVelocity()
| void Crowfoot::UpdateVelocity |
( |
const double |
T | ) |
|
Divides the change in the solved position since the previous accepted step by the length of that step, and stores the result for the "ExternalVel" output port. The first accepted step has no predecessor, so the velocity is left at zero until a positive time interval is available.
- Parameters
-
| [in] | T | -> Current simulation time |
The documentation for this class was generated from the following file:
- webfhsim/reloadrepos/fhsim_fishery/src/trawl/Crowfoot.h