getResistingForceIncInertia Method

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
mohammmad
Posts: 45
Joined: Tue Aug 21, 2018 4:10 am
Contact:

getResistingForceIncInertia Method

Post by mohammmad »

hello everyone,
I have a question. What does getResistingForceIncInertia Method do? What I mean is that based on which source (book or article), OpenSees calculate damping forces for a degree of freedom of nodes and apply them? I think the matrix of damping forces (Matrix element) cannot apply to nodes degree of freedom.




DispBeamColumn2d::getResistingForceIncInertia()
{

P = this->getResistingForce();

// Subtract other external nodal loads ... P_res = P_int - P_ext
P.addVector(1.0, Q, -1.0);

if (rho != 0.0) {
const Vector &accel1 = theNodes[0]->getTrialAccel();
const Vector &accel2 = theNodes[1]->getTrialAccel();

if (cMass == 0) {
// take advantage of lumped mass matrix
double L = crdTransf->getInitialLength();
double m = 0.5*rho*L;

P(0) += m*accel1(0);
P(1) += m*accel1(1);
P(3) += m*accel2(0);
P(4) += m*accel2(1);
} else {
// use matrix vector multip. for consistent mass matrix
static Vector accel(6);
for (int i=0; i<3; i++) {
accel(i) = accel1(i);
accel(i+3) = accel2(i);
}
P.addMatrixVector(1.0, this->getMass(), accel, 1.0);
}

// add the damping forces if rayleigh damping
if (alphaM != 0.0 || betaK != 0.0 || betaK0 != 0.0 || betaKc != 0.0)
P.addVector(1.0, this->getRayleighDampingForces(), 1.0);

} else {

// add the damping forces if rayleigh damping
if (betaK != 0.0 || betaK0 != 0.0 || betaKc != 0.0)
P.addVector(1.0, this->getRayleighDampingForces(), 1.0);
}

return P;
}
Post Reply