8#ifndef C_NET_ELEMENT_3N
9#define C_NET_ELEMENT_3N
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
60 void AddNodeForces(
const double*
const adNodePosA_ned,
61 const double*
const adNodePosB_ned,
62 const double*
const adNodePosC_ned,
63 const double*
const adNodeVelA_ned,
64 const double*
const adNodeVelB_ned,
65 const double*
const adNodeVelC_ned,
66 const double*
const adWaterVel_ned,
67 double *
const adNodeForceA_ned,
68 double *
const adNodeForceB_ned,
69 double *
const adNodeForceC_ned,
70 double dHydroForcesRatio = 1.0,
71 double dAddedLinearDrag = 0.0);
76#ifdef FH_VISUALIZATION
78 void RenderInit(Ogre::Root* pOgreRoot,
int NumMeshPerLine = 1);
81 void RenderUpdate(
const double*
const adPosA,
const double*
const adPosB,
82 const double*
const adPosC );
87 void CalcTensionForces(
double meshBarComp_panel[6],
double meshBarLength[2],
88 double twineTension[2],
double nodeATension_panel[3],
double nodeBTension_panel[3],
89 double nodeCTension_panel[3]);
91 void CalcLocalUVComponents(
double nodesABdist_panel[3],
double nodesACdist_panel[3],
92 double nodesBCdist_panel[3],
double meshBarComp_panel[6],
double meshBarLength[2]);
94 void CalcMeshContactForces(
double meshBarComp_panel[6],
95 double meshBarLength[2],
96 double nodeAMeshOpeningRes_panel[3],
97 double nodeBMeshOpeningRes_panel[3],
98 double nodeCMeshOpeningRes_panel[3],
99 double nodeATwineContactRes_panel[3],
100 double nodeBTwineContactRes_panel[3],
101 double nodeCTwineContactRes_panel[3]);
103 double CalcVelocities(
double R_ned2panel[3][3],
104 const double*
const adNodeVelA_ned,
105 const double*
const adNodeVelB_ned,
106 const double*
const adNodeVelC_ned,
107 const double*
const adWaterVel_ned,
108 double elementVel_ned[3],
109 double hydDynVel_ned[3],
110 double hydDynVel_panel[3]);
112 void CalcHydroDynamicForces(
double meshBarComp_panel[6],
113 double meshBarLength[2],
114 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 totalDragPerNode_panel[3]);
122 void CalcDampingForces(
double elementVel_ned[3],
123 const double*
const adNodeVelA_ned,
124 const double*
const adNodeVelB_ned,
125 const double*
const adNodeVelC_ned,
126 const double*
const adWaterVel_ned,
127 double adDampingForcesNodeA[3],
128 double adDampingForcesNodeB[3],
129 double adDampingForcesNodeC[3],
130 double dAddedLinearDrag);
134 std::string m_sNetName;
136 double m_adNodeInertia[3];
143 double m_dKnotMomStiff;
144 double m_dKnotMomStiffContact;
145 double m_adNodeAPos_mesh[2];
146 double m_adNodeBPos_mesh[2];
147 double m_adNodeCPos_mesh[2];
148 double m_CnLinearLimitAngle;
155 double m_CnKnots_nominal;
159 double m_adNodesDistAB_mesh[2];
160 double m_adNodesDistAC_mesh[2];
161 double m_adNodesDistBC_mesh[2];
170 double m_dMeshOpeningAngle;
171 double m_ShadowEffect[3];
172 double m_ShadowEffectBias;
177 double m_kTwineDragNormal[2];
178 double m_nodeAforce_ned[3];
179 double m_nodeBforce_ned[3];
180 double m_nodeCforce_ned[3];
181 double m_dDampingCoeff;
183 double m_nodeAforce_ned_last[3];
184 double m_nodeBforce_ned_last[3];
185 double m_nodeCforce_ned_last[3];
188#ifdef FH_VISUALIZATION
190 Ogre::Root* m_pOgreRoot;
191 Ogre::SceneManager* m_pSceneMgr;
192 Ogre::Entity* m_apRenderElement[3];
193 Ogre::Entity* m_apRenderSphere[3];
194 Ogre::SceneNode* m_pRenderNodeMesh;
195 Ogre::SceneNode* m_apRenderNodeSphere[3];
196 Ogre::SceneNode* m_pRenderNodeOutline;
197 Ogre::SceneNode* m_pRenderNodeMaterial;
198#ifdef USE_DYNAMIC_LINES
202 Ogre::ColourValue m_twineColour;
204 C3DLine* m_pLineOutline;
208 unsigned short* m_aiSortU;
209 unsigned short* m_aiSortV;
210 unsigned long m_iNumTwines;
211 unsigned long m_iNumUTwines;
212 unsigned long m_iNumVTwines;
213 double* m_adInterpCoeffAu;
214 double* m_adInterpCoeffAv;
215 double* m_adInterpCoeffBu;
216 double* m_adInterpCoeffBv;
217 int m_NumMeshPerLine;
Definition: CNetElement3N.h:34
CNetElement3N(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.
~CNetElement3N(void)
The destructor.
double CalcNodeInertia(int iNode)
Calculates the inertia of a node.
Class containing the description of a net panel and methods necessary for taking this over to triangu...
Definition: CNetElementDef.h:22