Blender Fluid Sim Applied to Reservoir Model

with 1:1 and 6:1 (Horizontal to Vertical) Upstream Slopes

Back to Index Page

Blender Fluid Simulation

Blender is primarily a graphics animation package, open source under the GNU license. Dr. Nils Thuerey developed a fluid simulation capability for it, called El'Beem, from his work in modeling metal foams using the Lattice Boltzmann Method (LBM) for fluid flow. Links to his work can be found below. LBM is used in at least one commercial computational fluid dynamics program. Blender Fluid Simulation is meant primarily for animation graphics and is not physically rigorous. However, it contains gravity, mass, inertia, and viscosity. And maybe surface tension, but I'm not sure. Viscosity choices are listed in the program for water, honey, oil and "manual". According to Dr. Thuerey, the "realworld-size" variable, which is listed as the longest dimension of the solution domain in meters, is primarily used to adjust the visual viscosity of the fluid. So all one can say is that when it is set to water, it models a fluid that behaves similarly to water in a domain of loosely know scale. In some cases, it looks pretty good, compared to real water. A QuickTime speed-up movie has been created for the two cases illustrated below. It does not show the differences in magnitude of flow that well, but does show that compared to the dam with the 1:1 upstream slope, the dam with the 6:1 upstream slope has a lot more flow from the sides of the breach into the breach.

Scaling the Model

Unfortunately, one can only set "realworld-size" to a maximum value of 10 meters, or 32.8 feet. So additional scaling has to be done. Dr. Hubert Chanson of the University of Queensland in Australia describes the various non-dimensional number used in fluid dynamics in Chapter 14 of his textbook, The Hydraulics of Open Channel Flow, 1999, Arnold, London UK. The most appropriate for a breach reservoir looks to be the Froude number, Fr,

where v = fluid velocity (ft/s), g = acceleration of gravity = 32.17 ft/(s-squared), l = length (ft). Blender uses the metric acceleration of gravity, 9.81 m/(s-squared), so the realworld-size variable is taken to be meters, converted from feet for this exercise.

We get around the 10 meter limit of realworld-size by scaling length and time. In the Froude number, a particular significant velocity of water is taken for v. But the velocities in the model must range widely. Leaving gravity constant, suppose that we take length, l, in Fr to be the side length of the square reservoir. And suppose we take the length in the velocity, v, to be the side length of the reservoir, l, divided by the computer resolution of the El'Beem (LBM) model, r. In this case that would be 1/200 or .005. The Blender documentation itself is a bit hazy on what length that resolution divides into, and changing resolution would significantly change the results, so we will leave it constant.

Suppose as well that the time part of the velocity v is the inverse of the animation frame rate of the model, f, in frames per second. So if the usual frame rate is 25 per second, we can slow down time by running the model at 50 frames per second and viewing it at 25. Setting the Froude number for the intended scale, Frm, equal to the Froude number for the scale adjusted to fit within the realworld-size limit of 10 meters, Frs, we get

So we divide the side length of the reservoir by 4, from 44 ft to 11 ft, to get it under the 10 meter limit for the realworld-size Blender setting, we must raise the frame rate by a factor of 2, from 25 fps to 50 fps. Whatever flaws may exist in this approach, the results will still be like water flowing through breaches of the same geometry at some unknown time and scale. In other words, more water goes through a bigger hole, and it still has the mass and inertia to form a jet at a flow constriction (the breach). We can get some general idea as to how water behavior might change from one dam breach to another, if we change only one parameter, such as the upstream slope, mu, and leave the rest of the model the same. And this result will be independent from either the ARS flume data or the 6% fit. It's the best one can do without access to highly accurate and expensive commercial software.

Model Layouts

Consider a reservoir 44 feet by 44 feet with an initial depth of water behind the dam of 2 feet. Apologies to our metric friends on the rest of the planet, but this is in comparison to a flume test by the USDA Agricultural Research Service, which was still working mostly in inches and feet. The 44 feet behind the dam is measured from the middle depth (1 ft) of the upstream slope. This way, the upstream slope can be varied to any value of H:V and the initial volume of water behind the dam will be the same, because the cross-sectional the triangles of water above and below the 1 ft depth on the upstream slope add and subtract equally.

Let the x, y and z-axes in the drawings be linear to the same scale and mutually perpendicular. The grid squares in the drawings below are 1 foot square. Let the z-axis be vertical, zero at the floor of the reservoir and positive upwards in the model layouts. Let the y-axis be horizontal, zero at the center of the breach, and positive to the right in the drawing below. Let the x-axis be zero where the upstream slope is one foot above the reservoir floor, and positive horizontally through the breach.

This perspective view of the model for the 1:1 upstream slope also shows the 1:1 breach side side slopes, and a headcut 3.014 ft wide by 1.781 ft deep. The crest of the headcut and the reservoir floor are at the same level. The grid squares are 1 ft by 1 ft in the horizontal. This image comes from a graphics program called Blender (www.blender.org), which has a fluid simulation capability. In the Blender model, the reservoir has sides and a dropoff into a fluid sink at the downstream end of the headcut. This will differ from the flume model a bit because of the velocity of approach due to the 10 ft width of the flume. But because no velocities were measured in the flume experiment, this factor is not determined here.

Front View of both the 1:1 and 6:1 upstream slope models

1:1 Side View - note that the downstream slope of the dam is 1:1 in both drawings

6:1 Side View - notice that the dam is moved 5 feet in the positive x-direction to keep the initial water volume in the reservoir equal to that for the 1:1 upstream slope dam

1:1 Top View

6:1 Top View

Measuring Head Versus Time

The measurements of head in Blender are recorded in sheets A & B in the Lotus 97 1-2-3 spreadsheet, fe2208b.123, for a time, t, of 0.04 to 120 seconds. Sheet A contains the data for the Blender Fluid Sim model for 1:1 upstream slope (mu = 1), runa9b.blend. Sheet Bcontains the data for the Blender Fluid Sim model for 6:1 upstream slope (mu = 6), runb0.blend.

At t = 0, the water is held at the upstream slope above the breach, and then let go, as if the breach appeared instantaneously in the dam. That way the different volumes of the 1:1 and 6:1 upstream slope breaches have no effect on the initial volume of water behind the dam. Since the dam breach is based simply upon a plywood flume model, it does not change due to erosion as the reservoir empties. Blender produces a graphical output that seems to start not at t = 0, but at the next frame, numbered 1. We take this to be 0.04 seconds, at the unscaled frame rate of 25 fps.

Notice the horizontal 2 by 40 ft rectangle at x = -22 in the drawings above. This is a plane Blender object used to measure head at that point. Blender seems to have some artificial turbulence, and the initial dropping of water into the breach sets up waves that slosh back and forth in the reservoir. So we take advantage of the fact that the water surface, as modeled, is not level. The water is blue in solid view, and the plane is gray. We select the plane and move it up/down in the z-direction until it is half covered by water. The "Transform Properties" list shows the z-position in this image to be at +1.915 ft (Loc Z: 1.915).

Unfortunately, Blender artificially elevates the liquid and separates it from obstacle object boundaries, such as the bottom and sides of the reservoir and dam. So instead of starting out at an initial head of 2 ft, which we set by defining a fluid object with that top surface, the modeled surface in this case is 2.232 ft for the dam with the 1:1 upstream slope. So we have to subtract 0.232 ft from all of the heads measured this way, as shown in the Lotus 1-2-3 Sheets A&B.

It might have been better to use a plane that covered most of the reservoir surface, because the slosh shows up in the data as wave noise. But we will ignore it for this exercise.

In this case, we use only the frames labeled in 3D View frame (as above) that are multiples of 100, plus frame 1, taking the unscaled frame rate to be 25 fps. So for every measurement past frame 1, the time increment is 4 seconds, as shown in fe2208a.123.

Calculations and Plots

 In Sheet A (mu = 1) of fe2208a.123, a linear regression fit of he to t has about 2.7 times the standard error of the fitted he as a linear regression fit of ln(he) to t, so we use the log fit. It is convenient to normalize the head (divide by 2) so that it starts out at 1 (ln(1) = 0), set the constant of the fit to 0, then rescale the fitted he values back (multiply by 2). The same approach is used in Sheet B for mu = 6. This gives an equation for fitted head, hefit, with the decay parameter, a:

For mu = 1, a = 0.00416144, and for mu = 6, a = 0.00525862, 26% higher.

  Due to our chosen reservoir layout, the volume is calculated from head and upstream slope. Here we used the fitted head in column G in Sheets A&B instead of he to calculate V in column H.

 Substituting the fitted head into this equation and differentiating, we get.

which we use to calculate the flow, Q, in column I.

 This shows the flows for the breach through the dam models with 1:1 and 6:1 upstream slopes extended by calculation to 400 seconds. Even at that time, they are still not very close, but in the application of the 6% fit, they cross at just before t = 60 seconds. The flow through the 6:1 dam according to 6% fit starts out at 1.72 times the flow through the 1:1 dam.

 Here, with the Blender model, the flow through the 6:1 dam starts out at a significantly lower ratio of 1.4. So the 6:1 dam empties relatively slower here. That argues for rewriting the Blender El'Beem (LBM) model for serious work. The Blender 3-D interface is reasonably easy to use, so this fluid sim model has a lot of potential for research and education. The source code is written in C++ and is available under the GNU license though the links below.

A QuickTime speed-up movie has been created for these two cases. It does not show the differences in magnitude of flow that well, but does show that compared to the dam with the 1:1 upstream slope, the dam with the 6:1 upstream slope has a lot more flow from the sides of the breach into the breach. Put the movie on loop and look at the shape of the grids distorted by the slope of the water where the jet starts. The grid is generated by Blender by projecting a grid on the sides of a cube onto the water surface. So the grid on the downstream side of the cube tends to form a contour plot on the breach jet. The breach jet in the dam with the 1:1 slope cuts a C-shaped hole into the upstream surface of the water. But the breach jet in the dam with the 6:1 slope, cuts an M shape, indicating much more water coming in from the sides of the breach.

Another difference between these Blender models and the real world is that Blender does not form aerated jets. The water in Blender completely fills the cut at its head. This may in part account for the fact that the Blender models show less difference between the breach jets for the two dam slopes than does the 6% fit equation.

Back to Index Page

Links to

Blender organizations: www.blender.org, www.blendernation.com, www.blenderartists.org

Blender Sources: Blender Interface and Requests Forum, Download Blender

Blender Fluid Simulation: Fluid Simulation Manual, Part X, Another Fluid Simulation Manual, Blender Nation Fluid Simulation Tutorial, Notes on Fluid Simulation Additions for Blender 2.40, Fluid Enhancements for Blender 2.43, 3_D Tutorials, http://www.pkblender.it/, SoCFluidDevelDoc,

Fluid Sim Author's Work and Research Publications:

Publications, Nils Thuerey Old Web Page, http://graphics.ethz.ch/~thuereyn/, http://graphics.ethz.ch/%7Ethuereyn/ntoken2_old/p_fluid.html, http://www10.informatik.uni-erlangen.de/en/%7Esinithue/,

Lattice Boltzmann Method: El'Beem at sourceforge.net, http://www10.informatik.uni-erlangen.de/~sinithue/blender/wikimirror/wikibu060815_devel.html, wiki for Lattice_Boltzmann_methods,

Other Blender Tutorials: blender.org Manual, http://homepage.ntlworld.com/r.burke2/tutorial.html, wiki/Blender_3D:_Noob_to_Pro, Blender Summer of Documentation,

 

 

 

 

This page was designed by Donald L. Baker copyright © 2008