const Vector & ElasticBeam2d::getResistingForce() { theCoordTransf->update(); const Vector &v = theCoordTransf->getBasicTrialDisp(); double L = theCoordTransf->getInitialLength(); double EoverL = E/L; double EAoverL = A*EoverL; // EA/L double EIoverL2 = 2.0*I*EoverL; // 2EI/L double EIoverL4 = 2.0*EIoverL2; // 4EI/L // determine q = kv + q0 q(0) = EAoverL*v(0); q(1) = EIoverL4*v(1) + EIoverL2*v(2); q(2) = EIoverL2*v(1) + EIoverL4*v(2); q(0) += q0[0]; q(1) += q0[1]; q(2) += q0[2]; // Vector for reactions in basic system Vector p0Vec(p0, 3); P = theCoordTransf->getGlobalResistingForce(q, p0Vec); return P; }
const Vector& DispBeamColumn2d::getResistingForce() { double L = crdTransf->getInitialLength(); double oneOverL = 1.0/L; //const Matrix &pts = quadRule.getIntegrPointCoords(numSections); //const Vector &wts = quadRule.getIntegrPointWeights(numSections); double xi[maxNumSections]; beamInt->getSectionLocations(numSections, L, xi); double wt[maxNumSections]; beamInt->getSectionWeights(numSections, L, wt); // Zero for integration q.Zero(); // Loop over the integration points for (int i = 0; i < numSections; i++) { int order = theSections[i]->getOrder(); const ID &code = theSections[i]->getType(); //double xi6 = 6.0*pts(i,0); double xi6 = 6.0*xi[i]; // Get section stress resultant const Vector &s = theSections[i]->getStressResultant(); // Perform numerical integration on internal force //q.addMatrixTransposeVector(1.0, *B, s, wts(i)); double si; for (int j = 0; j < order; j++) { //si = s(j)*wts(i); si = s(j)*wt[i]; switch(code(j)) { case SECTION_RESPONSE_P: q(0) += si; break; case SECTION_RESPONSE_MZ: q(1) += (xi6-4.0)*si; q(2) += (xi6-2.0)*si; break; default: break; } } } // Add effects of element loads, q = q(v) + q0 q(0) += q0[0]; q(1) += q0[1]; q(2) += q0[2]; // Vector for reactions in basic system Vector p0Vec(p0, 3); P = crdTransf->getGlobalResistingForce(q, p0Vec); return P; }
const Vector& Timoshenko2d::getResistingForce() { crdTransf->update(); // Will remove once we clean up the corotational 3d transformation double L = crdTransf->getInitialLength(); double pts[maxNumSections]; beamInt->getSectionLocations(numSections, L, pts); double wts[maxNumSections]; beamInt->getSectionWeights(numSections, L, wts); // Zero for integration q.Zero(); // Loop over the integration points for (int i = 0; i<numSections; i++) { int order = theSections[i]->getOrder(); const ID &code = theSections[i]->getType(); double x = L * pts[i]; //xi; const Vector &v = crdTransf->getBasicTrialDisp(); // Get section stress resultant const Vector &s = theSections[i]->getStressResultant(); // Perform numerical integration on internal force bd[i] = this->getBd(i, v, L); q.addMatrixTransposeVector(1.0, bd[i], s, L*wts[i]); } // Add effects of element loads, q = q(v) + q0 q(0) += q0[0]; q(1) += q0[1]; q(2) += q0[2]; // Vector for reactions in basic system Vector p0Vec(p0, 3); P = crdTransf->getGlobalResistingForce(q, p0Vec); // Subtract other external nodal loads ... P_res = P_int - P_ext //P.addVector(1.0, Q, -1.0); P(0) -= Q(0); P(1) -= Q(1); P(2) -= Q(2); P(3) -= Q(3); P(4) -= Q(4); P(5) -= Q(5); return P; }
const Vector & ElasticForceBeamColumn2d::getResistingForce(void) { // Will remove once we clean up the corotational 2d transformation -- MHS crdTransf->update(); double p0[3]; Vector p0Vec(p0, 3); p0Vec.Zero(); if (numEleLoads > 0) this->computeReactions(p0); static Matrix f(NEBD, NEBD); // element flexibility matrix this->getInitialFlexibility(f); static Vector Se(NEBD); this->computeBasicForces(Se); return crdTransf->getGlobalResistingForce(Se, p0Vec); }
const Vector & ElasticBeam3d::getResistingForce() { const Vector &v = theCoordTransf->getBasicTrialDisp(); double L = theCoordTransf->getInitialLength(); double oneOverL = 1.0/L; double EoverL = E*oneOverL; double EAoverL = A*EoverL; // EA/L double EIzoverL2 = 2.0*Iz*EoverL; // 2EIz/L double EIzoverL4 = 2.0*EIzoverL2; // 4EIz/L double EIyoverL2 = 2.0*Iy*EoverL; // 2EIy/L double EIyoverL4 = 2.0*EIyoverL2; // 4EIy/L double GJoverL = G*Jx*oneOverL; // GJ/L q(0) = EAoverL*v(0); q(1) = EIzoverL4*v(1) + EIzoverL2*v(2); q(2) = EIzoverL2*v(1) + EIzoverL4*v(2); q(3) = EIyoverL4*v(3) + EIyoverL2*v(4); q(4) = EIyoverL2*v(3) + EIyoverL4*v(4); q(5) = GJoverL*v(5); q(0) += q0[0]; q(1) += q0[1]; q(2) += q0[2]; q(3) += q0[3]; q(4) += q0[4]; Vector p0Vec(p0, 5); // opserr << q; P = theCoordTransf->getGlobalResistingForce(q, p0Vec); // subtract external load P = P - Q if (rho != 0) P.addVector(1.0, Q, -1.0); return P; }