You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
2.2 KiB
56 lines
2.2 KiB
|
|
Colocated multigrid
|
|
|
|
+---+---+---+---+---+---+---+---+---+
|
|
8 | x | x | x | x | x | x | x | x | x |
|
|
+---+---+---+---+---+---+---+---+---+
|
|
7 | 0 | | | | | | | | x |
|
|
+---+---+---+---+---+---+---+---+---+
|
|
6 | 0 | | | | | | | | x |
|
|
+---+---+---+---+---+---+---+---+---+
|
|
5 | 0 | | | | | | | | x |
|
|
+---+---+---+---+---+---+---+---+---+
|
|
4 | 0 | | | | | | | | x |
|
|
+---+---+---+---+---+---+---+---+---+
|
|
3 | 0 | | | | | | | | x |
|
|
+---+---+---+---+---+---+---+---+---+
|
|
2 | 0 | | | | | | | | x |
|
|
+---+---+---+---+---+---+---+---+---+
|
|
1 | 0 | | | | | | | | x |
|
|
+---+---+---+---+---+---+---+---+---+
|
|
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | x |
|
|
+---+---+---+---+---+---+---+---+---+
|
|
0 1 2 3 4 5 6 7 8
|
|
|
|
- Pressure is defined on all cells:
|
|
- The 0 cells are stored but not used (we return p = 0 on these cells)
|
|
- The x cells are not stored (we implicitly return p = 0 out of bounds)
|
|
|
|
- Velocity is only defined in the inner cells, we always return 0 on the borders
|
|
|
|
The Coarse grid is as follows:
|
|
|
|
+-------+-------+-------+-------+-------+
|
|
| | | | | |
|
|
| x | x | x | x | x |
|
|
| | | | | |
|
|
+-------+-------+-------+-------+-------+
|
|
| | | | | |
|
|
| 0 | | | | x |
|
|
| | | | | |
|
|
+-------+-------+-------+-------+-------+
|
|
| | | | | |
|
|
| 0 | | | | x |
|
|
| | | | | |
|
|
+-------+-------+-------+-------+-------+
|
|
| | | | | |
|
|
| 0 | | | | x |
|
|
| | | | | |
|
|
+-------+-------+-------+-------+-------+
|
|
| | | | | |
|
|
| 0 | 0 | 0 | 0 | x |
|
|
| | | | | |
|
|
+-------+-------+-------+-------+-------+
|
|
|
|
So, the size of the total grid is (2^N+1)*(2^N+1), but we store only (2^N)*(2^N), and explicitly
|
|
set the pressure to 0 on the lower and left borders.
|
|
|