This commit is contained in:
jverzani
2023-03-28 11:02:18 -04:00
parent 377c9f0238
commit ed5434bb1c
13 changed files with 187 additions and 32 deletions

View File

@@ -111,6 +111,54 @@ a = v0 * cosd(theta)
By defining a new variable `a` to represent a value that is repeated a few times in the expression, the last command is greatly simplified. Doing so makes it much easier to check for accuracy against the expression to compute.
##### Example
A [grass swale](https://stormwater.pca.state.mn.us/index.php?title=Design_criteria_for_dry_swale_(grass_swale)) is a design to manage surface water flow resulting from a storm. Swales detain, filter, and infiltrate runoff limiting erosion in the process.
![Swale cross section](precalc/swale.png)
There are a few mathematical formula that describe the characteristics of swale:
The area is given by:
$$
A = (b + d/\tan(\theta)) d
$$
The *wetted* perimeter is given by
$$
P = b + 2 d/\sin(\theta)
$$
The *hydraulic radius* is given by
$$
R = \frac{b\cdot d \sin(\theta) + d^2 \cos(\theta)}{b\sin(\theta) + 2d}.
$$
Finally, the *flow quantity* is given by *Manning's* formula:
$$
Q = vA = \frac{R^{2/3} S^{1/2}}{n}, \quad R = \frac{A}{P}.
$$
With $n$ being Manning's coefficient, $v$ the velocity in feet per second, and $S$ being the slope. Velocity and slope are correlated.
Manning's coefficient depends on the height of the vegetation in the grass swale. It is $0.025$ when the depth of flow is similar to the vegetation height.
Given all this, compute the flow quantity when $S = 2/90$, $n=0.025$ and $v=1/10$ for a swale with characteristics $b=1$, $\theta=\pi/4$, $d=1$.
```{julia}
b, theta, d = 1, pi/4, 1
n, S = 0.025, 2/90
A = (b + d/tan(theta)) * d
P = b + 2d/sin(theta)
R = A / P
Q = R^(2/3) * S^(1/2) / n
```
##### Example