8#ifndef C_MEMBRANE_ELEMENT
9#define C_MEMBRANE_ELEMENT
12#include <net/CNetElementDef.h>
13#include "CPrintDuringExec.h"
15#ifdef FH_VISUALIZATION
17#ifndef USE_DYNAMIC_LINES
18#include "sfh/ogre/C3DLine.h"
19#include "sfh/ogre/CDynamicLines.h"
40 const std::string sNetName,
41 const unsigned long iID,
43 const double dNy_water,
44 const double dRho_water);
49 void AddNodeForces(
const double*
const adNodePosA_ned,
50 const double*
const adNodePosB_ned,
51 const double*
const adNodePosC_ned,
52 const double*
const adNodeVelA_ned,
53 const double*
const adNodeVelB_ned,
54 const double*
const adNodeVelC_ned,
55 const double*
const adWaterVel_ned,
56 double *
const adNodeForceA_ned,
57 double *
const adNodeForceB_ned,
58 double *
const adNodeForceC_ned,
59 double * pressCoeffAngle,
61 double dHydroForcesRatio = 1.0,
62 double dAddedLinearDrag = 0.0);
66 const double*
const adNodePosB_ned,
67 const double*
const adNodePosC_ned,
68 const double*
const adNodeVelA_ned,
69 const double*
const adNodeVelB_ned,
70 const double*
const adNodeVelC_ned,
71 const double*
const adWaterVel_ned,
72 double *
const adNodeForceA_ned,
73 double *
const adNodeForceB_ned,
74 double *
const adNodeForceC_ned,
75 double dHydroForcesRatio = 1.0,
76 double dAddedLinearDrag = 0.0);
81#ifdef FH_VISUALIZATION
83 void RenderInit(Ogre::Root* pOgreRoot);
86 void RenderUpdate(
const double*
const adPosA,
const double*
const adPosB,
87 const double*
const adPosC );
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]);
124 void CalcHydroDynamicForces(
129 double R_ned2panel[3][3],
130 const double*
const adNodeVelA_ned,
131 const double*
const adNodeVelB_ned,
132 const double*
const adNodeVelC_ned,
133 const double*
const adWaterVel_ned,
134 double elementVel_ned[3],
135 double totalDragPerNode_panel[3]);
137 void CalcDampingForces(
double elementVel_ned[3],
138 const double*
const adNodeVelA_ned,
139 const double*
const adNodeVelB_ned,
140 const double*
const adNodeVelC_ned,
141 const double*
const adWaterVel_ned,
142 double adDampingForcesNodeA[3],
143 double adDampingForcesNodeB[3],
144 double adDampingForcesNodeC[3],
145 double dAddedLinearDrag);
149 std::string m_sNetName;
151 double m_adNodeInertia[3];
160 double m_adNodeAPos_mesh[2];
161 double m_adNodeBPos_mesh[2];
162 double m_adNodeCPos_mesh[2];
174 double m_adNodesDistAB_mesh[2];
175 double m_adNodesDistAC_mesh[2];
176 double m_adNodesDistBC_mesh[2];
185 double m_dMeshOpeningAngle;
186 double m_ShadowEffect[3];
187 double m_ShadowEffectBias;
193 double m_nodeAforce_ned[3];
194 double m_nodeBforce_ned[3];
195 double m_nodeCforce_ned[3];
196 double m_dDampingCoeff;
198 double m_nodeAforce_ned_last[3];
199 double m_nodeBforce_ned_last[3];
200 double m_nodeCforce_ned_last[3];
203#ifdef FH_VISUALIZATION
205 Ogre::Root* m_pOgreRoot;
206 Ogre::SceneManager* m_pSceneMgr;
207 Ogre::Entity* m_apRenderElement[3];
208 Ogre::Entity* m_apRenderSphere[3];
209 Ogre::SceneNode* m_pRenderNodeMesh;
210 Ogre::SceneNode* m_apRenderNodeSphere[3];
211 Ogre::SceneNode* m_pRenderNodeOutline;
212 Ogre::SceneNode* m_pRenderNodeMaterial;
213#ifdef USE_DYNAMIC_LINES
214 CDynamicLines* m_pLines;
218 CDynamicLines* m_pLineOutline;
219 Ogre::ManualObject * m_pNetRenderObj;
222 unsigned short* m_aiSortU;
223 unsigned short* m_aiSortV;
224 unsigned long m_iNumTwines;
225 unsigned long m_iNumUTwines;
226 unsigned long m_iNumVTwines;
227 double* m_adInterpCoeffAu;
228 double* m_adInterpCoeffAv;
229 double* m_adInterpCoeffBu;
230 double* m_adInterpCoeffBv;
Class containing the description of a net panel and methods necessary for taking this over to triangu...
Definition: CNetElementDef.h:22
Definition: CMembraneElement.h:36
~CMembraneElement(void)
The destructor.
CMembraneElement(const std::string sNetName, const unsigned long iID, const CNetElementDef *pNetPanel, const double dNy_water, const double dRho_water)
The constructor.
double CalcNodeInertia(int iNode)
Calculates the inertia of a node.
void AddNodeForces(const double *const adNodePosA_ned, const double *const adNodePosB_ned, const double *const adNodePosC_ned, const double *const adNodeVelA_ned, const double *const adNodeVelB_ned, const double *const adNodeVelC_ned, const double *const adWaterVel_ned, double *const adNodeForceA_ned, double *const adNodeForceB_ned, double *const adNodeForceC_ned, double dHydroForcesRatio=1.0, double dAddedLinearDrag=0.0)
Adds node forces for none-cage membrane elements.
Class modelling a Net cage.
Definition: CBottomRing.h:35