Typical example of Structural Dynamics 3DOF
Moderators: silvia, selimgunay, Moderators
-
- Posts: 160
- Joined: Mon Feb 02, 2015 6:32 pm
Typical example of Structural Dynamics 3DOF
# Coded by Prafulla Malla, Sichuan University
# Structural Response 3DOF
# Report Vibration Control
# X--*************--X --************--X----************--X
# 1Fix(m,k,c) 2 m,k,c) 3 (m,k,c) 4 Top Floor
wipe all;
set Tn 1.0
set K 2.0e8
set M 4.0e5
set dampRatio 0.02
#number of modes
set numModes 3
#set some constants
set g 9.810
set PI [expr 2.0 * asin(1.0)]
#derived quantaties
set Wn [expr 2.0 * $PI / $Tn]
set c [expr 2.0*$M*$Wn*$dampRatio]
# create the model
wipe
model basic -ndm 1 -ndf 1
node 1 0.0
node 2 1.0 -mass $M
node 3 2.0 -mass $M
node 4 3.0 -mass $M
fix 1 1
uniaxialMaterial Elastic 1 $K 0.0
uniaxialMaterial Elastic 2 0.0 $c
uniaxialMaterial Parallel 3 1 2
#element truss eleno -i -j area matt
element truss 1 1 2 1.0 3
element truss 2 2 3 1.0 3
element truss 3 3 4 1.0 3
# perform eigen analysis
#-----------------------------
set lambda [eigen -fullGenLapack $numModes];
# calculate frequencies and periods of the structure
#---------------------------------------------------
set omega {}
set f {}
set T {}
set pi 3.141593
foreach lam $lambda {
lappend omega [expr sqrt($lam)]
lappend f [expr sqrt($lam)/(2*$pi)]
lappend T [expr (2*$pi)/sqrt($lam)]
}
puts "omega are $omega"
puts "periods are $T"
print node 4;
print node 3;
print node 2;
set dT 0.02;
set nPts 1500;
set factor $g
timeSeries Path 1 -filePath Elcentro.dat -dt $dT -factor $g
pattern UniformExcitation 1 1 -accel 1
# create the analysis
constraints Plain
integrator Newmark 0.5 [expr 1.0/6.0]
system ProfileSPD
test NormUnbalance 1.0e-12 6 0
algorithm Newton
numberer RCM
analysis Transient
rayleigh 0.7334 0.0026 0. 0.
set t 0.0
set maxT [expr (1+$nPts)*$dT];
set ok 0.0
set maxD 0.0
recorder Node -file disp4.out -time -node 4 -dof 1 disp
recorder Node -file vel4.out -time -node 4 -dof 1 vel
recorder Node -file accel4.out -time -node 4 -dof 1 accel
recorder Drift -file drift4.out -time -iNode 3 -jNode 4 -dof 1 -perpDirn 1
recorder Node -file mode.out -nodeRange 2 4 -dof 1 eigen ;
while {$ok == 0 && $t < $maxT} {
set ok [analyze 1 $dT]
if {$ok != 0} {
test NormDispIncr 1.0e-12 100 0
algorithm ModifiedNewton -initial
set ok [analyze 1 .01]
test NormDispIncr 1.0e-12 10
algorithm Newton
}
set time [getTime]
set d [nodeDisp 4 1]
if {$d > $maxD} {
set maxD $d
} elseif {$d < [expr -$maxD]} {
set maxD [expr -$d]
}
set t [expr $t + $dT]
}
puts "record: $record period: $Tn damping ratio: $dampRatio max disp: $maxD"
wipe all;
# Structural Response 3DOF
# Report Vibration Control
# X--*************--X --************--X----************--X
# 1Fix(m,k,c) 2 m,k,c) 3 (m,k,c) 4 Top Floor
wipe all;
set Tn 1.0
set K 2.0e8
set M 4.0e5
set dampRatio 0.02
#number of modes
set numModes 3
#set some constants
set g 9.810
set PI [expr 2.0 * asin(1.0)]
#derived quantaties
set Wn [expr 2.0 * $PI / $Tn]
set c [expr 2.0*$M*$Wn*$dampRatio]
# create the model
wipe
model basic -ndm 1 -ndf 1
node 1 0.0
node 2 1.0 -mass $M
node 3 2.0 -mass $M
node 4 3.0 -mass $M
fix 1 1
uniaxialMaterial Elastic 1 $K 0.0
uniaxialMaterial Elastic 2 0.0 $c
uniaxialMaterial Parallel 3 1 2
#element truss eleno -i -j area matt
element truss 1 1 2 1.0 3
element truss 2 2 3 1.0 3
element truss 3 3 4 1.0 3
# perform eigen analysis
#-----------------------------
set lambda [eigen -fullGenLapack $numModes];
# calculate frequencies and periods of the structure
#---------------------------------------------------
set omega {}
set f {}
set T {}
set pi 3.141593
foreach lam $lambda {
lappend omega [expr sqrt($lam)]
lappend f [expr sqrt($lam)/(2*$pi)]
lappend T [expr (2*$pi)/sqrt($lam)]
}
puts "omega are $omega"
puts "periods are $T"
print node 4;
print node 3;
print node 2;
set dT 0.02;
set nPts 1500;
set factor $g
timeSeries Path 1 -filePath Elcentro.dat -dt $dT -factor $g
pattern UniformExcitation 1 1 -accel 1
# create the analysis
constraints Plain
integrator Newmark 0.5 [expr 1.0/6.0]
system ProfileSPD
test NormUnbalance 1.0e-12 6 0
algorithm Newton
numberer RCM
analysis Transient
rayleigh 0.7334 0.0026 0. 0.
set t 0.0
set maxT [expr (1+$nPts)*$dT];
set ok 0.0
set maxD 0.0
recorder Node -file disp4.out -time -node 4 -dof 1 disp
recorder Node -file vel4.out -time -node 4 -dof 1 vel
recorder Node -file accel4.out -time -node 4 -dof 1 accel
recorder Drift -file drift4.out -time -iNode 3 -jNode 4 -dof 1 -perpDirn 1
recorder Node -file mode.out -nodeRange 2 4 -dof 1 eigen ;
while {$ok == 0 && $t < $maxT} {
set ok [analyze 1 $dT]
if {$ok != 0} {
test NormDispIncr 1.0e-12 100 0
algorithm ModifiedNewton -initial
set ok [analyze 1 .01]
test NormDispIncr 1.0e-12 10
algorithm Newton
}
set time [getTime]
set d [nodeDisp 4 1]
if {$d > $maxD} {
set maxD $d
} elseif {$d < [expr -$maxD]} {
set maxD [expr -$d]
}
set t [expr $t + $dT]
}
puts "record: $record period: $Tn damping ratio: $dampRatio max disp: $maxD"
wipe all;
Prafulla Malla, Nepal
Praf_malla@hotmail.com
Praf_malla@hotmail.com
-
- Posts: 25
- Joined: Fri Jun 15, 2018 2:47 am
- Location: Huazhong University of Science & Technology,China
Re: Typical example of Structural Dynamics 3DOF
Thank you for sharing such a good example.Will you kindly share a typical example for base isolated 2DOF system subjected to ground motion(earthquake),i was trying to do the same and blocked somewhere.Will appreciate for your help.
-
- Posts: 25
- Joined: Fri Jun 15, 2018 2:47 am
- Location: Huazhong University of Science & Technology,China
Re: Typical example of Structural Dynamics 3DOF
I have tried to model this 3DOF system using opensees navigator and I get error message.can you help me please to figure out the problem
# Coded by Prafulla Malla, Sichuan University
# Structural Response 3DOF
# Report Vibration Control
# X--*************--X --************--X----************--X
# 1Fix(m,k,c) 2 m,k,c) 3 (m,k,c) 4 Top Floor
wipe all;
set Tn 1.0
set K 2.0e8
set M 4.0e5
set dampRatio 0.02
#number of modes
set numModes 3
#set some constants
set g 9.810
set PI [expr 2.0 * asin(1.0)]
#derived quantaties
set Wn [expr 2.0 * $PI / $Tn]
set c [expr 2.0*$M*$Wn*$dampRatio]
# create the model
wipe
model basic -ndm 1 -ndf 1
node 1 0.0
node 2 1.0 -mass $M
node 3 2.0 -mass $M
node 4 3.0 -mass $M
fix 1 1
uniaxialMaterial Elastic 1 $K 0.0
uniaxialMaterial Elastic 2 0.0 $c
uniaxialMaterial Parallel 3 1 2
#element truss eleno -i -j area matt
element truss 1 1 2 1.0 3
element truss 2 2 3 1.0 3
element truss 3 3 4 1.0 3
# perform eigen analysis
#-----------------------------
set lambda [eigen -fullGenLapack $numModes];
# calculate frequencies and periods of the structure
#---------------------------------------------------
set omega {}
set f {}
set T {}
set pi 3.141593
foreach lam $lambda {
lappend omega [expr sqrt($lam)]
lappend f [expr sqrt($lam)/(2*$pi)]
lappend T [expr (2*$pi)/sqrt($lam)]
}
puts "omega are $omega"
puts "periods are $T"
print node 4;
print node 3;
print node 2;
set dT 0.02;
set nPts 1500;
set factor $g
timeSeries Path 1 -filePath Elcentro.dat -dt $dT -factor $g
pattern UniformExcitation 1 1 -accel 1
# create the analysis
constraints Plain
integrator Newmark 0.5 [expr 1.0/6.0]
system ProfileSPD
test NormUnbalance 1.0e-12 6 0
algorithm Newton
numberer RCM
analysis Transient
rayleigh 0.7334 0.0026 0. 0.
set t 0.0
set maxT [expr (1+$nPts)*$dT];
set ok 0.0
set maxD 0.0
recorder Node -file disp4.out -time -node 4 -dof 1 disp
recorder Node -file vel4.out -time -node 4 -dof 1 vel
recorder Node -file accel4.out -time -node 4 -dof 1 accel
recorder Drift -file drift4.out -time -iNode 3 -jNode 4 -dof 1 -perpDirn 1
recorder Node -file mode.out -nodeRange 2 4 -dof 1 eigen ;
while {$ok == 0 && $t < $maxT} {
set ok [analyze 1 $dT]
if {$ok != 0} {
test NormDispIncr 1.0e-12 100 0
algorithm ModifiedNewton -initial
set ok [analyze 1 .01]
test NormDispIncr 1.0e-12 10
algorithm Newton
}
set time [getTime]
set d [nodeDisp 4 1]
if {$d > $maxD} {
set maxD $d
} elseif {$d < [expr -$maxD]} {
set maxD [expr -$d]
}
set t [expr $t + $dT]
}
puts "record: $record period: $Tn damping ratio: $dampRatio max disp: $maxD"
wipe all;
Prafullamalla
Posts: 34
Joined: Mon Feb 02, 2015 7:32 pm
# Coded by Prafulla Malla, Sichuan University
# Structural Response 3DOF
# Report Vibration Control
# X--*************--X --************--X----************--X
# 1Fix(m,k,c) 2 m,k,c) 3 (m,k,c) 4 Top Floor
wipe all;
set Tn 1.0
set K 2.0e8
set M 4.0e5
set dampRatio 0.02
#number of modes
set numModes 3
#set some constants
set g 9.810
set PI [expr 2.0 * asin(1.0)]
#derived quantaties
set Wn [expr 2.0 * $PI / $Tn]
set c [expr 2.0*$M*$Wn*$dampRatio]
# create the model
wipe
model basic -ndm 1 -ndf 1
node 1 0.0
node 2 1.0 -mass $M
node 3 2.0 -mass $M
node 4 3.0 -mass $M
fix 1 1
uniaxialMaterial Elastic 1 $K 0.0
uniaxialMaterial Elastic 2 0.0 $c
uniaxialMaterial Parallel 3 1 2
#element truss eleno -i -j area matt
element truss 1 1 2 1.0 3
element truss 2 2 3 1.0 3
element truss 3 3 4 1.0 3
# perform eigen analysis
#-----------------------------
set lambda [eigen -fullGenLapack $numModes];
# calculate frequencies and periods of the structure
#---------------------------------------------------
set omega {}
set f {}
set T {}
set pi 3.141593
foreach lam $lambda {
lappend omega [expr sqrt($lam)]
lappend f [expr sqrt($lam)/(2*$pi)]
lappend T [expr (2*$pi)/sqrt($lam)]
}
puts "omega are $omega"
puts "periods are $T"
print node 4;
print node 3;
print node 2;
set dT 0.02;
set nPts 1500;
set factor $g
timeSeries Path 1 -filePath Elcentro.dat -dt $dT -factor $g
pattern UniformExcitation 1 1 -accel 1
# create the analysis
constraints Plain
integrator Newmark 0.5 [expr 1.0/6.0]
system ProfileSPD
test NormUnbalance 1.0e-12 6 0
algorithm Newton
numberer RCM
analysis Transient
rayleigh 0.7334 0.0026 0. 0.
set t 0.0
set maxT [expr (1+$nPts)*$dT];
set ok 0.0
set maxD 0.0
recorder Node -file disp4.out -time -node 4 -dof 1 disp
recorder Node -file vel4.out -time -node 4 -dof 1 vel
recorder Node -file accel4.out -time -node 4 -dof 1 accel
recorder Drift -file drift4.out -time -iNode 3 -jNode 4 -dof 1 -perpDirn 1
recorder Node -file mode.out -nodeRange 2 4 -dof 1 eigen ;
while {$ok == 0 && $t < $maxT} {
set ok [analyze 1 $dT]
if {$ok != 0} {
test NormDispIncr 1.0e-12 100 0
algorithm ModifiedNewton -initial
set ok [analyze 1 .01]
test NormDispIncr 1.0e-12 10
algorithm Newton
}
set time [getTime]
set d [nodeDisp 4 1]
if {$d > $maxD} {
set maxD $d
} elseif {$d < [expr -$maxD]} {
set maxD [expr -$d]
}
set t [expr $t + $dT]
}
puts "record: $record period: $Tn damping ratio: $dampRatio max disp: $maxD"
wipe all;
Prafullamalla
Posts: 34
Joined: Mon Feb 02, 2015 7:32 pm
-
- Posts: 160
- Joined: Mon Feb 02, 2015 6:32 pm
Re: Typical example of Structural Dynamics 3DOF
Is it convergence error? Although the data, is for t=30 sec, it converges upto 29 secs. So, I think the result is enough.
@nyangi. I tried to model for base isolation , taking negligible mass for base isolation but, I got convergence errror.
@nyangi. I tried to model for base isolation , taking negligible mass for base isolation but, I got convergence errror.
Prafulla Malla, Nepal
Praf_malla@hotmail.com
Praf_malla@hotmail.com
-
- Posts: 25
- Joined: Fri Jun 15, 2018 2:47 am
- Location: Huazhong University of Science & Technology,China
Re: Typical example of Structural Dynamics 3DOF
No it is not convergence error.I can send you an image for the error message ,and please if you don't mind can you text me your email to my email address nyangip@yahoo.com, I would like to discuss in detail and I may have some question on your model that I still need some explanation, I am in Wuhan.
-
- Posts: 917
- Joined: Mon Sep 09, 2013 8:50 pm
- Location: University of California, Berkeley
Re: Typical example of Structural Dynamics 3DOF
Did you try it in OpenSees itself?
-
- Posts: 25
- Joined: Fri Jun 15, 2018 2:47 am
- Location: Huazhong University of Science & Technology,China
Re: Typical example of Structural Dynamics 3DOF
No I tried it first on opensees navigator, but when I tried it in opensees it had a convergence error.
-
- Posts: 160
- Joined: Mon Feb 02, 2015 6:32 pm
Re: Typical example of Structural Dynamics 3DOF
Check the output file. did you plot the graph?
Prafulla Malla, Nepal
Praf_malla@hotmail.com
Praf_malla@hotmail.com
-
- Posts: 25
- Joined: Fri Jun 15, 2018 2:47 am
- Location: Huazhong University of Science & Technology,China
Re: Typical example of Structural Dynamics 3DOF
Yes i checked the output files with results(did not plot the graph),does it means that convergence error should be ignored and there is no effect to the results? How do you plot graph?
-
- Posts: 160
- Joined: Mon Feb 02, 2015 6:32 pm
Re: Typical example of Structural Dynamics 3DOF
The easy way to understand about convergence is that, For example, if you want to get load for 30 mm displacement, and if you get load for say 26~29 mm displacement. Then, its ok. but if you just get load for 5 mm displacement then, the result is not sufficient. Here, the earthquake data is for 30 sec , and you get results upto 29 sec. So, your analysis is sufficient
you can plot by using excel but more preferrable to use matlab. its quick for repeated works
you can plot by using excel but more preferrable to use matlab. its quick for repeated works
Prafulla Malla, Nepal
Praf_malla@hotmail.com
Praf_malla@hotmail.com
-
- Posts: 25
- Joined: Fri Jun 15, 2018 2:47 am
- Location: Huazhong University of Science & Technology,China
Re: Typical example of Structural Dynamics 3DOF
Well explained,i understand now.Thank you.I will plot graph.
-
- Posts: 25
- Joined: Fri Jun 15, 2018 2:47 am
- Location: Huazhong University of Science & Technology,China
Re: Typical example of Structural Dynamics 3DOF
I was able to plot the graphs for responses and the results seem to be OK,thank you once again.Have you tried to do this example using opensees navigator?
-
- Posts: 160
- Joined: Mon Feb 02, 2015 6:32 pm
Re: Typical example of Structural Dynamics 3DOF
No, I was unable to download it.
Prafulla Malla, Nepal
Praf_malla@hotmail.com
Praf_malla@hotmail.com
-
- Posts: 25
- Joined: Fri Jun 15, 2018 2:47 am
- Location: Huazhong University of Science & Technology,China
Re: Typical example of Structural Dynamics 3DOF
Ok, I will try to send you set up files.
-
- Posts: 25
- Joined: Fri Jun 15, 2018 2:47 am
- Location: Huazhong University of Science & Technology,China
Re: Typical example of Structural Dynamics 3DOF
@Prafullamalla I sent you the files for opensees navigator hope you received them.