8#ifndef C_NET_ELEMENT_3N_WITH_CONSTRAINTS
9#define C_NET_ELEMENT_3N_WITH_CONSTRAINTS
12#include "NetElementDef.h"
13#include "NetElement3NForces.h"
14#include <fhsim_environment/hydrodynamics/NetSolidity.h>
15#include <fhsim/PrintDuringExec.h>
17#ifdef FH_VISUALIZATION
19#ifdef USE_DYNAMIC_LINES
20 #include "sfh/ogre/CDynamicLines.h"
22 #include "sfh/ogre/C3DLine.h"
40 const std::string netName,
41 const unsigned long iID,
43 const double dRho_water,
44 const double knotDiameter,
45 const net_solidity::PanelSolidity& solidity);
75 void AddNodeForces(
const hydrodynamics::PanelLoadLaw& law,
const hydrodynamics::Fluid& fluid,
76 const double*
const posA_ned,
const double*
const posB_ned,
const double*
const posC_ned,
77 const double*
const velA_ned,
const double*
const velB_ned,
const double*
const velC_ned,
78 const double*
const waterVel_ned,
79 double*
const nodeAforce_ned,
double*
const nodeBforce_ned,
double*
const nodeCforce_ned,
80 const hydrodynamics::PanelClampLog* clampLog =
nullptr)
const;
98 hydrodynamics::PanelLoad<double>
EvaluatePanelLoad(
const hydrodynamics::PanelLoadLaw& law,
const hydrodynamics::Fluid& fluid,
99 const double*
const posA_ned,
const double*
const posB_ned,
const double*
const posC_ned,
100 const double elementVel[3],
const double waterVel_ned[3],
double& area)
const;
106 double Solidity(
const double*
const posA_ned,
const double*
const posB_ned,
const double*
const posC_ned)
const;
109 double WakeSolidity(
const double*
const posA_ned,
const double*
const posB_ned,
const double*
const posC_ned)
const;
120#ifdef FH_VISUALIZATION
122 void RenderInit(Ogre::Root* ogreRoot);
125 void RenderUpdate(
const double*
const adPosA,
const double*
const adPosB,
126 const double*
const adPosC );
132 void FillPanelForceParams();
136 void SortPanelNodes(
int index,
const double * aadNodes[3],
double adNodePosA_mesh[2],
double adNodePosB_mesh[2],
double adNodePosC_mesh[2],
unsigned short* aiSort);
137 void FindTwineCrossings(
unsigned short index,
unsigned short kiNumMeshPerLine,
double* CoeffA,
double* CoeffB,
const double* aadNodes[3]);
143 std::string m_netName;
144 double m_nodeInertia[3];
151 double m_nodeAPos_mesh[2];
152 double m_nodeBPos_mesh[2];
153 double m_nodeCPos_mesh[2];
157 double m_nodesDistAB_mesh[2];
158 double m_nodesDistAC_mesh[2];
159 double m_nodesDistBC_mesh[2];
168 net_solidity::PanelSolidity m_solidity;
170 double m_nodeAforce_ned[3];
171 double m_nodeBforce_ned[3];
172 double m_nodeCforce_ned[3];
174 double m_nodeAforce_ned_last[3];
175 double m_nodeBforce_ned_last[3];
176 double m_nodeCforce_ned_last[3];
179#ifdef FH_VISUALIZATION
181 Ogre::Root* m_ogreRoot;
182 Ogre::SceneManager* m_sceneMgr;
183 Ogre::Entity* m_renderElement[3];
184 Ogre::Entity* m_renderSphere[3];
185 Ogre::SceneNode* m_renderNodeMesh;
186 Ogre::SceneNode* m_renderNodeSphere[3];
187 Ogre::SceneNode* m_renderNodeOutline;
188 Ogre::SceneNode* m_renderNodeMaterial;
189#ifdef USE_DYNAMIC_LINES
190 CDynamicLines* m_lines =
nullptr;
192 C3DLine* m_lines =
nullptr;
194 CDynamicLines* m_lineOutline;
195 Ogre::ManualObject * m_netRenderObj;
198 unsigned short* m_sortU =
nullptr;
199 unsigned short* m_sortV =
nullptr;
200 unsigned long m_numTwines;
201 unsigned long m_numUTwines;
202 unsigned long m_numVTwines;
203 double* m_interpCoeffAu =
nullptr;
204 double* m_interpCoeffAv =
nullptr;
205 double* m_interpCoeffBu =
nullptr;
206 double* m_interpCoeffBv =
nullptr;
Definition NetElement3NWithConstraints.h:36
double GetTwineDiameter()
Returns the twine diameter in the panel.
void AddNodeForces(const hydrodynamics::PanelLoadLaw &law, const hydrodynamics::Fluid &fluid, const double *const posA_ned, const double *const posB_ned, const double *const posC_ned, const double *const velA_ned, const double *const velB_ned, const double *const velC_ned, const double *const waterVel_ned, double *const nodeAforce_ned, double *const nodeBforce_ned, double *const nodeCforce_ned, const hydrodynamics::PanelClampLog *clampLog=nullptr) const
double WakeSolidity(const double *const posA_ned, const double *const posB_ned, const double *const posC_ned) const
The solidity the element hands to its wake source at the given node positions, global frame (NetSolid...
double GetNumberOfTwineLengthsU()
Returns the number of twine lengths in mesh direction u in panel.
hydrodynamics::PanelLoad< double > EvaluatePanelLoad(const hydrodynamics::PanelLoadLaw &law, const hydrodynamics::Fluid &fluid, const double *const posA_ned, const double *const posB_ned, const double *const posC_ned, const double elementVel[3], const double waterVel_ned[3], double &area) const
NetElement3NWithConstraints(const std::string netName, const unsigned long iID, const NetElementDef *netPanel, const double dRho_water, const double knotDiameter, const net_solidity::PanelSolidity &solidity)
The constructor.
double CalcNodeInertia(int node)
Calculates the inertia of a node.
double Solidity(const double *const posA_ned, const double *const posB_ned, const double *const posC_ned) const
The solidity of the element at the given node positions, global frame.
~NetElement3NWithConstraints(void)
The destructor.
bool HasBarDirections() const
True when the bar directions are defined, which needs a non-zero mesh determinant.
Definition NetElement3NWithConstraints.h:103
Class containing the description of a net panel and methods necessary for taking this over to triangu...
Definition NetElementDef.h:22
Definition NetElement3NForces.h:59