Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wipe
- set pathname "STR2_Result"
- file mkdir $pathname
- set filename "STR_in.out"
- # Work in [N], [m], [s], [kg]
- # Define the properties of SDoF
- set Tn 1.0
- set M 1.0
- set dampRatio 0.02
- # Define constants
- set g 9.81
- set pi [expr 2.0 * asin(1.0)]
- # Calculate SDoF parameters
- set wn [expr 2.0 * $pi / $Tn]
- set K [expr $M*$wn*$wn]
- set c [expr 2.0*$M*$wn*$dampRatio]
- # create the model
- wipe
- model basic -ndm 3
- node 1 0.0 0.0 0.0
- node 2 0.0 0.0 0.0
- node 3 0.0 0.0 1.0
- fix 1 1 1 1 1 1 1
- equalDOF 1 2 1 2 3 4 6
- rigidLink beam 2 3
- mass 3 $M 0.0 0.0 0.0 0.0 0.0
- #unity mass assigned to node 3 (top of SDOF) in X direction
- geomTransf Linear 1 -1 0 0
- uniaxialMaterial Steel01 1 0.118623 1.949551 0.03
- #uniaxialMaterial Steel01 $matTag $Fy $E0 $b <$a1 $a2 $a3 $a4>
- uniaxialMaterial Viscous 2 $c 1
- #uniaxialMaterial Viscous $matTag $C $alpha; alpha=1 is linear damping, C is damping coeff.
- uniaxialMaterial Parallel 3 1 2
- #uniaxialMaterial Parallel $matTag $tag1 $tag2 - combines two materials together
- element zeroLength 1 1 2 -mat 3 -dir 5
- element elasticBeamColumn 2 2 3 1. 1. 1. 1. 1. 1. 1
- recorder Node -file $pathname/Node_disp.out -time -node 3 -dof 1 disp
- recorder Node -file $pathname/Node_vel.out -time -node 3 -dof 1 vel
- recorder Node -file $pathname/Node_acc.out -time -node 3 -dof 1 accel
- recorder Element -file $pathname/Int_force.out -time -ele 1 force
- rigidLink beam 1 2
- setTime 0.0
- wipeAnalysis
- constraints Transformation
- numberer RCM
- system FullGeneral
- test NormDispIncr 1.e-12 500 0
- integrator Newmark 0.50 0.25
- algorithm KrylovNewton
- analysis Transient
- set dT 0.01
- set NumSteps 295
- puts "dT: $dT, Number of Steps: $NumSteps"
- set record "Series -dt $dT -filePath $filename -factor 1.0"
- pattern UniformExcitation 1 1 -accel $record
- analyze $NumSteps $dT
- puts "Analysis complete..."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement