Question: Please answer in python code. 4. For the Gas well problem, your tasks are: a. Can you identify the method used inside the zfact.py function?

Please answer in python code. 4. For the Gas well problem, yourtasks are: a. Can you identify the method used inside the zfact.py

Please answer in python code.

4. For the Gas well problem, your tasks are: a. Can you identify the method used inside the zfact.py function? Comment on the method and its usage b. Write a Python functions for dp/dy=f(p,y) and T=f(y). The T=f(y) is the gas temperature as a function of depth (y). You may use the provided zfact function without modification (note units). c. Confirm dimensional homogeneity of units in each equation. d. Consider gas temperature to vary linearly as a function of depth between the surface and bottomhole temperatures, Tts and Tws. Provide a plot (with equation) for gas temperature versus depth. e. Confirm convergence and stability by showing that the pressure versus depth function converges as y is reduced. Show results for at least 4 values of y. f. Confirm convergence and stability by showing the absolute approximate error in bottomhole pressure as a function of y. Show results for at least 4 values of y. g. Choose your smallest y so that you are confident that you have calculated the bottomhole pressure with less than \pm 1.0 psia of approximation error (for the assumptions described). Provide a brief explanation of the reasons for your confidence. h. Use the Python built in function called solve_ivp to compare with your results

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Chemical Engineering Questions!