Question: please solve using LU decomposition and give me the correct python code: The flow of an incompressible fluid in a porous medium is often modeled

please solve using LU decomposition and give me the correct python code:

The flow of an incompressible fluid in a porous medium is often modeled by Darcys law, which gives the flux J = D(x)P, with J = 0 to enforce incompressibility. The parameter D(x) is a function of position within the porous medium, and is often written as D = k(x)/, where k(x) is the permeability (with units m2) and is the dynamic viscosity of the flowing fluid. Permeability is often measured in units of Darcys, 1D (10^6m)^2, especially in the oil field, although Darcys are not SI units. Often it is convenient to use the milli-Darcy (10^3D) instead. Consider a porous medium with only one dimension of variation, situated between x = 100 m and x = +100 m. The pressure at x = 100m is 1000 psi, and at 100m is 1200 psi. We suppose that the flowing fluid is water, with = 1.05 cP. Divide the medium into 20 regions, each of extent 10 m in the x-direction. The permeability of each of the regions is a random function, with log k equidistributed between log(1mD) and log(1D), with no probability of k occurring outside this range. There is no correlation between the permeabilities of adjacent cells. Choosing multiple realizations of the random permeabiities, build up a histogram of the probability distribution (P) of the pressure in the fluid phase at x = 0. You should choose enough realizations to be confident that you have a representative result for the histogram. Graph your result and comment on its interpretation. Note that your cell size may be smaller than the regions defined above, and possibly much smaller. Be careful with material balance at the boundaries between the regions.

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!