User Tools

Site Tools


gibson:teaching:spring-2015:math445:lab11

====== Differences ====== This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gibson:teaching:spring-2015:math445:lab11 [2015/04/13 13:07]
gibson
gibson:teaching:spring-2015:math445:lab11 [2015/04/15 19:36] (current)
gibson
Line 20: Line 20:
  
  
-**Problem 3.** Superimpose on your previous plot the path of a raindrop that falls at $(x,y) = (0.9,​0.9)$. +**Problem 3.** Superimpose on your previous plot the path 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 $,  
 +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*} 
 +\vec{x}(t+\Delta t) = \vec{x}(t) + \Delta t \, \vec{v}(\vec{x}) 
 +\end{eqnarray*} 
 {{:​gibson:​teaching:​spring-2015:​math445:​montesol_path.png?​direct&​400|}} {{:​gibson:​teaching:​spring-2015:​math445:​montesol_path.png?​direct&​400|}}
  
-**Problem 4.** Then show the path of the raindrop in 3d, superimposed on the surface plot.+**Problem 4.** Then show the path of the raindrop in 3d, superimposed on the surface plot. You will need to use Matlab'​s ''​plot3''​ function.
  
 {{:​gibson:​teaching:​spring-2015:​math445:​montesol_path3d.png?​direct&​400|}} {{:​gibson:​teaching:​spring-2015:​math445:​montesol_path3d.png?​direct&​400|}}
 +
 +**Problem 5.** Recompute the plot of problem 3 using Matlab'​s ''​ode45''​ numerical integration function instead of forward Euler. ​
 +
 +**Problem 6.** Plot the paths of 100 raindrops that fall randomly on the mountains. Show the hundred raindrop paths on both the contour plot and the 3d surface plot.
gibson/teaching/spring-2015/math445/lab11.1428955623.txt.gz · Last modified: 2015/04/13 13:07 by gibson