Updated Gravity load after each Transient analysis time step
Moderators: silvia, selimgunay, Moderators

 Posts: 3
 Joined: Wed Oct 14, 2020 12:16 pm
Updated Gravity load after each Transient analysis time step
Respected Sir/Ma'am,
I am analyzing a bridge model with vehicle atop it. While considering the movement of the vehicle during earthquake loading, it requires updated gravity load for each and every time step, as vehicle would move somewhat distance during the interval of the ground motion time step. For that, I am updating the gravity loads of vehicle by adding and removing "pattern Plain $tag" during each and every time step. However, I got stuck in analyzing for gravity and transient analysis for every time step. I tried following algorithm:
1. Define Bridge Model and add vehicle using nodes and spring damper system at specified location
2. Define Bridge Loads
3. Define Vehicle loads
4. Perform gravity analysis
5. Perform Transient Analysis for one time step
6. Remove Vehicle loads and update the vehicular gravity loads (because of movement of vehicle)
7. Repeat steps 4,5,6 for entire earthquake time series
Somehow, I am not getting response in my bridge model's different components (for example columns, bearing) following above procedure.
Kindly provide your valuable suggestions.
Thank you.
I am analyzing a bridge model with vehicle atop it. While considering the movement of the vehicle during earthquake loading, it requires updated gravity load for each and every time step, as vehicle would move somewhat distance during the interval of the ground motion time step. For that, I am updating the gravity loads of vehicle by adding and removing "pattern Plain $tag" during each and every time step. However, I got stuck in analyzing for gravity and transient analysis for every time step. I tried following algorithm:
1. Define Bridge Model and add vehicle using nodes and spring damper system at specified location
2. Define Bridge Loads
3. Define Vehicle loads
4. Perform gravity analysis
5. Perform Transient Analysis for one time step
6. Remove Vehicle loads and update the vehicular gravity loads (because of movement of vehicle)
7. Repeat steps 4,5,6 for entire earthquake time series
Somehow, I am not getting response in my bridge model's different components (for example columns, bearing) following above procedure.
Kindly provide your valuable suggestions.
Thank you.

 Posts: 883
 Joined: Mon Sep 09, 2013 8:50 pm
 Location: University of California, Berkeley
Re: Updated Gravity load after each Transient analysis time step
What you are doing theoretically sounds correct. The issues could be related to how you use the commands. Can you post your loop for the analysis commands?

 Posts: 3
 Joined: Wed Oct 14, 2020 12:16 pm
Re: Updated Gravity load after each Transient analysis time step
Respected Sir,
I actually figured out few things to implement gravity load for every new position of vehicle and perform the gravity and transient, both analysis simultaneously. If I apply static gravity load for every new position of vehicle, the bridge will fail after few time steps because gravity load would get added to bridge the number of times the earthquake time step is run.
Hence, there is a little modification in my new algorithm for doing the same analysis. Because vehicle is moving at certain speed, the bridge won't be able to react to that vehicular loading in the time step of earthquake and hence rather considering it as a static load, shouldn't it be considered as a transient load? and if, it has to be considered as a transient load, how would I take into consideration that loading into my analysis.
Kindly guide with your suggestions. Thank you.
I actually figured out few things to implement gravity load for every new position of vehicle and perform the gravity and transient, both analysis simultaneously. If I apply static gravity load for every new position of vehicle, the bridge will fail after few time steps because gravity load would get added to bridge the number of times the earthquake time step is run.
Hence, there is a little modification in my new algorithm for doing the same analysis. Because vehicle is moving at certain speed, the bridge won't be able to react to that vehicular loading in the time step of earthquake and hence rather considering it as a static load, shouldn't it be considered as a transient load? and if, it has to be considered as a transient load, how would I take into consideration that loading into my analysis.
Kindly guide with your suggestions. Thank you.

 Posts: 883
 Joined: Mon Sep 09, 2013 8:50 pm
 Location: University of California, Berkeley
Re: Updated Gravity load after each Transient analysis time step
First, I think you can consider the gravity as a static load and earthquake as transient and make that work. You need to remove the gravity loading of the previous step before you apply the new gravity in the next step so that it would not accumulate. Best way would be to see you script related to the analysis commands

 Posts: 3
 Joined: Wed Oct 14, 2020 12:16 pm
Re: Updated Gravity load after each Transient analysis time step
Is there a way to remove effect of previous gravity load analysis in OpenSees. Please guide a bit on this
Please find the attached code below which incorporates transient analysis:
puts $fileID {set tCurrent [getTime]}
#puts $fileID {print $fileID}
set check 10
puts $fileID "set ok 0"
#
set loopIndex 100000
puts $fileID "set loopIndex 100000"
puts $fileID {
for {set u 1} {$u <7} {incr u 1} {
set sum11($u) 0
set sum12($u) 0
set sum13($u) 0
}
for {set u 1} {$u <13} {incr u 1} {
set sum21($u) 0
set sum22($u) 0
set sum23($u) 0
}
}
puts $fileID "source checktruck.tcl"
puts $fileID "#\n# Perform the transient analysis"
puts $fileID "while {\$ok == 0 && \$tCurrent < \$tFinal} {"
# The vehicle stifness and damping properties, axle mass, rigid body mass are assigned.
puts $fileID { set ok [analyze 1 $dt]}
puts $fileID { puts [getTime]}
puts $fileID "\n # if the analysis fails try other algorithms"
puts $fileID " if {\$ok != 0} {"
puts $fileID { puts "Trying Newton with Initial Tangent .."}
puts $fileID " algorithm Newton initial"
puts $fileID { set ok [analyze 1 $dt]}
puts $fileID " }"
# trying Broyden algorithm
puts $fileID " if {\$ok != 0} {"
puts $fileID { puts "Trying Broyden .."}
puts $fileID " algorithm Broyden 8"
puts $fileID { set ok [analyze 1 $dt]}
puts $fileID " }"
# trying Broyden algorithm
puts $fileID " if {\$ok != 0} {"
puts $fileID { puts "Trying NewtonWithLineSearch .."}
puts $fileID " algorithm NewtonLineSearch .8"
puts $fileID { set ok [analyze 1 $dt]}
puts $fileID " }"
puts $fileID " if {\$ok != 0} {"
puts $fileID { puts "regular time step failed .. lets try a smaller step and a less stringent test"}
puts $fileID " test NormDispIncr 1.0e1 165 1"
puts $fileID { set ok [analyze 1 [expr $dt*0.05]]}
puts $fileID " if {\$ok == 0} {puts \"that worked .. back to regular time step and test criteria\"}"
puts $fileID " }\n"
puts $fileID " test NormDispIncr 1.0e3 50 "
puts $fileID " algorithm Newton"
puts $fileID { set tCurrent [getTime]}
puts $fileID {
for {set u 1} {$u <7} {incr u 1} {
set Vnode1($u) [expr 92000+$u]
}
for {set u 1} {$u <7} {incr u 1} {
set disp11($u) [expr [nodeDisp $Vnode1($u) 1]*1]
set disp12($u) [expr [nodeDisp $Vnode1($u) 2]*1]
set disp13($u) [expr [nodeDisp $Vnode1($u) 3]*1]
}
for {set u 1} {$u <13} {incr u 1} {
set Vnode2($u) [expr 93000+$u]
}
for {set u 1} {$u <13} {incr u 1} {
set disp21($u) [expr [nodeDisp $Vnode2($u) 1]*1]
set disp22($u) [expr [nodeDisp $Vnode2($u) 2]*1]
set disp23($u) [expr [nodeDisp $Vnode2($u) 3]*1]
}
puts $disp11(1)
}
# Remove Element
puts $fileID {
for {set u 1} {$u <=[array size AddedVehicleElement]} {incr u 1} {
remove element $AddedVehicleElement($u,1)
#puts $AddedVehicleElement($u,1)
}
for {set u 1} {$u <=[array size AddedVehicleNode]} {incr u 1} {
remove node $AddedVehicleNode($u,1)
#puts $AddedVehicleNode($u,1)
}
}
puts $fileID {
for {set u 1} {$u <7} {incr u 1} {
set sum11($u) [expr $sum11($u)+$disp11($u)]
set sum12($u) [expr $sum12($u)+$disp12($u)]
set sum13($u) [expr $sum13($u)+$disp13($u)]
}
for {set u 1} {$u <13} {incr u 1} {
set sum21($u) [expr $sum21($u)+$disp21($u)]
set sum22($u) [expr $sum22($u)+$disp22($u)]
set sum23($u) [expr $sum23($u)+$disp23($u)]
}
}
puts $fileID {source checktruck.tcl}
puts $fileID {source removedelementlist.tcl}
puts $fileID {set loopIndex [expr $loopIndex+10000]}
puts $fileID {source addElements.tcl}
puts $fileID {set ini_loc [expr $ini_loc+0]}
puts $fileID {source truck2loop.tcl}
puts $fileID {remove loadPattern 4}
puts $fileID "#\npattern Plain 4 \"Linear\" {"
puts $fileID "load 93008 0.0 [expr 384.6*$m_rb1] 0.0 0.0 0.0 0.0"
puts $fileID "load 93011 0.0 [expr 384.6*$m_rb2] 0.0 0.0 0.0 0.0"
puts $fileID "load 92001 0.0 [expr 384.6*$m_a1] 0.0 0.0 0.0 0.0"
puts $fileID "load 92002 0.0 [expr 384.6*$m_a1] 0.0 0.0 0.0 0.0"
puts $fileID "load 92003 0.0 [expr 384.6*$m_a2] 0.0 0.0 0.0 0.0"
puts $fileID "load 92004 0.0 [expr 384.6*$m_a2] 0.0 0.0 0.0 0.0"
puts $fileID "load 92005 0.0 [expr 384.6*$m_a3] 0.0 0.0 0.0 0.0"
puts $fileID "load 92006 0.0 [expr 384.6*$m_a3] 0.0 0.0 0.0 0.0"
set check 10
puts $fileID "set check 10"
puts $fileID "}\n"
Please find the attached code below which incorporates transient analysis:
puts $fileID {set tCurrent [getTime]}
#puts $fileID {print $fileID}
set check 10
puts $fileID "set ok 0"
#
set loopIndex 100000
puts $fileID "set loopIndex 100000"
puts $fileID {
for {set u 1} {$u <7} {incr u 1} {
set sum11($u) 0
set sum12($u) 0
set sum13($u) 0
}
for {set u 1} {$u <13} {incr u 1} {
set sum21($u) 0
set sum22($u) 0
set sum23($u) 0
}
}
puts $fileID "source checktruck.tcl"
puts $fileID "#\n# Perform the transient analysis"
puts $fileID "while {\$ok == 0 && \$tCurrent < \$tFinal} {"
# The vehicle stifness and damping properties, axle mass, rigid body mass are assigned.
puts $fileID { set ok [analyze 1 $dt]}
puts $fileID { puts [getTime]}
puts $fileID "\n # if the analysis fails try other algorithms"
puts $fileID " if {\$ok != 0} {"
puts $fileID { puts "Trying Newton with Initial Tangent .."}
puts $fileID " algorithm Newton initial"
puts $fileID { set ok [analyze 1 $dt]}
puts $fileID " }"
# trying Broyden algorithm
puts $fileID " if {\$ok != 0} {"
puts $fileID { puts "Trying Broyden .."}
puts $fileID " algorithm Broyden 8"
puts $fileID { set ok [analyze 1 $dt]}
puts $fileID " }"
# trying Broyden algorithm
puts $fileID " if {\$ok != 0} {"
puts $fileID { puts "Trying NewtonWithLineSearch .."}
puts $fileID " algorithm NewtonLineSearch .8"
puts $fileID { set ok [analyze 1 $dt]}
puts $fileID " }"
puts $fileID " if {\$ok != 0} {"
puts $fileID { puts "regular time step failed .. lets try a smaller step and a less stringent test"}
puts $fileID " test NormDispIncr 1.0e1 165 1"
puts $fileID { set ok [analyze 1 [expr $dt*0.05]]}
puts $fileID " if {\$ok == 0} {puts \"that worked .. back to regular time step and test criteria\"}"
puts $fileID " }\n"
puts $fileID " test NormDispIncr 1.0e3 50 "
puts $fileID " algorithm Newton"
puts $fileID { set tCurrent [getTime]}
puts $fileID {
for {set u 1} {$u <7} {incr u 1} {
set Vnode1($u) [expr 92000+$u]
}
for {set u 1} {$u <7} {incr u 1} {
set disp11($u) [expr [nodeDisp $Vnode1($u) 1]*1]
set disp12($u) [expr [nodeDisp $Vnode1($u) 2]*1]
set disp13($u) [expr [nodeDisp $Vnode1($u) 3]*1]
}
for {set u 1} {$u <13} {incr u 1} {
set Vnode2($u) [expr 93000+$u]
}
for {set u 1} {$u <13} {incr u 1} {
set disp21($u) [expr [nodeDisp $Vnode2($u) 1]*1]
set disp22($u) [expr [nodeDisp $Vnode2($u) 2]*1]
set disp23($u) [expr [nodeDisp $Vnode2($u) 3]*1]
}
puts $disp11(1)
}
# Remove Element
puts $fileID {
for {set u 1} {$u <=[array size AddedVehicleElement]} {incr u 1} {
remove element $AddedVehicleElement($u,1)
#puts $AddedVehicleElement($u,1)
}
for {set u 1} {$u <=[array size AddedVehicleNode]} {incr u 1} {
remove node $AddedVehicleNode($u,1)
#puts $AddedVehicleNode($u,1)
}
}
puts $fileID {
for {set u 1} {$u <7} {incr u 1} {
set sum11($u) [expr $sum11($u)+$disp11($u)]
set sum12($u) [expr $sum12($u)+$disp12($u)]
set sum13($u) [expr $sum13($u)+$disp13($u)]
}
for {set u 1} {$u <13} {incr u 1} {
set sum21($u) [expr $sum21($u)+$disp21($u)]
set sum22($u) [expr $sum22($u)+$disp22($u)]
set sum23($u) [expr $sum23($u)+$disp23($u)]
}
}
puts $fileID {source checktruck.tcl}
puts $fileID {source removedelementlist.tcl}
puts $fileID {set loopIndex [expr $loopIndex+10000]}
puts $fileID {source addElements.tcl}
puts $fileID {set ini_loc [expr $ini_loc+0]}
puts $fileID {source truck2loop.tcl}
puts $fileID {remove loadPattern 4}
puts $fileID "#\npattern Plain 4 \"Linear\" {"
puts $fileID "load 93008 0.0 [expr 384.6*$m_rb1] 0.0 0.0 0.0 0.0"
puts $fileID "load 93011 0.0 [expr 384.6*$m_rb2] 0.0 0.0 0.0 0.0"
puts $fileID "load 92001 0.0 [expr 384.6*$m_a1] 0.0 0.0 0.0 0.0"
puts $fileID "load 92002 0.0 [expr 384.6*$m_a1] 0.0 0.0 0.0 0.0"
puts $fileID "load 92003 0.0 [expr 384.6*$m_a2] 0.0 0.0 0.0 0.0"
puts $fileID "load 92004 0.0 [expr 384.6*$m_a2] 0.0 0.0 0.0 0.0"
puts $fileID "load 92005 0.0 [expr 384.6*$m_a3] 0.0 0.0 0.0 0.0"
puts $fileID "load 92006 0.0 [expr 384.6*$m_a3] 0.0 0.0 0.0 0.0"
set check 10
puts $fileID "set check 10"
puts $fileID "}\n"

 Posts: 883
 Joined: Mon Sep 09, 2013 8:50 pm
 Location: University of California, Berkeley
Re: Updated Gravity load after each Transient analysis time step
You can apply the gravity forces of the previous step in the upward direction in the current step to remove the gravity and apply the new gravity load at the current step.