OpenSees Cloud
OpenSees AMI
Sloshing Around
Original Post - 03 Nov 2024 - Michael H. Scott
Visit Structural Analysis Is Simple on Substack.
With a Lagrangian formulation for fluids, the particle finite element method (PFEM) is ideal for simulating fluid-structure interaction (FSI) with all the solid elements and constitutive models available in OpenSees.
The initial applications of the PFEM in OpenSees were simulations of tsunami loading on structures, where the fluid flow was gravity driven or based on an imposed wave height and velocity. For sequential earthquake-tsunami hazards, the structural model could first be subjected to a ground motion with the final damaged state as the initial condition for the tsunami loading.
Don’t let anyone fool you though with new paper alerts of multi-hazard earthquake-tsunami analysis–the wave loading either does little damage or does total damage to a structure. There’s not much in between–the fragility curve is a step function regardless of prior earthquake damage.
But anyway, a more interesting problem is fluid sloshing in a tank during an earthquake.
To start, fill up a numerical wave tank. We’ll use the tank described in this post, but we’ll need to make a few adjustments.
First, use more particles per cell. In the aforementioned post, I used one particle per cell in the X and Y directions because the analysis was for hydrostatic response. Now, with fluid dynamics, let’s use two particles per cell.
# Number of particles per cell
numx = 2.0
numy = 2.0
nx = int(round(Ltank/meshsize)*numx)
ny = int(round(hfluid/meshsize)*numy)
If you stick with one particle per cell, the fluid mesh will collapse after sloshing starts. Going higher than two particles per cell will improve the simulation, but not by as much as going from one to two particles per cell.
Second, define a larger bounding box for the background mesh. Here we’ll extend the bounding to 1.5 times the tank height for potentially large vertical motion of the fluid up and above the tank walls. In addition, the bounding box includes 0.2 m on either side of the tank so we’ll see if any fluid over-tops the tank walls.
lower = [-0.2*m,0]
upper = [Ltank+0.2*m, 1.5*Htank]
ops.mesh('bg', meshsize, *lower, *upper,
'-structure', sid, len(wallnodes), *wallnodes)
If your bounding box is only around the initial standing water, you will lose elements that slosh out of the box. And the larger bounding box won’t significantly affect the computational effort.
Third, define a uniform excitation just like you would for any other ground motion analysis in OpenSees.
ops.timeSeries('Path',1,'-dt',0.02*sec,'-filePath','tabasFN.txt','-factor',g)
ops.pattern('UniformExcitation',1,1,'-accel',1)
With a focus on gravity-driven and imposed wave conditions, we never checked that the PFEM elements in OpenSees work with uniform excitation until recently. Funny story: it turned out we needed to implement the addInertiaLoadToUnbalance() method for the PFEM elements. Oops! Maybe not so funny of a story if you tried sloshing before PR #1455.
With the model and uniform excitation defined, we can analyze in a loop. The key aspect of the analysis is to remesh the fluid-structure interface (fluid-wall in this case) at each time step.
totaltime = 30*sec
# Now perform simulation
while ops.getTime() < totaltime:
# Analyze at current time step
if ops.analyze() < 0:
break
ops.remesh()
The fluid sloshing response is shown below. Note some fluid over-tops the walls between 11 and 13 seconds simulation time.
Future posts will show PFEM analyses with flexible structural elements.
Beavis and Butt-Head debuted during my formative high school years. To say the show had a lasting impact would be an understatement. Did I say “sloshing a hound”?