I’m looking for a way to apply time varying body force or a ground motion in OepenSees PFEM model . I modified the provided python example in OpenSeespy doc (https://openseespydoc.readthedocs.io/en/latest/src/dambreak.html) to model fluid sloshing in a rectangular tank. I tried the code lines bellow but failed to do it.
Can anyone provide some help or an example of a 2D sloshing tank model.
Thanks
# Horiz Acceleration
tsTag = 300
acctimes = np.arange(0,totaltime+dtmax,dtmax)
accvalues = np.sin(acctimes*2*np.pi/1.5)
ops.timeSeries('Path', tsTag, '-values', *accvalues, '-time', *acctimes, '-factor', 9.81)
msTag = 400
ops.pattern('MultipleSupport', msTag)
gmTag = 500
ops.groundMotion(gmTag, 'Series', '-accel', tsTag)
# change th original BC (fixed) to SupportMotion
for nd in ops.getNodeTags('-mesh', wall_tag):
#ops.fix(nd,1,1)
ops.fix(nd,0,1)
ops.imposedSupportMotion(nd, 1, gmTag)