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
mass participation
Moderators: silvia, selimgunay, Moderators
-
- Posts: 5
- Joined: Thu Apr 23, 2009 9:37 am
- Location: Tehran University
mass participation
abbas
-
- Posts: 123
- Joined: Tue Oct 31, 2006 10:40 am
- Location: k.n.toosi University
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]
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]