Hello!
I am trying to build a 2D frame in OpenSEES, and everything has worked until I tried to add a recorder for the eigenvectors. OpenSEES shuts down evertime I try to run my code, so I haven't even been able to see the error message, although I know it has something to do with the new node recorders. Would you mind looking at my code and see if you see an error? I haven't been able to find any. Thanks so much!
# SET UP ----------------------------------------------------------------------------
wipe; # clear opensees model
model basic -ndm 2 -ndf 3; # 2 dimensions, 3 dof per node
# MAKE DIRECTORY TO PUT RESULLS IN---------------------------------------------------
set fDir "Test_Results";
file mkdir $fDir; # create directory
# SET UNITS--------------------------------------------------------------------------
set in 1.;
set sec 1.;
set kip 1.;
set ksi [expr $kip/pow($in,2)]; # define dependent units
set psi [expr $ksi/1000.];
set ft [expr 12.*$in];
set lb [expr $kip/1000];
set g [expr 32.2*$ft/pow($sec,2)];
set gin [expr 386.4*$in/pow($sec,2)];
set lbf [expr $psi*$in*$in]; # pounds force
puts "units defined"
# DEFINE NODES-----------------------------------------------------------------------
node 1 [expr 0*$ft] [expr 0*$ft]; #base floor,(x,y)=(-60,40)
node 2 [expr 40*$ft] [expr 0*$ft];
node 3 [expr 80*$ft] [expr 0*$ft];
node 4 [expr 0*$ft] [expr 12.5*$ft];
node 5 [expr 40*$ft] [expr 12.5*$ft];
node 6 [expr 80*$ft] [expr 12.5*$ft];
node 7 [expr 0*$ft] [expr 25*$ft];
node 8 [expr 40*$ft] [expr 25*$ft];
node 9 [expr 80*$ft] [expr 25*$ft];
node 10 [expr 0*$ft] [expr 37.5*$ft];
node 11 [expr 40*$ft] [expr 37.5*$ft];
node 12 [expr 80*$ft] [expr 37.5*$ft];
node 13 [expr 00*$ft] [expr 50*$ft];
node 14 [expr 40*$ft] [expr 50*$ft];
node 15 [expr 80*$ft] [expr 50*$ft];
node 16 [expr 0*$ft] [expr 62.5*$ft];
node 17 [expr 40*$ft] [expr 62.5*$ft];
node 18 [expr 80*$ft] [expr 62.5*$ft];
# DEFINE FIXITIES--------------------------------------------------------------------
fix 1 1 1 0; #pin,1=constrained,0=unconstrained
fix 2 1 1 0;
fix 3 1 1 0;
# DEFINE MASSES AS CENTER OF MASS AT EACH FLOOR (kips-secs^2/in)---------------------
set storymass 540; # Total story load in weight units
mass 4 [expr $storymass/(4*$gin)] 1e-9 0.;
mass 5 [expr $storymass/(2*$gin)] 1e-9 0.;
mass 6 [expr $storymass/(4*$gin)] 1e-9 0.;
mass 7 [expr $storymass/(4*$gin)] 1e-9 0.;
mass 8 [expr $storymass/(2*$gin)] 1e-9 0.;
mass 9 [expr $storymass/(4*$gin)] 1e-9 0.;
mass 10 [expr $storymass/(4*$gin)] 1e-9 0.;
mass 11 [expr $storymass/(2*$gin)] 1e-9 0.;
mass 12 [expr $storymass/(4*$gin)] 1e-9 0.;
mass 13 [expr $storymass/(4*$gin)] 1e-9 0.;
mass 14 [expr $storymass/(2*$gin)] 1e-9 0.;
mass 15 [expr $storymass/(4*$gin)] 1e-9 0.;
mass 16 [expr $storymass/(4*$gin)] 1e-9 0.;
mass 17 [expr $storymass/(2*$gin)] 1e-9 0.;
mass 18 [expr $storymass/(4*$gin)] 1e-9 0.;
# ASSIGN TRANSFORMATION---------------------------------------------------------------
# Defines how the element coordinates correlate to the global model coordinates
# For a 2D system, there is no transfomation
geomTransf Linear 1
# ASSIGN ELASTIC ELEMENTS-------------------------------------------------------------
#element elasticBeamColumn IDnumber node1 node2 Area E I Transformation
element elasticBeamColumn 1 1 4 38.2 29000. 2460. 1;
element elasticBeamColumn 2 4 7 38.2 29000. 2460. 1;
element elasticBeamColumn 3 7 10 38.2 29000. 2460. 1;
element elasticBeamColumn 4 10 13 31.1 29000. 1910. 1;
element elasticBeamColumn 5 13 16 31.1 29000. 1910. 1;
element elasticBeamColumn 6 2 5 38.2 29000. 2460. 1;
element elasticBeamColumn 7 5 8 38.2 29000. 2460. 1;
element elasticBeamColumn 8 8 11 38.2 29000. 2460. 1;
element elasticBeamColumn 9 11 14 31.1 29000. 1910. 1;
element elasticBeamColumn 10 14 17 31.1 29000. 1910. 1;
element elasticBeamColumn 11 3 6 38.2 29000. 2460. 1;
element elasticBeamColumn 12 6 9 38.2 29000. 2460. 1;
element elasticBeamColumn 13 9 12 38.2 29000. 2460. 1;
element elasticBeamColumn 14 12 15 31.1 29000. 1910. 1;
element elasticBeamColumn 15 15 18 31.1 29000. 1910. 1;
element elasticBeamColumn 16 4 5 27.7 29000. 2700. 1;
element elasticBeamColumn 17 5 6 27.7 29000. 2700. 1;
element elasticBeamColumn 18 7 8 27.7 29000. 2700. 1;
element elasticBeamColumn 19 8 9 27.7 29000. 2700. 1;
element elasticBeamColumn 20 10 11 27.7 29000. 2700. 1;
element elasticBeamColumn 21 12 13 27.7 29000. 2700. 1;
element elasticBeamColumn 22 13 14 22.4 29000. 2100. 1;
element elasticBeamColumn 23 14 15 22.4 29000. 2100. 1;
element elasticBeamColumn 24 16 17 22.4 29000. 2100. 1;
element elasticBeamColumn 25 17 18 22.4 29000. 2100. 1;
#Here's an example of assigning parameters and using them as variables instead
# Assign parameters
set Fy [expr 50.*$ksi]; # steel yield stress
set Es [expr 29000.*$ksi]; # elastic modulus of steel
set epsY [expr $Fy/$Es]; # steel yield strain
set Fu [expr 65.*$ksi]; # ultimate stress of steel
set epsU 0.08; # ultimate strain of steel
set Bs [expr ($Fu-$Fy)/($epsU-$epsY)/$Es]; # post-yield stiffness ratio of steel
# DEFINE RECORDERS-------------------------------------------------------------------
recorder Node -file $fDir/NodeDisp.out -time -node 1 4 7 10 13 16 -dof 1 2 disp;
recorder Node -file $fDir/NodeEig1.out -time -node 1 4 7 10 13 16 -dof 1 2 "eigen 1";
recorder Node -file $fDir/NodeEig1.out -time -node 1 4 7 10 13 16 -dof 1 2 "eigen 2";
recorder Node -file $fDir/NodeEig1.out -time -node 1 4 7 10 13 16 -dof 1 2 "eigen 3";
recorder Element -file $fDir/ElementForce.out -time -eleRange 16 25 localForce;
# DEFINE GRAVITY LOADS---------------------------------------------------------------
set QBeam1 [expr 94*$lbf/$ft];
set QBeam2 [expr 76*$lbf/$ft];
pattern Plain 1 Linear {
eleLoad -ele 16 17 18 19 20 21 -type -beamUniform -$QBeam1;
eleLoad -ele 22 23 24 25 -type -beamUniform -$QBeam2;
}
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
test NormDispIncr 1.0e-8 6 ; # determine if convergence has been achieved at the end of an iteration step
algorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iteration
integrator LoadControl 0.1; # determine the next time step for an analysis, # apply gravity in 10 steps
analysis Static # define type of analysis static or transient
analyze 10; # perform gravity analysis
loadConst -time 0.0; # hold gravity constant and restart time
#Define loads... imposed in a constant manner
pattern Plain 2 Linear {
load 4 27. 0. 0.;
load 7 54. 0. 0.;
load 10 81. 0. 0.;
load 13 108. 0. 0.;
load 16 135. 0. 0.;
}
# pushover: diplacement controlled static analysis
integrator LoadControl 0.1;
analyze 10; # apply the lateral load in 10 steps
#eigenvalue analysis
eigen 3
puts "Done!"
Problems with eigen recorder
Moderators: silvia, selimgunay, Moderators