Modal participation factors
Moderators: silvia, selimgunay, Moderators
-
- Posts: 68
- Joined: Fri Jul 02, 2004 6:10 am
- Location: Computers and Structures, Inc.
Modal participation factors
Does anyone has a script/code to calculate modal participation ratios in OpenSees?
Berk Taftali
Georgia Institute of Technology
Ph.D. Candidate, Structural Engineering, Mechanics, and Materials
School of Civil and Environmental Engineering
Atlanta, GA 30332 USA
Email: gte994y@mail.gatech.edu
Georgia Institute of Technology
Ph.D. Candidate, Structural Engineering, Mechanics, and Materials
School of Civil and Environmental Engineering
Atlanta, GA 30332 USA
Email: gte994y@mail.gatech.edu
-
- Posts: 15
- Joined: Tue Nov 09, 2004 11:19 am
- Location: USGS
For MPF computation,
compute [story mass x eigen vector at the master joint] at each story and sum them up. It will be the modal participation factor.
I did some changes in the code to get directly the eigen vectors at certain node number, I wrote a command for that
[nodeEigen "nodenumber" "direction"] with that one to get the eigen vector at any node and at any time of the analysis is trivial. if you need I can send you the compiled opensees exe file or more info.
Hope this help,
E. Kalkan
ekalkan@ucdavis.edu
compute [story mass x eigen vector at the master joint] at each story and sum them up. It will be the modal participation factor.
I did some changes in the code to get directly the eigen vectors at certain node number, I wrote a command for that
[nodeEigen "nodenumber" "direction"] with that one to get the eigen vector at any node and at any time of the analysis is trivial. if you need I can send you the compiled opensees exe file or more info.
Hope this help,
E. Kalkan
ekalkan@ucdavis.edu
-
- Posts: 68
- Joined: Fri Jul 02, 2004 6:10 am
- Location: Computers and Structures, Inc.
I'm also using a modified version of OpenSees, so the your executeable won't work with my models. The code underlying the command and a script showing the MPF calculations will be very helpful, though...
Thanks in advance...
Code: Select all
nodeEigen
Thanks in advance...
Berk Taftali
Georgia Institute of Technology
Ph.D. Candidate, Structural Engineering, Mechanics, and Materials
School of Civil and Environmental Engineering
Atlanta, GA 30332 USA
Email: gte994y@mail.gatech.edu
Georgia Institute of Technology
Ph.D. Candidate, Structural Engineering, Mechanics, and Materials
School of Civil and Environmental Engineering
Atlanta, GA 30332 USA
Email: gte994y@mail.gatech.edu
-
- Posts: 15
- Joined: Tue Nov 09, 2004 11:19 am
- Location: USGS
Hope that one helps, c++ code is as follows
The class added under Globals for nodeeigen comand is:
int
nodeEigen(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv)
{
if (argc < 3) {
opserr << "WARNING want - nodeEigen nodeTag? dof?\n";
return TCL_ERROR;
}
int tag, dof;
if (Tcl_GetInt(interp, argv[1], &tag) != TCL_OK) {
opserr << "WARNING nodeEigen nodeTag? dof? - could not read nodeTag? \n";
return TCL_ERROR;
}
if (Tcl_GetInt(interp, argv[2], &dof) != TCL_OK) {
opserr << "WARNING nodeEigen nodeTag? dof? - could not read dof? \n";
return TCL_ERROR;
}
Node *theNode = theDomain.getNode(tag);
double value = 0.0;
if (theNode != 0) {
const Matrix dispe = theNode->getEigenvectors();
value = dispe(0,dof-1); // RETURNS only first 3 modes
}
sprintf(interp->result,"%35.20f",value);
return TCL_OK;
}
before using "nodeeigen" command call the [eigen] in opensees.
For the script to compute MPFs, I dont have any generic but case-specific.
I will try to put in a generic form and will post here.
The class added under Globals for nodeeigen comand is:
int
nodeEigen(ClientData clientData, Tcl_Interp *interp, int argc, TCL_Char **argv)
{
if (argc < 3) {
opserr << "WARNING want - nodeEigen nodeTag? dof?\n";
return TCL_ERROR;
}
int tag, dof;
if (Tcl_GetInt(interp, argv[1], &tag) != TCL_OK) {
opserr << "WARNING nodeEigen nodeTag? dof? - could not read nodeTag? \n";
return TCL_ERROR;
}
if (Tcl_GetInt(interp, argv[2], &dof) != TCL_OK) {
opserr << "WARNING nodeEigen nodeTag? dof? - could not read dof? \n";
return TCL_ERROR;
}
Node *theNode = theDomain.getNode(tag);
double value = 0.0;
if (theNode != 0) {
const Matrix dispe = theNode->getEigenvectors();
value = dispe(0,dof-1); // RETURNS only first 3 modes
}
sprintf(interp->result,"%35.20f",value);
return TCL_OK;
}
before using "nodeeigen" command call the [eigen] in opensees.
For the script to compute MPFs, I dont have any generic but case-specific.
I will try to put in a generic form and will post here.
it is also calculated in this example script.
http://opensees.berkeley.edu/community/ ... .php?t=426
http://opensees.berkeley.edu/community/ ... .php?t=426
-
- Posts: 22
- Joined: Tue Oct 02, 2012 12:24 pm
- Location: Budapest University of Technology and Economincs
Re: Modal participation factors
Do you looking for this? I wrote a code which is model independant:
proc calculate_modalmass { modeNum dir } {
#################################################
#Calcuates modal masses in $modeNum at $dir with:
#
#(fi_transpose * M * fi)^2
#fi: eigenvector
#M: mass diagonal matrix
#################################################
# Calculate modal mass in actual direction
set NODES [getNodeTags]
set modalMassUP 0.0
set modalMassDOWN 0.0
set totalMass 0.0
foreach node $NODES {
set actualMass [nodeMass $node $dir]
set totalMass [expr $totalMass + $actualMass]
}
foreach node $NODES {
set m [nodeMass $node $dir]
set fi [nodeEigenvector $node $modeNum $dir]
set iota 1.0
set modalMassUP [expr $modalMassUP + $m*$fi*$iota]
for {set dof 1} {$dof < 7} {incr dof} {
set fi_dof [nodeEigenvector $node $modeNum $dof]
set m_dof [nodeMass $node $dof]
set modalMassDOWN [expr $modalMassDOWN + $fi_dof**2*$m_dof]
}
}
set modalMass [expr $modalMassUP**2 / $modalMassDOWN]
return [expr $modalMass/$totalMass]
}
#USAGE
set modeShapes 4
eigen $modeShapes
puts "X\tY\tZ"
for {set mode 1} {$mode < $modeShapes} {incr mode} {
puts "[calculate_modalmass $mode 1] [calculate_modalmass $mode 2] [calculate_modalmass $mode 3]"
}
proc calculate_modalmass { modeNum dir } {
#################################################
#Calcuates modal masses in $modeNum at $dir with:
#
#(fi_transpose * M * fi)^2
#fi: eigenvector
#M: mass diagonal matrix
#################################################
# Calculate modal mass in actual direction
set NODES [getNodeTags]
set modalMassUP 0.0
set modalMassDOWN 0.0
set totalMass 0.0
foreach node $NODES {
set actualMass [nodeMass $node $dir]
set totalMass [expr $totalMass + $actualMass]
}
foreach node $NODES {
set m [nodeMass $node $dir]
set fi [nodeEigenvector $node $modeNum $dir]
set iota 1.0
set modalMassUP [expr $modalMassUP + $m*$fi*$iota]
for {set dof 1} {$dof < 7} {incr dof} {
set fi_dof [nodeEigenvector $node $modeNum $dof]
set m_dof [nodeMass $node $dof]
set modalMassDOWN [expr $modalMassDOWN + $fi_dof**2*$m_dof]
}
}
set modalMass [expr $modalMassUP**2 / $modalMassDOWN]
return [expr $modalMass/$totalMass]
}
#USAGE
set modeShapes 4
eigen $modeShapes
puts "X\tY\tZ"
for {set mode 1} {$mode < $modeShapes} {incr mode} {
puts "[calculate_modalmass $mode 1] [calculate_modalmass $mode 2] [calculate_modalmass $mode 3]"
}