166#include "SimObject.h"
167#include "CNetCableElement.h"
168#include "CNetElementDef.h"
169#include "CNormalForceCalc.h"
170#include "CNetBottomContactFilter.h"
171#include "CInputReader.h"
172#include "SimObject.h"
173#include <EnvironmentProvider.h>
175#ifdef FH_VISUALIZATION
176#include <sfh/ogre/NMeshGenerators.h>
187 virtual void OdeFcn(
const double dT,
const double *
const adX,
double *
const adXDot,
const bool bIsMajorTimeStep);
188 virtual void InitialConditionSetup(
const double dT,
const double *
const adCurrentIC,
double *
const adUpdatedIC, ISimObjectCreator *
const pCreator);
189 virtual void FinalSetup(
const double dT,
const double *
const adX, ISimObjectCreator *
const pCreator);
190#ifdef FH_VISUALIZATION
192 virtual void RenderInit(Ogre::Root *
const pOgreRoot, ISimObjectCreator *
const pCreator);
194 virtual void RenderUpdate(
const double dT,
const double *
const adX);
197 void SetAddedDragPerMPS(
double AddedDragPerMPS);
198 virtual const double * NumExternalPos(
const double dT,
const double *
const adX);
199 virtual const double * NodePos(
const double dT,
const double *
const adX,
int iExtNode);
200 virtual const double * NodeVel(
const double dT,
const double *
const adX,
int iExtNode);
201 virtual const double * BottomContact(
const double dT,
const double *
const adX);
203 virtual void CalcStateDerivatives(
const double *
const adX,
double *
const adXDot);
204 virtual void AddExternalForces(
const double dT,
const double *
const adX);
205 virtual void DeleteAllNodeForces();
206 virtual void ReadInputFile(ISimObjectCreator *pCreator);
207 virtual void AddNetForces(
const double dT,
const double *
const adX);
208 virtual void AddCableForces(
const double dT,
const double *
const adX);
209 void FindNodesToDivide(
int iNodesToDivide[2],
double *dLength,
double *dLengthFactor);
211 void CheckNodeNumber(
int iNodeNumber, ISimObjectCreator *
const pCreator, std::string sNodeDescription =
"");
212 void CheckNodes(ISimObjectCreator *pCreator);
213 unsigned short AddCalcNode(
int aiNodes[2]);
214 virtual double AddNodeBottomForce(
const double *
const adX,
int iNode,
double dDiam,
double adForceInOut[3]);
215 virtual void AddBottomForces(
const double *
const adX);
216 virtual void AddInputPorts(ISimObjectCreator *pCreator);
218 sfh::timers::StopWatch m_OdeTimer;
248 double m_adBottomContact[6];
264 int **m_aaiCableConn;
277 int m_iNumNodeOutputs;
282 bool m_bUseTagForExternalNodes;
283 int CreateExternalNodeMap(VSPairStrInt& VsNodes, std::string sTag, ISimObjectCreator* pCreator);
284 void CreateNetPanels( ISimObjectCreator* pCreator);
285 void CreateNetCables( ISimObjectCreator* pCreator);
286 void CreateDataStructures();
287 void CreateOutputPorts(ISimObjectCreator* pCreator);
292 double* adNodesDistMesh;
295 double* adMeshBarLength_unstretched;
296 double* adKnotDiameter;
297 double* adKnotMomStiff_contact;
299 double* adTwineDragNormal;
300 double* adTwineDiameter;
301 double* adElementWaterVel;
302 double* adDampingCoeff;
303 double* adElementNodeWeight;
305 void PRINTALLNODEFORCES(std::string spec,
double dT);
Class containing a cable element object, allowing for disks and spheres to be connected.
Definition CNetCableElement.h:32
Definition CNetStructureArray.h:181
double m_dNumExternalPos
The index of the output port with position of the starboard wing external nodes.
Definition CNetStructureArray.h:231
environment::EnvironmentProvider * m_environment
Environment provider.
Definition CNetStructureArray.h:260
double m_dMaxCableTension
The maximum tension of the cable elements.
Definition CNetStructureArray.h:271
double * m_adInertia
The inertia of the nodes.
Definition CNetStructureArray.h:257
int * m_aIStateVel
An array of indices to the node velocity states.
Definition CNetStructureArray.h:235
std::vector< CNetElementDef > m_VSPanelData
A vector of structs containing the section data read from the input file.
Definition CNetStructureArray.h:245
double m_dMaxSideLengthFactor
The maximum element side length factor.
Definition CNetStructureArray.h:250
double m_dMinSideLength
The side length limit for the elements to be further subdivided.
Definition CNetStructureArray.h:251
int m_iNumPanelsGlobal
The number of global sections of the net.
Definition CNetStructureArray.h:239
double m_dFluidRho
The density of the surrounding fluid.
Definition CNetStructureArray.h:244
int m_iNumNodesOriginal
The number of original nodes of the net.
Definition CNetStructureArray.h:242
double m_dMaxVelocity
The maximum velocity component of each node.
Definition CNetStructureArray.h:274
int m_iNumNodeInputsUsed
The number of used external force inputs.
Definition CNetStructureArray.h:221
double m_dMinCableLength
The minimum length of the cable elements.
Definition CNetStructureArray.h:269
VSPairStrInt m_VsNodesInput
The tag names and indices of the external nodes to be used as input.
Definition CNetStructureArray.h:279
double m_dStepSafetyFactor
The safety factor when calculating the adapted stiffness of the elements.
Definition CNetStructureArray.h:268
double m_dMaxStepLength
The maximum step length for the simulation.
Definition CNetStructureArray.h:266
double m_dMaxAcceleration
The maximum acceleration component of each node.
Definition CNetStructureArray.h:273
int m_iMaxNumCables
The maximum number of cable elements used for the calculations.
Definition CNetStructureArray.h:254
long * m_aiExternalNodes
The index of the starboard nodes corresponding to the elements of the enum TrawlSpec::ENetExternalNod...
Definition CNetStructureArray.h:225
CNetCableElement ** m_apCableElements
An array holding the cable elements.
Definition CNetStructureArray.h:256
int m_iNumCablesGlobal
The number of global cable elements.
Definition CNetStructureArray.h:241
int m_iNumPanelsCalc
The number of elements the net is divided into.
Definition CNetStructureArray.h:238
double m_dMeanCableTension
The expected average tension of the cable elements.
Definition CNetStructureArray.h:270
VSPairStrInt m_VsNodesOutput
The tag names and indices of the external nodes to be used as output.
Definition CNetStructureArray.h:278
double * m_adNodeForce
The force on the global nodes.
Definition CNetStructureArray.h:258
int m_iMaxNumPanels
The maximum number of net panels used for the calculations.
Definition CNetStructureArray.h:253
int m_iMaxNumNodes
The maximum number of nodes used for net calculations.
Definition CNetStructureArray.h:252
int m_iNumNodeOutputsUsed
The number of used external position outputs.
Definition CNetStructureArray.h:222
double m_dScale
The scale of the trawl net in relation to the specifications.
Definition CNetStructureArray.h:255
VSPairStrInt m_VsNodesAvailable
The tag names and indices of the available external nodes.
Definition CNetStructureArray.h:280
int * m_aIExternalConn
The index of the external nodes on the starboard wing.
Definition CNetStructureArray.h:224
std::string m_sNetName
The identification name of the net.
Definition CNetStructureArray.h:259
int * m_aIStatePos
An array of indices to the node position states.
Definition CNetStructureArray.h:234
double m_dAdaptationPeriod
The adaptation period for the mean tension in cables and net elements.
Definition CNetStructureArray.h:267
double m_dMassFactor
A factor to multiply the mass of each node with, slowing down the eigenfrequencies of the system.
Definition CNetStructureArray.h:272
int m_iNumCablesCalc
The number of elements the cable is divided into.
Definition CNetStructureArray.h:240
ISignalPort ** m_apInExternalForces
The external forces input port.
Definition CNetStructureArray.h:228
std::vector< CNetCableElement * > m_VCableElements
A vector of structs containing the cable data read from the input file.
Definition CNetStructureArray.h:246
double m_dAddedDragPerMPS
The added linear drag per meter per second speed.
Definition CNetStructureArray.h:275
CNetStructureArray(std::string sSimObjectName, ISimObjectCreator *pCreator)
The constructor sets the pointer to the output object and the parser object.
int m_iNumNodesCalc
The number of nodes of the net after refinement.
Definition CNetStructureArray.h:243
virtual ~CNetStructureArray()
The destructor deletes dynamically allocated memory.