Mass matrix or nodal mass

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

Post Reply
maziarfarzam
Posts: 5
Joined: Tue Oct 22, 2013 11:38 pm
Location: iust

Mass matrix or nodal mass

Post by maziarfarzam »

I have a problem in calculating period by opensees.
why when I define mass at the end of nodes in the format of (node 32 45.75 9.45 -mass 13459.4 1e-9 1e-9 ), I've got the 1st period 0.7,
but surprisingly when I define it separately, (mass 32 13459.4 1e-9 1e-9 ), the 1st period will be 6.2 ?!
mhscott
Posts: 880
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: Mass matrix or nodal mass

Post by mhscott »

What is the mass reported for each case when you print the node

print node 32
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: Mass matrix or nodal mass

Post by fmk »

are you sure all the masses are the same? the SmallEigen verification example is a simple script that uses both the mass and node command options. (if it fails with your .exe remove reference to findLargest in the eigen command as this may not yet be in the released .exe)

http://opensees.berkeley.edu/WebSVN/lis ... ication%2F
maziarfarzam
Posts: 5
Joined: Tue Oct 22, 2013 11:38 pm
Location: iust

Re: Mass matrix or nodal mass

Post by maziarfarzam »

Thanks from both of you.
By a little chance I found the problem.
it happens when I was trying to use leaning column in my model, if I give zero mass to nodes which are correspond to the leaning column the period is wrong (6.2) but when I delete this zero masses, it works correct and gives 0.7, I think it may be a bug would you please check it ?
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: Mass matrix or nodal mass

Post by fmk »

send me a small script deomostrating the problem. a portal frame with a leaning column would be nice!
maziarfarzam
Posts: 5
Joined: Tue Oct 22, 2013 11:38 pm
Location: iust

Re: Mass matrix or nodal mass

Post by maziarfarzam »

I tested this problem (Example: 2-Story Steel Moment Frame with Concentrated Plasticity). When I defined zero mass for the leaning column, opensees couldn't calculate the eigenvalue. But if these zero masses are removed, the periods will be calculated correctly.
version with zero mass in leaning column nodes (32 , 33 ): ( if you remove these zero masses it works correctly )

wipe all; # clear memory of past model definitions
model BasicBuilder -ndm 2 -ndf 3; # Define the model builder, ndm = #dimension, ndf = #dofs
source rotSpring2DModIKModel.tcl; # procedure for defining a rotational spring (zero-length element)
source rotLeaningCol.tcl; # procedure for defining a rotational spring (zero-length element) with very small stiffness
set analysisType "dynamic";

if {$analysisType == "pushover"} {
set dataDir Concentrated-Pushover-Output; # name of output folder
file mkdir $dataDir; # create output folder
}
if {$analysisType == "dynamic"} {
set dataDir Concentrated-Dynamic-Output; # name of output folder
file mkdir $dataDir; # create output folder
}
set NStories 2; # number of stories
set NBays 1; # number of frame bays (excludes bay for P-delta column)
set WBay [expr 30.0*12.0]; # bay width in inches
set HStory1 [expr 15.0*12.0]; # 1st story height in inches
set HStoryTyp [expr 12.0*12.0]; # story height of other stories in inches
set HBuilding [expr $HStory1 + ($NStories-1)*$HStoryTyp]; # height of building
set Pier1 0.0; # leftmost column line
set Pier2 [expr $Pier1 + $WBay];
set Pier3 [expr $Pier2 + $WBay]; # P-delta column line
set Floor1 0.0; # ground floor
set Floor2 [expr $Floor1 + $HStory1];
set Floor3 [expr $Floor2 + $HStoryTyp];
set phlat23 [expr 0.0]; # lateral dist from beam-col joint to loc of hinge on Floor 2
set g 386.2; # acceleration due to gravity
set Floor2Weight 535.0; # weight of Floor 2 in kips
set Floor3Weight 525.0; # weight of Floor 3 in kips
set WBuilding [expr $Floor2Weight + $Floor3Weight];# total building weight
set NodalMass2 [expr ($Floor2Weight/$g) / (2.0)]; # mass at each node on Floor 2
set NodalMass3 [expr ($Floor3Weight/$g) / (2.0)]; # mass at each node on Floor 3
set Negligible 1e-9; # a very smnumber to avoid problems with zero
node 11 $Pier1 $Floor1;
node 21 $Pier2 $Floor1;
node 31 $Pier3 $Floor1;
node 12 $Pier1 $Floor2 -mass $NodalMass2 $Negligible $Negligible;
node 22 $Pier2 $Floor2 -mass $NodalMass2 $Negligible $Negligible;
node 32 $Pier3 $Floor2 -mass $Negligible $Negligible $Negligible;
node 13 $Pier1 $Floor3 -mass $NodalMass3 $Negligible $Negligible;
node 23 $Pier2 $Floor3 -mass $NodalMass3 $Negligible $Negligible;
node 33 $Pier3 $Floor3 -mass $Negligible $Negligible $Negligible;
node 117 $Pier1 $Floor1;
node 217 $Pier2 $Floor1;
node 126 $Pier1 $Floor2;
node 226 $Pier2 $Floor2;
node 326 $Pier3 $Floor2; # zero-stiffness spring will be used on p-delta column
node 127 $Pier1 $Floor2;
node 227 $Pier2 $Floor2;
node 327 $Pier3 $Floor2; # zero-stiffness spring will be used on p-delta column
node 136 $Pier1 $Floor3;
node 236 $Pier2 $Floor3;
node 336 $Pier3 $Floor3; # zero-stiffness spring will be used on p-delta column
node 122 [expr $Pier1 + $phlat23] $Floor2;
node 223 [expr $Pier2 - $phlat23] $Floor2;
node 132 [expr $Pier1 + $phlat23] $Floor3;
node 233 [expr $Pier2 - $phlat23] $Floor3;
set dof1 1; # constrain movement in dof 1 (x-direction)
equalDOF 12 22 $dof1; # Floor 2: Pier 1 to Pier 2
equalDOF 12 32 $dof1; # Floor 2: Pier 1 to Pier 3
equalDOF 13 23 $dof1; # Floor 3: Pier 1 to Pier 2
equalDOF 13 33 $dof1; # Floor 3: Pier 1 to Pier 3
fix 11 1 1 1;
fix 21 1 1 1;
fix 31 1 1 0; # P-delta column is pinned
set Es 29000.0; # steel Young's modulus
set Acol_12 38.5; # cross-sectional area
set Icol_12 4020.0; # moment of inertia
set Mycol_12 20350.0; # yield moment
set Abeam_23 30.0; # cross-sectional area (full section properties)
set Ibeam_23 3620.0; # moment of inertia (full section properties)
set Mybeam_23 10938.0; # yield moment at plastic hinge location (i.e., My of RBS section, if used)
set n 10.0; # stiffness multiplier for rotational spring
set Icol_12mod [expr $Icol_12*($n+1.0)/$n]; # modified moment of inertia for columns in Story 1 & 2
set Ibeam_23mod [expr $Ibeam_23*($n+1.0)/$n]; # modified moment of inertia for beams in Floor 2 & 3
set Ks_col_1 [expr $n*6.0*$Es*$Icol_12mod/$HStory1]; # rotational stiffness of Story 1 column springs
set Ks_col_2 [expr $n*6.0*$Es*$Icol_12mod/$HStoryTyp]; # rotational stiffness of Story 2 column springs
set Ks_beam_23 [expr $n*6.0*$Es*$Ibeam_23mod/$WBay]; # rotational stiffness of Floor 2 & 3 beam springs
set PDeltaTransf 1;
geomTransf PDelta $PDeltaTransf; # PDelta transformation
element elasticBeamColumn 111 117 126 $Acol_12 $Es $Icol_12mod $PDeltaTransf; # Pier 1
element elasticBeamColumn 121 217 226 $Acol_12 $Es $Icol_12mod $PDeltaTransf; # Pier 2
element elasticBeamColumn 112 127 136 $Acol_12 $Es $Icol_12mod $PDeltaTransf; # Pier 1
element elasticBeamColumn 122 227 236 $Acol_12 $Es $Icol_12mod $PDeltaTransf; # Pier 2
element elasticBeamColumn 212 122 223 $Abeam_23 $Es $Ibeam_23mod $PDeltaTransf;
element elasticBeamColumn 222 132 233 $Abeam_23 $Es $Ibeam_23mod $PDeltaTransf;
set TrussMatID 600; # define a material ID
set Arigid 1000.0; # define area of truss section (make much larger than A of frame elements)
set Irigid 100000.0; # moment of inertia for p-delta columns (make much larger than I of frame elements)
uniaxialMaterial Elastic $TrussMatID $Es; # define truss material
element truss 622 22 32 $Arigid $TrussMatID; # Floor 2
element truss 623 23 33 $Arigid $TrussMatID; # Floor 3
element elasticBeamColumn 731 31 326 $Arigid $Es $Irigid $PDeltaTransf; # Story 1
element elasticBeamColumn 732 327 336 $Arigid $Es $Irigid $PDeltaTransf; # Story 2
set McMy 1.05; # ratio of capping moment to yield moment, Mc / My
set LS 1000.0; # basic strength deterioration (a very large # = no cyclic deterioration)
set LK 1000.0; # unloading stiffness deterioration (a very large # = no cyclic deterioration)
set LA 1000.0; # accelerated reloading stiffness deterioration (a very large # = no cyclic deterioration)
set LD 1000.0; # post-capping strength deterioration (a very large # = no deterioration)
set cS 1.0; # exponent for basic strength deterioration (c = 1.0 for no deterioration)
set cK 1.0; # exponent for unloading stiffness deterioration (c = 1.0 for no deterioration)
set cA 1.0; # exponent for accelerated reloading stiffness deterioration (c = 1.0 for no deterioration)
set cD 1.0; # exponent for post-capping strength deterioration (c = 1.0 for no deterioration)
set th_pP 0.025; # plastic rot capacity for pos loading
set th_pN 0.025; # plastic rot capacity for neg loading
set th_pcP 0.3; # post-capping rot capacity for pos loading
set th_pcN 0.3; # post-capping rot capacity for neg loading
set ResP 0.4; # residual strength ratio for pos loading
set ResN 0.4; # residual strength ratio for neg loading
set th_uP 0.4; # ultimate rot capacity for pos loading
set th_uN 0.4; # ultimate rot capacity for neg loading
set DP 1.0; # rate of cyclic deterioration for pos loading
set DN 1.0; # rate of cyclic deterioration for neg loading
set a_mem [expr ($n+1.0)*($Mycol_12*($McMy-1.0)) / ($Ks_col_1*$th_pP)]; # strain hardening ratio of spring
set b [expr ($a_mem)/(1.0+$n*(1.0-$a_mem))]; # modified strain hardening ratio of spring (Ibarra & Krawinkler 2005, note: Eqn B.5 is incorrect)
rotSpring2DModIKModel 3111 11 117 $Ks_col_1 $b $b $Mycol_12 [expr -$Mycol_12] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN;
rotSpring2DModIKModel 3211 21 217 $Ks_col_1 $b $b $Mycol_12 [expr -$Mycol_12] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN;
#col springs @ top of Story 1 (below Floor 2)
rotSpring2DModIKModel 3112 12 126 $Ks_col_1 $b $b $Mycol_12 [expr -$Mycol_12] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN;
rotSpring2DModIKModel 3212 22 226 $Ks_col_1 $b $b $Mycol_12 [expr -$Mycol_12] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN;

set a_mem [expr ($n+1.0)*($Mycol_12*($McMy-1.0)) / ($Ks_col_2*$th_pP)]; # strain hardening ratio of spring
set b [expr ($a_mem)/(1.0+$n*(1.0-$a_mem))]; # modified strain hardening ratio of spring (Ibarra & Krawinkler 2005, note: there is mistake in Eqn B.5)
# col springs @ bottom of Story 2 (above Floor 2)
rotSpring2DModIKModel 3121 12 127 $Ks_col_2 $b $b $Mycol_12 [expr -$Mycol_12] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN;
rotSpring2DModIKModel 3221 22 227 $Ks_col_2 $b $b $Mycol_12 [expr -$Mycol_12] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN;
#col springs @ top of Story 2 (below Floor 3)
rotSpring2DModIKModel 3122 13 136 $Ks_col_2 $b $b $Mycol_12 [expr -$Mycol_12] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN;
rotSpring2DModIKModel 3222 23 236 $Ks_col_2 $b $b $Mycol_12 [expr -$Mycol_12] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN;

region 1 -ele 3111 3211 3112 3212 3121 3221 3122 3222;
set th_pP 0.02;
set th_pN 0.02;
set th_pcP 0.16;
set th_pcN 0.16;
set a_mem [expr ($n+1.0)*($Mybeam_23*($McMy-1.0)) / ($Ks_beam_23*$th_pP)]; # strain hardening ratio of spring
set b [expr ($a_mem)/(1.0+$n*(1.0-$a_mem))]; # modified strain hardening ratio of spring (Ibarra & Krawinkler 2005, note: there is mistake in Eqn B.5)
#beam springs at Floor 2
rotSpring2DModIKModel 4121 12 122 $Ks_beam_23 $b $b $Mybeam_23 [expr -$Mybeam_23] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN;
rotSpring2DModIKModel 4122 22 223 $Ks_beam_23 $b $b $Mybeam_23 [expr -$Mybeam_23] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN;
#beam springs at Floor 3
rotSpring2DModIKModel 4131 13 132 $Ks_beam_23 $b $b $Mybeam_23 [expr -$Mybeam_23] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN;
rotSpring2DModIKModel 4132 23 233 $Ks_beam_23 $b $b $Mybeam_23 [expr -$Mybeam_23] $LS $LK $LA $LD $cS $cK $cA $cD $th_pP $th_pN $th_pcP $th_pcN $ResP $ResN $th_uP $th_uN $DP $DN;

region 2 -ele 4121 4122 4131 4132;
rotLeaningCol 5312 32 326; # top of Story 1
rotLeaningCol 5321 32 327; # bottom of Story 2
rotLeaningCol 5322 33 336; # top of Story 2
region 3 -ele 5312 5321 5322;
set pi [expr 2.0*asin(1.0)]; # Definition of pi
set nEigenI 1; # mode i = 1
set nEigenJ 2; # mode j = 2
set lambdaN [eigen [expr $nEigenJ]]; # eigenvalue analysis for nEigenJ modes
set lambdaI [lindex $lambdaN [expr 0]]; # eigenvalue mode i = 1
set lambdaJ [lindex $lambdaN [expr $nEigenJ-1]]; # eigenvalue mode j = 2
set w1 [expr pow($lambdaI,0.5)]; # w1 (1st mode circular frequency)
set w2 [expr pow($lambdaJ,0.5)]; # w2 (2nd mode circular frequency)
set T1 [expr 2.0*$pi/$w1]; # 1st mode period of the structure
set T2 [expr 2.0*$pi/$w2]; # 2nd mode period of the structure
puts "T1 = $T1 s"; # display the first mode period in the command window
puts "T2 = $T2 s";
Post Reply