osp - mode shape
Moderators: silvia, selimgunay, Moderators
osp - mode shape
hi silvia
how can i use the osp for mode shape?
please help me
thanks alot
how can i use the osp for mode shape?
please help me
thanks alot
Hello
I use to see mode shape through this way on OSP.
Step 1: Source the file procModalAnalysis.tcl (find it below)
Step 2. Run model in OpenSees, It will creat .eig file for mode shape.
Step 3: Open model on the OSP
Step 4: Open modeshape file
This should make you able to view modeshape.
Good Luck!!
##Example only
#quad element connected with BeamColumn element
# Set parameters for overall model geometry
set width 3600
set height 4440
# Create ModelBuilder (with two-dimensions and 3 DOF/node):
model basic -ndm 2 -ndf 3
# nodal coordinates:
node 1 0.0 0.0
node 2 $width 0.0
node 3 0.0 $height
node 4 $width $height
#boundry condition
fix 1 1 1 1
fix 2 1 1 1
# transformation:
geomTransf Linear 1
# connectivity:
element elasticBeamColumn 1 1 3 660 200 11864 1
element elasticBeamColumn 2 2 4 660 200 11864 1
element elasticBeamColumn 3 3 4 660 200 11864 1
# Load
pattern Plain 1 "Linear" {
load 3 100.0 -20.0 100.0
load 4 100.0 -0.0 0.0
}
# Create another ModelBuilder (with two-dimensions and 2 DOF/node)
model basic -ndm 2 -ndf 2
node 11 0.0 0.0 -mass 0.00003 0.0
node 12 $width 0.0 -mass 0.00003 0.0
node 13 0.0 $height -mass 0.00003 0.0
node 14 $width $height -mass 0.00003 0.0
fix 11 1 1
fix 12 1 1
nDMaterial ElasticIsotropic 1 200 0.3
#element quad $eleTag $iNode $jNode $kNode $lNode $thick $type $matTag <$pressure $rho $b1 $b2>
element quad 4 11 12 14 13 .000076 PlaneStress 1
# now force nodes 13 and 14 to have same disp as 3 and 4 in 1st and 2nd DOF.
equalDOF 3 13 1 2
equalDOF 4 14 1 2
# for shear model (Series of constraint, the constraints Transformation is not suitable)
equalDOF 13 14 1
#Mode Shape for OSP
source procModalAnalysis.tcl; #Create eig file that can be viewed at OSP (OpenSees Post processor), Name of the file that will be created is given on this source file, i.e, Diaphragm_ModeShape.eig in this case.
set N 1
ModalAnalysis $N
wipeAnalysis
pattern Plain 3 "Linear" {
# Create the nodal load - command: load nodeID xForce yForce
load 13 5 1 0
}
#set g 9810; # Gravitational constant
#set FN "Path -filePath SS160.txt -dt 0.0025 -factor $g"; # Earthquake Excitation file
# Define the excitation using the FN ground motion records
#pattern UniformExcitation 2 1 -accel $FN ; # create uniform excitation with IDtag 2 in direction 2
#Start of analysis:
test EnergyIncr 1.0e-8 10 3
# Create the solution algorithm
algorithm Newton
## Create the system of equation storage and solver (SPD solver can not be used if the constraints Lagrange is used as constraint handler)
system SparseGeneral -piv
# Create the constraint handler
constraints Lagrange
integrator Newmark 0.5 0.25
## Create the DOF numberer
numberer RCM
analysis Transient
recorder Node -file node11.out -time -node 11 -dof 1 disp
analyze 1000 0.01
print node 11 12 13 14
print node 1 2 3 4
wipeAnalysis
set lambda [eigen 1]
set omega [expr pow($lambda,0.5)]
set PI 3.142857
set Tperiod [expr 2*$PI/$omega]; # period (sec.)
puts $Tperiod
############################
###Source file procModalAnalysis.tcl
##############################
proc ModalAnalysis { nModes } {
#Wipe the analysis
wipeAnalysis
#Perform Eigen Value analysis
set eigenvalues [eigen $nModes ]
#Set up recorders for eigen vectors
set jjj 0
for {set jjj 0} {$jjj < $nModes} {incr jjj 1} {
recorder Node -file tempFile[expr {$jjj}].tmp -node all -dof 1 2 "eigen [expr $jjj + 1]"
###recorder Node tempFile[expr {$jjj}].tmp "eigen [expr $jjj + 1]" -node all -dof 1 2 ## this commond is not working
}
#Run a one step gravity load with no loading.
test EnergyIncr 1e-6 20 0
algorithm Newton
system SparseGeneral
integrator LoadControl 0 ;#1 .0000001 1
numberer Plain
constraints Transformation
analysis Static
analyze 1
#Wipe the analysis
wipeAnalysis
#Remove the recorders
remove recorders
#Create .eig file to view mode shape on OSP
set _fID [open Diaphragm_ModeShape.eig w]
#Open the temp files
for {set jjj 0} {$jjj < $nModes} {incr jjj 1} {
set _fIDt [open tempFile[expr {$jjj}].tmp]
set tempPeriod [expr 2*3.1416/sqrt([lindex $eigenvalues $jjj])]
set tempValues [read -nonewline $_fIDt]
puts $_fID "$tempPeriod $tempValues"
close $_fIDt
file delete tempFile[expr {$jjj}].tmp
}
#Close the .eig File
close $_fID
}
I use to see mode shape through this way on OSP.
Step 1: Source the file procModalAnalysis.tcl (find it below)
Step 2. Run model in OpenSees, It will creat .eig file for mode shape.
Step 3: Open model on the OSP
Step 4: Open modeshape file
This should make you able to view modeshape.
Good Luck!!
##Example only
#quad element connected with BeamColumn element
# Set parameters for overall model geometry
set width 3600
set height 4440
# Create ModelBuilder (with two-dimensions and 3 DOF/node):
model basic -ndm 2 -ndf 3
# nodal coordinates:
node 1 0.0 0.0
node 2 $width 0.0
node 3 0.0 $height
node 4 $width $height
#boundry condition
fix 1 1 1 1
fix 2 1 1 1
# transformation:
geomTransf Linear 1
# connectivity:
element elasticBeamColumn 1 1 3 660 200 11864 1
element elasticBeamColumn 2 2 4 660 200 11864 1
element elasticBeamColumn 3 3 4 660 200 11864 1
# Load
pattern Plain 1 "Linear" {
load 3 100.0 -20.0 100.0
load 4 100.0 -0.0 0.0
}
# Create another ModelBuilder (with two-dimensions and 2 DOF/node)
model basic -ndm 2 -ndf 2
node 11 0.0 0.0 -mass 0.00003 0.0
node 12 $width 0.0 -mass 0.00003 0.0
node 13 0.0 $height -mass 0.00003 0.0
node 14 $width $height -mass 0.00003 0.0
fix 11 1 1
fix 12 1 1
nDMaterial ElasticIsotropic 1 200 0.3
#element quad $eleTag $iNode $jNode $kNode $lNode $thick $type $matTag <$pressure $rho $b1 $b2>
element quad 4 11 12 14 13 .000076 PlaneStress 1
# now force nodes 13 and 14 to have same disp as 3 and 4 in 1st and 2nd DOF.
equalDOF 3 13 1 2
equalDOF 4 14 1 2
# for shear model (Series of constraint, the constraints Transformation is not suitable)
equalDOF 13 14 1
#Mode Shape for OSP
source procModalAnalysis.tcl; #Create eig file that can be viewed at OSP (OpenSees Post processor), Name of the file that will be created is given on this source file, i.e, Diaphragm_ModeShape.eig in this case.
set N 1
ModalAnalysis $N
wipeAnalysis
pattern Plain 3 "Linear" {
# Create the nodal load - command: load nodeID xForce yForce
load 13 5 1 0
}
#set g 9810; # Gravitational constant
#set FN "Path -filePath SS160.txt -dt 0.0025 -factor $g"; # Earthquake Excitation file
# Define the excitation using the FN ground motion records
#pattern UniformExcitation 2 1 -accel $FN ; # create uniform excitation with IDtag 2 in direction 2
#Start of analysis:
test EnergyIncr 1.0e-8 10 3
# Create the solution algorithm
algorithm Newton
## Create the system of equation storage and solver (SPD solver can not be used if the constraints Lagrange is used as constraint handler)
system SparseGeneral -piv
# Create the constraint handler
constraints Lagrange
integrator Newmark 0.5 0.25
## Create the DOF numberer
numberer RCM
analysis Transient
recorder Node -file node11.out -time -node 11 -dof 1 disp
analyze 1000 0.01
print node 11 12 13 14
print node 1 2 3 4
wipeAnalysis
set lambda [eigen 1]
set omega [expr pow($lambda,0.5)]
set PI 3.142857
set Tperiod [expr 2*$PI/$omega]; # period (sec.)
puts $Tperiod
############################
###Source file procModalAnalysis.tcl
##############################
proc ModalAnalysis { nModes } {
#Wipe the analysis
wipeAnalysis
#Perform Eigen Value analysis
set eigenvalues [eigen $nModes ]
#Set up recorders for eigen vectors
set jjj 0
for {set jjj 0} {$jjj < $nModes} {incr jjj 1} {
recorder Node -file tempFile[expr {$jjj}].tmp -node all -dof 1 2 "eigen [expr $jjj + 1]"
###recorder Node tempFile[expr {$jjj}].tmp "eigen [expr $jjj + 1]" -node all -dof 1 2 ## this commond is not working
}
#Run a one step gravity load with no loading.
test EnergyIncr 1e-6 20 0
algorithm Newton
system SparseGeneral
integrator LoadControl 0 ;#1 .0000001 1
numberer Plain
constraints Transformation
analysis Static
analyze 1
#Wipe the analysis
wipeAnalysis
#Remove the recorders
remove recorders
#Create .eig file to view mode shape on OSP
set _fID [open Diaphragm_ModeShape.eig w]
#Open the temp files
for {set jjj 0} {$jjj < $nModes} {incr jjj 1} {
set _fIDt [open tempFile[expr {$jjj}].tmp]
set tempPeriod [expr 2*3.1416/sqrt([lindex $eigenvalues $jjj])]
set tempValues [read -nonewline $_fIDt]
puts $_fID "$tempPeriod $tempValues"
close $_fIDt
file delete tempFile[expr {$jjj}].tmp
}
#Close the .eig File
close $_fID
}
Kishor
Research Assitant
McGill University
Canada
Research Assitant
McGill University
Canada
-
- Posts: 29
- Joined: Mon Sep 11, 2006 9:48 am
- Location: South China Univesity of Technology
in order to solve this problem, i will try my method, after i finish the new modal display method, i will show it on the forum, please wait
Structure Engineer and CAD/CAE Programmer
Form South China University of Technology
http://www.dinochen.com
Form South China University of Technology
http://www.dinochen.com