MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / addLoad

Method addLoad

SRC/element/pipe/Pipe.cpp:547–618  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

545}
546
547int Pipe::addLoad(ElementalLoad *theLoad, double loadFactor) {
548 if (theCoordTransf == 0) {
549 return 0;
550 }
551
552 int type;
553 const Vector &data = theLoad->getData(type, loadFactor);
554 double L = theCoordTransf->getInitialLength();
555
556 if (type == LOAD_TAG_Beam3dUniformLoad) {
557 // transformation matrix
558 Matrix T(3, 3);
559 Vector xAxis(3), yAxis(3), zAxis(3);
560 Vector global_w(3);
561 if (theCoordTransf->getLocalAxes(xAxis, yAxis, zAxis) < 0) {
562 return -1;
563 }
564 xAxis.Normalize();
565 yAxis.Normalize();
566 zAxis.Normalize();
567 for (int j = 0; j < 3; ++j) {
568 T(0, j) = xAxis(j);
569 T(1, j) = yAxis(j);
570 T(2, j) = zAxis(j);
571 }
572
573 // global wy, wz, wx
574 global_w(1) = data(0) * loadFactor;
575 global_w(2) = data(1) * loadFactor;
576 global_w(0) = data(2) * loadFactor;
577
578 // local
579 Vector local_w(3);
580 local_w.addMatrixVector(0.0, T, global_w, 1.0);
581
582 double wx = local_w(0); // Transverse
583 double wy = local_w(1); // Transverse
584 double wz = local_w(2); // Axial (+ve from node I to J)
585
586 this->wx += wx;
587 this->wy += wy;
588 this->wz += wz;
589
590 double Vy = 0.5 * wy * L;
591 double Mz = Vy * L / 6.0; // wy*L*L/12
592 double Vz = 0.5 * wz * L;
593 double My = Vz * L / 6.0; // wz*L*L/12
594 double Pw = wx * L;
595
596 // Reactions in basic system
597 p0[0] -= Pw; // plw1
598 p0[1] -= Vy; // plw2
599 p0[2] -= Vy; // plw8
600 p0[3] -= Vz; // plw3
601 p0[4] -= Vz; // plw9
602
603 // Fixed end forces in basic system
604 q0[0] -= 0.5 * Pw; // pb0_1

Callers

nothing calls this directly

Calls 6

getDataMethod · 0.45
getInitialLengthMethod · 0.45
getLocalAxesMethod · 0.45
NormalizeMethod · 0.45
addMatrixVectorMethod · 0.45
getTagMethod · 0.45

Tested by

no test coverage detected