how to make implicit upwind schemes as efficient as streamline … · 2014. 11. 17. · how to make...
TRANSCRIPT
![Page 1: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/1.jpg)
How to Make Implicit Upwind Schemes asEfficient as Streamline Methods
J. R. Natvig†, K.-A. Lie† B. Eikemo‡
†SINTEF, Department of Applied Mathematics
‡Department of Mathematics, University of Bergen
CMWR XVI, Copenhagen, June 20 2006
CMWR, Copenhagen 1/ 22
![Page 2: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/2.jpg)
Topic of this talk
Aim:To construct fast implicit solver for
φ∂S
∂t+ v · ∇f(S) = Q(S), (1)
assuming no gravity and no capillary pressure.
Method:Decompose (1) in sequence of local problems.
CMWR, Copenhagen 2/ 22
![Page 3: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/3.jpg)
Implicit First-Order Upwind Scheme 1D
S1 S2v
Q1 Q2
φ
∆t(Sn
1 −Sn−11 )− v
∆xf(Sn
1 ) = Q1(Sn1 ),
φ
∆t(Sn
2 −Sn−12 ) +
v
∆xf(Sn
1 ) = Q2(Sn2 ),
CMWR, Copenhagen 3/ 22
![Page 4: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/4.jpg)
Implicit First-Order Upwind Scheme 1D
S1 S2v
Q1 Q2
φ
∆t(Sn
1 −Sn−11 )− v
∆xf(Sn
1 ) = Q1(Sn1 ),
φ
∆t(Sn
2 −Sn−12 ) +
v
∆xf(Sn
1 ) = Q2(Sn2 ),
CMWR, Copenhagen 3/ 22
![Page 5: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/5.jpg)
Implicit First-Order Upwind Scheme 1D
S1 · · · Sk−1 Sk Sk+1 · · · Sm
v1 vk−1 vk vm−1
Consider the scheme
φ
∆t(Sn
k−Sn−1k ) +
1
∆x
(vk−1f(Sn
k−1)− vkf(Snk )
)= Qk(Sn
k ),
where we have assumed vk > 0.
CMWR, Copenhagen 4/ 22
![Page 6: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/6.jpg)
Implicit First-Order Upwind Scheme 1D
S1 · · · Sk−1 Sk Sk+1 · · · Sm
v1 vk−1 vk vm−1
Consider the scheme
φ
∆t(Sn − Sn−1) +
1
∆x
−v1
v1 −v2
. . . . . .vm−1 0
f(Sn
1 )...
f(Snm)
= Q(S).
where we have assumed vk > 0.
CMWR, Copenhagen 4/ 22
![Page 7: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/7.jpg)
Implicit First-Order Upwind Scheme 1D
S1 · · · Sk−1 Sk Sk+1 · · · Sm
v1 vk−1 vk vm−1
Consider the scheme
φ
∆t(Sn − Sn−1) +
1
∆x
−v1
v1 −v2
. . . . . .vm−1 0
f(Sn
1 )...
f(Snm)
= Q(S).
where we have assumed vk > 0.
Lower triangular matrix =⇒ equations can be solved in sequence.
CMWR, Copenhagen 4/ 22
![Page 8: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/8.jpg)
Implicit First-Order Upwind Scheme 2D
Then consider the same scheme in 2D withm grid cells and fluxes given by the (sparse)m×m-matrix v.
k jvkj
Snk − Sn−1
k
∆t− 1
h
( ∑j
max(vkj , 0)f(Snk ) +
∑j
min(vkj , 0)f(Snj )
)= Qk(Sn
k ).
Again, this can be written in matrix notation
1
∆t(Sn − Sn−1) + V
f(Sn1 )
...f(Sn
m)
= Q(Sn).
where
Vkk = − 1
h
∑j
max(vkj , 0), Vkj = − 1
hmin(vkj , 0).
Is V triangular?
CMWR, Copenhagen 5/ 22
![Page 9: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/9.jpg)
Implicit First-Order Upwind Scheme 2D
Then consider the same scheme in 2D withm grid cells and fluxes given by the (sparse)m×m-matrix v.
k jvkj
Again, this can be written in matrix notation
1
∆t(Sn − Sn−1) + V
f(Sn1 )
...f(Sn
m)
= Q(Sn).
where
Vkk = − 1
h
∑j
max(vkj , 0), Vkj = − 1
hmin(vkj , 0).
Is V triangular?
CMWR, Copenhagen 5/ 22
![Page 10: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/10.jpg)
Implicit First-Order Upwind Scheme 2D
Then consider the same scheme in 2D withm grid cells and fluxes given by the (sparse)m×m-matrix v.
k jvkj
Again, this can be written in matrix notation
1
∆t(Sn − Sn−1) + V
f(Sn1 )
...f(Sn
m)
= Q(Sn).
where
Vkk = − 1
h
∑j
max(vkj , 0), Vkj = − 1
hmin(vkj , 0).
Is V triangular?
CMWR, Copenhagen 5/ 22
![Page 11: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/11.jpg)
“Homogeneous” Quarter five-spot
What does V look like?
1 2 3
4 5 6
7 8 9
V =
∗∗ ∗
∗ ∗∗ ∗
∗ ∗ ∗∗ ∗ ∗
∗ ∗∗ ∗ ∗
∗ ∗ ∗
Lower triangular
CMWR, Copenhagen 6/ 22
![Page 12: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/12.jpg)
“Homogeneous” Quarter five-spot
What does V look like?
1 2 3
4 5 6
7 8 9
V =
∗∗ ∗
∗ ∗∗ ∗
∗ ∗ ∗∗ ∗ ∗
∗ ∗∗ ∗ ∗
∗ ∗ ∗
Lower triangular
CMWR, Copenhagen 6/ 22
![Page 13: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/13.jpg)
“Heterogeneous” Quarter five-spot
What does V look like now?
1 2 3
4 5 6
7 8 9
V =
∗∗ ∗ ∗
∗ ∗∗ ∗
∗ ∗ ∗∗ ∗ ∗
∗ ∗∗ ∗
∗ ∗ ∗
Not lower triangular
CMWR, Copenhagen 7/ 22
![Page 14: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/14.jpg)
“Heterogeneous” Quarter five-spot
What does V look like now?
1 2 3
4 5 6
7 8 9
V =
∗∗ ∗ ∗
∗ ∗∗ ∗
∗ ∗ ∗∗ ∗ ∗
∗ ∗∗ ∗
∗ ∗ ∗
Not lower triangular
CMWR, Copenhagen 7/ 22
![Page 15: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/15.jpg)
Graph Interpretation
What can be done?
CMWR, Copenhagen 8/ 22
![Page 16: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/16.jpg)
Graph Interpretation Continued
“Homogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 9
Can this directed graph be flattenedsuch that all arrows point to the right?
1 2 3 4 5 6 7 8 9
Yes!
CMWR, Copenhagen 9/ 22
![Page 17: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/17.jpg)
Graph Interpretation Continued
“Homogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 9
Can this directed graph be flattenedsuch that all arrows point to the right?
1 2 3 4 5 6 7 8 9
Yes!
CMWR, Copenhagen 9/ 22
![Page 18: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/18.jpg)
Graph Interpretation Continued
“Homogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 9
Can this directed graph be flattenedsuch that all arrows point to the right?
1 2 3 4 5 6 7 8 9
Yes!
CMWR, Copenhagen 9/ 22
![Page 19: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/19.jpg)
Graph Interpretation Continued
“Heterogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 9
What about this directed graph?
CMWR, Copenhagen 10/ 22
![Page 20: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/20.jpg)
Graph Interpretation Continued
“Heterogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 9
What about this directed graph?
1 2 3 4 5 6 7 8 9
CMWR, Copenhagen 10/ 22
![Page 21: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/21.jpg)
Topological sorting
Topological sorting:
Find sequence of vertex numbers (p1, . . . , pm) such that
pi < pj
whenever there is a directed edge from vertex i to vertex j.
A topological sort of the vertices in a directed graph can be found inlinear time as the post-order of the depth-first traversal of thereversed graph.
CMWR, Copenhagen 11/ 22
![Page 22: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/22.jpg)
Graph Interpretation Continued
“Heterogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 999
87
4
1
4
7 8
6
32
5
2 3
6
9
1 4 7 8 5 2 3 6 9
CMWR, Copenhagen 12/ 22
![Page 23: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/23.jpg)
Graph Interpretation Continued
“Heterogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 9988
7
4
1
4
7 8
6
32
5
2 3
6
9
1 4 7 8 5 2 3 6 9
CMWR, Copenhagen 12/ 22
![Page 24: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/24.jpg)
Graph Interpretation Continued
“Heterogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 99877
4
1
4
7 8
6
32
5
2 3
6
9
1 4 7 8 5 2 3 6 9
CMWR, Copenhagen 12/ 22
![Page 25: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/25.jpg)
Graph Interpretation Continued
“Heterogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 9987
44
1
4
7 8
6
32
5
2 3
6
9
1 4 7 8 5 2 3 6 9
CMWR, Copenhagen 12/ 22
![Page 26: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/26.jpg)
Graph Interpretation Continued
“Heterogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 9987
4
1
1
4
7 8
6
32
5
2 3
6
9
1 4 7 8 5 2 3 6 9
CMWR, Copenhagen 12/ 22
![Page 27: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/27.jpg)
Graph Interpretation Continued
“Heterogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 9987
4
1
4
4
7 8
6
32
5
2 3
6
9
1
4 7 8 5 2 3 6 9
CMWR, Copenhagen 12/ 22
![Page 28: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/28.jpg)
Graph Interpretation Continued
“Heterogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 998
7
4
1
4
7
7 8
6
32
5
2 3
6
9
1 4
7 8 5 2 3 6 9
CMWR, Copenhagen 12/ 22
![Page 29: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/29.jpg)
Graph Interpretation Continued
“Heterogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 998
7
4
1
4
7 8
8
6
32
5
2 3
6
9
1 4 7
8 5 2 3 6 9
CMWR, Copenhagen 12/ 22
![Page 30: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/30.jpg)
Graph Interpretation Continued
“Heterogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 998
7
4
1
4
7 8 9
6
32
5
2 3
6
9
1 4 7 8
5 2 3 6 9
CMWR, Copenhagen 12/ 22
![Page 31: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/31.jpg)
Graph Interpretation Continued
“Heterogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 998
7
4
1
4
7 8
66
32
5
2 3
6
9
1 4 7 8
5 2 3 6 9
CMWR, Copenhagen 12/ 22
![Page 32: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/32.jpg)
Graph Interpretation Continued
“Heterogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 998
7
4
1
4
7 8
6
33
2
5
2 3
6
9
1 4 7 8
5 2 3 6 9
CMWR, Copenhagen 12/ 22
![Page 33: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/33.jpg)
Graph Interpretation Continued
“Heterogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 99
87
4
1
4
7 8
6
322
5
2 3
6
9
1 4 7 8
5 2 3 6 9
CMWR, Copenhagen 12/ 22
![Page 34: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/34.jpg)
Graph Interpretation Continued
“Heterogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 99
87
4
1
4
7 8
6
32
5
5
2 3
6
9
1 4 7 8
5 2 3 6 9
CMWR, Copenhagen 12/ 22
![Page 35: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/35.jpg)
Graph Interpretation Continued
“Heterogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 99
87
4
1
4
7 8
6
32
5
2
2 3
6
9
1 4 7 8 5
2 3 6 9
CMWR, Copenhagen 12/ 22
![Page 36: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/36.jpg)
Graph Interpretation Continued
“Heterogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 99
87
4
1
4
7 8
6
3
2
5
2 3
3
6
9
1 4 7 8 5 2
3 6 9
CMWR, Copenhagen 12/ 22
![Page 37: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/37.jpg)
Graph Interpretation Continued
“Heterogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 99
87
4
1
4
7 8
6
32
5
2 3
6
6
9
1 4 7 8 5 2 3
6 9
CMWR, Copenhagen 12/ 22
![Page 38: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/38.jpg)
Graph Interpretation Continued
“Heterogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 9
987
4
1
4
7 8
6
32
5
2 3
6
9
9
1 4 7 8 5 2 3 6
9
CMWR, Copenhagen 12/ 22
![Page 39: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/39.jpg)
Graph Interpretation Continued
“Heterogeneous” Quarter five-spot as directed graph
1 2 3
4 5 6
7 8 9
987
4
1
4
7 8
6
32
5
2 3
6
9
1 4 7 8 5 2 3 6 9
CMWR, Copenhagen 12/ 22
![Page 40: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/40.jpg)
Triangularisation of the coefficient matrix
By rearranging the rows and columns in the order(1, 4, 7, 8, 5, 2, 3, 6, 9), we obtain a triangular V :
1 2 3
4 5 6
7 8 9
1 4 7 8 5 2 3 6 9147852369
∗∗ ∗
∗ ∗∗ ∗
∗ ∗ ∗∗ ∗ ∗
∗ ∗∗ ∗ ∗
∗ ∗ ∗
Duff and Reid. An implementation of Tarjans algorithm for block triangularisation of a matrix. 1978.
Dennis, Martinez and Zhang. Triangular decomposition methods for solving reducible nonlinear systems. 1994.
CMWR, Copenhagen 13/ 22
![Page 41: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/41.jpg)
Triangularisation of the coefficient matrix
Again, this can be written in matrix notation
1
∆t(S̃n − S̃n−1) + L
f(S̃n1 )
...f(S̃n
m)
= PQ(S̃n).
where S̃ = PS, L = PV P T and P is a permutation matrixobtained from a topological ordering of the grid cells.
CMWR, Copenhagen 14/ 22
![Page 42: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/42.jpg)
Implicit First-Order Upwind Scheme 2D
k jvkj
Snk − Sn−1
k
∆t− 1
h
( ∑j
max(vkj , 0)f(Snk ) +
∑j
min(vkj , 0)f(Snj )
)= Qk(Sn
k ).
CMWR, Copenhagen 15/ 22
![Page 43: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/43.jpg)
Implicit First-Order Upwind Scheme 2D
k jvkj
Find uh ∈ Vh such that∫K
Snk − Sn−1
k
∆tvh−
∫K
f(Snk ) v·∇vh+
∑j
∫∂K
vhf̂(Snk , Sn
j , vkj)=
∫K
Qk(Snk )vh,
For all vh ∈ Vh.
Here f̂ is the upwind flux given by
f̂(Sk, Sj , vkj) = f(Sk) max(vkj , 0) + f(Sj) min(vkj , 0).
CMWR, Copenhagen 15/ 22
![Page 44: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/44.jpg)
Delineation of Reservoirs
Consider a domain with multiple injectors at positions (x1, . . . ,xn).Solve
v · ∇Ci = Qi
where Qi > 0 for the injector at injector xi and zero elsewhere.
Ci(x) =
{1 x on streamline from injector i,
0 otherwise.
CMWR, Copenhagen 16/ 22
![Page 45: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/45.jpg)
Porosity of the model 2 of the SPE Comparative Solution Project.
CMWR, Copenhagen 17/ 22
![Page 46: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/46.jpg)
Delineation of Reservoirs ContinuedModel 2 of the SPE Comparative Solution Project*.
Size: 60× 220× 85 (1.122 mill. grid blocks)Simulation time: a few minutes.
Christie and Blunt Tenth SPE Comparative Solution Project: A Comparison of Upscaling Techniques
CMWR, Copenhagen 18/ 22
![Page 47: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/47.jpg)
Twophase Flow in 2D
First-order upwind 2nd-order discontinuous Galerkin
Solution after 0.2 PVI .
Solution after 0.3 PVI.
Water flooding in layer 6 of the same model computed with 3 pressureupdates.
CMWR, Copenhagen 19/ 22
![Page 48: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/48.jpg)
Twophase Flow in 2D
0.15 PVI 0.24 PVI 0.36 PVI
Water flooding in homogeneous domain with highly permeablefractures computed with the first-order upwind scheme.
CMWR, Copenhagen 20/ 22
![Page 49: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/49.jpg)
Model 2 of the SPE Comparative Solution Project
∆t=1 day, 40 minutes ∆t=20 days, 2 minutes
0 500 1000 1500 20000
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 500 1000 1500 20000
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Watercut curves computed with the first-order upwind scheme (solidline) and with FrontSim (dashed).
CMWR, Copenhagen 21/ 22
![Page 50: How to Make Implicit Upwind Schemes as Efficient as Streamline … · 2014. 11. 17. · How to Make Implicit Upwind Schemes as Efficient as Streamline Methods J. R. Natvig†, K.-A](https://reader036.vdocuments.pub/reader036/viewer/2022081620/611316d258069e056671ea43/html5/thumbnails/50.jpg)
Highlights
Why is this a good ideaExtremely fast solvers: O(n) operations for n unknowns.Local control over Newton iteration.Small memory requirements.Based on well-known conservative discretisation.
Similar to streamline methods in performance: millions of gridcells on desktop computers!
CMWR, Copenhagen 22/ 22