Lecture Packet 9.Numerical Modeling of Groundwater Flow
1.72, Groundwat er Hydrology Prof. Charles Harvey
Le ct u r e Pa ck e t # 9 : N u m e r ica l M ode lin g of Gr oun dw a t e r Flow
Sim ulat ion: The predict ion of quant it ies of int erest ( dependent variables) based upon an equat ion or series of equat ions t hat describe syst em behavior under a set of assum ed sim plificat ions.
Gr ou n dw a t e r Flow Sim u la t ion
- Predict hydraulic heads ( 1D, 2D, 3D)
- For particular conditions – confined, unconfined, isotropic, anisotropic, hom ogeneous, het erogeneous, infinit e, finit e, st eady, t ransient .
- Varying levels of com plexity: Analyst ic solut ions – Theim , Theis, et c.
Advant ages: exact , sim ple, cheap, can provide sufficient insight Analog sim ulat ion Physical m odels – scale m odels of aquifers Num erical Sim ulat ion
N u m e r ica l Sim u la t ion
- Given a PDE and appropriate I Cs and BCs
- Discretize the system
- Approxim ate the PDE corresponding to the discretization
- Solve the approxim ated PDE on a com puter
- Com m only finite differences or finite elem ents for GW flow
- Advantages: can handle com plex geom etries, I Cs, and C conditions; can be used for nonlinear syst em s.
Be w a r e of t h e t e r m “M ode l” a n d h ow it is u se d
- “ A m odel should be used as sim ple as possible, but not sim pler”
- Mathem atical “ m odel” – a PDE
- Num erical “ m odel” – a particular technique is applied
- Com puter or sim ulation “ m odel” – a code
Fin it e D iffe r e n ce s
A num erical m et hod t hat approxim at es t he governing PDE by replacing t he derivat ives in t he equat ion w it h t heir respect ive difference represent at ions. Procedure involves: Grid ( or Mesh) and Equat ion Grid – a represent at ion of t he physical dom ain t hat enables one t o account for t he boundaries and int ernal feat ures
Equ a t ion – D iffe r e n ce Appr ox im a t ion of D e r iva t ive s
2
2 ∂ h ∂ h S ∂ h
- =
2D flow equat ion
2
2 T
∂ x ∂ y ∂ t
Approxim at ing t he Tim e Derivat ive:
Back w ar d Differ en ce: h − h
⎛ ∂ h ⎞ ∆ h i , j i , j ,n i , j ,n − 1
≈ ≈ ⎜⎜ ⎟⎟ ∆ t ∆ t ⎝ ∂ t ⎠ n t
∆ n
h head h n- 1 ∆ h t n- 1 n ∆ t im e End of t t w here, t im e st ep n = t he current t im e st ep index
∆ t = tim e step i,j = x and y coordinat e indices Approxim at ing t he Space Derivat ives: Consider a 2D discret izat ion, if w e assum e t hat t he grid spacing in t he x- direct ion and y- direct ion are t he sam e, our discret ized grid for an int ernal node w ill be: h i,j + 1 h i,j h h i+ 1,j i- 1,j
i- 1/ 2 i+ 1/ 2
y
h i,j - 1 ∆ y
x
∆ x
I n t h e x - dir ect ion
: Approxim at e derivat ive at locat ion h : i,j 2
⎛ ∂ h ⎞ 2 ⎜⎜ ⎟⎟ x
∂ ⎝ ⎠
Approxim at e t he se con d spat ial derivat ive at i,j as follow s:
h h ∂ ∂
⎛ i 1 / ,
2 j i 1 / , 2 j ⎞ − + −
2 ⎜⎜ ⎟⎟ ∂ x ∂ x
⎛ h ⎞ h ∂ ∂ ∂ ⎛ ⎞ ⎝ ⎠
= ≈ ⎜ ⎟
2 ⎜⎜ ⎟⎟ x ∂ x ∂ x ∆ x
∂ ⎝ ⎠ ⎝ ⎠
We can approxim at e t he fir st spat ial derivat ive at i- 1/ 2,j and i+ 1/ 2,j as follows:
∂ h h − h ∂ h h − h ⎛ i / , j ⎞ ⎛ 1 2 i, j i , 1 j ⎞ ⎛ i 1 / , 2 j ⎞ ⎛ i , 1 j i, j ⎞ − − + + and
≈ ≈ ⎜⎜ ⎟⎟ ⎜⎜ ⎟⎟ ⎜⎜ ⎟⎟ ⎜⎜ ⎟⎟ ∂ x ∆ x ∂ x ∆ x ⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠
Subst it ut e t he above equat ions t o obt ain:
h − h h − h ⎛ ⎞ i , 1 j i , j i , j i , − 1 j
- 2
− ⎜⎜ ⎟⎟ ⎛ ⎞ ∂ h ∆ x ∆ x i , j ⎝ ⎠
⎜ ⎟
or 2 ≈ ⎜ ⎟
∂ x ∆ x ⎝ ⎠ 2 ⎛ ⎞
2 ∂ + h h − h h i , j i , 1 j i , j i 1 j
− + , ⎜ ⎟ 2 ≈ 2 ⎜ ⎟
∂ x ∆ x ⎝ ⎠
I n t he y- direct ion: 2
⎛ ⎞
2 ∂ + h h − h h i, j i , j − 1 i , j i , j 1
⎜ ⎟
- 2
≈ 2 ⎜ ⎟ ∂ y ∆ y ⎝ ⎠
Com bining Flow Equat ion Term s:
2
2 ∂ h ∂ h ∂ h ⎛ ⎞
- i j , i j , S i j ,
=
2
2 ⎜⎜ ⎟⎟ x y T t
∂ ∂ ∂ ⎝ ⎠ η t ∆
For t he backwards difference t im e derivat ive ( not e: all left hand side values of h are for t im e = n- 1) Linear diff. eq’n. This eq’n is
− 2 h + h − 2 h + h −
h h h i − , 1 j i j , i + , 1 j i j , − 1 i j , i j , +1 S h i j , , n i j , , n −
1
= + 2 2 not explicit for h at any ∆ x ∆ y T ∆ t
part icular t im e I f ∆ x and ∆ y are equal – this is the finite difference groundwater flow equation
i 1 j i 1 j i , j i , j i , j i , j , n i , j , n + + + h h h h − 4 h − h − , + , − 1 + 1 S h − 1 2 = ∆ x T ∆ t
What does t he finit e- difference equat ion indicat e for st eady st at e condit ions?
h − h ⎛ ⎞ ∂ h i , j , n i , j , n − 1
S ≈ S ⎜⎜ ⎟⎟ = 0 ∂ t ∆ t ⎝ ⎠ i 1 j i 1 j i , j i , j i , j + + + h h h h − 4 h
− , + , − 1 + 1 2 = 0 ∆ x h + h + h + h − 4 h = 0 i − , 1 j i + , 1 j i , j − 1 i , j + 1 i , j i 1 j i 1 j i , j i , j + + + h h h h
− , + , − 1 + 1 = h i , j
4
h i,j + 1
10
65 100 h i,j h i+ 1,j h i- 1,j
11
10
9 h i,j - 1
10 Flow Value of head at node is t he average of t he surrounding nodes ( for SS isot ropic hom ogeneous case) Consider t he 1D st eady- st at e flow equat ion w it h a sink is: 2
d H '
T − w = 0 or 2 2 dx ' d H w 2 = dx T ∆ x
h 1 h 2 h 3 H= 9 H= 10
N ode
0 1 2 3 4 The nodal finit e difference equat ion is:
− 2 ' −1 +1 2 =
- h h h i , j i , j i , j w
T ∆ x
Or 2
' x w
( ) ∆ h − 2h + h = i , j i , j i , j
−1 +1 T
Node 1:
1H + - 2h 1 + 1h 2 = 0 1( 10) + - 2h 1 + 1h 2 = 0
- 2h + 1h = - 10 1 2 Node 2: 1h 1 + - 2h 2 + 1h 3 = 0
- St art w it h init ial condit ions ( t hese are known)
- Given known heads at end of first t im e st ep solve for heads at t he end of t he second t im e st ep.
- Wit h known value at t he end of t im e st ep solve for next t im e st ep – t his is called m arching t hrough t im e
- ⎨ 2 ⎬
- ,
Node 3: Node 3 has a forcing t erm due t o t he pum ping of t he w ell. This t ranslat es int o an init ial r ight hand side of t he equat ion: 2 2 ' ( 1 0 ) .
1 ( ) ∆ x w
∆x = 0.1, Given = = 1 .
01 T
1h 2 + - 2h 3 + 1H 4 = 1 1h + - 2h + 1( 9) = 1 2 3
1h 2 + - 2h 3 = 1- 9 = - 8 The syst em of finit e- difference equat ions consist s of 3 equat ions and 3 unknow ns
1 − 2 h h = −10 1 2
1 h − 2 h h = 1 2 3
1 h − 2 h = − 8 2 3 Un k n ow n s
Kn ow n s
Or in coeffiecient m at rix form
1 ⎛− 2 ⎞⎛ h ⎞ ⎛−10⎞ 1 ⎜ ⎟⎜ ⎟ ⎜ ⎟ 1 ⎜ 1 − 2 ⎟⎜h 2 ⎟ = ⎜ 0 ⎟ ⎜ ⎟⎜ ⎟ ⎜ ⎟
1 3 − 2⎠⎝h ⎝ ⎠ ⎝ − 8 ⎠
FD Coeff. Unknow n RHS cont aining boundary Mat rix Heads condit ions and know n pum ping Or in m at rix not at ion it can be w rit t en as Ah = b’ A is t he m at rix of difference coefficient s H is t he vect or of unknow n heads b’ is t he RHS vect or of know n quant it ies A com put at ional linear solve yields t he vect or h :
10 9 .
5 h
⎛ ⎞ ⎛ ⎞ 1 ⎜ ⎟ ⎜ ⎟
9.5
9 h =
⎜ 2 ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ 8 .
5 h 3
9.0 ⎝ ⎠ ⎝ ⎠
8.5 1 2 3 4 Tr a n sie n t Sim u la t ion Usin g Fin it e D iffe r e n ce s
Procedure: March Through Tim e
∆t; this give the spatial distribution of • Solve for heads at end of first t im e st ep head ( a m ap) aft er a sm all t im e increm ent .
Ah n = b* w here b* = b’ + h n- 1 The right - hand side alw ays cont ains know ns. The m at rix A is t he m at rix of finit e difference coefficient s reflect ing t he syst em param et ers and discret izat ion.
So if you can solve spat ial equat ions for one t im e st ep. Then you can solve it for as m any t im e st eps as you like. The t im e st ep m ust be sm all w hen changes in heads are rapid – such as, w hen you st art t o pum p a w ell, ∆t m ust be seconds or m inutes. I t can be increased as changes in head becom e sm aller.
FD Sim u la t ion M ode ls: codes t hat solve t he above syst em of linear algebraic equat ions – fairly robust .
Tim e St e ppin g
S h − h
i , n i , n− 1 − 2 h + h ⎧ h i ⎫ 1 i i 1
− =
T ∆ x ∆ t ⎩ ⎭
n? n- 1? Som et hing
Cr a n k -
else?
I m plicit N ich olson n Ex plicit
h head ∆ h n- 1 h n- 1 n ∆ t t t
T ∆t
( h − 2 h + h ) = h − h i i i i , n i , n 2 − 1 + 1 − 1 s ∆ x
Ex plicit : h i,n = ch i- 1,n- 1 + ( 1- 2C) h i,n- 1 + ch i+ 1,n- 1 T ∆ t
Where: c
= 2 s ∆ x Easy t o calculat e – no linear algebra, but unst able if t im e- st eps are t oo large.
I m plicit : ch i- 1,n - ( 1+ 2C) h i,n + ch i+ 1,n = - h i,n- 1
Result s in syst em of linear equat ions t hat m ust be solved sim ult aneously. St able, but issues of accuracy.
c c c Cr a n k N ich olson : ) h − (1+ h c h = ( c − 1)h + − h + h i 1 n i , n i 1 n i 1 n ( i 1 n i 1 n )
− , + , − , − , − 1 − , − 1
2
2
2 Not m uch m ore num erical expense t han fully im plicit , but m ore accurat e Bou n da r y Con dit ion s:
Const ant Head – Don’t w rit e equat ion for const ant head node. Use value of const ant head in equat ions for neighboring nodes. Flux Boundary – replace first derivat ive t erm w it h const ant
h − h h − h ⎛ ⎞ i − , 1 j i , j i , j i + , 1 j 2 − ⎜⎜ ⎟⎟
⎛ ∂ ⎞ h ∆ x ∆ x i , j
⎝ ⎠ ⎜ ⎟ 2 ⎟ ≈ ∆ x ⎝ ⎜ ∂ x ⎠ h − h i , j i 1 j Q
= ∆ x T