8#ifndef C_NET_ELEMENT_3N_WITH_CONSTRAINTS
9#define C_NET_ELEMENT_3N_WITH_CONSTRAINTS
12#include "CNetElementDef.h"
13#include "CPrintDuringExec.h"
15#ifdef FH_VISUALIZATION
17#ifdef USE_DYNAMIC_LINES
18 #include "sfh/ogre/CDynamicLines.h"
20 #include "sfh/ogre/C3DLine.h"
38 const std::string sNetName,
39 const unsigned long iID,
41 const double dNy_water,
42 const double dRho_water,
43 const double dKnotDiameterRatio,
44 const double dKnotMomStiff,
45 const double dKknotMomStiff_contact,
46 const double dCnLinearLimitAngle,
47 const double dCnLinear,
50 const double dTurbLimit,
51 const double dLamLimit,
52 const double dCt_nominal,
53 const double dCnKnots_nominal,
54 const double dDampingRatio);
59 void AddNodeForces(
const double*
const adNodePosA_ned,
60 const double*
const adNodePosB_ned,
61 const double*
const adNodePosC_ned,
62 const double*
const adNodeVelA_ned,
63 const double*
const adNodeVelB_ned,
64 const double*
const adNodeVelC_ned,
65 const double*
const adWaterVel_ned,
66 double *
const adNodeForceA_ned,
67 double *
const adNodeForceB_ned,
68 double *
const adNodeForceC_ned,
69 double dHydroForcesRatio = 1.0,
70 double dAddedLinearDrag = 0.0);
87#ifdef FH_VISUALIZATION
89 void RenderInit(Ogre::Root* pOgreRoot);
92 void RenderUpdate(
const double*
const adPosA,
const double*
const adPosB,
93 const double*
const adPosC );
98 void CalcTensionForces(
double meshBarComp_panel[6],
double meshBarLength[2],
99 double twineTension[2],
double nodeATension_panel[3],
double nodeBTension_panel[3],
100 double nodeCTension_panel[3]);
102 void CalcLocalUVComponents(
double nodesABdist_panel[3],
double nodesACdist_panel[3],
103 double nodesBCdist_panel[3],
double meshBarComp_panel[6],
double meshBarLength[2]);
105 void CalcMeshContactForces(
double meshBarComp_panel[6],
106 double meshBarLength[2],
107 double nodeAMeshOpeningRes_panel[3],
108 double nodeBMeshOpeningRes_panel[3],
109 double nodeCMeshOpeningRes_panel[3],
110 double nodeATwineContactRes_panel[3],
111 double nodeBTwineContactRes_panel[3],
112 double nodeCTwineContactRes_panel[3]);
114 double CalcVelocities(
double R_ned2panel[3][3],
115 const double*
const adNodeVelA_ned,
116 const double*
const adNodeVelB_ned,
117 const double*
const adNodeVelC_ned,
118 const double*
const adWaterVel_ned,
119 double elementVel_ned[3],
120 double hydDynVel_ned[3],
121 double hydDynVel_panel[3]);
123 void CalcHydroDynamicForces(
double meshBarComp_panel[6],
124 double meshBarLength[2],
125 double R_ned2panel[3][3],
126 const double*
const adNodeVelA_ned,
127 const double*
const adNodeVelB_ned,
128 const double*
const adNodeVelC_ned,
129 const double*
const adWaterVel_ned,
130 double elementVel_ned[3],
131 double totalDragPerNode_panel[3]);
133 void CalcDampingForces(
double elementVel_ned[3],
134 const double*
const adNodeVelA_ned,
135 const double*
const adNodeVelB_ned,
136 const double*
const adNodeVelC_ned,
137 const double*
const adWaterVel_ned,
138 double adDampingForcesNodeA[3],
139 double adDampingForcesNodeB[3],
140 double adDampingForcesNodeC[3],
141 double dAddedLinearDrag);
145 void SortPanelNodes(
int index,
const double * aadNodes[3],
double adNodePosA_mesh[2],
double adNodePosB_mesh[2],
double adNodePosC_mesh[2],
unsigned short* aiSort);
146 void FindTwineCrossings(
unsigned short index,
unsigned short kiNumMeshPerLine,
double* CoeffA,
double* CoeffB,
const double* aadNodes[3]);
148 bool m_InternalWakeEffectsActive;
154 std::string m_sNetName;
156 double m_adNodeInertia[3];
163 double m_dKnotMomStiff;
164 double m_dKnotMomStiffContact;
165 double m_adNodeAPos_mesh[2];
166 double m_adNodeBPos_mesh[2];
167 double m_adNodeCPos_mesh[2];
168 double m_CnLinearLimitAngle;
175 double m_CnKnots_nominal;
179 double m_adNodesDistAB_mesh[2];
180 double m_adNodesDistAC_mesh[2];
181 double m_adNodesDistBC_mesh[2];
190 double m_dMeshOpeningAngle;
191 double m_ShadowEffect[3];
192 double m_ShadowEffectBias;
197 double m_kTwineDragNormal[2];
198 double m_nodeAforce_ned[3];
199 double m_nodeBforce_ned[3];
200 double m_nodeCforce_ned[3];
201 double m_dDampingCoeff;
203 double m_nodeAforce_ned_last[3];
204 double m_nodeBforce_ned_last[3];
205 double m_nodeCforce_ned_last[3];
208#ifdef FH_VISUALIZATION
210 Ogre::Root* m_pOgreRoot;
211 Ogre::SceneManager* m_pSceneMgr;
212 Ogre::Entity* m_apRenderElement[3];
213 Ogre::Entity* m_apRenderSphere[3];
214 Ogre::SceneNode* m_pRenderNodeMesh;
215 Ogre::SceneNode* m_apRenderNodeSphere[3];
216 Ogre::SceneNode* m_pRenderNodeOutline;
217 Ogre::SceneNode* m_pRenderNodeMaterial;
218#ifdef USE_DYNAMIC_LINES
219 CDynamicLines* m_pLines;
223 CDynamicLines* m_pLineOutline;
224 Ogre::ManualObject * m_pNetRenderObj;
227 unsigned short* m_aiSortU;
228 unsigned short* m_aiSortV;
229 unsigned long m_iNumTwines;
230 unsigned long m_iNumUTwines;
231 unsigned long m_iNumVTwines;
232 double* m_adInterpCoeffAu;
233 double* m_adInterpCoeffAv;
234 double* m_adInterpCoeffBu;
235 double* m_adInterpCoeffBv;
Definition: CNetElement3NWithConstraints.h:34
double CalcNodeInertia(int iNode)
Calculates the inertia of a node.
double GetTwineDiameter()
Returns the twine diameter in the panel.
double GetNumberOfTwineLengthsU()
Returns the number of twine lengths in mesh direction u in panel.
~CNetElement3NWithConstraints(void)
The destructor.
double GetNodeWeight(int iNode)
Returns the weight of a node.
CNetElement3NWithConstraints(const std::string sNetName, const unsigned long iID, const CNetElementDef *pNetPanel, const double dNy_water, const double dRho_water, const double dKnotDiameterRatio, const double dKnotMomStiff, const double dKknotMomStiff_contact, const double dCnLinearLimitAngle, const double dCnLinear, const double dCnTurb, const double dCnLam, const double dTurbLimit, const double dLamLimit, const double dCt_nominal, const double dCnKnots_nominal, const double dDampingRatio)
The constructor.
double GetNumberOfTwineLengthsV()
Returns the number of twine lengths in mesh direction v in panel.
Class containing the description of a net panel and methods necessary for taking this over to triangu...
Definition: CNetElementDef.h:22