Finite Difference Methods

User Generated

YRTNY_8995_1691645949

Programming

Sultan Qaboos University

Description

i help solving this assignment. please answer question 3 using python

Unformatted Attachment Preview

GEOL 575 HW 4 – Finite Difference Methods 1. Derive the finite difference equations to solve the 1-D advection-dispersion equation c  2c c  D 2 v t x x (1) where D is the dispersion coefficient, and v is the average linear flow velocity. Use the explicit (forward) finite difference time-stepping scheme. 2. Note (and explain) the order of the truncation error associated with this method for t and x. 3. Now use your finite difference equations to write a program to solve the equation based on the following information: t=0,0≤x≤L t > 0, x = 0 t > 0, x = L ca = 0.0 mg/L L = 50 m v = 5.0 m/d c = ca c = cb c = ca cb = 100.0 mg/L D = 8.0 m2/d dx = spatial discretization = 1.0 m dt = time step = 0.05 day tmax = time frame = 5.0 days a) Use the analytic solution from last week’s homework to graph the correct answer for 1, 3, and 5 days. b) On the same graph, plot your numerical results for t = 1, 3, and 5 days. Please also turn in printouts of the values of c at 1, 3, and 5 days. (Save paper by writing the numbers out in rows rather than in a long column.) Also print out and turn in the code (the .m file) that you used. c) Increase dt to 0.10 day and rerun your program. What happened? Why? d) Now decrease dt to 0.025. Is the solution better? Why? e) What dt should you use for this problem? (Keep decreasing dt by a factor of two until you are satisfied that the results are good. Determine “goodness” visually (by looking at the graph), to see how your simulation does compared to the analytic solution.
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Related Tags