This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
gibson:teaching:spring-2016:math445:lab10 [2016/04/12 06:18] gibson created |
gibson:teaching:spring-2016:math445:lab10 [2016/04/12 06:52] (current) gibson |
||
---|---|---|---|
Line 20: | Line 20: | ||
- | **Problem 3.** Superimpose on your previous plot the path of a raindrop that falls at | + | **Problem 3.** Superimpose on your previous plot the path $\vec{x}(t)$ of a raindrop that falls at |
- | $\vec{x} = (x,y) = (0.9,0.9)$. We're assuming the velocity of the raindrop as it drips down is proportional to the negative of the gradient of the height. That is, $\vec{v} = -c \vec{\nabla} h $, | + | $\vec{x}(0) = (x_0,y_0) = (0.9,0.9)$. We're assuming the velocity of the raindrop as it drips down is proportional to the negative of the gradient of the height. That is, $\vec{v} = -c \vec{\nabla} h $, |
where $\vec{v} = d\vec{x}/dt$ is the $x,y$ velocity of the raindrop. For convenience set $c=1$ (this won't change the path). Then compute the path of the raindrop numerically using //forward Euler time-stepping//, | where $\vec{v} = d\vec{x}/dt$ is the $x,y$ velocity of the raindrop. For convenience set $c=1$ (this won't change the path). Then compute the path of the raindrop numerically using //forward Euler time-stepping//, | ||
\begin{eqnarray*} | \begin{eqnarray*} | ||
- | \vec{x}(t+\Delta t) = \vec{x}(t) + \Delta t \, \vec{v}(\vec{x}) | + | \vec{x}(t+\Delta t) = \vec{x}(t) + \Delta t \, \vec{v}(\vec{x}(t)) |
\end{eqnarray*} | \end{eqnarray*} | ||
+ | |||
+ | The above formula is accurate only if the time step $\Delta t$ is small. The value $\Delta = 0.1$ is small enough for the given system. (You can experiment with larger and smaller time steps if you like.) | ||
+ | |||
{{:gibson:teaching:spring-2015:math445:montesol_path.png?direct&400|}} | {{:gibson:teaching:spring-2015:math445:montesol_path.png?direct&400|}} |