Você está na página 1de 13

Pore-Scale Modeling of Subsurface Flow

ErSE 390F Homework Set #2

Wardana Saputra - 146629

Problem 1
We first consider the steady-state incompressible Navier-Stokes laminar flow within a circular
pipe (Hagen-Poiseuille flow). Please provide a detailed derivation to reach the closed-form ve-
locity and pressure solution of this Hagen-Poiseuille flow. We then consider the steady-state
incompressible NavierStokes laminar flow within an annulus (i.e., space between two concentric
cylinders). Please derive its closed-form velocity and pressure solution with full details.

Solution:

Hagen-Poiseuille flow for a circular pipe


We consider steady-state incompressible Navier-Stokes flow within a circular pipe. We use a
cylindrical coordinate system, and the pipe aligns with the z.

Assumptions:

Incompressible fluid: is constant; steady-state flow: ui and p time-independent; no


gravity: gi = 0.
No-slip boundary condition: v = 0 when r = R.
Consider flow in z only: vr = 0, v = 0.
vz
Symmetry: = 0.

Continuity equation in a cylindrical coordinate system:


1 1 v vz
v = (rvr ) + + = 0,
r r r z
Since the flow is in z only: vr = 0, v = 0 thus:
vz
v = = 0 = vz = vz (r, z) = vz (r).
z
Navier-Stokes equations for steady-state incompressible fluid without gravity:

v v = p + 2 v.

1
For r direction:
! !
vr v vr vr v2 p 1 vr 1 2 vr 2 vr vr 2 v
 
vr + + vz = + r + 2 + 2 2
r r z r r r r r r 2 z 2 r r
Substitute vr = 0, v = 0:
p
0= = p = p(r, , z) = p(, z).
r
For direction:
!
v v v v vr v 1 p 1 v 1 2 v 2 v v 2 vr
   
vr + + vz = + r + 2 2
+ 2
2 2
r r z r r r r r r z r r

Substitute vr = 0, v = 0:
1 p
0= = p = p(, z) = p(z).
r
For z direction:
!
vz v vz vz p 1 vz 1 2 vz 2 vz
   
vr + + vz = + r + 2 +
r r z z r r r r 2 z 2
Substitute vr = 0, v = 0, and vz = vz (r) from continuity eq.:
p 1 vz p vz
    
0= + r = = r = C1 .
z r r r z r r r
Take integral over z to find p:
p
Z Z
dz = C1 dz = p = C1 z + C2
z
B.C.:
z = 0, p = p1 = C2 = p2
z = l, p = p2 = C1 = p/l where: p p1 p2
p
p = p2 + z
l
Substitute C1 and take integral over r to find vz :
vz p
 
r =
r r r l
vz p vz p 2
Z   Z
r dr = r dr = r = r + C3
r r l r 2l
vz p C3 p 2
Z Z
dr = r+ dr = vz = r + C3 ln r + C4 .
r 2l r 4l
B.C.:
r = 0, |vz | = + = C3 = 0
r = R, vz = 0 = C4 = (p/4l)R2
Finally, we conclude: !
p R2 r 2
 
vz =
l 4
The average velocity
RR
vz (r)2rdr pR4 /(8l) p R2
 
0
vz = RR = 2
=
0 2rdr R l 8

2
Hagen-Poiseuille flow between two concentric cylinders (through annulus)
Again, we apply the same assumptions for the steady-state incompressible Navier-Stokes flow
in cylindrical coordinate system. The only different is the boundary conditions, now we have
two non-slip boundary conditions for r.

Following the same steps, we end up with:


p vz
 
= r = C1 .
z r r r
Take integral over z to find p:
p
Z Z
dz = C1 dz = p = C1 z + C2
z
B.C.:
z = 0, p = p1 = C2 = p2
z = l, p = p2 = C1 = p/l where: p p1 p2

p
p = p2 + z
l
Substitute C1 and take integral over r to find vz :
vz p
 
r =
r r r l
vz p vz p 2
Z   Z
r dr = r dr = r = r + C3
r r l r 2l

vz p C3 p 2
Z Z
dr = r+ dr = vz = r + C3 ln r + C4 .
r 2l r 4l
B.C.:
r = Ri , vz = 0
p 2
0= R + C3 ln Ri + C4 .
4l i
r = Ro , vz = 0
p 2
0= R + C3 ln Ro + C4 .
4l o
Solve both equations to obtain C3 and C4 :
p 2 Ro
 
0= (Ro Ri2 ) + C3 ln ,
4l Ri

p(Ro2 Ri2 )
C3 = ,
4l ln (Ro /Ri )

3
!
p (R2 Ri2 ) ln Ro
C4 = Ro2 o .
4L ln (Ro /Ri )
We conclude: !
p (Ro2 Ri2 ) (R2 Ri2 ) ln Ro
vz = 2
r ln r Ro2 + o ,
4l ln (Ro /Ri ) ln (Ro /Ri )
!
pRo2 r2 (Ro2 Ri2 )
vz = 1 + 2 ln (r/Ro ) .
4l Ro ln (Ro /Ri )
The average velocity
 4 
pRo4 (1(Ri /Ro )2 )2

Ri
R Ro
vz (r)2rdr 8l 1 + Ro + ln (Ro /Ri )
Ri
vz = = .
(Ro2 Ri2 )
R Ro
Ri 2rdr

Problem 2
Please provide a detailed derivation for the Kozeny-Carman formula using the Hagen-Poiseuille
solution for laminar flow within a circular pipe. Please extend your Kozeny-Carman formula
using the laminar flow solution within an annulus; please provide all derivation steps.

Solution:

Kozeny-Carman formula for a circular pipe


We define a pore space made of N identical parallel round pipes with radius R embedded in a
solid block with length L at an angle to its horizontal face.
The total volume flux trough one single pipe according to Hagen-Poiseuille is:
p(R2 r2 ) pR4
Z R Z R
q= vz (r)2rdr = 2rdr = .
0 0 4l 8l
The total flux through N pipes is:
pR4
Q = N q = N .
8l
Introduce tortuosity , by definition l = L :
pR4
Q = N .
8L
Define porosity as the ratio between volume of pores to total volume:
N R2 l N R2
= = .
AL A
Substitute , we obtain:
Q R2 p
= .
A 8 2 L
This form is similar to Darcys law
Q k p
uDarcy = = .
A L
Finally we conclude the permeability as:
R2
k= .
8 2

4
Kozeny-Carman formula between two concentric cylinders (through annulus)
We define a pore space made of N identical parallel two concentric cylinder with outer radius
Ro and inner radius Ri embedded in a solid block with length L at an angle to its horizontal
face.
The total volume flux trough two concentric cylinders according to Hagen-Poiseuille is:
4 !
pRo4 (1 (Ri /Ro )2 )2 pRo4
Z Ro
Ri

q= vz (r)2rdr = 1 + + = f (Ri /Ro ).
Ri 8l Ro ln (Ro /Ri ) 8l

The total flux through N pipes is:


pRo4
Q = N q = N f (Ri /Ro ).
8l
Introduce tortuosity , by definition l = L :
pRo4
Q = N f (Ri /Ro ).
8L
Define porosity as the ratio between volume of pores to total volume:
N (Ro2 Ri2 )l N (Ro2 Ri2 )
= = .
AL A
Substitute , we obtain:
!
Q Ro2 p
= f (Ri /Ro ) .
A 8 2 1 (Ri /Ro )2 )) L

This form is similar to Darcys law


Q k p
uDarcy = = .
A L
Finally we conclude the permeability as:
!
Ro2
k= 2 f (Ri /Ro ),
8 1 (Ri /Ro )2 )
where 4
Ri (1 (Ri /Ro )2 )2

f (Ri /Ro ) = 1 + +
Ro ln (Ro /Ri )

Problem 3
Consider a 2D sample rock of size Lx Ly with its pore structure given by the void indi-
cator function : (0, Lx ) (0, Ly ) {0, 1}. For numerical computation, we discretize the
domain (0, Lx ) (0, Ly ) using the m n uniform rectangular mesh. With this discretization,
the indicator function becomes {0, 1}mn . Given Lx , Ly , and h , please write down the
detailed computational procedure to compute the effective permeability Kh of the sample rock,
using the staggered-grid finite-difference method for the Stokes equation with no-slip bound-
ary conditions (on the solid-fluid interface) and periodic boundary conditions (on the domain
boundary occupied by fluid). Please state the computational procedure using the vector-matrix
notation (similar to Problem 2 in your homework set #1). Finally prove the computed effec-
tive permeability Kh is indeed symmetric and positive definite using the vector-matrix notation.

Solution:

5
Calculating the effective permeability of rock samples
The effective permeability Kh of the sample rock is defined as:
Z 
2 (1) (2) (3)
Kh :=  (uh , uh , uh )dy .

(j) (j)
where uh , h is the solution of:
(j) (j)
Stokes equation: h uh = h h e(j) , x .
(j)
The continuity equation: h uh = 0, x .
(j)
No slip B.C.: uh = 0 and periodic B.C., x .

In 2D, the effective permeability Kh is reduced to:


(1) (2)
!
ux ux
Z
2
Kh =  (1) (2) dy.
uy uy

We decide u(1) and u(2) corresponds to the source term [1,0] and [0,1] respectively.
Using the matrix-vector notation, the SGFD algorithm stokes reads:

Dcx (Dxc vec(ux )) + Dcy (Dyc vec(ux )) Dxc vec(ph ) = vec(gxh ),

Dcx (Dxc vec(uy )) + Dcy (Dyc vec(uy )) Dyc vec(ph ) = vec(gyh ),


Dcx vec(ux ) + Dcy vec(uy ) = 0.

Note that we dismiss fluid viscosity and density from the formulation since permeability
depends on the rock properties only. In this formulation, we set the body force of source
term [1,0] as gx = 1, gy = 0 and source term [0,1] as gx = 0, gy = 1.

We define:
T T
h = Dcx Dcx + Dcy Dcy ,
1
Dcx = (Imnmn Inn Sm ),
hx
1
Dcy = (Imnmn Sn Imm ,
hy
and R is the restriction matrix representing the location of the solid phase for non-slip
boundary conditions.

The matrix-vector notation of SGFD algorithm stokes can be written as the following
matrix form:

h 0 T
Dcx uR vec(gxh )
x
T R
R 0 T
h Dcy R uy = R vec(gyh ) .

Dcx Dcy 0 pR
h 0

Since the matrix in LHS is singular, we need to add the absolute value of one of the
element of the last column to the last diagonal zero entry.
(1) (2) (1) (2)
Finally, we solve the SGFD algorithm stokes to obtain ux , ux , uy , and uy .

6
The next step is calculating the permeability tensor K from a given rock sizes Lx Ly
with discretization m n:
m P
n (1) m P
n (2)

1 1
ux,i,j L2y ux,i,j L2y
P P
(1) (2)
!
Z
ux ux mn mn
i=1 j=1 i=1 j=1
Kh = 2

(1) (2) dy m P n m P n
.
uy uy 1 (1) 1 (2)
uy,i,j L2x uy,i,j L2x
P P

mn mn
i=1 j=1 i=1 j=1

Because the permeability tensor is symmetric, the permeability tensor can always be
converted to a diagonal matrix (by a rotation of the coordinate system). We can invoke
the spectral theorem of linear algebra to diagonalize the permeability matrix K = {Kij }:

K = SKD S 1 = SDS T ,

where KD is the eigenvalue matrix defined by


!
Kxx 0
KD = .
0 Kyy

The principal components (the diagonal elements in KD ) can also be determined from
the characteristic (eigenvalue) equation:

det(Kij (k) ij ) = 0, k = 1, 2.

The corresponding eigenvectors designate the direction (principal direction) associated


with each of the principal components of permeability:
(k)
(Kij (k) ij )ni = 0.

Proof that the effective permeability Kh is symmetric


Given a vector f = (f1 , f2 , f3 ) R3 , we consider the following problem with unknowns
(f ) (f )
(uh , h ):
(f ) (f )
The Stokes equation: h uh = h h f , x .
(f )
The continuity equation: h uh = 0, x .
(f )
B.C.: uh = 0 and periodic B.C., x .

Due to the linearity of the problem, we have


3
(f ) X (j) (1) (2) (3)
uh = fj uh = (uh , uh , uh )f .
j=1

The (superficial) average of u is:


3
(f ) (f ) X (j) 1
h = huh i =
u h =
fj u Kh f .
j=1
2

Similarly, given a vector g = (g1 , g2 , g3 ) R3 , we consider the following problem with


(g) (g)
unknowns (uh , h ):
(g) (g)
The Stokes equation: h uh = h h g, x .

7
(g)
The continuity equation: h uh = 0, x .
(g)
B.C.: uh = 0 and periodic B.C., x .

Due to the linearity of the problem, we also have


3
(g) X (j) (1) (2) (3)
uh = gj uh = (uh , uh , uh )g.
j=1

Similarly, the (superficial) average of uu is:


3
(g) (g) X (j) 1
h = huh i =
u h =
gj u Kh g.
j=1
2

(g) (f )
We now multiply uh to the Stokes equation for uh to obtain
(f ) (g) (f ) (g) (g)
(h uh , uh ) = (h h , uh ) (f , uh ).

(f ) (g)
Similarly, we multiply uh to the equation for uh to obtain
(g) (f ) (g) (f ) (f )
(h uh , uh ) = (h h , uh ) (g, uh ).

We first apply the summation by parts formula, and then use the no-slip and the periodic
boundary conditions to show
(f ) (g) (f ) (g) (g) (f )
(h uh , uh ) = (h uh , h uh ) = (h uh , uh )

Applying the summation by parts formula and the discretized continuity equation, and
(f ) (g) (g) (f )
using the no-slip and the periodic BC, one can show (h h , uh ) = 0 = (h h , uh )

We thus have
(g) (f )
(f , uh ) = (g, uh ),
which holds for any given vectors f R3 and g R3 .

Since f and g are constant vectors, we have


(g) (g) (g) (f ) (f ) (f )
h = f T u
(f , uh ) = f u h , h = gT u
(g, uh ) = g u h .

(f ) 1 (g) 1
Finally, we recal u
h = K f
2 h
h =
and u K g
2 h
to conclude

f T Kh g = gT Kh f ,

which implies the symmetry of the permeability Kh .

Proof that the effective permeability Kh is positive definite


Given a vector f = (f1 , f2 , f3 ) R3 , we consider the following problem with unknowns
(f ) (f )
(uh , h ):
(f ) (f )
The Stokes equation: h uh = h h f , x .
(f )
The continuity equation: h uh = 0, x .

8
(f )
B.C.: uh = 0 and periodic B.C., x .

Due to the linearity of the problem, we have


3
(f ) X (j) (1) (2) (3)
uh = fj uh = (uh , uh , uh )f .
j=1

The (superficial) average of u is:


3
(f ) (f ) X (j) 1
h = huh i =
u h =
fj u Kh f .
j=1
2

(f ) (f )
We now multiply uh to the Stokes equation for uh to obtain
(f ) (f ) (f ) (f ) (f )
(h uh , uh ) = (h h , uh ) (f , uh ).

(f ) (f )
We first apply the summation by parts formula with the BCs to show (h uh , uh ) =
(f ) (f )
(h uh , h uh ).

Applying the summation by parts formula, the continuity equation, and the BCs, one
(f ) (f )
can show (h h , uh ) = 0.
(f ) (f ) (f ) 1
Since f is a constant vector, we have (f , uh ) = f T u
h . We recall u
h = K f
2 h
to conclude
3
that for any f R
(f ) (f ) (f ) (f )
h = 2 (f , uh ) = 2 (h uh , h uh ) 0,
f T Kh f = 2 f T u

which implies the positive definite of the effective permeability tensor Kh .

Problem 4
Consider a 2D sample rock of size Lx Ly = 0.1mm 0.1mm discretized using the 100 100
uniform rectangular mesh. The pore structure is given by the void indicator function h
{0, 1}100100 . Please design a code to compute the effective permeability of the rock sample for
the following five scenarios as shown in Figure 1. For each scenario, if the computed effective
permeability is not isotropic, please compute also its principal components (kmax and kmin )
and principal directions, as well as the permeability anisotropy (defined as the anisotropic ratio
= kmax /kmin ). Please feel free to re-use your code in your homework set #1, or to write your
new code in either MATLAB or R. You may use the MATLAB (or R) built-in functions on
eigenvalue decomposition. You need attach your complete code for submission.

Figure 1: The five scenarios of pore structure considered in Problem 4

Solution:
Matlab codes:

9
% HW#2 Wardana Saputra
% calculating permeability of given rocks
function result=main()
Lx=1.0e-4; Ly=1.0e-4; % Sample size Lx Ly=0.1mm 0.1mm
m=100; n=100; % 100x100 uniform rectangular mesh

for i=1:5
isSolid=LoadScenarios(i);
[ux1,uy1,p1]=solveNavierStokes(isSolid,m,n,1,0);
[ux2,uy2,p2]=solveNavierStokes(isSolid,m,n,0,1);
result(i) =calculatePermeability(ux1,ux2,uy1,uy2,Lx,Ly)
subplot(4,5,i); imageplot(p1)
subplot(4,5,i+5); quiverplot(ux1,uy1,m,n)
subplot(4,5,i+10); imageplot(p2)
subplot(4,5,i+15); quiverplot(ux2,uy2,m,n)
end
end

function result=calculatePermeability(ux1,ux2,uy1,uy2,Lx,Ly)
% calculate the permeability tensor in m2
result.K=[mean(ux1(:))*Ly2 mean(ux2(:))*Ly2;...
mean(uy1(:))*Lx2 mean(uy2(:))*Lx2];
% calculate eigen vector V and eigen value D
[V,D]=eigs(result.K);
% obtain the principal permeability
result.kmax=max(diag(D));
result.kmin=min(diag(D));
% calculate principal directions
result.angle=acos(V(1,2))/pi*180;
% calculate permeability anisotropy
result.anisotropy=result.kmax/result.kmin;
end

function [ux,uy,p]=solveNavierStokes(isSolid,m,n,gx,gy)
hx=1/m;hy=1/n;
% shifting matrix Dcx and Dcy
Dcx=(speye(m*n)-kron(speye(n),circshift(speye(m),[1,0])))/hx;
Dcy=(speye(m*n)-kron(circshift(speye(n),[1,0]),speye(m)))/hy;
% discrete Laplacian Dsq (without mu)
Dsq=(Dcx*Dcx'+Dcy*Dcy'); O=sparse(m*n,m*n);
% matrix A (LHS)
A=[Dsq,O,-Dcx';O,Dsq,-Dcy';-Dcx,-Dcy,O];
A(end,end)=A(end,end)+max(abs(A(end,:)));
% vector of body force b (without rho)
b=[gx*ones(m*n,1);gy*ones(m*n,1);sparse(m*n,1)];
% constructing the restriction matrix R
isUx0=isSolid | circshift(isSolid,[-1 0]);
isUy0=isSolid | circshift(isSolid,[0 -1]);
Rp=speye(m*n); Rp(isSolid(:),:)=[];
Rx=speye(m*n); Rx(isUx0(:),:)=[];
Ry=speye(m*n); Ry(isUy0(:),:)=[];
R=blkdiag(Rx,Ry,Rp);
% solving the system using inverse problem
x=R'*((R*A*R')\(R*b));
% reshaping back to 2D
ux=reshape(x(1:m*n),[m n]);
uy=reshape(x(m*n+1:2*m*n),[m n]);
p =reshape(x(2*m*n+1:end),[m n]);
end

function imageplot(A)
imagesc(rot90(A));
set(gca,'DataAspectRatio',[1 1 1]); axis off

10
end

function quiverplot(ux,uy,m,n)
r=5; x=1:r:m; y=1:r:n;
[X,Y]=meshgrid(x,y);
quiver(X,Y,transpose(ux(1:r:m,1:r:n)),transpose(uy(1:r:m,1:r:n)));
set(gca,'DataAspectRatio',[1 1 1]); axis off
xlim([0 100]); ylim([0 100])
end

function isSolid=LoadScenarios(i)
isSolid=false(100,100);
switch i
case 1 % vertical lines
isSolid(11:20,21:100)=1;
isSolid(31:40,1:80)=1;
isSolid(51:60,21:100)=1;
isSolid(71:80,1:80)=1;
case 2 % diagonal north-east
isSolid(11:20,81:90)=1;
isSolid(21:30,71:80)=1;
isSolid(31:40,61:70)=1;
isSolid(41:50,51:60)=1;
isSolid(51:60,41:50)=1;
isSolid(61:70,31:40)=1;
isSolid(71:80,21:30)=1;
isSolid(81:90,11:20)=1;
case 3 % 'E' letter
isSolid(21:70,71:80)=1;
isSolid(21:70,41:50)=1;
isSolid(21:70,11:20)=1;
isSolid(21:30,11:80)=1;
case 4 % 'K' letter
isSolid(21:30,11:90)=1;
isSolid(71:80,11:20)=1;
isSolid(61:70,21:30)=1;
isSolid(51:60,31:40)=1;
isSolid(41:50,41:50)=1;
isSolid(31:40,51:60)=1;
isSolid(41:50,61:70)=1;
isSolid(51:60,71:80)=1;
isSolid(61:70,81:90)=1;
case 5 % 'S' letter
isSolid(21:80,11:20)=1;
isSolid(21:80,51:60)=1;
isSolid(21:80,81:90)=1;
isSolid(21:30,21:30)=1;
isSolid(71:80,21:60)=1;
isSolid(21:30,61:90)=1;
isSolid(71:80,71:80)=1;
end
end

Figure 2 shows the result of pressure and velocity distribution of five scenarios for different
principal direction: gx = 1, gy = 0 and gx = 0, gy = 1. It is obvious if we have solids, the
flow is blocked resulted in higher pressure at inlet and lower pressure at outlet. The calculated
permeability, and the corresponding principal direction and anisotropic ratio of each scenario
are shown in Table 1. As we can see, scenario 1 has the maximum anistropic ratio since the
vertical permeability is much higher than the horizontal permeability.

11
1 (a)

1 (b)

2 (a)

2 (b)

Figure 2: Navier-stokes solution of five scenarios in figure 1: 1 (a) pressure distribution for
gx = 1, gy = 0; 1 (b) velocity quiver plot for gx = 1, gy = 0; 2 (a) pressure distribution for
gx = 0, gy = 1; 2 (b) velocity quiver plot for gx = 0, gy = 1.

12
Table 1: Simulation results from the five scenarios: permeability tensor K, principal permeabil-
ity kmax and kmin , principal direction from x-axis , and anisotropic ratio .
scenario permeability tensor kmax kmin angle anisotropy
" #
2.677e-12 -1.352e-13
1 K= 3.034e-11 2.676e-12 89.72 11.33
-1.352e-13 3.034e-11
" #
1.539e-10 -1.179e-10
2 K= 2.719e-10 3.593e-11 45 7.57
-1.179e-10 1.539e-10
" #
3.433e-11 1.864e-27
3 K= 1.238e-10 3.433e-11 90 3.61
8.868e-28 1.238e-10
" #
1.588e-11 -2.121e-12
4 K= 9.424e-11 1.582e-11 88.44 5.96
-2.121e-12 9.418e-11
" #
1.0163e-11 1.975e-14
5 K= 6.146e-11 1.016e-11 90.02 6.05
1.975e-14 6.146e-11

13

Você também pode gostar