This preview shows pages 1–2. Sign up to view the full content.
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. Darcys 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 10-7 , =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
This note was uploaded on 04/21/2010 for the course PGE 310 taught by Professor Klaus during the Spring '06 term at University of Texas at Austin.
- Spring '06