edit: the reference I got my equations from contained a couple of errors. I've fixed it here. Solutions might actually make sense now!
When a two layer fluid flows over topography, there exist a number of different solutions depending on the relative size of the flow speed and the wave speed in the fluid.
These are termed 'supercritical', 'subcritical' and 'critical' (the first two I refer to here as 'extra-critical').
The following equations define the bounding lines between critical and extra-critical behaviour in (h, U0) parameter space:
I want to eliminate d_1c
(i.e. I don't care what it is) and find
solutions to these equations in (h, U_0)
.
Simplifying factors:
- I only need answers for given
d_0
- I do not need exact solutions, just an outline of the solution curves, so this can be solved either analytically or numerically.
- I only want to plot over the region (h, U0) = (0,0) to (0.5, 1).
I'd like to solve this using modules available in the Enthought distribuion (numpy, scipy, sympy), but really don't know where to start. It's the elimination of the variable d1c that really confuses me.
Here are the equations in python:
def eq1(h, U0, d1c, d0=0.1):
f = (U0) ** 2 * ((d0 ** 2 / d1c ** 3) + (1 - d0) ** 2 / (1 - d1c - d0) ** 3) - 1
return f
def eq2(h, U0, d1c, d0=0.1):
f = 0.5 * (U0) ** 2 * ((d0 ** 2 / d1c ** 2) - (1 - d0) ** 2 / (1 - d1c - d0) ** 2) + d1c + (h - d_0)
return f
I'm expecting a solution that has a number of solution branches (not always physical, but don't worry about that) and looks roughly like this:
How do I go about implementing this?