Marine systems simulation
CConstantStrainTriangle.h
1
11
12#ifndef CConstantStrainTriangle_H
13#define CConstantStrainTriangle_H
14
16#include <string>
17#include <Eigen/Eigen>
18
19#include "SimObject.h"
20#include "CEnvironment.h"
21
22namespace membrane {
23
24/*
25typedef Eigen::Matrix<double,6,6> mat66;
26typedef Eigen::Matrix<double,6,1> vect6;
27typedef Eigen::Matrix<double,3,3> mat33;
28typedef Eigen::Matrix<double,3,6> mat36;
29typedef Eigen::Matrix<double,6,3> mat63;
30typedef Eigen::Matrix<double,3,1> vect3;
31*/
32
33class CConstantStrainTriangle : public SimObject
34{
35public:
36 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
37
38 CConstantStrainTriangle(std::string sSimObjectName, ISimObjectCreator* pCreator);
39 virtual void FinalSetup(const double dT, const double* const adX, ISimObjectCreator* const pCreator);
41
42#ifdef FH_VISUALIZATION
44 virtual void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
45
47 virtual void RenderUpdate(const double dT, const double* const adX);
48
50 void DrawBody(Ogre::SceneNode* renderNode, Ogre::SceneManager* sceneMgr);
51#endif
52
53 virtual void OdeFcn(const double dT, const double* const adX, double* const adXDot, const bool bIsMajorTimeStep);
54
55protected:
57 ISignalPort* m_pInForce;
58 ISignalPort* m_pInForce_B;
60 ISignalPort** m_TopInPos;
61 ISignalPort** m_TopInVel;
62 int m_BotConnectNum;
63 int* m_BotConnectNode;
64 ISignalPort** m_BotInForce;
65 ISignalPort* m_BotInForceM;
66
68 virtual const double* VolumeCL(const double dT, const double* const adX);
69 virtual const double* DragCOE(const double dT, const double* const adX);
70 virtual const double* StressMX(const double dT, const double* const adX);
71
72 double* m_TopOutForce;
73 virtual const double* TopOutForce(const double dT, const double* const adX, int iTop);
74 double* m_BotOutPos;
75 double* m_BotOutVel;
76 virtual const double* BotOutPos(const double dT, const double* const adX, int iBot);
77 virtual const double* BotOutVel(const double dT, const double* const adX, int iBot);
78 double m_BotOutPosM[3];
79 double m_BotOutVelM[3];
80 virtual const double* BotOutPosM(const double dT, const double* const adX);
81 virtual const double* BotOutVelM(const double dT, const double* const adX);
82
86
89
90 int m_Rows;
92 int m_Nodes;
94
95 double m_TStart[3];
96 double m_TEnd[3];
97 double m_BStart[3];
98 double m_Rmesh;
99 double m_Cmesh;
100 string m_Shape;
102 double m_BDepth;
103 double m_Radians[2];
104 double m_Depth;
105 double m_Filling;
106
107 double m_Damp[3];
108 double m_Drag;
109
110 double m_Thickness;
111 double m_Density;
112 double m_Youngs;
113 double m_Poissons;
114 double m_CArea;
115 double m_Volume[2];
116 double m_MStrain[3];
117 double m_MStress[4];
118 double m_Indt;
119
120 Eigen::Matrix<double,3,3> m_D;
121
122 int* m_CI;
123 int* m_BI;
124 int* m_TI;
125 double* m_NodeM;
126 double* m_NodeA;
127 double* m_TC;
128 Eigen::Matrix<double,3,1>* m_N;
129 Eigen::Matrix<double,3,6>* m_B;
130 Eigen::Matrix<double,6,3>* m_Bt;
131 Eigen::Matrix<double,6,6>* m_K;
132 Eigen::Matrix<double,6,6>* m_KA;
133 Eigen::Matrix<double,3,1>* m_Strain;
134 Eigen::Matrix<double,3,1>* m_Stress;
135 double* m_VMStress;
136 double* m_RAngle;
137
138#ifdef FH_VISUALIZATION
139 string m_Material;
140 vector<Ogre::SceneNode*> m_RenderNodes;
141 Ogre::SceneManager* m_SceneMgr;
142 vector<Ogre::ManualObject*> m_Manual;
143#endif
144
145};
146
147};
148#endif
Definition: CEnvironment.h:10
Definition: CConstantStrainTriangle.h:34
double m_Youngs
Density of the membrane elements [kg/m^3].
Definition: CConstantStrainTriangle.h:112
double m_TStart[3]
Number of triangles [#].
Definition: CConstantStrainTriangle.h:95
string m_Shape
Mesh size of columns [m].
Definition: CConstantStrainTriangle.h:100
Eigen::Matrix< double, 6, 6 > * m_K
Transpose Shape matrix of the triangles.
Definition: CConstantStrainTriangle.h:131
double m_Indt
Maximum stress.
Definition: CConstantStrainTriangle.h:118
CEnvironment * m_Environment
Index of the global velocity in the state vector.
Definition: CConstantStrainTriangle.h:88
double m_TEnd[3]
NED location of the starting point of the top row [m].
Definition: CConstantStrainTriangle.h:96
double m_Depth
Radians.
Definition: CConstantStrainTriangle.h:104
double m_Density
Thickness of the membrane elements [m].
Definition: CConstantStrainTriangle.h:111
Eigen::Matrix< double, 3, 1 > * m_N
Initial local locations of the triangle nodes.
Definition: CConstantStrainTriangle.h:128
Eigen::Matrix< double, 3, 3 > m_D
Initial time step.
Definition: CConstantStrainTriangle.h:120
double m_Cmesh
Mesh size of rows [m].
Definition: CConstantStrainTriangle.h:99
double m_BStart[3]
NED location of the ending point of the top row [m].
Definition: CConstantStrainTriangle.h:97
int m_Bottom
Shape.
Definition: CConstantStrainTriangle.h:101
Eigen::Matrix< double, 3, 1 > * m_Stress
Strain matrix of the triangles.
Definition: CConstantStrainTriangle.h:134
int * m_TI
Index of the bottom nodes in Node matrix.
Definition: CConstantStrainTriangle.h:124
Eigen::Matrix< double, 3, 6 > * m_B
Normal matrix of the triangles.
Definition: CConstantStrainTriangle.h:129
double m_CArea
Poisson¡¯s ratio of the membrane elements [#].
Definition: CConstantStrainTriangle.h:114
double m_MStress[4]
Maximum strain.
Definition: CConstantStrainTriangle.h:117
double m_Volume[2]
Cross area of a closed structure [m^3].
Definition: CConstantStrainTriangle.h:115
Eigen::Matrix< double, 6, 6 > * m_KA
Stiffness matrix of the triangles.
Definition: CConstantStrainTriangle.h:132
double * m_TC
Node acceleration matrix.
Definition: CConstantStrainTriangle.h:127
int * m_CI
Material matrix.
Definition: CConstantStrainTriangle.h:122
ISignalPort * m_pInForce_B
A pointer to the input force.
Definition: CConstantStrainTriangle.h:58
double m_Filling
Column depth.
Definition: CConstantStrainTriangle.h:105
int m_Rows
Pointer to DeepSeaGravityWaves -> CEnvironment.
Definition: CConstantStrainTriangle.h:90
double m_BDepth
Bottom.
Definition: CConstantStrainTriangle.h:102
double * m_NodeM
Index of the triangle nodes in Node matrix.
Definition: CConstantStrainTriangle.h:125
double m_Poissons
Elastic modulus of the membrane elements [N/m^2].
Definition: CConstantStrainTriangle.h:113
Eigen::Matrix< double, 3, 1 > * m_Strain
Mass matrix of the triangles.
Definition: CConstantStrainTriangle.h:133
int m_Nodes
Number of columns [#].
Definition: CConstantStrainTriangle.h:92
int m_Columns
Number of rows [#].
Definition: CConstantStrainTriangle.h:91
double m_Thickness
Drag coefficient[#].
Definition: CConstantStrainTriangle.h:110
int m_TopConnectNum
A pointer to the input force (bottom).
Definition: CConstantStrainTriangle.h:59
Eigen::Matrix< double, 6, 3 > * m_Bt
Shape matrix of the triangles.
Definition: CConstantStrainTriangle.h:130
virtual const double * VolumeCL(const double dT, const double *const adX)
A pointer to the input force (bottom).
double m_Radians[2]
Depth of bottom [m].
Definition: CConstantStrainTriangle.h:103
double m_Rmesh
NED location of the starting point of the bottom row [m].
Definition: CConstantStrainTriangle.h:98
double m_Drag
Damping coefficients[#].
Definition: CConstantStrainTriangle.h:108
double * m_RAngle
von Mises stress of the triangles.
Definition: CConstantStrainTriangle.h:136
ISignalPort * m_pInForce
Input ports.
Definition: CConstantStrainTriangle.h:57
double * m_NodeA
Node matrix.
Definition: CConstantStrainTriangle.h:126
double m_Damp[3]
Filling percentage.
Definition: CConstantStrainTriangle.h:107
int * m_BI
Index of the corner nodes in Node matrix.
Definition: CConstantStrainTriangle.h:123
int m_IStateVel
Index of the global position in the state vector.
Definition: CConstantStrainTriangle.h:85
double m_MStrain[3]
Volume of a closed structure [m^3].
Definition: CConstantStrainTriangle.h:116
int m_Triangles
Number of nodes [#].
Definition: CConstantStrainTriangle.h:93
double * m_VMStress
Stress matrix of the triangles.
Definition: CConstantStrainTriangle.h:135
int m_IStatePos
States.
Definition: CConstantStrainTriangle.h:84
Includes.
Definition: CConstantStrainTriangle.h:22