MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
shelleasans.h
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/struct/shelleasans.h,v 1.12 2017/01/12 14:46:44 masarati Exp $ */
2 /*
3  * MBDyn (C) is a multibody analysis code.
4  * http://www.mbdyn.org
5  *
6  * Copyright (C) 2010-2017
7  *
8  * Marco Morandini <morandini@aero.polimi.it>
9  * Riccardo Vescovini <vescovini@aero.polimi.it>
10  *
11  * Dipartimento di Ingegneria Aerospaziale - Politecnico di Milano
12  * via La Masa, 34 - 20156 Milano, Italy
13  * http://www.aero.polimi.it
14  *
15  * Changing this copyright notice is forbidden.
16  *
17  * This program is free software; you can redistribute it and/or modify
18  * it under the terms of the GNU General Public License as published by
19  * the Free Software Foundation (version 2 of the License).
20  *
21  *
22  * This program is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  * GNU General Public License for more details.
26  *
27  * You should have received a copy of the GNU General Public License
28  * along with this program; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */
31 
32 /*
33  * Inspired by
34  * Wojciech Witkowski
35  * "4-Node combined shell element with semi-EAS-ANS strain interpolations
36  * in 6-parameter shell theories with drilling degrees of freedom"
37  * Comput Mech (2009) 43:307­319 DOI 10.1007/s00466-008-0307-x
38  */
39 
40 #ifndef SHELLEASANS_H
41 #define SHELLEASANS_H
42 
43 #include "myassert.h"
44 #include "except.h"
45 
46 #include "strnode.h"
47 #include "elem.h"
48 
49 #include "constltp.h"
50 
51 /* da spostare in .cc */
52 #include "Rot.hh"
53 #include "joint.h"
54 
55 extern const char* psShellNames[];
56 
57 // Forward declaration
58 class DataManager;
59 class MBDynParser;
60 
61 // Shell - begin
62 
63 
64 #include "shell.h"
65 
66 // Shell - end
67 
68 // Shell4EASANS - begin
69 
71 : virtual public Elem,
72 public Shell
73 {
74 #if 0
75 protected:
76  static const unsigned int iNumPrivData =
77  +3 // 0 ( 1 -> 3) - strain
78  +3 // 3 ( 4 -> 6) - curvature
79  +3 // 6 ( 7 -> 9) - force
80  +3 // 9 (10 -> 12) - moment
81  +3 // 12 (13 -> 15) - position
82  +3 // 15 (16 -> 18) - orientation vector
83  +3 // 18 (19 -> 21) - angular velocity
84  +3 // 21 (22 -> 24) - strain rate
85  +3 // 24 (25 -> 27) - curvature rate
86  ;
87 
88  static unsigned int iGetPrivDataIdx_int(const char *s,
89  ConstLawType::Type type);
90 #endif
91 private:
92 public:
93  // numbered according to
94  //
95  // ^
96  // 4 o-----+-----o 3
97  // | 1_2 | 2_2 |
98  // --+-----+-----+->
99  // | 1_1 | 2_1 |
100  // 1 o-----+-----o 2
101  //
103  IP_1_1 = 0,
104  IP_1_2 = 1,
105  IP_1_3 = 2,
106  IP_2_1 = 3,
107  IP_2_2 = 4,
108  IP_2_3 = 5,
109  IP_3_1 = 6,
110  IP_3_2 = 7,
111  IP_3_3 = 8,
112 
113  NUMIP = 4
114  };
115 
116  static doublereal xi_i[NUMIP][2];
118 
119  // numbered according to the side they are defined on
121  SSEP_1 = 0,
122  SSEP_2 = 1,
123  SSEP_3 = 2,
124  SSEP_4 = 3,
125 
127  };
128 
129  static doublereal xi_A[NUMSSEP][2];
130 
131  enum NodeName {
132  NODE1 = 0,
133  NODE2 = 1,
134  NODE3 = 2,
135  NODE4 = 3,
136 
138  };
139 
141 
142  static doublereal xi_0[2];
143 
145  STRAIN = 0,
146  CURVAT = 1,
147 
149  };
150 
151 protected:
152  // Pointers to nodes
154 
155 #if 0
156  // Node offsets - TODO: offsets
157  const Vec3 f[NUMNODES];
158  Vec3 fRef[NUMNODES];
159 #endif
160 
161  // nodal positions (0: initial; otherwise current)
164  // current nodal orientation
168  // Euler vector of Ra
170 
171  // Average orientation matrix
175  // Average orientation matrix
176  // .. in reference configuration
178  // .. in current configuration
180 
181  // Orientation matrix
182  // .. in reference configuration
186  // .. in current configuration
190 
195 
196 // // Orientation matrix of the shear strain evaluation points
197 // Mat3x3 R[NUMSSEP];
198 // Mat3x3 RRef[NUMSSEP];
199 // Mat3x3 RPrev[NUMSSEP];
200 
201  // rotation tensors
204 
205  // Orientation tensor derivative axial vector
208 // Mat3x3 T_1_i[NUMIP];
209 // Mat3x3 T_2_i[NUMIP];
210 
211  // linear deformation vectors
212  // .. in reference configuration
217  // .. in current configuration
222 
223  // angular deformation vectors
224  // .. in reference configuration
227  // .. in current configuration
230 
231 
232 #if 0
233  // Angular velocity of the sections - TODO: viscoelastic
234  Vec3 Omega[NUMSEZ];
235  Vec3 OmegaRef[NUMSEZ];
236 #endif
237 
238  // Temporary data - TODO
239 #if 0
240  Vec6 Az[NUMSEZ];
241  Vec6 AzRef[NUMSEZ];
242  Vec6 AzLoc[NUMSEZ];
243  Vec6 DefLoc[NUMSEZ];
244  Vec6 DefLocRef[NUMSEZ];
245  Vec6 DefLocPrev[NUMSEZ];
246 #endif
247 
248 protected:
256 
258 // vfmh B_overline_m_i;
261 
263 
265 
268 
272 
273 #ifdef USE_CL_IN_SHELL
274  // Constitutive law handlers at integration points
276 #else // ! USE_CL_IN_SHELL
280 #endif // ! USE_CL_IN_SHELL
281 
282  // Reference constitutive law tangent matrices
284 
285  //stress
287 
288  // Is first residual
289  bool bFirstRes;
290 
291  // for derived elements that add external contributions
292  // to internal forces
293  virtual void
294  AddInternalForces(Vec6& /* AzLoc */ , unsigned int /* iSez */ ) {
295  NO_OP;
296  };
297 
298 private:
301  void InterpolateOrientation();
302 // void ComputeIPSEPRotations();
303  void ComputeIPCurvature();
304 
305 public:
306  Shell4EASANS(unsigned int uL,
307  const DofOwner* pDO,
308  const StructNode* pN1, const StructNode* pN2,
309  const StructNode* pN3, const StructNode* pN4,
310 #if 0 // TODO: offset
311  const Vec3& f1, const Vec3& f2,
312  const Vec3& f3, const Vec3& f4,
313 #endif
314  const Mat3x3& R1, const Mat3x3& R2,
315  const Mat3x3& R3, const Mat3x3& R4,
316 #ifdef USE_CL_IN_SHELL
317  const ConstitutiveLaw<vh, fmh>** pDTmp,
318 #else // ! USE_CL_IN_SHELL
319  const fmh& pDTmp,
320  const vh& PreStress,
321 #endif // ! USE_CL_IN_SHELL
322  flag fOut);
323 
324  virtual ~Shell4EASANS(void);
325 
326  // Shell type
327  virtual Shell::Type GetShellType(void) const {
328  return Shell::ELASTIC;
329  };
330 
331  // Element type
332  virtual Elem::Type GetElemType(void) const {
333  return Elem::PLATE;
334  };
335 
336  virtual unsigned int iGetNumDof(void) const {
337 // return 8;
338  return 7;
339  };
340 
341  virtual DofOrder::Order GetDofType(unsigned int i) const {
342  ASSERT(i >= 0 && i < iGetNumDof());
343  return DofOrder::ALGEBRAIC;
344  };
345 
346  virtual DofOrder::Order GetEqType(unsigned int i) const {
347  ASSERT(i >= 0 && i < iGetNumDof());
348  return DofOrder::ALGEBRAIC;
349  };
350 
351  // Contribution to restart file
352  virtual std::ostream& Restart(std::ostream& out) const;
353 
354 #if 0
355  virtual void
356  AfterConvergence(const VectorHandler& X, const VectorHandler& XP);
357 
358  // Inverse dynamics
359  virtual void
360  AfterConvergence(const VectorHandler& X, const VectorHandler& XP,
361  const VectorHandler& XPP);
362 #endif
363 
364  // Workspace size
365  virtual void
366  WorkSpaceDim(integer* piNumRows, integer* piNumCols) const {
367  *piNumRows = 6*4 + iGetNumDof();
368  *piNumCols = 6*4 + iGetNumDof();
369  };
370 
371  // Initial settings
372  void
373  SetValue(DataManager *pDM,
374  VectorHandler& /* X */ , VectorHandler& /* XP */ ,
375  SimulationEntity::Hints *ph = 0);
376 
377 #if 0
378  // Prepares reference parameters after prediction
379  virtual void
380  AfterPredict(VectorHandler& /* X */ , VectorHandler& /* XP */ );
381 #endif
382 
383  // Residual assembly
384  virtual SubVectorHandler& AssRes(SubVectorHandler& WorkVec,
385  doublereal dCoef,
386  const VectorHandler& XCurr,
387  const VectorHandler& XPrimeCurr);
388 
389 #if 0
390  // Inverse dynamics
391  virtual SubVectorHandler&
392  AssRes(SubVectorHandler& WorkVec,
393  const VectorHandler& XCurr ,
394  const VectorHandler& XPrimeCurr ,
395  const VectorHandler& XPrimePrimeCurr ,
397 #endif
398 
399  // Jacobian matrix assembly
400  virtual VariableSubMatrixHandler&
402  doublereal dCoef,
403  const VectorHandler& XCurr,
404  const VectorHandler& XPrimeCurr);
405 
406 #if 0
407  // Matrix assembly for eigenvalues
408  void
410  VariableSubMatrixHandler& WorkMatB,
411  const VectorHandler& XCurr,
412  const VectorHandler& XPrimeCurr);
413 #endif
414 
415  virtual void Output(OutputHandler& OH) const;
416 
417  virtual unsigned int iGetInitialNumDof(void) const {
418  return 0;
419  };
420 
421  virtual void
422  InitialWorkSpaceDim(integer* piNumRows, integer* piNumCols) const {
423  *piNumRows = 6*4;
424  *piNumCols = 6*4;
425  };
426 
427  virtual void SetInitialValue(VectorHandler& /* X */ ) {
428  NO_OP;
429  };
430 
431  virtual VariableSubMatrixHandler&
433  const VectorHandler& XCurr);
434 
435  virtual SubVectorHandler&
436  InitialAssRes(SubVectorHandler& WorkVec, const VectorHandler& XCurr);
437 
438 #if 0
439  // Access to private data
440  virtual unsigned int iGetNumPrivData(void) const;
441  virtual unsigned int iGetPrivDataIdx(const char *s) const;
442  virtual doublereal dGetPrivData(unsigned int i) const;
443 #endif
444 
445  // Access to nodes
446  virtual const StructNode* pGetNode(unsigned int i) const;
447 
448  /******** PER IL SOLUTORE PARALLELO *********/
449  /* Fornisce il tipo e la label dei nodi che sono connessi all'elemento
450  * utile per l'assemblaggio della matrice di connessione fra i dofs */
451  virtual void
452  GetConnectedNodes(std::vector<const Node *>& connectedNodes) const {
453  connectedNodes.resize(NUMNODES);
454  for (int i = 0; i < NUMNODES; i++) {
455  connectedNodes[i] = pNode[i];
456  }
457  };
458  /**************************************************/
459 };
460 
461 // Shell4EASANS - end
462 
463 
464 #endif // SHELLEASANS_H
465 
Mat3x3 Phi_Delta_i[NUMIP][NUMNODES]
Definition: shelleasans.h:191
Mat3x3 Q_i[NUMIP]
Definition: shelleasans.h:202
static doublereal xi_0[2]
Definition: shelleasans.h:142
Vec3 eps_tilde_2_A[NUMSSEP]
Definition: shelleasans.h:221
virtual ~Shell4EASANS(void)
Definition: shelleasans.cc:476
Vec3 y_i_2[NUMIP]
Definition: shelleasans.h:267
virtual void GetConnectedNodes(std::vector< const Node * > &connectedNodes) const
Definition: shelleasans.h:452
Mat3x3 Kappa_delta_i_1[NUMIP][NUMNODES]
Definition: shelleasans.h:193
Vec3 k_1_i[NUMIP]
Definition: shelleasans.h:206
virtual DofOrder::Order GetDofType(unsigned int i) const
Definition: shelleasans.h:341
long int flag
Definition: mbdyn.h:43
static doublereal w_i[NUMIP]
Definition: shelleasans.h:117
fmh S_alpha_beta_0
Definition: shelleasans.h:249
Definition: matvec3.h:98
Mat3x3 T_0_A[NUMSSEP]
Definition: shelleasans.h:185
doublereal alpha_0
Definition: shelleasans.h:252
vfmh S_alpha_beta_A
Definition: shelleasans.h:251
std::vector< vh > vvh
Definition: shell.h:81
Vec3 y_i_1[NUMIP]
Definition: shelleasans.h:266
static doublereal xi_i[NUMIP][2]
Definition: shelleasans.h:116
Shell4EASANS(unsigned int uL, const DofOwner *pDO, const StructNode *pN1, const StructNode *pN2, const StructNode *pN3, const StructNode *pN4, const Mat3x3 &R1, const Mat3x3 &R2, const Mat3x3 &R3, const Mat3x3 &R4, const fmh &pDTmp, const vh &PreStress, flag fOut)
Definition: shelleasans.cc:253
Vec3 xa_0[NUMNODES]
Definition: shelleasans.h:162
virtual unsigned int iGetPrivDataIdx(const char *s) const
Definition: simentity.cc:142
virtual SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: shelleasans.cc:488
Vec3 k_tilde_2_0_i[NUMIP]
Definition: shelleasans.h:226
static const unsigned int iNumPrivData
Definition: beam.cc:249
Mat3x3 Phi_Delta_A[NUMIP][NUMNODES]
Definition: shelleasans.h:192
Vec3 k_tilde_1_0_i[NUMIP]
Definition: shelleasans.h:225
virtual unsigned int iGetInitialNumDof(void) const
Definition: shelleasans.h:417
Mat3x3 T_A[NUMSSEP]
Definition: shelleasans.h:189
Vec3 k_tilde_2_i[NUMIP]
Definition: shelleasans.h:229
vfmh L_alpha_beta_i
Definition: shelleasans.h:254
vfmh S_alpha_beta_i
Definition: shelleasans.h:250
#define NO_OP
Definition: myassert.h:74
ShearStrainEvaluationPoint
Definition: shelleasans.h:120
std::vector< Hint * > Hints
Definition: simentity.h:89
void ComputeInitialNodeOrientation()
Definition: shelleasans.cc:138
Vec3 xa[NUMNODES]
Definition: shelleasans.h:163
virtual SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
Definition: shelleasans.cc:825
void InterpolateOrientation()
Definition: shelleasans.cc:185
Vec3 phi_tilde_0
Definition: shelleasans.h:174
Mat3x3 T_i[NUMIP]
Definition: shelleasans.h:188
vfmh D_overline_i
Definition: shelleasans.h:259
doublereal alpha_i[NUMIP]
Definition: shelleasans.h:253
Vec3 eps_tilde_1_0_A[NUMSSEP]
Definition: shelleasans.h:215
Vec3 eps_tilde_2_i[NUMIP]
Definition: shelleasans.h:219
Mat3x3 iTa_A[NUMSSEP]
Definition: shelleasans.h:167
virtual const StructNode * pGetNode(unsigned int i) const
Definition: shelleasans.cc:833
Vec3 eps_tilde_1_i[NUMIP]
Definition: shelleasans.h:218
Vec3 eps_tilde_1_0_i[NUMIP]
Definition: shelleasans.h:213
virtual void AddInternalForces(Vec6 &, unsigned int)
Definition: shelleasans.h:294
Definition: matvec6.h:37
virtual VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
Definition: shelleasans.cc:817
Mat3x3 T0_overline
Definition: shelleasans.h:177
virtual unsigned int iGetNumDof(void) const
Definition: shelleasans.h:336
virtual std::ostream & Restart(std::ostream &out) const
Definition: shelleasans.cc:802
vfmh L_alpha_beta_A
Definition: shelleasans.h:255
Vec3 phi_tilde_i[NUMIP]
Definition: shelleasans.h:172
virtual VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: shelleasans.cc:715
Vec3 phi_tilde_n[NUMNODES]
Definition: shelleasans.h:169
Vec3 phi_tilde_A[NUMSSEP]
Definition: shelleasans.h:173
Mat3x3 iTa_i[NUMIP]
Definition: shelleasans.h:166
virtual Shell::Type GetShellType(void) const
Definition: shelleasans.h:327
#define ASSERT(expression)
Definition: colamd.c:977
virtual void SetInitialValue(VectorHandler &)
Definition: shelleasans.h:427
vfmh K_beta_beta_i
Definition: shelleasans.h:264
vfmh B_overline_i
Definition: shelleasans.h:257
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: shelleasans.h:422
Mat3x3 T_overline
Definition: shelleasans.h:179
Vec3 eps_tilde_1_A[NUMSSEP]
Definition: shelleasans.h:220
static doublereal xi_n[NUMNODES][2]
Definition: shelleasans.h:140
virtual doublereal dGetPrivData(unsigned int i) const
Definition: simentity.cc:149
virtual unsigned int iGetNumPrivData(void) const
Definition: simentity.cc:136
Mat3x3 T_0_i[NUMIP]
Definition: shelleasans.h:184
virtual Elem::Type GetElemType(void) const
Definition: shelleasans.h:332
const StructNode * pNode[NUMNODES]
Definition: shelleasans.h:153
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition: shelleasans.h:366
virtual DofOrder::Order GetEqType(unsigned int i) const
Definition: shelleasans.h:346
Definition: elem.h:75
Type
Definition: elem.h:91
Vec3 eps_tilde_2_0_i[NUMIP]
Definition: shelleasans.h:214
void SetValue(DataManager *pDM, VectorHandler &, VectorHandler &, SimulationEntity::Hints *ph=0)
Definition: shelleasans.cc:809
Type
Definition: shell.h:71
Mat3x3 iTa[NUMNODES]
Definition: shelleasans.h:165
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
Definition: simentity.cc:120
virtual void Output(OutputHandler &OH) const
Definition: shelleasans.cc:848
Vec3 eps_tilde_2_0_A[NUMSSEP]
Definition: shelleasans.h:216
virtual void AssMats(VariableSubMatrixHandler &WorkMatA, VariableSubMatrixHandler &WorkMatB, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: elem.cc:55
const char * psShellNames[]
Vec3 k_tilde_1_i[NUMIP]
Definition: shelleasans.h:228
static doublereal xi_A[NUMSSEP][2]
Definition: shelleasans.h:129
void UpdateNodalAndAveragePosAndOrientation()
Definition: shelleasans.cc:116
FullMatrixHandler fmh
Definition: shell.h:82
void ComputeIPCurvature()
Definition: shelleasans.cc:229
std::vector< fmh > vfmh
Definition: shell.h:83
virtual void AfterPredict(VectorHandler &X, VectorHandler &XP)
Definition: simentity.cc:91
Vec3 k_2_i[NUMIP]
Definition: shelleasans.h:207
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
Mat3x3 Q_A[NUMSSEP]
Definition: shelleasans.h:203
Mat3x3 Kappa_delta_i_2[NUMIP][NUMNODES]
Definition: shelleasans.h:194
Definition: shell.h:63
MyVectorHandler vh
Definition: shell.h:80
Mat3x3 T_0_0
Definition: shelleasans.h:183