MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
hbeam.cc
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/struct/hbeam.cc,v 1.70 2017/05/12 17:29:26 morandini Exp $ */
2 /*
3  * MBDyn (C) is a multibody analysis code.
4  * http://www.mbdyn.org
5  *
6  * Copyright (C) 1996-2017
7  *
8  * Pierangelo Masarati <masarati@aero.polimi.it>
9  * Paolo Mantegazza <mantegazza@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  * Trave a volumi finiti, con predisposizione per forze di inerzia consistenti
34  * e legame cositutivo piezoelettico
35  */
36 
37 #include "mbconfig.h" /* This goes first in every *.c,*.cc file */
38 
39 #include <limits>
40 #include <cfloat>
41 #include <limits>
42 
43 #include "dataman.h"
44 #include "constltp.h"
45 #include "shapefnc.h"
46 #include "beam.h"
47 #include "hbeam.h"
48 #if 0 /* not implemented yet */
49 #include <pzhbeam.h>
50 #endif
51 #include "hbeam_interp.h"
52 
53 /*
54  * Nota: non e' ancora stato implementato il contributo
55  * della ViscoElasticHBeam all'assemblaggio iniziale
56  */
57 
58 /*
59  * Nota: la parte viscoelastica va rivista in accordo con la piu'
60  * recente formulazione delle derivate delle deformazioni nel sistema
61  * materiale
62  */
63 
64 /* HBeam - begin */
65 
66 /* Costruttore normale */
67 HBeam::HBeam(unsigned int uL,
68  const StructNode* pN1,
69  const StructNode* pN2,
70  const Vec3& F1,
71  const Vec3& F2,
72  const Mat3x3& R1, const Mat3x3& R2,
73  const ConstitutiveLaw6D* pd,
74  flag fOut)
75 : Elem(uL, fOut),
76 ElemGravityOwner(uL, fOut),
77 InitialAssemblyElem(uL, fOut),
78 bFirstRes(true)
79 {
80  /* Validazione dati */
81  ASSERT(pN1 != NULL);
83  ASSERT(pN2 != NULL);
85 
86  pNode[NODE1] = pN1;
87  pNode[NODE2] = pN2;
88  f[NODE1] = F1;
89  f[NODE2] = F2;
90 
91  Rn[NODE1] = R1;
92  Rn[NODE2] = R2;
93 
94  /*
95  RRef = R = interpolazione di R1 e R2 ;
96  */
97 
98  pD = NULL;
102 
103  Omega = Zero3;
104  Az = Zero6;
105  AzRef = Zero6;
106  AzLoc = Zero6;
107  DefLoc = Zero6;
108  DefLocRef = Zero6;
109  p = Zero3;
110  g = Zero3;
111  L0 = Zero3;
112  L = Zero3;
113 
114  DsDxi();
115 }
116 
117 
119 {
120  /* Distrugge il legame costitutivo */
121  ASSERT(pD != NULL);
122  if (pD != NULL) {
123  SAFEDELETE(pD);
124  }
125 }
126 
127 /* Accesso ai dati privati */
128 unsigned int
130 {
131  return 12;
132 }
133 
134 unsigned int
135 HBeam::iGetPrivDataIdx(const char *s) const
136 {
137  ASSERT(s != NULL);
138 
139  /*
140  * {ex|k{x|y|z}}
141  */
142 
143  unsigned int idx = 0;
144 
145  switch (s[0]) {
146  case 'F':
147  idx += 6;
148  case 'e':
149  switch (s[1]) {
150  case 'x':
151  idx += 1;
152  break;
153 
154  case 'y':
155  case 'z':
156  return 0;
157 
158  default:
159  return 0;
160  }
161  break;
162 
163  case 'M':
164  idx += 6;
165  case 'k':
166  idx += 3;
167  switch (s[1]) {
168  case 'x':
169  idx += 1;
170  break;
171 
172  case 'y':
173  idx += 2;
174  break;
175 
176  case 'z':
177  idx += 3;
178  break;
179 
180  default:
181  return 0;
182  }
183  break;
184 
185  default:
186  return 0;
187  }
188 
189  if (s[2] != '\0') {
190  return 0;
191  }
192 
193  return idx;
194 }
195 
197 HBeam::dGetPrivData(unsigned int i) const
198 {
199  ASSERT(i > 0 && i <= 6);
200 
201  switch (i) {
202  case 1:
203  case 4:
204  case 5:
205  case 6:
206  return DefLoc.dGet(i);
207 
208  case 7:
209  case 10:
210  case 11:
211  case 12:
212  return AzLoc.dGet(i);
213 
214  case 2:
215  case 3:
216  silent_cerr("HBeam(" << GetLabel() << "): "
217  "not allowed to return shear strain" << std::endl);
219 
220  case 8:
221  case 9:
222  silent_cerr("HBeam(" << GetLabel() << "): "
223  "not allowed to return shear force" << std::endl);
225 
226  default:
227  silent_cerr("HBeam(" << GetLabel() << "): "
228  "illegal private data " << i << std::endl);
230  }
231 }
232 
233 void
235 {
236  /* Calcola il ds/dxi e le deformazioni iniziali */
237  Mat3x3 RTmp[NUMNODES];
238  Vec3 yTmp[NUMNODES];
239  Vec3 fTmp[NUMNODES];
240  for (unsigned int i = 0; i < NUMNODES; i++) {
241  RTmp[i] = pNode[i]->GetRCurr()*Rn[i];
242  fTmp[i] = pNode[i]->GetRCurr()*f[i];
243  yTmp[i] = pNode[i]->GetXCurr() + fTmp[i];
244  }
245 
246  xi = 0.5;
247  dsdxi = 1.0;
248  /* Calcolo i wder ... */
249  ComputeInterpolation(yTmp, RTmp, fTmp,
250  xi, dsdxi,
251  p, R,
252  L, Rho);
253 
254  doublereal d = L.Dot();
255  if (d > std::numeric_limits<doublereal>::epsilon()) {
256  d = std::sqrt(d);
257  } else {
258  silent_cerr("HBeam(" << GetLabel() << ") "
259  "has singular metric; aborting..." << std::endl);
260 
262  }
263 
264  dsdxi = dsdxi*d;
265  dxids = 1./dsdxi;
266 
267  /* Calcolo le caratteristiche iniziali ... */
268  ComputeInterpolation(yTmp, RTmp, fTmp,
269  xi, dxids,
270  p, R,
271  L, Rho);
272 
273  /* Grandezze iniziali e di riferimento */
274  /* FIXME: fare un temporaneo per i trasposti ... */
275  RRef = R;
276  Mat3x3 RT(R.Transpose());
277  Rho0 = RT*Rho;
278  LRef = L;
279  L0 = RT*L;
280 }
281 
282 
283 /* Calcola la velocita' angolare delle sezioni a partire da quelle dei nodi */
284 void
286 {
287 #if 0
288  /* Modo consistente: */
289  Mat3x3 RNod[NUMNODES];
290  Vec3 w[NUMNODES];
291  for (unsigned int i = 0; i < NUMNODES; i++) {
292  RNod[i] = pNode[i]->GetRCurr();
293  w[i] = pNode[i]->GetWCurr();
294  }
295 
296  /*
297  * Calcolo i parametri di rotazione della rotazione relativa
298  * tra inizio e fine e li dimezzo nell'ipotesi che siano limitati
299  */
300  Vec3 gTmp(MatR2gparam(RNod[NODE2].Transpose()*RNod[NODE1]));
301 
302  /*
303  * Le derivate dei parametri di rotazione si ricavano da omega
304  */
305  Vec3 g1P(Mat3x3(MatGm1, gTmp*(-.5))*w[NODE1]);
306  Vec3 g2P(Mat3x3(MatGm1, gTmp*.5)*w[NODE2]);
307 
308  Vec3 gPTmp(g1P*dN2[NODE1]+g2P*dN2[NODE2]);
309  Omega = Mat3x3(MatG, gTmp)*gPTmp;
310 
311 #if 0
312  /* Modo brutale: interpolo le velocita' dei nodi */
313  Vec3 w[NUMNODES];
314  for (unsigned int i = 0; i < NUMNODES; i++) {
315  w[i] = pNode[i]->GetWCurr();
316  }
317  Omega[i] = w[NODE1]*dN2[NODE1]+w[NODE2]*dN2[NODE2];
318 #endif /* 0 */
319 #endif
320 }
321 
322 
323 /* Contributo al file di restart */
324 std::ostream&
325 HBeam::Restart(std::ostream& out) const
326 {
327  return Restart_(out)<< ';' << std::endl;
328 }
329 
330 std::ostream&
331 HBeam::Restart_(std::ostream& out) const
332 {
333  out << " beam2: " << GetLabel();
334  for (unsigned int i = 0; i < NUMNODES; i++) {
335  out << ", " << pNode[i]->GetLabel() << ", reference, node, ",
336  f[i].Write(out, ", ");
337  }
338  out << ", reference, global,"
339  << "1, ", (R.GetVec(1)).Write(out, ", ") << ", "
340  << "2, ", (R.GetVec(2)).Write(out, ", ") << ", ",
341  pD->pGetConstLaw()->Restart(out);
342 
343  return out;
344 }
345 
346 void
348 {
350 }
351 
352 /* Assembla la matrice */
353 void
355  FullSubMatrixHandler& /* WMB */ ,
356  doublereal dCoef,
357  const VectorHandler& /* XCurr */ ,
358  const VectorHandler& /* XPrimeCurr */ )
359 {
360  DEBUGCOUTFNAME("HBeam::AssStiffnessMat");
361 
362  /*
363  * La matrice arriva gia' dimensionata
364  * e con gli indici di righe e colonne a posto
365  */
366 
367  /* Recupera i dati dei nodi */
368  Vec3 yTmp[NUMNODES];
369  Vec3 fTmp[NUMNODES];
370  Mat3x3 RTmp[NUMNODES];
371  for (unsigned int i = 0; i < NUMNODES; i++) {
372  RTmp[i] = pNode[i]->GetRCurr()*Rn[i];
373  fTmp[i] = pNode[i]->GetRCurr()*f[i];
374  yTmp[i] = pNode[i]->GetXCurr() + fTmp[i];
375  }
376  ComputeFullInterpolation(yTmp, RTmp, fTmp,
377  xi, dxids,
378  p, R,
379  RdP, pdP, pdp,
380  L, Rho,
381  RhodP, LdP, Ldp);
382  /* Legame costitutivo (viene generato sempre) */
383  DRef = MultRMRt(pD->GetFDE(), R);
384 
385  /* Derivate delle deformazioni rispetto alle incognite nodali */
386  Mat6x6 AzTmp[NUMNODES];
387 
388  for (unsigned int i = 0; i < NUMNODES; i++) {
389  /* Delta - deformazioni */
390  AzTmp[i] = Mat6x6(Ldp[i]*dCoef,
391  Zero3x3,
392  (LdP[i] + L.Cross(RdP[i]))*dCoef,
393  (RhodP[i] + Rho.Cross(RdP[i]))*dCoef);
394 
395  /* Delta - azioni interne */
396  AzTmp[i] = DRef*AzTmp[i];
397 
398  /* Correggo per la rotazione da locale a globale */
399  AzTmp[i].SubMat12((AzRef.GetVec1()*dCoef).Cross(RdP[i]));
400  AzTmp[i].SubMat22((AzRef.GetVec2()*dCoef).Cross(RdP[i]));
401  }
402 
403  Vec3 bTmp[2];
404 
405  bTmp[0] = p - pNode[NODE1]->GetXCurr();
406  bTmp[1] = p - pNode[NODE2]->GetXCurr();
407 
408  for (unsigned int i = 0; i < NUMNODES; i++) {
409  /* Equazione all'indietro: */
410  WMA.Sub(1, 6*i + 1, AzTmp[i].GetMat11());
411  WMA.Sub(1, 6*i + 4,
412  AzTmp[i].GetMat12()
413  - (AzRef.GetVec1()*dCoef).Cross(pdP[i]));
414 
415  WMA.Sub(4, 6*i + 1,
416  AzTmp[i].GetMat21()
417  - (AzRef.GetVec1()*dCoef).Cross(pdp[i])
418  + bTmp[0].Cross(AzTmp[i].GetMat11()));
419  WMA.Sub(4, 6*i + 4,
420  AzTmp[i].GetMat22()
421  + bTmp[0].Cross(AzTmp[i].GetMat12()));
422 
423  /* Equazione in avanti: */
424  WMA.Add(7, 6*i + 1, AzTmp[i].GetMat11());
425  WMA.Add(7, 6*i + 4,
426  AzTmp[i].GetMat12()
427  - (AzRef.GetVec1()*dCoef).Cross(pdP[i]));
428 
429  WMA.Add(10, 6*i + 1,
430  AzTmp[i].GetMat21()
431  - (AzRef.GetVec1()*dCoef).Cross(pdp[i])
432  + bTmp[1].Cross(AzTmp[i].GetMat11()));
433  WMA.Add(10, 6*i + 4,
434  AzTmp[i].GetMat22()
435  + bTmp[1].Cross(AzTmp[i].GetMat12()));
436  }
437 
438  /* correzione alle equazioni */
439  Mat3x3 FTmp(MatCross, AzRef.GetVec1()*dCoef);
440  WMA.Sub(4, 1, FTmp);
441  WMA.Add(10, 7, FTmp);
442 };
443 
444 
445 /* Assembla il residuo */
446 void
448  doublereal /* dCoef */ ,
449  const VectorHandler& /* XCurr */ ,
450  const VectorHandler& /* XPrimeCurr */ )
451 {
452  DEBUGCOUTFNAME("HBeam::AssStiffnessVec");
453 
454  /*
455  * Riceve il vettore gia' dimensionato e con gli indici a posto
456  * per scrivere il residuo delle equazioni di equilibrio dei tre nodi
457  */
458 
459  /* Recupera i dati dei nodi */
460  Vec3 yTmp[NUMNODES];
461  Vec3 fTmp[NUMNODES];
462  Mat3x3 RTmp[NUMNODES];
463  for (unsigned int i = 0; i < NUMNODES; i++) {
464  RTmp[i] = pNode[i]->GetRCurr()*Rn[i];
465  fTmp[i] = pNode[i]->GetRCurr()*f[i];
466  yTmp[i] = pNode[i]->GetXCurr() + fTmp[i];
467  }
468 
469  /* Interpolazione generica */
470  ComputeInterpolation(yTmp, RTmp, fTmp,
471  xi, dxids,
472  p, R,
473  L, Rho);
474 
475  Mat3x3 RT(R.Transpose());
476  DefLoc = Vec6(RT*L - L0, RT*Rho - Rho0);
477 
478  /* Calcola le azioni interne */
479  pD->Update(DefLoc);
480  AzLoc = pD->GetF();
481 
482  /* corregge le azioni interne locali (piezo, ecc) */
484 
485  /* Porta le azioni interne nel sistema globale */
486  Az = MultRV(AzLoc, R);
487 
488  WorkVec.Add(1, Az.GetVec1());
489  WorkVec.Add(4, (p - pNode[NODE1]->GetXCurr()).Cross(Az.GetVec1()) + Az.GetVec2());
490  WorkVec.Sub(7, Az.GetVec1());
491  WorkVec.Sub(10, Az.GetVec2() + (p - pNode[NODE2]->GetXCurr()).Cross(Az.GetVec1()));
492 }
493 
494 
495 /* assemblaggio jacobiano */
498  doublereal dCoef,
499  const VectorHandler& XCurr,
500  const VectorHandler& XPrimeCurr)
501 {
502  DEBUGCOUTFNAME("HBeam::AssJac => AssStiffnessMat");
503 
504  integer iNode1FirstMomIndex = pNode[NODE1]->iGetFirstMomentumIndex();
505  integer iNode1FirstPosIndex = pNode[NODE1]->iGetFirstPositionIndex();
506  integer iNode2FirstMomIndex = pNode[NODE2]->iGetFirstMomentumIndex();
507  integer iNode2FirstPosIndex = pNode[NODE2]->iGetFirstPositionIndex();
508 
509  FullSubMatrixHandler& WM = WorkMat.SetFull();
510 
511  /* Dimensiona la matrice, la azzera e pone gli indici corretti */
512  WM.ResizeReset(12, 12);
513 
514  for (int iCnt = 1; iCnt <= 6; iCnt++) {
515  WM.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
516  WM.PutColIndex(iCnt, iNode1FirstPosIndex + iCnt);
517  WM.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
518  WM.PutColIndex(6 + iCnt, iNode2FirstPosIndex + iCnt);
519  }
520 
521  AssStiffnessMat(WM, WM, dCoef, XCurr, XPrimeCurr);
522 
523  return WorkMat;
524 }
525 
526 
527 /* assemblaggio residuo */
530  doublereal dCoef,
531  const VectorHandler& XCurr,
532  const VectorHandler& XPrimeCurr)
533 {
534  DEBUGCOUTFNAME("HBeam::AssRes => AssStiffnessVec");
535 
536  integer iNode1FirstMomIndex = pNode[NODE1]->iGetFirstMomentumIndex();
537  integer iNode2FirstMomIndex = pNode[NODE2]->iGetFirstMomentumIndex();
538 
539  /* Dimensiona il vettore, lo azzera e pone gli indici corretti */
540  WorkVec.ResizeReset(12);
541 
542  for (unsigned int iCnt = 1; iCnt <= 6; iCnt++) {
543  WorkVec.PutRowIndex(iCnt, iNode1FirstMomIndex + iCnt);
544  WorkVec.PutRowIndex(6 + iCnt, iNode2FirstMomIndex + iCnt);
545  }
546 
547  AssStiffnessVec(WorkVec, dCoef, XCurr, XPrimeCurr);
548 
549  return WorkVec;
550 }
551 
552 
553 /* Settings iniziali, prima della prima soluzione */
554 void
556  VectorHandler& /* X */ , VectorHandler& /* XP */ ,
558 {
559  /* Aggiorna le grandezze della trave nei punti di valutazione */
560  (Mat3x3&)RRef = R;
561  (Vec3&)LRef = L;
562  (Vec6&)DefLocRef = DefLoc;
563  (Vec6&)AzRef = Az;
564 
565  /*
566  * Aggiorna il legame costitutivo di riferimento
567  * (la deformazione e' gia' stata aggiornata dall'ultimo residuo)
568  */
569  (Mat6x6&)DRef = MultRMRt(pD->GetFDE(), RRef);
570 
571  bFirstRes = true;
572 }
573 
574 
575 /* Prepara i parametri di riferimento dopo la predizione */
576 void
578 {
579  /*
580  * Calcola le deformazioni, aggiorna il legame costitutivo
581  * e crea la FDE
582  */
583 #if 0
584  /* Recupera i dati dei nodi */
585  Vec3 gNod[NUMNODES];
586  Vec3 xTmp[NUMNODES];
587 
588  for (unsigned int i = 0; i < NUMNODES; i++) {
589  gNod[i] = pNode[i]->GetgRef();
590  xTmp[i] = pNode[i]->GetXCurr()+pNode[i]->GetRRef()*f[i];
591  }
592 
593  Mat3x3 RDelta;
594  Vec3 gGrad;
595 
596  /* Aggiorna le grandezze della trave nel punto di valutazione */
597 
598  /* Posizione */
599  p = InterpState(xTmp[NODE1], xTmp[NODE2]);
600 
601  /* Matrici di rotazione */
602  g = InterpState(gNod[NODE1], gNod[NODE2]);
603  RDelta = Mat3x3(MatR, g);
604  R = RRef = RDelta*R;
605 
606  /* Derivate della posizione */
607  L = LRef = InterpDeriv(xTmp[NODE1], xTmp[NODE2]);
608 
609  /* Derivate dei parametri di rotazione */
610  gGrad = InterpDeriv(gNod[NODE1], gNod[NODE2]);
611 
612  /* Per le deformazioni nel sistema del materiale */
613  Mat3x3 RTmp(R.Transpose());
614 
615  /*
616  * Calcola le deformazioni nel sistema locale
617  * nei punti di valutazione
618  */
619  DefLoc = DefLocRef = Vec6(RTmp*L-L0,
620  RTmp*(Mat3x3(MatG, g)*gGrad)+DefLoc.GetVec2());
621 
622  /* Calcola le azioni interne */
623  pD->Update(DefLoc);
624  AzLoc = pD->GetF();
625 
626  /* corregge le azioni interne locali (piezo, ecc) */
628 
629  /* Porta le azioni interne nel sistema globale */
630  Az = AzRef = MultRV(AzLoc, R);
631 
632  /* Aggiorna il legame costitutivo di riferimento */
633  DRef = MultRMRt(pD->GetFDE(), RRef);
634 
635  bFirstRes = true;
636 #endif
637 }
638 
639 
640 /*
641  * output; si assume che ogni tipo di elemento sappia, attraverso
642  * l'OutputHandler, dove scrivere il proprio output
643  */
644 void
646 {
647  if (bToBeOutput()) {
648  OH.Beams() << std::setw(8) << GetLabel() << " "
649  << AzLoc.GetVec1() << " " << AzLoc.GetVec2() << std::endl;
650  }
651 }
652 
653 
654 /* Contributo allo jacobiano durante l'assemblaggio iniziale */
657  const VectorHandler& XCurr)
658 {
659  DEBUGCOUTFNAME("HBeam::InitialAssJac => AssStiffnessMat");
660 
661  /* Dimensiona la matrice, la azzera e pone gli indici corretti */
662  FullSubMatrixHandler& WM = WorkMat.SetFull();
663  WM.ResizeReset(12, 12);
664 
665  integer iNode1FirstPosIndex = pNode[NODE1]->iGetFirstPositionIndex();
666  integer iNode2FirstPosIndex = pNode[NODE2]->iGetFirstPositionIndex();
667 
668  for (int iCnt = 1; iCnt <= 6; iCnt++) {
669  WM.PutRowIndex(iCnt, iNode1FirstPosIndex+iCnt);
670  WM.PutColIndex(iCnt, iNode1FirstPosIndex+iCnt);
671  WM.PutRowIndex(6+iCnt, iNode2FirstPosIndex+iCnt);
672  WM.PutColIndex(6+iCnt, iNode2FirstPosIndex+iCnt);
673  }
674 
675  AssStiffnessMat(WM, WM, 1., XCurr, XCurr);
676  return WorkMat;
677 }
678 
679 
680 /* Contributo al residuo durante l'assemblaggio iniziale */
683  const VectorHandler& XCurr)
684 {
685  DEBUGCOUTFNAME("HBeam::InitialAssRes => AssStiffnessVec");
686 
687  /* Dimensiona il vettore, lo azzera e pone gli indici corretti */
688  WorkVec.ResizeReset(12);
689 
690  integer iNode1FirstPosIndex = pNode[NODE1]->iGetFirstPositionIndex();
691  integer iNode2FirstPosIndex = pNode[NODE2]->iGetFirstPositionIndex();
692 
693  for (int iCnt = 1; iCnt <= 6; iCnt++) {
694  WorkVec.PutRowIndex(iCnt, iNode1FirstPosIndex+iCnt);
695  WorkVec.PutRowIndex(6+iCnt, iNode2FirstPosIndex+iCnt);
696  }
697 
698  AssStiffnessVec(WorkVec, 1., XCurr, XCurr);
699  return WorkVec;
700 }
701 
702 
703 const StructNode*
704 HBeam::pGetNode(unsigned int i) const
705 {
706  ASSERT(i >= 1 && i <= 2);
707  switch (i) {
708  case 1:
709  case 2:
710  return pNode[i-1];
711  default:
713  }
714 }
715 
716 
717 /* HBeam - end */
718 
719 
720 #ifdef VISCOELASTIC_BEAM
721 /* ViscoElasticHBeam - begin */
722 
723 /* Costruttore normale */
724 ViscoElasticHBeam::ViscoElasticHBeam(unsigned int uL,
725  const StructNode* pN1,
726  const StructNode* pN2,
727  const Vec3& F1,
728  const Vec3& F2,
729  const Mat3x3& r,
730  const ConstitutiveLaw6D* pd,
731  flag fOut)
732 : Elem(uL, fOut),
733 HBeam(uL, pN1, pN2, F1, F2, r, pd, fOut)
734 {
735  LPrimeRef = LPrime = Zero3;
736  gPrime = Zero3;
737 
738  DefPrimeLoc = DefPrimeLocRef = Zero6;
739 
740  /* Nota: DsDxi() viene chiamata dal costruttore di Beam */
741  HBeam::Omega0();
742 }
743 
744 
745 /* Assembla la matrice */
746 void
747 ViscoElasticHBeam::AssStiffnessMat(FullSubMatrixHandler& WMA,
749  doublereal dCoef,
750  const VectorHandler& /* XCurr */ ,
751  const VectorHandler& /* XPrimeCurr */ )
752 {
753  DEBUGCOUTFNAME("ViscoElasticHBeam::AssStiffnessMat");
754 
755  /*
756  * La matrice arriva gia' dimensionata
757  * e con gli indici di righe e colonne a posto
758  */
759 
760  /* offset nel riferimento globale */
761  Vec3 fTmp[NUMNODES];
762  for (unsigned int i = 0; i < NUMNODES; i++) {
763  fTmp[i] = pNode[i]->GetRCurr()*f[i];
764  }
765 
766  Mat6x6 AzTmp[NUMNODES];
767  Mat6x6 AzPrimeTmp[NUMNODES];
768 
769  for (unsigned int i = 0; i < NUMNODES; i++) {
770  /* Delta - deformazioni */
771  AzTmp[i] = AzPrimeTmp[i] = Mat6x6(Mat3x3(dN2P[i]*dsdxi),
772  Zero3x3,
773  Mat3x3(LRef*(dN2[i])-fTmp[i]*(dN2P[i]*dsdxi)),
774  Mat3x3(dN2P[i]*dsdxi));
775 
776  AzTmp[i] = DRef*AzTmp[i]*dCoef;
777 
778  AzTmp[i] += ERef*Mat6x6(Mat3x3(OmegaRef*(-dN2P[i]*dsdxi*dCoef)),
779  Zero3x3,
780  (Mat3x3(LPrimeRef)-Mat3x3(Omega,LRef))
781  *(dN2[i]*dCoef)
782  +Mat3x3(Omega, fTmp[i]*(dN2P[i]*dsdxi*dCoef))
783  +Mat3x3(fTmp[i].Cross(pNode[i]->GetWRef()
784  *(dN2P[i]*dsdxi*dCoef))),
785  Mat3x3(OmegaRef*(-dN2P[i]*dsdxi*dCoef)));
786 
787  AzPrimeTmp[i] = ERef*AzPrimeTmp[i];
788 
789  /* Correggo per la rotazione da locale a globale */
790  AzTmp[i].SubMat12(Mat3x3(AzRef.GetVec1()*(dN2[i]*dCoef)));
791  AzTmp[i].SubMat22(Mat3x3(AzRef.GetVec2()*(dN2[i]*dCoef)));
792  }
793 
794  Vec3 bTmp[2];
795 
796  bTmp[0] = p-pNode[NODE1]->GetXCurr();
797  bTmp[1] = p-pNode[NODE2]->GetXCurr();
798 
799  for (unsigned int i = 0; i < NUMNODES; i++) {
800  /* Equazione all'indietro: */
801  WMA.Sub(1, 6*i+1, AzTmp[i].GetMat11());
802  WMA.Sub(1, 6*i+4, AzTmp[i].GetMat12());
803 
804  WMA.Sub(4, 6*i+1,
805  AzTmp[i].GetMat21()
806  -Mat3x3(AzRef.GetVec1()*(dCoef*dN2[i]))
807  +Mat3x3(bTmp[0])*AzTmp[i].GetMat11());
808  WMA.Sub(4, 6*i+4,
809  AzTmp[i].GetMat22()
810  -Mat3x3(AzRef.GetVec1()*(-dCoef*dN2[i]),
811  fTmp[i])
812  +Mat3x3(bTmp[0])*AzTmp[i].GetMat12());
813 
814  /* Equazione in avanti: */
815  WMA.Add(7, 6*i+1, AzTmp[i].GetMat11());
816  WMA.Add(7, 6*i+4, AzTmp[i].GetMat12());
817 
818  WMA.Add(10, 6*i+1,
819  AzTmp[i].GetMat21()
820  -Mat3x3(AzRef.GetVec1()*(dCoef*dN2[i]))
821  +Mat3x3(bTmp[1])*AzTmp[i].GetMat11());
822  WMA.Add(10, 6*i+4,
823  AzTmp[i].GetMat22()
824  +Mat3x3(AzRef.GetVec1()*(dCoef*dN2[i]),
825  fTmp[i])
826  +Mat3x3(bTmp[1])*AzTmp[i].GetMat12());
827 
828  /* Equazione viscosa all'indietro: */
829  WMB.Sub(1, 6*i+1, AzPrimeTmp[i].GetMat11());
830  WMB.Sub(1, 6*i+4, AzPrimeTmp[i].GetMat12());
831 
832  WMB.Sub(4, 6*i+1,
833  AzPrimeTmp[i].GetMat21()
834  +Mat3x3(bTmp[0])*AzPrimeTmp[i].GetMat11());
835  WMB.Sub(4, 6*i+4,
836  AzPrimeTmp[i].GetMat22()
837  +Mat3x3(bTmp[0])*AzPrimeTmp[i].GetMat12());
838 
839  /* Equazione viscosa in avanti: */
840  WMB.Add(7, 6*i+1, AzPrimeTmp[i].GetMat11());
841  WMB.Add(7, 6*i+4, AzPrimeTmp[i].GetMat12());
842 
843  WMB.Add(10, 6*i+1,
844  AzPrimeTmp[i].GetMat21()
845  +Mat3x3(bTmp[1])*AzPrimeTmp[i].GetMat11());
846  WMB.Add(10, 6*i+4,
847  AzPrimeTmp[i].GetMat22()
848  +Mat3x3(bTmp[1])*AzPrimeTmp[i].GetMat12());
849  }
850 
851  /* correzione alle equazioni */
852  WMA.Add(4, 1, Mat3x3(AzRef.GetVec1()*(-dCoef)));
853  WMA.Add(10, 7, Mat3x3(AzRef.GetVec1()*dCoef));
854 };
855 
856 
857 /* Assembla il residuo */
858 void
859 ViscoElasticHBeam::AssStiffnessVec(SubVectorHandler& WorkVec,
860  doublereal /* dCoef */ ,
861  const VectorHandler& /* XCurr */ ,
862  const VectorHandler& /* XPrimeCurr */ )
863 {
864  DEBUGCOUTFNAME("ViscoElasticHBeam::AssStiffnessVec");
865 
866  /*
867  * Riceve il vettore gia' dimensionato e con gli indici a posto
868  * per scrivere il residuo delle equazioni di equilibrio dei due nodi
869  */
870 
871  /*
872  * Per la trattazione teorica, il riferimento e' il file ul-travi.tex
873  * (ora e' superato)
874  */
875 
876  /* Recupera i dati dei nodi */
877  Vec3 xNod[NUMNODES];
878 
879  for (unsigned int i = 0; i < NUMNODES; i++) {
880  xNod[i] = pNode[i]->GetXCurr();
881  }
882 
883  if (bFirstRes) {
884  bFirstRes = false; /* AfterPredict ha gia' calcolato tutto */
885 
886  } else {
887  Vec3 gNod[NUMNODES];
888  Vec3 xTmp[NUMNODES];
889 
890  Vec3 gPrimeNod[NUMNODES];
891  Vec3 xPrimeTmp[NUMNODES];
892 
893  for (unsigned int i = 0; i < NUMNODES; i++) {
894  gNod[i] = pNode[i]->GetgCurr();
895  Vec3 fTmp = pNode[i]->GetRCurr()*f[i];
896  xTmp[i] = xNod[i]+fTmp;
897  gPrimeNod[i] = pNode[i]->GetgPCurr();
898  xPrimeTmp[i] = pNode[i]->GetVCurr()
899  +pNode[i]->GetWCurr().Cross(fTmp);
900  }
901 
902  Mat3x3 RDelta;
903  Vec3 gGrad;
904  Vec3 gPrimeGrad;
905 
906  /*
907  * Aggiorna le grandezze della trave nel punto di valutazione
908  */
909 
910  /* Posizione */
911  p = InterpState(xTmp[NODE1], xTmp[NODE2]);
912 
913  /* Matrici di rotazione */
914  g = InterpState(gNod[NODE1], gNod[NODE2]);
915  RDelta = Mat3x3(MatR, g);
916  R = RDelta*RRef;
917 
918  /* Velocita' angolare della sezione */
919  gPrime = InterpState(gPrimeNod[NODE1], gPrimeNod[NODE2]);
920  Omega = Mat3x3(MatG, g)*gPrime+RDelta*OmegaRef;
921 
922  /* Derivate della posizione */
923  L = InterpDeriv(xTmp[NODE1], xTmp[NODE2]);
924 
925  /* Derivate della velocita' */
926  LPrime = InterpDeriv(xPrimeTmp[NODE1], xPrimeTmp[NODE2]);
927 
928  /* Derivate dei parametri di rotazione */
929  gGrad = InterpDeriv(gNod[NODE1], gNod[NODE2]);
930 
931  /*
932  * Derivate delle derivate spaziali dei parametri di rotazione
933  */
934  gPrimeGrad = InterpDeriv(gPrimeNod[NODE1], gPrimeNod[NODE2]);
935 
936  /* Per le deformazioni nel sistema del materiale */
937  Mat3x3 RTmp(R.Transpose());
938 
939  /*
940  * Calcola le deformazioni nel sistema locale nel punto
941  * di valutazione
942  */
943  DefLoc = Vec6(RTmp*L-L0, RTmp*(Mat3x3(MatG, g)*gGrad)
944  +DefLocRef.GetVec2());
945 
946  /*
947  * Calcola le velocita' di deformazione nel sistema locale
948  * nel punto di valutazione
949  */
950  DefPrimeLoc = Vec6(RTmp*(LPrime+L.Cross(Omega)),
951  RTmp*(Mat3x3(MatG, g)*gPrimeGrad
952  +(Mat3x3(MatG, g)*gGrad).Cross(Omega))
953  +DefPrimeLocRef.GetVec2());
954 
955  /* Calcola le azioni interne */
956  pD->Update(DefLoc, DefPrimeLoc);
957  AzLoc = pD->GetF();
958 
959  /* corregge le azioni interne locali (piezo, ecc) */
960  AddInternalForces(AzLoc);
961 
962  /* Porta le azioni interne nel sistema globale */
963  Az = MultRV(AzLoc, R);
964  }
965 
966  WorkVec.Add(1, Az.GetVec1());
967  WorkVec.Add(4, (p-xNod[NODE1]).Cross(Az.GetVec1())+Az.GetVec2());
968  WorkVec.Sub(7, Az.GetVec1());
969  WorkVec.Sub(10, Az.GetVec2()+(p-xNod[NODE2]).Cross(Az.GetVec1()));
970 }
971 
972 
973 /* Settings iniziali, prima della prima soluzione */
974 void
975 ViscoElasticHBeam::SetValue(DataManager *pDM,
978 {
979  HBeam::SetValue(pDM, X, XP. ph);
980 
981  /* Aggiorna le grandezze della trave nei punti di valutazione */
982  (Vec3&)OmegaRef = Omega;
983  (Vec3&)LPrimeRef = LPrime;
984  (Vec6&)DefPrimeLocRef = DefPrimeLoc;
985 
986  /*
987  * Aggiorna il legame costitutivo di riferimento
988  * (la deformazione e' gia' stata aggiornata dall'ultimo residuo)
989  */
990  (Mat6x6&)ERef = MultRMRt(pD->GetFDEPrime(), RRef);
991 
992  ASSERT(bFirstRes == true);
993 }
994 
995 
996 /* Prepara i parametri di riferimento dopo la predizione */
997 void
998 ViscoElasticHBeam::AfterPredict(VectorHandler& /* X */ ,
999  VectorHandler& /* XP */ )
1000 {
1001  /*
1002  * Calcola le deformazioni, aggiorna il legame costitutivo
1003  * e crea la FDE
1004  */
1005 
1006  /* Recupera i dati dei nodi */
1007  Vec3 gNod[NUMNODES];
1008  Vec3 xTmp[NUMNODES];
1009 
1010  Vec3 gPrimeNod[NUMNODES];
1011  Vec3 xPrimeTmp[NUMNODES];
1012 
1013  for (unsigned int i = 0; i < NUMNODES; i++) {
1014  gNod[i] = pNode[i]->GetgRef();
1015  Vec3 fTmp = pNode[i]->GetRRef()*f[i];
1016  xTmp[i] = pNode[i]->GetXCurr()+fTmp;
1017  gPrimeNod[i] = pNode[i]->GetgPRef();
1018  xPrimeTmp[i] = pNode[i]->GetVCurr()
1019  +pNode[i]->GetWRef().Cross(fTmp);
1020  }
1021 
1022  Mat3x3 RDelta;
1023  Vec3 gGrad;
1024  Vec3 gPrimeGrad;
1025 
1026  /* Aggiorna le grandezze della trave nel punto di valutazione */
1027  /* Posizione */
1028  p = InterpState(xTmp[NODE1], xTmp[NODE2]);
1029 
1030  /* Matrici di rotazione */
1031  g = InterpState(gNod[NODE1], gNod[NODE2]);
1032  RDelta = Mat3x3(MatR, g);
1033  R = RRef = RDelta*R;
1034 
1035  /* Velocita' angolare della sezione */
1036  gPrime = InterpState(gPrimeNod[NODE1], gPrimeNod[NODE2]);
1037  Omega = OmegaRef = Mat3x3(MatG, g)*gPrime;
1038 
1039  /* Derivate della posizione */
1040  L = LRef = InterpDeriv(xTmp[NODE1], xTmp[NODE2]);
1041 
1042  /* Derivate della velocita' */
1043  LPrime = LPrimeRef = InterpDeriv(xPrimeTmp[NODE1], xPrimeTmp[NODE2]);
1044 
1045  /* Derivate dei parametri di rotazione */
1046  gGrad = InterpDeriv(gNod[NODE1], gNod[NODE2]);
1047 
1048  /* Derivate delle derivate spaziali dei parametri di rotazione */
1049  gPrimeGrad = InterpDeriv(gPrimeNod[NODE1], gPrimeNod[NODE2]);
1050 
1051  /* Per le deformazioni nel sistema del materiale */
1052  Mat3x3 RTmp(R.Transpose());
1053 
1054  /*
1055  * Calcola le deformazioni nel sistema locale nel punto di valutazione
1056  */
1057  DefLoc = DefLocRef = Vec6(RTmp*L-L0,
1058  RTmp*(Mat3x3(MatG, g)*gGrad)+DefLoc.GetVec2());
1059 
1060  /*
1061  * Calcola le velocita' di deformazione nel sistema locale
1062  * nel punto di valutazione
1063  */
1064  DefPrimeLoc = DefPrimeLocRef = Vec6(RTmp*(LPrime+L.Cross(Omega)),
1065  RTmp*(Mat3x3(MatG, g)*gPrimeGrad
1066  +(Mat3x3(MatG, g)*gGrad).Cross(Omega)));
1067 
1068  /* Calcola le azioni interne */
1069  pD->Update(DefLoc, DefPrimeLoc);
1070  AzLoc = pD->GetF();
1071 
1072  /* corregge le azioni interne locali (piezo, ecc) */
1073  AddInternalForces(AzLoc);
1074 
1075  /* Porta le azioni interne nel sistema globale */
1076  Az = AzRef = MultRV(AzLoc, R);
1077 
1078  /* Aggiorna il legame costitutivo */
1079  DRef = MultRMRt(pD->GetFDE(), R);
1080  ERef = MultRMRt(pD->GetFDEPrime(), R);
1081 
1082  bFirstRes = true;
1083 }
1084 
1085 /* ViscoElasticBeam - end */
1086 #endif /* VISCOELASTIC_BEAM */
1087 
1088 
1089 /* Legge una trave */
1090 Elem*
1091 ReadHBeam(DataManager* pDM, MBDynParser& HP, unsigned int uLabel)
1092 {
1093  DEBUGCOUTFNAME("ReadHBeam");
1094 
1095  const char* sKeyWords[] = {
1096  "piezoelectric",
1097  NULL
1098  };
1099 
1100  /* enum delle parole chiave */
1101  enum KeyWords {
1102  UNKNOWN = -1,
1103 
1104  PIEZOELECTRIC = 0,
1105 
1106  LASTKEYWORD
1107  };
1108 
1109  /* tabella delle parole chiave */
1110  KeyTable K(HP, sKeyWords);
1111 
1112  /* Nodo 1 */
1113  const StructNode* pNode1 = pDM->ReadNode<const StructNode, Node::STRUCTURAL>(HP);
1114  if (HP.IsKeyWord("position")) {
1115  /* just eat it! */
1116  NO_OP;
1117  }
1118  Vec3 f1(HP.GetPosRel(ReferenceFrame(pNode1)));
1119  Mat3x3 R1;
1120  if (HP.IsKeyWord("orientation") || HP.IsKeyWord("rot")) {
1121  R1 = HP.GetRotRel(ReferenceFrame(pNode1));
1122  } else {
1123  R1 = pNode1->GetRCurr();
1124  }
1125 
1126  DEBUGLCOUT(MYDEBUG_INPUT, "node 1 offset (node reference frame): "
1127  << f1 << std::endl << "(global frame): "
1128  << pNode1->GetXCurr()+pNode1->GetRCurr()*R1*f1 << std::endl);
1129 
1130  /* Nodo 2 */
1131  const StructNode* pNode2 = pDM->ReadNode<const StructNode, Node::STRUCTURAL>(HP);
1132  if (HP.IsKeyWord("position")) {
1133  /* just eat it! */
1134  NO_OP;
1135  }
1136  Vec3 f2(HP.GetPosRel(ReferenceFrame(pNode2)));
1137  Mat3x3 R2;
1138  if (HP.IsKeyWord("orientation") || HP.IsKeyWord("rot")) {
1139  R2 = HP.GetRotRel(ReferenceFrame(pNode2));
1140  } else {
1141  R2 = pNode1->GetRCurr();
1142  }
1143 
1144  DEBUGLCOUT(MYDEBUG_INPUT, "node 2 offset (node reference frame): "
1145  << f2 << std::endl << "(global frame): "
1146  << pNode2->GetXCurr()+pNode2->GetRCurr()*R2*f2 << std::endl);
1147 
1148  /* Legame costitutivo */
1150  ConstitutiveLaw6D* pD = HP.GetConstLaw6D(CLType);
1151 
1152  if (pD->iGetNumDof() != 0) {
1153  silent_cerr("line " << HP.GetLineData()
1154  << ": HBeam(" << uLabel << ") does not support "
1155  "dynamic constitutive laws yet"
1156  << std::endl);
1158  }
1159 
1160 #ifdef DEBUG
1161  Mat6x6 MTmp(pD->GetFDE());
1162  Mat3x3 D11(MTmp.GetMat11());
1163  Mat3x3 D12(MTmp.GetMat12());
1164  Mat3x3 D21(MTmp.GetMat21());
1165  Mat3x3 D22(MTmp.GetMat22());
1166 
1168  "First point matrix D11: " << std::endl << D11 << std::endl
1169  << "First point matrix D12: " << std::endl << D12 << std::endl
1170  << "First point matrix D21: " << std::endl << D21 << std::endl
1171  << "First point matrix D22: " << std::endl << D22 << std::endl);
1172 #endif /* DEBUG */
1173 
1174 #ifdef PIEZO_BEAM
1175  flag fPiezo(0);
1176  Mat3xN PiezoMat[2];
1177  integer iNumElec = 0;
1178  const ScalarDifferentialNode** pvElecDofs = 0;
1179  if (HP.IsKeyWord("piezoelectricactuator")) {
1180  fPiezo = flag(1);
1182  "Piezoelectric actuator beam is expected"
1183  << std::endl);
1184 
1185  iNumElec = HP.GetInt();
1187  "piezo actuator " << uLabel
1188  << " has " << iNumElec
1189  << " electrodes" << std::endl);
1190  if (iNumElec <= 0) {
1191  silent_cerr("HBeam(" << uLabel << "): "
1192  "illegal number of electric nodes "
1193  << iNumElec
1194  << " at line " << HP.GetLineData()
1195  << std::endl);
1197  }
1198 
1199  SAFENEWARR(pvElecDofs, const ScalarDifferentialNode *, iNumElec);
1200 
1201  for (integer i = 0; i < iNumElec; i++) {
1202  pvElecDofs[i] = pDM->ReadNode<const ScalarDifferentialNode, Node::ABSTRACT>(HP);
1203  }
1204 
1205  PiezoMat[0].Resize(iNumElec);
1206  PiezoMat[1].Resize(iNumElec);
1207 
1208  /* leggere le matrici (6xN sez. 1, 6xN sez. 2) */
1209  HP.GetMat6xN(PiezoMat[0], PiezoMat[1], iNumElec);
1210 
1211 #if 0
1212  DEBUGLCOUT(MYDEBUG_INPUT, "Piezo matrix I:" << std::endl
1213  << PiezoMat[0][0] << PiezoMat[1][0]);
1214 #endif /* 0 */
1215  }
1216 #endif /* PIEZO_BEAM */
1217 
1218  flag fOut = pDM->fReadOutput(HP, Elem::BEAM);
1219 
1220  Elem* pEl = NULL;
1221 
1222  if (CLType == ConstLawType::ELASTIC) {
1223 #ifdef PIEZO_BEAM
1224  if (fPiezo == 0) {
1225 #endif /* PIEZO_BEAM */
1227  HBeam,
1228  HBeam(uLabel,
1229  pNode1, pNode2,
1230  f1, f2,
1231  R1, R2,
1232  pD,
1233  fOut));
1234 #ifdef PIEZO_BEAM
1235  } else {
1237  PiezoActuatorHBeam,
1238  PiezoActuatorHBeam(uLabel,
1239  pNode1, pNode2,
1240  f1, f2,
1241  R,
1242  pD,
1243  iNumElec,
1244  pvElecDofs,
1245  PiezoMat[0], PiezoMat[1],
1246  fOut));
1247  }
1248 #endif /* PIEZO_BEAM */
1249 
1250  } else /* At least one is VISCOUS or VISCOELASTIC */ {
1251 #ifdef VISCOELASTIC_BEAM
1252 #ifdef PIEZO_BEAM
1253  if (fPiezo == 0) {
1254 #endif /* PIEZO_BEAM */
1256  ViscoElasticHBeam,
1257  ViscoElasticHBeam(uLabel,
1258  pNode1, pNode2,
1259  f1, f2,
1260  R,
1261  pD,
1262  fOut));
1263 #ifdef PIEZO_BEAM
1264  } else {
1266  PiezoActuatorVEHBeam,
1267  PiezoActuatorVEHBeam(uLabel,
1268  pNode1, pNode2,
1269  f1, f2,
1270  R,
1271  pD,
1272  iNumElec,
1273  pvElecDofs,
1274  PiezoMat[0], PiezoMat[1],
1275  fOut));
1276  }
1277 #endif /* PIEZO_BEAM */
1278 
1279 #else /* VISCOELASTIC_BEAM */
1280  silent_cerr("Sorry, the ViscoElasticHBeam element"
1281  " is not available yet" << std::endl);
1283 #endif /* VISCOELASTIC_BEAM */
1284  }
1285 
1286  /* Se non c'e' il punto e virgola finale */
1287  if (HP.IsArg()) {
1288  silent_cerr("semicolon expected at line "
1289  << HP.GetLineData() << std::endl);
1291  }
1292 
1293  return pEl;
1294 } /* End of ReadHBeam() */
flag fReadOutput(MBDynParser &HP, const T &t) const
Definition: dataman.h:1064
const MatGm1_Manip MatGm1
Definition: matvec3.cc:647
Mat3x3 GetRotRel(const ReferenceFrame &rf)
Definition: mbpar.cc:1795
void ComputeInterpolation(const Vec3 *const node_pos, const Mat3x3 *const node_or, const Vec3 *const node_f, const doublereal xi, const doublereal dexi_des, Vec3 &pos, Mat3x3 &orient, Vec3 &F, Vec3 &om)
Mat3x3 MultRMRt(const Mat3x3 &m, const Mat3x3 &R)
Definition: matvec3.cc:1162
Vec3 Rho
Definition: hbeam.h:125
void PutColIndex(integer iSubCol, integer iCol)
Definition: submat.h:325
const Vec3 Zero3(0., 0., 0.)
Vec3 Cross(const Vec3 &v) const
Definition: matvec3.h:218
virtual SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
Definition: hbeam.cc:682
std::ostream & Write(std::ostream &out, const char *sFill=" ") const
Definition: matvec3.cc:738
HBeam(unsigned int uL, const StructNode *pN1, const StructNode *pN2, const Vec3 &F1, const Vec3 &F2, const Mat3x3 &R1, const Mat3x3 &R2, const ConstitutiveLaw6D *pd, flag fOut)
Definition: hbeam.cc:67
Vec3 MultRV(const Vec3 &v, const Mat3x3 &R)
Definition: matvec3.cc:1144
long int flag
Definition: mbdyn.h:43
virtual const Mat3x3 & GetRRef(void) const
Definition: strnode.h:1006
virtual bool bToBeOutput(void) const
Definition: output.cc:890
MatrixExpression< TransposedMatrix< MatrixDirectExpr< Matrix< T, N_rows, N_cols > > >, N_cols, N_rows > Transpose(const Matrix< T, N_rows, N_cols > &A)
Definition: matvec.h:2206
virtual unsigned int iGetPrivDataIdx(const char *s) const
Definition: hbeam.cc:135
Vec3 Omega
Definition: hbeam.h:96
Mat3x3 GetMat12(void)
Definition: matvec6.h:328
ConstitutiveLaw< T, Tder > * pGetConstLaw(void) const
Definition: constltp.h:278
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
Definition: matvec3.h:98
#define DEBUGCOUTFNAME(fname)
Definition: myassert.h:256
virtual void ResizeReset(integer)
Definition: vh.cc:55
virtual integer GetInt(integer iDefval=0)
Definition: parser.cc:1050
const Vec3 & GetVec2(void) const
Definition: matvec6.h:76
Vec3 LRef
Definition: hbeam.h:111
const MatCross_Manip MatCross
Definition: matvec3.cc:639
FullSubMatrixHandler & SetFull(void)
Definition: submat.h:1168
virtual const Mat3x3 & GetRCurr(void) const
Definition: strnode.h:1012
virtual Node::Type GetNodeType(void) const
Definition: strnode.cc:145
Mat3x3 RdP[NUMNODES]
Definition: hbeam.h:133
doublereal Dot(const Vec3 &v) const
Definition: matvec3.h:243
void Add(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:209
ConstitutiveLawOwner< Vec6, Mat6x6 > ConstitutiveLaw6DOwner
Definition: constltp.h:380
std::ostream & Write(std::ostream &out, const FullMatrixHandler &m, const char *s, const char *s2)
Definition: fullmh.cc:376
virtual void GetMat6xN(Mat3xN &m1, Mat3xN &m2, integer iNumCols)
Definition: mbpar.cc:2743
Mat3x3 pdP[NUMNODES]
Definition: hbeam.h:130
virtual const Tder & GetFDE(void) const
Definition: constltp.h:129
virtual void Sub(integer iRow, const Vec3 &v)
Definition: vh.cc:78
const Tder & GetFDE(void) const
Definition: constltp.h:298
virtual doublereal dGetPrivData(unsigned int i) const
Definition: hbeam.cc:197
Mat3x3 Rn[NUMNODES]
Definition: hbeam.h:82
#define NO_OP
Definition: myassert.h:74
doublereal dxids
Definition: hbeam.h:115
std::vector< Hint * > Hints
Definition: simentity.h:89
virtual std::ostream & Restart(std::ostream &out) const
Definition: hbeam.cc:325
bool bFirstRes
Definition: hbeam.h:118
Vec3 GetVec(unsigned short int i) const
Definition: matvec3.h:893
virtual unsigned int iGetNumPrivData(void) const
Definition: hbeam.cc:129
Mat3x3 GetMat11(void)
Definition: matvec6.h:320
virtual void PutRowIndex(integer iSubRow, integer iRow)=0
virtual void Omega0(void)
Definition: hbeam.cc:285
const Mat3x3 Zero3x3(0., 0., 0., 0., 0., 0., 0., 0., 0.)
virtual void AssStiffnessVec(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: hbeam.cc:447
virtual ~HBeam(void)
Definition: hbeam.cc:118
Vec3 MatR2gparam(const Mat3x3 &m)
Definition: matvec3.cc:756
Definition: hbeam.h:57
Definition: matvec6.h:37
doublereal dsdxi
Definition: hbeam.h:114
virtual SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: hbeam.cc:529
const Vec3 & GetVec1(void) const
Definition: matvec6.h:72
const doublereal dN2[2]
Definition: shapefnc.cc:52
void SubMat12(const Mat3x3 &x)
Definition: matvec6.h:416
Vec3 GetPosRel(const ReferenceFrame &rf)
Definition: mbpar.cc:1331
void SubMat22(const Mat3x3 &x)
Definition: matvec6.h:420
virtual void AfterPredict(VectorHandler &, VectorHandler &)
Definition: hbeam.cc:577
Vec3 L
Definition: hbeam.h:110
virtual bool IsKeyWord(const char *sKeyWord)
Definition: parser.cc:910
const Vec6 Zero6(0., 0., 0., 0., 0., 0.)
Mat3x3 pdp[NUMNODES]
Definition: hbeam.h:129
const MatG_Manip MatG
Definition: matvec3.cc:646
virtual void DsDxi(void)
Definition: hbeam.cc:234
Vec3 f[NUMNODES]
Definition: hbeam.h:78
doublereal xi
Definition: hbeam.h:113
Definition: mbdyn.h:77
Vec6 DefLocRef
Definition: hbeam.h:104
virtual integer iGetFirstMomentumIndex(void) const =0
Vec3 L0
Definition: hbeam.h:109
Mat3x3 R
Definition: hbeam.h:86
virtual integer iGetFirstPositionIndex(void) const
Definition: strnode.h:452
virtual const Vec3 & GetWCurr(void) const
Definition: strnode.h:1030
Mat3x3 RhodP[NUMNODES]
Definition: hbeam.h:134
virtual void AfterConvergence(const VectorHandler &X, const VectorHandler &XP)
Definition: hbeam.cc:347
Mat3x3 Ldp[NUMNODES]
Definition: hbeam.h:131
Vec6 DefLoc
Definition: hbeam.h:103
virtual void Output(OutputHandler &OH) const
Definition: hbeam.cc:645
void AfterConvergence(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:288
const MatR_Manip MatR
Definition: matvec3.cc:645
#define ASSERT(expression)
Definition: colamd.c:977
ConstitutiveLaw6DOwner * pD
Definition: hbeam.h:90
const doublereal dN2P[2]
Definition: shapefnc.cc:56
ConstitutiveLaw6D * GetConstLaw6D(ConstLawType::Type &clt)
Definition: mbpar.cc:1995
GradientExpression< UnaryExpr< FuncSqrt, Expr > > sqrt(const GradientExpression< Expr > &u)
Definition: gradient.h:2974
KeyWords
Definition: dataman4.cc:94
virtual void AddInternalForces(Vec6 &)
Definition: hbeam.h:159
VectorExpression< VectorCrossExpr< VectorLhsExpr, VectorRhsExpr >, 3 > Cross(const VectorExpression< VectorLhsExpr, 3 > &u, const VectorExpression< VectorRhsExpr, 3 > &v)
Definition: matvec.h:3248
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
virtual const Vec3 & GetXCurr(void) const
Definition: strnode.h:310
virtual void Add(integer iRow, const Vec3 &v)
Definition: vh.cc:63
void Resize(integer ns)
Definition: matvec3n.cc:318
virtual void ResizeReset(integer, integer)
Definition: submat.cc:182
virtual void AssStiffnessMat(FullSubMatrixHandler &WMA, FullSubMatrixHandler &WMB, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: hbeam.cc:354
virtual VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition: hbeam.cc:497
Mat3x3 Transpose(void) const
Definition: matvec3.h:816
virtual unsigned int iGetNumDof(void) const
Definition: constltp.h:138
std::ostream & Beams(void) const
Definition: output.h:457
Vec3 Rho0
Definition: hbeam.h:126
Vec6 AzLoc
Definition: hbeam.h:102
virtual bool IsArg(void)
Definition: parser.cc:807
Definition: elem.h:75
Mat3x3 LdP[NUMNODES]
Definition: hbeam.h:132
Vec3 g
Definition: hbeam.h:107
void PutRowIndex(integer iSubRow, integer iRow)
Definition: submat.h:311
const T & GetF(void) const
Definition: constltp.h:293
Mat6x6 DRef
Definition: hbeam.h:93
Vec6 AzRef
Definition: hbeam.h:101
virtual const Vec3 & GetgRef(void) const
Definition: strnode.h:976
Vec6 Az
Definition: hbeam.h:100
Mat3x3 RRef
Definition: hbeam.h:87
virtual VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
Definition: hbeam.cc:656
Elem * ReadHBeam(DataManager *pDM, MBDynParser &HP, unsigned int uLabel)
Definition: hbeam.cc:1091
void Sub(integer iRow, integer iCol, const Vec3 &v)
Definition: submat.cc:215
#define SAFENEWARR(pnt, item, sz)
Definition: mynewmem.h:701
double doublereal
Definition: colamd.c:52
Vec3 p
Definition: hbeam.h:106
long int integer
Definition: colamd.c:51
virtual HighParser::ErrOut GetLineData(void) const
Definition: parsinc.cc:697
void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:283
void SetValue(DataManager *pDM, VectorHandler &, VectorHandler &, SimulationEntity::Hints *ph=0)
Definition: hbeam.cc:555
virtual std::ostream & Restart_(std::ostream &out) const
Definition: hbeam.cc:331
unsigned int GetLabel(void) const
Definition: withlab.cc:62
const StructNode * pNode[NUMNODES]
Definition: hbeam.h:75
Node * ReadNode(MBDynParser &HP, Node::Type type) const
Definition: dataman3.cc:2309
const doublereal & dGet(unsigned short int i) const
Definition: matvec6.h:182
#define DEBUGLCOUT(level, msg)
Definition: myassert.h:244
void ComputeFullInterpolation(const Vec3 *const node_pos, const Mat3x3 *const node_or, const Vec3 *const node_f, const doublereal xi, const doublereal dexi_des, Vec3 &pos, Mat3x3 &orient, Mat3x3 *const or_delta_w_or, Mat3x3 *const delta_pos_w_or, Mat3x3 *const delta_pos_w_pos, Vec3 &F, Vec3 &om, Mat3x3 *const delta_om_ws_or, Mat3x3 *const delta_F_ws_or, Mat3x3 *const delta_F_ws_pos)
Mat3x3 R
virtual const StructNode * pGetNode(unsigned int i) const
Definition: hbeam.cc:704
#define SAFEDELETE(pnt)
Definition: mynewmem.h:710