mass participation

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

Moderators: silvia, selimgunay, Moderators

Post Reply
abbashoseyni85
Posts: 5
Joined: Thu Apr 23, 2009 9:37 am
Location: Tehran University

mass participation

Post by abbashoseyni85 »

Hi Frank
I need to calculate mass participation factor , I don't think Opensees has any command to do this !?
which Class and Variable store mass matrix , tangent matrix and damping matrix ?

thanks
abbas
pejman_opensees
Posts: 123
Joined: Tue Oct 31, 2006 10:40 am
Location: k.n.toosi University

Post by pejman_opensees »

There is a good discussion between Silvia and divamva in OpenSees user room. OpenSees directly does not give participation factor. However, you can do a little calculation to obtain it.
Pejman
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

there is no global mass, damping and stifness matrix. if you need to create one you need to loop over the FE_Elements and DOF_Groups in the AnalysisModel. Have a look at the code for eigen command in the Static or Transient analysis (currently in cvs, release version 2.1.1) code below.

these are stored in an EigenSOE, the full matrices are not typically stored; only a sparse, profile or diagonal representation of the matrix.

[code]

//
// zero A and M
//

theEigenSOE->zeroA();
theEigenSOE->zeroM();

//
// form K
//

FE_EleIter &theEles = theAnalysisModel->getFEs();
FE_Element *elePtr;

while((elePtr = theEles()) != 0) {
elePtr->zeroTangent();
elePtr->addKtToTang(1.0);
if (theEigenSOE->addA(elePtr->getTangent(0), elePtr->getID()) < 0) {
opserr << "WARNING DirectIntegrationAnalysis::eigen() -";
opserr << " failed in addA for ID " << elePtr->getID();
result = -2;
}
}

// if generalized is true, form M
//

if (generalized == true) {
int result = 0;
FE_EleIter &theEles2 = theAnalysisModel->getFEs();
while((elePtr = theEles2()) != 0) {
elePtr->zeroTangent();
elePtr->addMtoTang(1.0);
if (theEigenSOE->addM(elePtr->getTangent(0), elePtr->getID()) < 0) {
opserr << "WARNING DirectIntegrationAnalysis::eigen() -";
opserr << " failed in addA for ID " << elePtr->getID();
result = -2;
}
}

DOF_Group *dofPtr;
DOF_GrpIter &theDofs = theAnalysisModel->getDOFs();
while((dofPtr = theDofs()) != 0) {
dofPtr->zeroTangent();
dofPtr->addMtoTang(1.0);
if (theEigenSOE->addM(dofPtr->getTangent(0),dofPtr->getID()) < 0) {
opserr << "WARNING DirectIntegrationAnalysis::eigen() -";
opserr << " failed in addM for ID " << dofPtr->getID();
result = -3;
}
}
}
[/code]
Post Reply