# Moving and Influential

OpenSees is probably not the first, or second, software you think of when you need to generate influence lines or perform moving load analysis, e.g., across bridge girders. However, Tcl and Python scripting capabilities make OpenSees ideal for this type of analysis.

To keep things to the point, I’ll show an influence line analysis for a simple span. More logic and data structures are required for multiple loads and multiple spans, but it’s not too complicated.

First, define a force-based element with shear deformation in the section. This will make it easy to record shear forces in addition to bending moment.

``````L = 40*ft
P = 1*kip

E = 4000*ksi
G = 2400*ksi
b = 18*inch
d = 36*inch
A = b*d
I = b*d**3/12

ops.wipe()
ops.model('basic','-ndm',2,'-ndf',3)

ops.node(1,0,0); ops.fix(1,1,1,0)
ops.node(2,L,0); ops.fix(2,1,1,0)

ops.geomTransf('Linear',1)

ops.section('Elastic',1,E,A,I,G,5/6)
ops.beamIntegration('Lobatto',1,1,5)

ops.element('forceBeamColumn',1,1,2,1,1)``````

As described here, you can get clever with the locations of integration points because the moving load will cause discontinuities in section deformation that render high order Lobatto integration useless. To prevent going down that rabbit hole, I’ll just use Lobatto for this example.

To sweep a load across the span, use a loop where you define an element point load at the current load location, perform an analysis, then remove the load. You can record the internal forces using a recorder or the `sectionForce` command at the integration point of interest.

``````ops.analysis('Static')
ops.timeSeries('Constant',1)

Nsteps = 100
dx = L/Nsteps
for i in range(Nsteps):
x = dx*(i+1)
ops.pattern('Plain',1,1)