Skip to content

Commit 2d853a8

Browse files
authored
Merge pull request #42 from p-costa/simplify-geo-setup
Simplify setup of multi-block geometry
2 parents 52acd9f + cafbca1 commit 2d853a8

File tree

31 files changed

+279
-90
lines changed

31 files changed

+279
-90
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ P. Costa. *A FFT-accelerated multi-block finite-difference solver for massively
1010
Comput. Phys. Commun. 271 : 108194 (2022) [[DOI:10.1016/j.cpc.2021.108194]](doi.org/10.1016/j.cpc.2021.108194) [[arXiv:2106.03583]](https://arxiv.org/pdf/2106.03583.pdf).
1111

1212
## News
13+
[08/07/2022] The input files describing the block geometry (under `geo/block.???`) have been simplified. Now, instead of prescribing the lower and upper extents of each block `lo(:)` and `hi(:)`, the number of grid points `ng(:)` is prescribed. This change makes it much easier to refine the grid without, since one does not need to correct extents of neighboring blocks. See the updated [`src/INFO_INPUT.md`](src/INFO_INPUT.md) for more details.
1314

1415
## Features
1516

examples/__MULTI_BLOCK_GEOMETRY/L_channel/block.001

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
1 1 1 ! dims(1:3)
2-
1 1 1 ! lo(1:3)
3-
32 32 64 ! hi(1:3)
2+
32 32 64 ! ng(1:3)
43
0. 0. 0. ! lmin(1:3)
54
.5 .5 1. ! lmax(1:3)
65
0 0 0 ! gt(1:3)

examples/__MULTI_BLOCK_GEOMETRY/L_channel/block.002

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
1 1 1 ! dims(1:3)
2-
1 33 1 ! lo(1:3)
3-
32 64 64 ! hi(1:3)
2+
32 32 64 ! ng(1:3)
43
0. .5 0. ! lmin(1:3)
54
.5 1. 1. ! lmax(1:3)
65
0 0 0 ! gt(1:3)

examples/__MULTI_BLOCK_GEOMETRY/L_channel/block.003

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
2 1 1 ! dims(1:3)
2-
33 33 1 ! lo(1:3)
3-
128 64 64 ! hi(1:3)
2+
96 32 64 ! ng(1:3)
43
.5 .5 0. ! lmin(1:3)
54
2.0 1. 1. ! lmax(1:3)
65
0 0 0 ! gt(1:3)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
0.95 0.01 ! cfl, dtmin
2+
1. 1. 150. ! uref, lref, rey
3+
2501 100. 100. ! nstep,time_max,tw_max
4+
T F F ! stop_type(1:3)
5+
F T 0 ! restart,is_overwrite_save
6+
10 250 250 2500 250 2500 ! icheck, iout0d, iout1d, iout2d, iout3d, isave
7+
0. 0. 0. ! bforce(1:3)
8+
4 ! nthreadsmax
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
1 1 1 ! dims(1:3)
2+
48 48 2 ! ng(1:3)
3+
-9. -9. 0. ! lmin(1:3)
4+
-0.5 -0.5 0.01 ! lmax(1:3)
5+
3 3 0 ! gt(1:3)
6+
3.1 3.1 0. ! gr(1:3)
7+
D F N F F F ! cbcvel(0:1,1:3,1) [u BC type]
8+
D F N F F F ! cbcvel(0:1,1:3,2) [v BC type]
9+
D F N F F F ! cbcvel(0:1,1:3,3) [w BC type]
10+
N F D F F F ! cbcpre(0:1,1:3 ) [p BC type]
11+
1. 2. 0. 8. 1. 1. ! bcvel(0:1,1:3,1) [u BC value]
12+
0. 2. 0. 8. 1. 1. ! bcvel(0:1,1:3,2) [v BC value]
13+
0. 2. 0. 8. 1. 1. ! bcvel(0:1,1:3,3) [w BC value]
14+
0. 2. 0. 8. 1. 1. ! bcpre(0:1,1:3 ) [p BC value]
15+
0 0 0 0 0 0 ! is_inflow( 0:1,1:3)
16+
uni ! inivel
17+
1 ! id
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
1 1 1 ! dims(1:3)
2+
34 48 2 ! ng(1:3)
3+
-0.5 -9. 0. ! lmin(1:3)
4+
0.5 -0.5 0.01 ! lmax(1:3)
5+
0 3 0 ! gt(1:3)
6+
4. 3.1 0. ! gr(1:3)
7+
F F N D F F ! cbcvel(0:1,1:3,1) [u BC type]
8+
F F N D F F ! cbcvel(0:1,1:3,2) [v BC type]
9+
F F N D F F ! cbcvel(0:1,1:3,3) [w BC type]
10+
F F D N F F ! cbcpre(0:1,1:3 ) [p BC type]
11+
1. 3. 0. 0. 2. 2. ! bcvel(0:1,1:3,1) [u BC value]
12+
1. 3. 0. 0. 2. 2. ! bcvel(0:1,1:3,2) [v BC value]
13+
1. 3. 0. 0. 2. 2. ! bcvel(0:1,1:3,3) [w BC value]
14+
1. 3. 0. 0. 2. 2. ! bcpre(0:1,1:3 ) [p BC value]
15+
0 0 0 0 0 0 ! is_inflow(0:1,1:3)
16+
uni ! inivel
17+
2 ! id
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
1 1 1 ! dims(1:3)
2+
128 48 2 ! hi(1:3)
3+
0.5 -9. 0. ! lmin(1:3)
4+
12.5 -0.5 0.01 ! lmax(1:3)
5+
1 3 0 ! gt(1:3)
6+
2.6 3.1 0. ! gr(1:3)
7+
F N N F F F ! cbcvel(0:1,1:3,1) [u BC type]
8+
F N N F F F ! cbcvel(0:1,1:3,2) [v BC type]
9+
F N N F F F ! cbcvel(0:1,1:3,3) [w BC type]
10+
F D D F F F ! cbcpre(0:1,1:3 ) [p BC type]
11+
2. 1. 0. 4. 3. 3. ! bcvel(0:1,1:3,1) [u BC value]
12+
2. 0. 0. 4. 3. 3. ! bcvel(0:1,1:3,2) [v BC value]
13+
2. 0. 0. 4. 3. 3. ! bcvel(0:1,1:3,3) [w BC value]
14+
2. 0. 0. 4. 3. 3. ! bcpre(0:1,1:3 ) [p BC value]
15+
0 1 0 0 0 0 ! is_inflow(0:1,1:3)
16+
uni ! inivel
17+
3 ! id
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
1 1 1 ! dims(1:3)
2+
128 34 2 ! ng(1:3)
3+
0.5 -0.5 0. ! lmin(1:3)
4+
12.5 0.5 0.01 ! lmax(1:3)
5+
1 0 0 ! gt(1:3)
6+
2.6 4. 0. ! gr(1:3)
7+
D N F F F F ! cbcvel(0:1,1:3,1) [u BC type]
8+
D N F F F F ! cbcvel(0:1,1:3,2) [v BC type]
9+
D N F F F F ! cbcvel(0:1,1:3,3) [w BC type]
10+
N D F F F F ! cbcpre(0:1,1:3 ) [p BC type]
11+
0. 1. 3. 5. 4. 4. ! bcvel(0:1,1:3,1) [u BC value]
12+
0. 0. 3. 5. 4. 4. ! bcvel(0:1,1:3,2) [v BC value]
13+
0. 0. 3. 5. 4. 4. ! bcvel(0:1,1:3,3) [w BC value]
14+
0. 0. 3. 5. 4. 4. ! bcpre(0:1,1:3 ) [p BC value]
15+
0 1 0 0 0 0 ! is_inflow(0:1,1:3)
16+
uni ! inivel
17+
4 ! id
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
1 1 1 ! dims(1:3)
2+
128 48 2 ! ng(1:3)
3+
0.5 0.5 0. ! lmin(1:3)
4+
12.5 9. 0.01 ! lmax(1:3)
5+
1 1 0 ! gt(1:3)
6+
2.6 3.1 0. ! gr(1:3)
7+
F N F N F F ! cbcvel(0:1,1:3,1) [u BC type]
8+
F N F N F F ! cbcvel(0:1,1:3,2) [v BC type]
9+
F N F N F F ! cbcvel(0:1,1:3,3) [w BC type]
10+
F D F D F F ! cbcpre(0:1,1:3 ) [p BC type]
11+
6. 1. 4. 0. 5. 5. ! bcvel(0:1,1:3,1) [u BC value]
12+
6. 0. 4. 0. 5. 5. ! bcvel(0:1,1:3,2) [v BC value]
13+
6. 0. 4. 0. 5. 5. ! bcvel(0:1,1:3,3) [w BC value]
14+
6. 0. 4. 0. 5. 5. ! bcpre(0:1,1:3 ) [p BC value]
15+
0 1 0 0 0 0 ! is_inflow(0:1,1:3)
16+
uni ! inivel
17+
5 ! id

0 commit comments

Comments
 (0)