int ElastomericBearingBoucWen2d::addInertiaLoadToUnbalance(const Vector &accel) { // check for quick return if (mass == 0.0) return 0; // get R * accel from the nodes const Vector &Raccel1 = theNodes[0]->getRV(accel); const Vector &Raccel2 = theNodes[1]->getRV(accel); if (3 != Raccel1.Size() || 3 != Raccel2.Size()) { opserr << "ElastomericBearingBoucWen2d::addInertiaLoadToUnbalance() - " << "matrix and vector sizes are incompatible.\n"; return -1; } // want to add ( - fact * M R * accel ) to unbalance // take advantage of lumped mass matrix double m = 0.5*mass; for (int i=0; i<2; i++) { theLoad(i) -= m * Raccel1(i); theLoad(i+3) -= m * Raccel2(i); } return 0; }
int YamamotoBiaxialHDR::addInertiaLoadToUnbalance(const Vector &accel) { // check for quick return if (mass == 0.0) { return 0; } // get R * accel from the nodes const Vector &Raccel1 = theNodes[0]->getRV(accel); const Vector &Raccel2 = theNodes[1]->getRV(accel); if (6 != Raccel1.Size() || 6 != Raccel2.Size()) { opserr << "YamamotoBiaxialHDR::addInertiaLoadToUnbalance() - " << "matrix and vector sizes are incompatible\n"; return -1; } // want to add ( - fact * M R * accel ) to unbalance // take advantage of lumped mass matrix double m = 0.5*mass; for (int i = 0; i < 3; i++) { theLoad(i) -= m * Raccel1(i); theLoad(i+3) -= m * Raccel2(i); } return 0; }
int EEBeamColumn2d::addInertiaLoadToUnbalance(const Vector &accel) { // check for quick return if (L == 0.0 || rho == 0.0) { return 0; } // get R * accel from the nodes const Vector &Raccel1 = theNodes[0]->getRV(accel); const Vector &Raccel2 = theNodes[1]->getRV(accel); if (3 != Raccel1.Size() || 3 != Raccel2.Size()) { opserr << "EEBeamColumn2d::addInertiaLoadToUnbalance() - " << "matrix and vector sizes are incompatible\n"; return -1; } // want to add ( - fact * M R * accel ) to unbalance // take advantage of lumped mass matrix double m = 0.5*rho*L; theLoad(0) -= m * Raccel1(0); theLoad(1) -= m * Raccel1(1); theLoad(3) -= m * Raccel2(0); theLoad(4) -= m * Raccel2(1); return 0; }