Professional Documents
Culture Documents
1
Exercise A3: Simple Ogee Refinement & Troubleshooting
Page 1 of 11
Hydraulics Training on FLOW-3D Version 10.1
Exercise A3: Simple Ogee Refinement & Troubleshooting
Figure 1. Surface instability due to pure 2nd-order momentum advection method, 10-m case shown
Figure 2. Discharges with 1st-order & 2nd-order monotonicity preserving momentum advection methods
In this model, 1st-order momentum advection performs better than 2nd-order monotonicity-preserving
advection, at least for the coarse 2-m cell size case. This is counter-intuitive, since you might expect
Page 2 of 11
Hydraulics Training on FLOW-3D Version 10.1
Exercise A3: Simple Ogee Refinement & Troubleshooting
higher-order methods to perform better in all situations. There are many possible reasons that this is
not so:
One reason is that higher-order methods often exhibit significant and rapid oscillation, while 1st-
order methods produce very smooth results. The higher-order methods respond to sudden flow
changes better, but lower-order methods may be more accurate over time since they don’t tend
to introduce spikes and wobbles in the solution. This is probably the case here.
Higher-order methods may introduce artifacts in the solution, which are related to the spikes
and wobbles just discussed.
Additional logic is often added to lower-order CFD methods to make them more robust in a wide
range of situations, whereas higher-order methods tend to be more sensitive and “fragile”. They
are good for certain classes of problems, but not so reliable for others.
Rule-of-thumb: use 1st-order methods like multi-tools (e.g., a Swiss Army knife). Use higher-order
methods when they can be demonstrated to be more accurate.
TOTAL IMPROVEMENT
HEAD DISCHARGE FLOW RATE USING IFVOF6
He QUSBR QDEF.VOF QUNSPLITLAG. QSPLITLAG. VS. IFVOF4
3 3 3 3 3
(m) (m /s) (m /s) (m /s) (m /s) (m /s) (%)
8 47.97 51.74 52.85 52.64 -0.89 -1.9%
10 68.96 74.06 73.38 73.24 0.83 1.2%
12 92.70 99.07 98.73 98.42 0.66 0.7%
14 119.42 125.01 124.98 124.93 0.08 0.1%
16 148.91 154.81 154.02 153.83 0.99 0.7%
Table 1. Comparative improvement of different VOF methods (most accurate result in bold)
Page 3 of 11
Hydraulics Training on FLOW-3D Version 10.1
Exercise A3: Simple Ogee Refinement & Troubleshooting
The model is improved slightly for heads greater than 8 m by using higher-order VOF methods. The 8-m
case results are slightly worse with higher-order VOF methods. The results support a rule of thumb:
higher-order VOF methods often cause negligible improvement. There are some cases where higher-
order methods are necessary, but this is not one of them. Higher-order VOF methods are most useful
when the free surface is curved and its position changes with time. Examples of curved and oscillating or
pulsating free surfaces include some flip-bucket jets, partially-submerged morning glory spillways, and
unsteady cascades. The weir flow here has a curved free surface, but it does not change position in time
after steady conditions are reached. Rule of thumb: whenever two methods give nearly identical results,
use the lower-order method, which is probably more robust. Note that the test you’ve done so far
support the use of the default options!
The numeric “ceiling” for the turbulent length scale (mixing length) is called the maximum turbulent
mixing length (variable name TLEN), and must be included in two-equation turbulence closures for
stability. The default option is called dynamically-computed, where TLEN is estimated differently in
every cell at every time step and used in that cell’s turbulence calculations. The estimation process
utilizes Kolmogorov scales and rapid distortion theory.
The other option is to specify a global and constant TLEN. This option is usually preferable when the
characteristic length is constant. In channel flow, the characteristic length is usually depth, and you
would use the maximum depth for calculations. In pipe flow, it’s the wetted radius (hydraulic diameter).
Around piers, abutments, and ship hulls it’s the width of the wake, which is not constant, so often the
length is taken to be 2 – 10 times the object width.
Once the characteristic length is determined, the maximum turbulent mixing length should be between
7% and 100% of the characteristic length. The lower 7% figure (up to 20%) approximates the actual
turbulent mixing length, and tightly constrains the calculations. Larger values allow the turbulence
closure more room in estimating the actual mixing length. In many cases (e.g., wakes) it’s impossible to
know what the actual length should be without trying different values. In this step, you’ll test three
mixing lengths in addition to the dynamically-computed option you’ve already tested.
1. Your simulation has a crest head H of either 8, 10, 12, 14, or 16 m. Find the following values:
0.07H
0.15H
0.3H
2. Go to the Simulation Manager tab and right-click > Remove Simulation on the IFVOF6 and
IORDER3 cases. The project folder and all files remain on your drive, they’re just no longer
visible in the Portfolio. Cleaning up periodically helps keep your simulations in order.
Page 4 of 11
Hydraulics Training on FLOW-3D Version 10.1
Exercise A3: Simple Ogee Refinement & Troubleshooting
3. Make three copies of the IORDER1 IFVOF4 case, and edit their names so the final part of the
names read …TLEN07H, …TLEN15H, and …TLEN30H.
4. Select the 07H case and go to Model Setup > Physics > Viscosity and Turbulence. Select
Maximum Turbulent Mixing Length = Constant. Set the value to 7% of the total head H. Save
your work!
5. Repeat the process for the other two new cases, using 15% and 30% of the total head H.
6. Run all three simulations and post-process them as before. The results using FLOW-3D v10.1.3
are shown in Table 2.
IMPROVEMENT
TOTAL USING TLEN =
HEAD DISCHARGE FLOW RATE 0.07H
He QUSBR QTLEN=DYN QTLEN=7%H QTLEN=15%H QTLEN=30%H VS. DYNAMIC
(m) (m3/s) (m3/s) (m3/s) (m3/s) (m3/s) (m3/s) (%)
8 47.97 51.74 51.77 51.74 51.77 -0.03 -0.06%
10 68.96 74.06 74.03 74.03 74.03 0.04 0.06%
12 92.70 99.07 99.02 99.02 99.02 0.05 0.06%
14 119.42 125.01 124.94 124.94 124.94 0.07 0.06%
16 148.91 154.81 154.73 154.73 154.73 0.09 0.06%
Table 2. Comparative improvement of different TLEN options (most accurate result in bold)
As before, using a non-default numerical setting gains you very little in this case. The maximum
improvement is 6/100ths of a percent! It seems that FLOW-3D’s default settings work very well in this
test. This concludes your testing of numerical options. You could optionally test implicit vs. explicit
momentum advection, but in general implicit methods should only be used when there is a compelling
reason (such as extremely long run time) to do so.
1. Clean up. Remove the specified-TLEN cases, leaving only the IORDER1 IFVOF4 TLENDYN case.
2. Right-click the simulation and select Add Restart Simulation…
3. In the dialog that appears, make sure that a new project directory will be created with a copy of
the .stl geometry. Change the first part of the name from OGEE 2mCELLS… to OGEE 1mCELLS…
Observe how the new name includes Restart at the end.
4. Right-click the new restart simulation and select Add Restart Simulation again. Name this
“Restart Restart” simulation OGEE 05mCELLS…
5. Select the OGEE 1mCELLS… project. Go to Model Setup > Meshing & Geometry.
6. Toggle the Mesh Window on with the button and expand the tree.
Page 5 of 11
Hydraulics Training on FLOW-3D Version 10.1
Exercise A3: Simple Ogee Refinement & Troubleshooting
7. Right-click the Mesh Block 1 header in the tree and select Auto Mesh…
8. In the Auto Mesh Block 1 dialog, make sure only X direction and Z direction are active, and set
Size of cells = 1 m. Click OK.
9. Change the coordinate of Mesh Block 1 > Z Direction > Mesh Plane 2 = 20 (reduced from 24).
Lowering the z-max “ceiling” is safe since the free surface doesn’t splash or have waves, and
reducing the total cell count by 7% will speed up the runs a little bit.
10. Go to the Model Setup > General tab. This simulation will begin at t = 200, since that was the
finish time of the previous simulation. Set Finish Time = 300 to provide 100 seconds (300 – 200)
of runtime on the finer mesh, which will hopefully be sufficient to reach a new steady state.
11. Save your work.
12. Repeat steps 5 – 11 again for the OGEE 05mCELLS… project, but set Size of cells = 0.5 m in X and
Z and make Finish Time = 400 (another 100 seconds after the previous case).
13. Only in the finer case, on Model Setup > General, click on the Restart button to open an options
dialog. Set Restart Time = 300, so the finest case launches from the finish of the mid-size case.
Click OK to close the Restart dialog and Save your work.
14. In v10.1, there’s a known bug with relative paths to the restart file. Press Ctrl-E to open the
prepin file in the text editor. Find the line near the top that reads:
resfile=’../OGEE_2mCELLS_H12m_IORDER1_IFVOF4_RNG_TLENDYN/flsgrf.OGEE_2mCELLS_H12m_IORDE
R1_IFVOF4_RNG_TLENDYN',
15. Replace the .. with the full path to the project. You can find this by clicking on the link to
Workspace File at the top of the Simulation Manager tab and then highlighting and copying the
path from the OS window that appears. The final prepin line should look like the following
example:
resfile=’C:/Users/jeffb/Documents/FLOW-3D/FLOW-3D Projects/OGEE_TEST_CASE/
OGEE_2mCELLS_H12m_IORDER1_IFVOF4_RNG_TLENDYN/flsgrf.OGEE_2mCELLS_H12m_IORDER1_IFVOF
4_RNG_TLENDYN',
16. Press OK to close the dialog. Press Ctrl+S to save the prepin with the manual workaround.
Page 6 of 11
Hydraulics Training on FLOW-3D Version 10.1
Exercise A3: Simple Ogee Refinement & Troubleshooting
4. All three simulations should have been added to the queue at the bottom. The 2-m case will run
in about 1 minute, the 1-m case will take about 3 minutes, and the 0.5-m case will take about 30
minutes. This illustrates that the time required to run a case is not always linearly proportional
to the cell count!
5. Track the model progress and performance with the Runtime Plots. Try plotting different global
budgets by selecting them from the dropdown list above the plot window. Look at Volume of
Fluid 1, Mass-averaged Mean Kinetic Energy, and Mass-averaged Turbulent Kinetic Energy.
Referring to the y-axis of the plot to provide scale to the spread of values, do you think the finer-
grid runs reach steady state? Why or why not? There is an oscillation in the finer mesh runs.
What is the period of the oscillation? What does the oscillation period represent?
6. Check the Runtime Text below the plot window. What is limiting the time step? Hint: vs means
viscous stress and turbulent transport, while cx, cy, and cz mean explicit fluid convection. What’s
the relation between the limiting stability criteria and the cell size?
7. When the runs are complete, analyze them in 2-D and Probe data as before, but this time
average the last 60 seconds (240 – 300 seconds and 340 – 400 seconds).
All runs should look good unless you’ve chosen the H = 14 m case, for which the finest mesh run will
become unstable.
TROUBLESHOOTING
If you’ve run the 14-m case (in v10.1.3), it’s likely that the downstream surface has become unstable in
the jump. The symptom of this is shown below: unphysical jets that eventually destabilize the upstream
flow and hydraulic control. These results are unrealistic and numerically unstable. In other words,
they’re a problem. Referring to the troubleshooting guide in the User Manual and lecture material,
there are several possibilities that must be considered. They are discussed below.
If moving the boundary condition did not solve the problem, you would then want to pursue additional
troubleshooting. The guide below can be skipped (since the problem is solved), but you are encouraged
to come back to it when you’re troubleshooting your own cases.
Page 7 of 11
Hydraulics Training on FLOW-3D Version 10.1
Exercise A3: Simple Ogee Refinement & Troubleshooting
2. Is the pressure failing to converge? To check this, read the solver output text and the Show
Warnings information. There are no pressure iteration failures. The number of pressure
iterations iter = 1 for most output cycles except the earliest cycle, which is when the velocity and
pressure are adjusting from their interpolated values to the new finer mesh. The ratio of the
pressure residual (difference between LHS and RHS of governing equation) and the convergence
criteria (acceptable difference) is listed as res/epsi. The pressure solution is converged when
res/epsi < 1, which it is at all output cycles. The pressure is not failing to converge, which is
unsurprising: usually iteration failures are associated with poor mesh or geometry resolution,
sliver cells, or with boundary conditions that don’t match the initial fluid elevation or velocity.
This does not rule out the possibility that the convergence criteria are too loose, just that the
pressure solution is meeting the default accuracy requirement.
3. Is the pressure criteria too loose? Unless you are familiar enough with CFD analysis to interpret
the value of the residual (which usually scales by velocity), the easiest way to test the pressure
criteria is to make a Simulation Copy of the restart case and run it with tighter convergence
criteria. Make a copy and then go to Model Setup > Numerics > Pressure Solver Options >
Convergence Controls. Set Multiplier for Dynamically Adjusted Convergence Criterion (EPSADJ)
= 1E-3, Minimum Number of Iterations (ITMIN) = 2, and Maximum Number of Iterations
(ITMAX) = 500. If you have a lot of RAM and are willing to spend it on giving the pressure solver
more overhead (and slowing down the run time significantly) then also set Constant Subspace
Size GMRES Subspace Size (MRSTRT) = 20 or 25. Unfortunately, the new run still goes unstable,
so the problem is not with the default convergence criteria.
4. Does limited compressibility diffuse the problem? So-called “limited” compressibility is a fluid
property that can be specified on the Fluids tab for incompressible fluids. It allows pressure
waves to propagate as if the fluid is slightly compressible, but it doesn’t change the fluid volume
or density. In other words, limited compressibility is a simplification that models water hammer
and other acoustic pressure waves, and that is acceptable for fluids where the maximum change
in density is less than 10%. This is true of water. Limited compressibility also eases the pressure
solution by making the fluid less “stiff”. It’s often used as a physically realistic way of getting
around “stiff” pressure failures. To test this, make another copy of the original bad run and go to
Model Setup > Fluids > Properties > Fluid 1 and set Compressibility (RCSQL) = 4.65E-10 m-
s^2/kg, equal to 1/(RHOF*W2), where RHOF is the fluid density and W is the adiabatic speed of
sound in the fluid. Unfortunately, this does not solve the problem either, but it does give you a
clue as to the problem: this case reports the warning “Possible unphysical flow increase at a
static pressure boundary. Recommend stagnation boundary pressures”.
5. Is the problem related to the downstream static pressure boundary? Test this by making a
simulation copy of the original bad simulation and activating the Stagnation Pressure option on
Model Setup > Meshing & Geometry > Mesh-Cartesian > Mesh Block 1 > Boundaries > X-Min.
Interestingly, this fixes the situation completely. Results will be reviewed below.
6. Is the problem related to the mesh gridline location? When a perfectly flat free surface coincides
exactly with a gridline for a distance of many cells over many time steps, a feedback loop can be
created that causes large unphysical waves like those seen here. However, this problem usually
Page 8 of 11
Hydraulics Training on FLOW-3D Version 10.1
Exercise A3: Simple Ogee Refinement & Troubleshooting
appears only in reservoir and tank models. It can still be tested by shifting the z gridlines by 0.25
m: make a simulation copy of the original bad simulation and set z-min = -31.75 and z-max =
20.25. As expected, this does not eliminate the jump.
7. Is the problem related to F-Packing? F-Packing is a numerical book-keeping routine that runs at
the end of every time step when the model uses one-fluid, free-surface physics. The routine
sweeps through all the cells looking for any that are submerged (not adjacent to a free surface)
and that have fluid fraction F not equal to 1. These cells, that have slightly more or less fluid in
them than they should, are adjusted by tweaking their pressure slightly to either pull extra fluid
in or push extra fluid out. After the pushing/pulling step, the routine completes and the next
cycle begins. F-Packing errors are reported when a cell is adjusted multiple times in a row, as
this can potentially create an unphysical pressure. F-Packing errors are common at the toe of
hydraulic jumps. Usually these errors can be ignored, because the rest of the pressure solution
tends to oppose any locally incorrect artifacts due to F-Packing. There are no F-Packing errors
reported in the original run, but there is an oscillating hydraulic jump, so it might be worth
testing. To do this, make a simulation copy of the original unstable case and go to Model Setup >
Numerics > Volume-of-Fluid Advection > Advanced Options and set F-Packing Coefficient (CFPK)
= 0.1. Interestingly, this also solves the problem, although not as cleanly as the stagnation
pressure option. There is still a period between 340 and 360 seconds where the free surface
looks like it’s starting to become unstable because it’s splashing a lot, but it recovers.
Of six tested cases, three seemed to fix the problem: moving the boundary downstream, reducing the F-
packing coefficient, and changing the downstream boundary pressure type to stagnation. All three
solutions produce flow rates that agree with ±0.03 m3/s, so the working fixes are essentially identical.
They agree so closely because the free surface stability at the jump doesn’t affect the flow rate at the
crest unless it becomes so unstable that it destroys the hydraulic separation (supercritical flow) and
critical control point at the crest. Any fix that keeps the downstream surface even partially stable some
of the time will solve the flow rate error.
The F-Packing fix looks like the least stable option. It is a numerical “knob” that may affect other
elements of the solution in hard-to-predict ways. By comparison the stagnation pressure fix is safer
because its effects are better understood: it will change the location of the jump. Moving the boundary
downstream not only makes the jump more accurate, but it makes the model more stable. It is the ideal
solution. In future runs, you decide to move the X-max boundary farther downstream to a region of uni-
directional steady flow.
CONCLUSIONS
The results of the three runs indicate that the 1-m cells are probably sufficient for accuracy (±0.9 to 1.7
m3/s). The 0.5-m cells increase the accuracy a little (±0.5 to 1.4 m3/s), but not enough to warrant the
extra runtime. Results are shown in Figure 3 and Table 3 below.
Page 9 of 11
Hydraulics Training on FLOW-3D Version 10.1
Exercise A3: Simple Ogee Refinement & Troubleshooting
Congratulations on completing running and troubleshooting the test case! In the next tutorial, you’ll
calculate the parameters you’ll need to include in your report section on the test case.
Page 10 of 11
Hydraulics Training on FLOW-3D Version 10.1
Exercise A3: Simple Ogee Refinement & Troubleshooting
REFERENCES
Burnham, J. (2011). Modeling Dams with Computational Fluid Dynamics. Dam Safety 2011, National
Harbor, MD, September 25 – 29, 2011. Paper online at http://www.flow3d.com/resources/technical-
papers/water-and-environmental.html. Accessed 03/21/2014. PowerPoint presentation and data
interpretation included in FLOW-3D water & environmental introductory classes.
Flow Science (2013). FLOW-3D v10.1 User Manual. Flow Science, Inc. Santa Fe, NM.
Hirsch, C. (2007). Numerical Computation of Internal and External Flows Volume 1, 2nd Ed. Butterworth-
Heinemann, Burlington, MA.
USBR (1987). Design of Small Dams, 3rd Ed. U.S. Department of the Interior, Bureau of Reclamation.
Washington, DC. Online at http://www.usbr.gov/pmts/hydraulics_lab/pubs/manuals/SmallDams.pdf.
Accessed 03/21/2014.
USBR (2001). Water Measurement Manual, 3rd Ed., Revised Reprinting. U.S. Department of the Interior,
Bureau of Reclamation. Washington, DC. Online at
http://www.usbr.gov/pmts/hydraulics_lab/pubs/manuals/WMM_3rd_2001.pdf. Accessed 03/21/2014.
Page 11 of 11