This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: file called max_min.m. (25 points) 2. Darcy’s Law is an expression that relates the velocity of a fluid to pressured gradient in a porous medium. It can be expressed as ( 29 ( 29 2 ` 1 2 1 x x p p k v= μ , or ( 29 2 1 1 2 x x k v p p= . (a) Write a function file called darcy.m that calculates p 2 given x 1 , x 2 , p 1 , k, µ and v. Call your function file in command window, to make sure it works for different inputs. (25 points) (b) We are interested in the pressure values at x=1,4,6,7. We now have the information below: • k=1 x 107 , µ=2, q=2 for every point • at x=1, p=1000 write a script file using the function file created in (a) to calculate the pressure value at x=4,6,7. (hint: pressure at x=6 is determined by pressure at x=4, so you need to calculate pressure at x=4 before you calculate the pressure at x=6. in other words, you need to use a loop to call your function file to complete the calculation at every step. (25 points)...
View
Full Document
 Spring '06
 Klaus
 Calculation, Vector Motors, function file

Click to edit the document details