12#ifndef F_NETELEMENT_FLOAT_H
13#define F_NETELEMENT_FLOAT_H
15#include "sfh/constants.h"
16#include "sfh/math/array.h"
17#include "sfh/util/diagnostic.h"
18#include "sfh/sim/kinematics.h"
28 for (int i = 0; i<2; i++)
30 m_nodesABdist_mesh[i] = m_nodeBPos_mesh[i] - m_nodeAPos_mesh[i];
31 m_nodesACdist_mesh[i] = m_nodeCPos_mesh[i] - m_nodeAPos_mesh[i];
32 m_nodesBCdist_mesh[i] = m_nodeCPos_mesh[i] - m_nodeBPos_mesh[i];
38 m_meshDet = sfh::math::Abs(m_nodesACdist_mesh[0]*m_nodesABdist_mesh[1] - m_nodesABdist_mesh[0]*m_nodesACdist_mesh[1]);
39 if (sfh::math::Abs(m_meshDet) < 1.0)
40 CPrintDuringExec::WriteLog("In CNetElement3N::Initialize() for net "
42 + " and section with id "
43 + sfh::text::Int2Str(m_iID)
44 + ". The mesh determinant in is less than 1.0. This may be caused by two nodes of a net section being too close. Check your input!", "TempOut.txt");
52 m_numMeshes = sfh::math::Abs(m_meshDet/2); // Number of meshes in the triangular element.
53 m_numBars = sfh::math::Abs(m_meshDet); // Number of bars equals twice the number of meshes (Priour, 2005, Eq. 7).
54 m_numUBars = sfh::math::Abs(m_meshDet/2); // Number of u-bars is half the total number of mesh bars.
55 m_numVBars = sfh::math::Abs(m_meshDet/2); // Number of v-bars is half the total number of mrsh bars.
56 m_numKnots = sfh::math::Abs(m_meshDet/2); // Number of knots equals the number of meshes;
59 m_weight = (m_rho_twines - m_rho_water)*m_twineCrossSecArea*m_meshBarLength_unstretched*m_numBars;
60 m_NodeWeight = m_weight / 3;
62 m_Ct = m_Ct_nominal*sfh::pi; // Approximate tangential drag force coefficient, nominal coefficient multiplied by PI due to the typical expression for the drag force.
66 float CnKnots = m_CnKnots_nominal * sfh::pi * m_knotDiameter * m_knotDiameter / 4;
67 m_kKnot = 0.5 * m_rho_water * m_knotDiameter * m_numKnots * CnKnots;
70 m_kTwineDragNormal[0] = 0.5 * m_rho_water * m_twineDiameter * (m_meshBarLength_unstretched - m_knotDiameter) * m_numUBars ;
71 m_kTwineDragNormal[1] = 0.5 * m_rho_water * m_twineDiameter * (m_meshBarLength_unstretched - m_knotDiameter) * m_numVBars ;
73 m_EATwine = m_EModulus * m_twineCrossSecArea;
74 m_dDampingRatio = 10.0;
75 float avgMeshesBetweenNodes = (sfh::math::Norm(m_nodesABdist_mesh, 3) + sfh::math::Norm(m_nodesACdist_mesh, 3) + sfh::math::Norm(m_nodesBCdist_mesh, 3)) / 3;
76 float avgNodeDist = avgMeshesBetweenNodes * m_meshBarLength_unstretched;
77 m_dDampingCoeff = m_dDampingRatio * sqrt(m_NodeWeight * m_EATwine * m_numBars / avgMeshesBetweenNodes / avgNodeDist) ;
84 const float dHydroForcesRatio = 1;
85 const float dAddedLinearDrag = 0;
86 const float knotDiameterRatio = 2.0;
88 const float rho_water = 1025;
89 const float m_knotMomStiff = 0;
90 const float CnLinearLimitAngle = 4.0 * sfh::pi / 180;
91 const float CnLinear = 0.068 ;
92 const float CnTurb = 0.8;
93 const float CnLam = 1.15;
94 const float TurbLimit = 3.4e5;
95 const float LamLimit = 2.0e5;
96 const float Ct_nominal = 0.01;
97 const float CnKnots_nominal = 1.15;
100void AddNetPanelNodeForces(
102 const float* adPosAndVel,
103 const int* aiPosIndex,
104 const int* aiVelIndex,
105 const float* adWaterVel_ned,
108 float* adNodesDistMesh,
111 float* adMeshBarLength_unstretched,
112 float* adKnotDiameter,
113 float* adKnotMomStiff_contact,
115 float* adDampingCoeff,
117 float* adTwineDragNormal,
118 float* adTwineDiameter,
119 const float m_CnLinearLimitAngle,
120 const float m_CnLinear,
121 const float m_CnTurb,
123 const float m_TurbLimit,
124 const float m_LamLimit,
125 const float m_Ct_nominal,
126 const float m_CnKnots_nominal);
Definition FNetElementFloat.h:83
const float m_ny_water
Kinematic viscosity of water.
Definition FNetElementFloat.h:87