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

Method computeSectionForces

SRC/element/forceBeamColumn/ForceBeamColumn3d.cpp:1536–1741  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1534}
1535
1536void
1537ForceBeamColumn3d::computeSectionForces(Vector &sp, int isec)
1538{
1539 int type;
1540
1541 double L = crdTransf->getInitialLength();
1542
1543 double xi[maxNumSections];
1544 beamIntegr->getSectionLocations(numSections, L, xi);
1545 double x = xi[isec]*L;
1546
1547 int order = sections[isec]->getOrder();
1548 const ID &code = sections[isec]->getType();
1549
1550 for (int i = 0; i < numEleLoads; i++) {
1551
1552 double loadFactor = eleLoadFactors[i];
1553 const Vector &data = eleLoads[i]->getData(type, loadFactor);
1554
1555 if (type == LOAD_TAG_Beam3dUniformLoad) {
1556 double wy = data(0)*loadFactor; // Transverse
1557 double wz = data(1)*loadFactor; // Transverse
1558 double wa = data(2)*loadFactor; // Axial
1559
1560 for (int ii = 0; ii < order; ii++) {
1561
1562 switch(code(ii)) {
1563 case SECTION_RESPONSE_P:
1564 sp(ii) += wa*(L-x);
1565 break;
1566 case SECTION_RESPONSE_MZ:
1567 sp(ii) += wy*0.5*x*(x-L);
1568 break;
1569 case SECTION_RESPONSE_VY:
1570 sp(ii) += wy*(x-0.5*L);
1571 break;
1572 case SECTION_RESPONSE_MY:
1573 sp(ii) += wz*0.5*x*(L-x);
1574 break;
1575 case SECTION_RESPONSE_VZ:
1576 sp(ii) += wz*(0.5*L-x);
1577 break;
1578 default:
1579 break;
1580 }
1581 }
1582 }
1583 else if (type == LOAD_TAG_Beam3dPartialUniformLoad) {
1584 double wy = data(0) * loadFactor; // Transverse Y at start
1585 double wz = data(1) * loadFactor; // Transverse Z at start
1586 double wa = data(2) * loadFactor; // Axial at start
1587 double a = data(3)*L;
1588 double b = data(4)*L;
1589 double wyb = data(5) * loadFactor; // Transverse Y at end
1590 double wzb = data(6) * loadFactor; // Transverse Z at end
1591 double wab = data(7) * loadFactor; // Axial at end
1592 double Fa = wa * (b - a) + 0.5 * (wab - wa) * (b - a); // resultant axial load
1593 double Fy = wy * (b - a); // resultant transverse load

Callers 2

updateMethod · 0.95

Calls 6

getInitialLengthMethod · 0.45
getSectionLocationsMethod · 0.45
getOrderMethod · 0.45
getTypeMethod · 0.45
getDataMethod · 0.45
getTagMethod · 0.45

Tested by

no test coverage detected