From b74ae4496748af8f46d6d5850e9fd2a2744d4201 Mon Sep 17 00:00:00 2001 From: Fang Liu <46347645+fangliu-tju@users.noreply.github.com> Date: Wed, 29 Mar 2023 08:57:54 +0000 Subject: [PATCH] Update variables.qmd Some typos and as Manning's formula, in SI units k=1, 1.49 for English units. --- quarto/precalc/variables.qmd | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/quarto/precalc/variables.qmd b/quarto/precalc/variables.qmd index 1aa29f7..d3cd914 100644 --- a/quarto/precalc/variables.qmd +++ b/quarto/precalc/variables.qmd @@ -63,7 +63,7 @@ The `Pluto` interface for `Julia` is idiosyncratic, as variables are *reactive*. ::: -`Julia` is referred to as a "dynamic language" which means (in most cases) that a variable can be reassigned with a value of a different type, as we did with `x` where first it was assigned to a floating point value then to an integer value. (Though we meet some cases - generic functions - where `Julia` balks at reassigning a variable if the type if different.) +`Julia` is referred to as a "dynamic language" which means (in most cases) that a variable can be reassigned with a value of a different type, as we did with `x` where first it was assigned to a floating point value then to an integer value. (Though we meet some cases - generic functions - where `Julia` balks at reassigning a variable if the type is different.) More importantly than displaying a value, is the use of variables to build up more complicated expressions. For example, to compute @@ -115,7 +115,7 @@ By defining a new variable `a` to represent a value that is repeated a few times 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) +![Swale cross section](precalc/figures/swale.png) There are a few mathematical formula that describe the characteristics of swale: @@ -140,14 +140,14 @@ $$ 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}. +Q = vA = \frac{R^{2/3} S^{1/2}}{n} A, \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. +With $n$ being Manning's coefficient, $v$ the velocity in meters 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$. +Given all this, compute the flow quantity when $S = 2/90$ and $n=0.025$ for a swale with characteristics $b=1$, $\theta=\pi/4$, $d=1$. ```{julia} b, theta, d = 1, pi/4, 1 @@ -155,7 +155,7 @@ 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 +Q = R^(2/3) * S^(1/2) * A / n ``` @@ -287,7 +287,7 @@ There is even support for tab-completion of [emojis](https://github.com/JuliaLan ##### Example -As mentioned the value of $e$ is bound to the Unicode value `\euler[tab]` and not the letter `e`, so Unicode entry is required to access this constant This isn't quite true. The `MathConstants` module defines `e`, as well as a few other values accessed via Unicode. When the `CalculusWithJulia` package is loaded, as will often be done in these notes, a value of `exp(1)` is assigned to `e`. +As mentioned the value of $e$ is bound to the Unicode value `\euler[tab]` and not the letter `e`, so Unicode entry is required to access this constant. This isn't quite true. The `MathConstants` module defines `e`, as well as a few other values accessed via Unicode. When the `CalculusWithJulia` package is loaded, as will often be done in these notes, a value of `exp(1)` is assigned to `e`. ## Tuple assignment