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

Method computeSectionForces

SRC/element/forceBeamColumn/ForceBeamColumn2d.cpp:1711–1886  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1709}
1710
1711void
1712ForceBeamColumn2d::computeSectionForces(Vector &sp, int isec)
1713{
1714 int type;
1715
1716 double L = crdTransf->getInitialLength();
1717
1718 double xi[maxNumSections];
1719 beamIntegr->getSectionLocations(numSections, L, xi);
1720 double x = xi[isec]*L;
1721
1722 int order = sections[isec]->getOrder();
1723 const ID &code = sections[isec]->getType();
1724
1725 for (int i = 0; i < numEleLoads; i++) {
1726
1727 double loadFactor = eleLoadFactors[i];
1728 const Vector &data = eleLoads[i]->getData(type, loadFactor);
1729
1730 if (type == LOAD_TAG_Beam2dUniformLoad) {
1731 double wa = data(1)*loadFactor; // Axial
1732 double wy = data(0)*loadFactor; // Transverse
1733
1734 for (int ii = 0; ii < order; ii++) {
1735
1736 switch(code(ii)) {
1737 case SECTION_RESPONSE_P:
1738 sp(ii) += wa*(L-x);
1739 break;
1740 case SECTION_RESPONSE_MZ:
1741 sp(ii) += wy*0.5*x*(x-L);
1742 break;
1743 case SECTION_RESPONSE_VY:
1744 sp(ii) += wy*(x-0.5*L);
1745 break;
1746 default:
1747 break;
1748 }
1749 }
1750 }
1751 else if (type == LOAD_TAG_BeamUniformMoment) {
1752 double mz = data(2)*loadFactor; // About z
1753
1754 for (int ii = 0; ii < order; ii++) {
1755
1756 switch(code(ii)) {
1757 case SECTION_RESPONSE_P:
1758 break;
1759 case SECTION_RESPONSE_MZ:
1760 break;
1761 case SECTION_RESPONSE_VY:
1762 sp(ii) += mz;
1763 break;
1764 default:
1765 break;
1766 }
1767 }
1768 }

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