Marine systems simulation
CConstantStrainTriangle.h
1
10
11#ifndef CConstantStrainTriangle_H
12#define CConstantStrainTriangle_H
13
15#include <string>
16#include <Eigen/Eigen>
17
18#include "SimObject.h"
19#include "CEnvironment.h"
20#include "sfh/constants.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
62 virtual void OdeFcn(const double dT, const double* const adX, double* const adXDot, const bool bIsMajorTimeStep);
63
64protected:
66 ISignalPort* m_pInForce;
67 ISignalPort* m_pInForce_B;
69 ISignalPort** m_TopInPos;
70 ISignalPort** m_TopInVel;
71 int m_BotConnectNum;
72 int* m_BotConnectNode;
73 ISignalPort** m_BotInForce;
74 ISignalPort* m_BotInForceM;
75
77 virtual const double* VolumeCL(const double dT, const double* const adX);
78 virtual const double* DragCOE(const double dT, const double* const adX);
79 virtual const double* StressMX(const double dT, const double* const adX);
80
81 double* m_TopOutForce;
82 virtual const double* TopOutForce(const double dT, const double* const adX, int iTop);
83 double* m_BotOutPos;
84 double* m_BotOutVel;
85 virtual const double* BotOutPos(const double dT, const double* const adX, int iBot);
86 virtual const double* BotOutVel(const double dT, const double* const adX, int iBot);
87 double m_BotOutPosM[3];
88 double m_BotOutVelM[3];
89 virtual const double* BotOutPosM(const double dT, const double* const adX);
90 virtual const double* BotOutVelM(const double dT, const double* const adX);
91
93 int m_IStatePos;
94 int m_IStateVel;
95
98
99 int m_Rows;
100 int m_Columns;
101 int m_Nodes;
102 int m_Triangles;
103
104 double m_TStart[3];
105 double m_TEnd[3];
106 double m_BStart[3];
107 double m_Rmesh;
108 double m_Cmesh;
109 string m_Shape;
110 int m_Bottom;
111 double m_BDepth;
112 double m_Radians[2];
113 double m_Depth;
114 double m_Filling;
115
116 double m_Damp[3];
117 double m_Drag;
118
119 double m_Thickness;
120 double m_Density;
121 double m_Youngs;
122 double m_Poissons;
123 double m_CArea;
124 double m_Volume[2];
125 double m_MStrain[3];
126 double m_MStress[4];
127 double m_Indt;
128
129 Eigen::Matrix<double,3,3> m_D;
130
131 int* m_CI;
132 int* m_BI;
133 int* m_TI;
134 double* m_NodeM;
135 double* m_NodeA;
136 double* m_TC;
137 Eigen::Matrix<double,3,1>* m_N;
138 Eigen::Matrix<double,3,6>* m_B;
139 Eigen::Matrix<double,6,3>* m_Bt;
140 Eigen::Matrix<double,6,6>* m_K;
141 Eigen::Matrix<double,6,6>* m_KA;
142 Eigen::Matrix<double,3,1>* m_Strain;
143 Eigen::Matrix<double,3,1>* m_Stress;
144 double* m_VMStress;
145 double* m_RAngle;
146
147#ifdef FH_VISUALIZATION
148 string m_Material;
149 vector<Ogre::SceneNode*> m_RenderNodes;
150 Ogre::SceneManager* m_SceneMgr;
151 vector<Ogre::ManualObject*> m_Manual;
152#endif
153
154};
155
156};
157#endif
158
Definition: CEnvironment.h:10
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
virtual void OdeFcn(const double dT, const double *const adX, double *const adXDot, const bool bIsMajorTimeStep)
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