Skip to content

Commit fbd06f1

Browse files
authored
Merge branch 'master' into CodeTidying
2 parents 90192fb + a1d1576 commit fbd06f1

File tree

104 files changed

+7749
-438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+7749
-438
lines changed

.github/workflows/frontier/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ if [ "$2" == "bench" ]; then
1313
./mfc.sh run "$dir/case.py" --case-optimization -j 8 --dry-run $build_opts
1414
done
1515
else
16-
./mfc.sh test --dry-run -j 8 $build_opts
16+
./mfc.sh test -a --dry-run --rdma-mpi --generate -j 8 $build_opts
1717
fi
18+

.github/workflows/frontier/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ gpus=`rocm-smi --showid | awk '{print $1}' | grep -Eo '[0-9]+' | uniq | tr '\n'
44
ngpus=`echo "$gpus" | tr -d '[:space:]' | wc -c`
55

66
if [ "$job_device" = "gpu" ]; then
7-
./mfc.sh test --max-attempts 3 -j $ngpus -- -c frontier
7+
./mfc.sh test -a --rdma-mpi --max-attempts 3 -j $ngpus -- -c frontier
88
else
9-
./mfc.sh test --max-attempts 3 -j 32 -- -c frontier
9+
./mfc.sh test -a --rdma-mpi --max-attempts 3 -j 32 -- -c frontier
1010
fi

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ They are organized below.
165165

166166
* Shock and interface capturing schemes
167167
* First-order upwinding
168-
* WENO reconstructions of order 3, 5, and 7
168+
* MUSCL (order 2)
169+
* Slope limiters: minmod, monotonized central, Van Albada, Van Leer, superbee
170+
* WENO reconstructions (orders 3, 5, and 7)
169171
* WENO variants: WENO-JS, WENO-M, WENO-Z, TENO
170172
* Monotonicity-preserving reconstructions
171173
* Reliable handling of large density ratios
@@ -187,7 +189,7 @@ They are organized below.
187189
* Ideal weak scaling to 100% of the largest GPU and superchip supercomputers
188190
* \>36K AMD APUs (MI300A) on [LLNL El Capitan](https://hpc.llnl.gov/hardware/compute-platforms/el-capitan)
189191
* \>3K AMD APUs (MI300A) on [LLNL Tuolumne](https://hpc.llnl.gov/hardware/compute-platforms/tuolumne)
190-
* \>33K AMD GPUs (MI250X) on the first exascale computer, [OLCF Frontier](https://www.olcf.ornl.gov/frontier/)
192+
* \>33K AMD GPUs (MI250X) on [OLCF Frontier](https://www.olcf.ornl.gov/frontier/)
191193
* \>10K NVIDIA GPUs (V100) on [OLCF Summit](https://www.olcf.ornl.gov/summit/)
192194
* Near compute roofline behavior
193195
* RDMA (remote data memory access; GPU-GPU direct communication) via GPU-aware MPI on NVIDIA (CUDA-aware MPI) and AMD GPU systems
@@ -197,7 +199,7 @@ They are organized below.
197199

198200
* [Fypp](https://fypp.readthedocs.io/en/stable/fypp.html) metaprogramming for code readability, performance, and portability
199201
* Continuous Integration (CI)
200-
* \>300 Regression tests with each PR.
202+
* Approx. 500 Regression tests with each PR.
201203
* Performed with GNU (GCC), Intel (oneAPI), Cray (CCE), and NVIDIA (NVHPC) compilers on NVIDIA and AMD GPUs.
202204
* Line-level test coverage reports via [Codecov](https://app.codecov.io/gh/MFlowCode/MFC) and `gcov`
203205
* Benchmarking to avoid performance regressions and identify speed-ups

docs/documentation/case.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,9 @@ Details of implementation of viscosity in MFC can be found in [Coralic (2015)](r
379379
| `mixture_err` | Logical | Mixture properties correction |
380380
| `time_stepper` | Integer | Runge--Kutta order [1-3] |
381381
| `adap_dt` | Logical | Strang splitting scheme with adaptive time stepping |
382+
| `recon_type` | Integer | Reconstruction Type: [1] WENO; [2] MUSCL |
383+
| `adap_dt_tol` | Real | Tolerance for adaptive time stepping in Strang splitting scheme|
384+
| `adap_dt_max_iters` | Integer | Max iteration for adaptive time stepping in Strang splitting scheme |
382385
| `weno_order` | Integer | WENO order [1,3,5] |
383386
| `weno_eps` | Real | WENO perturbation (avoid division by zero) |
384387
| `mapped_weno` | Logical | WENO-M (WENO with mapping of nonlinear weights) |
@@ -388,6 +391,11 @@ Details of implementation of viscosity in MFC can be found in [Coralic (2015)](r
388391
| `teno_CT` | Real | TENO threshold for smoothness detection |
389392
| `null_weights` | Logical | Null WENO weights at boundaries |
390393
| `mp_weno` | Logical | Monotonicity preserving WENO |
394+
| `muscl_order` | Integer | MUSCL order [1,2] |
395+
| `muscl_lim` | Integer | MUSCL Slope Limiter: [1] minmod; [2] monotonized central; [3] Van Albada; [4] Van Leer; [5] SUPERBEE |
396+
| `int_comp` | Logical | THINC Interface Compression |
397+
| `ic_eps` | Real | Interface compression threshold (default: 1e-4) |
398+
| `ic_beta` | Real | Interface compression sharpness parameter (default: 1.6) |
391399
| `riemann_solver` | Integer | Riemann solver algorithm: [1] HLL*; [2] HLLC; [3] Exact*; [4] HLLD (only for MHD) |
392400
| `low_Mach` | Integer | Low Mach number correction for HLLC Riemann solver: [0] None; [1] Pressure (Chen et al. 2022); [2] Velocity (Thornber et al. 2008) |
393401
| `avg_state` | Integer | Averaged state evaluation method: [1] Roe average*; [2] Arithmetic mean |
@@ -453,7 +461,7 @@ The effect and use of the source term are assessed by [Schmidmayer et al., 2019]
453461
- `time_stepper` specifies the order of the Runge-Kutta (RK) time integration scheme that is used for temporal integration in simulation, from the 1st to 5th order by corresponding integer.
454462
Note that `time_stepper = 3` specifies the total variation diminishing (TVD), third order RK scheme ([Gottlieb and Shu, 1998](references.md)).
455463

456-
- `adap_dt` activates the Strang operator splitting scheme which splits flux and source terms in time marching, and an adaptive time stepping strategy is implemented for the source term. It requires ``bubbles_euler = 'T'``, ``polytropic = 'T'``, ``adv_n = 'T'`` and `time_stepper = 3`. Additionally, it can be used with ``bubbles_lagrange = 'T'`` and `time_stepper = 3`
464+
- `adap_dt` activates the Strang operator splitting scheme which splits flux and source terms in time marching, and an adaptive time stepping strategy is implemented for the source term. It requires ``bubbles_euler = 'T'``, ``polytropic = 'T'``, ``adv_n = 'T'`` and `time_stepper = 3`. Additionally, it can be used with ``bubbles_lagrange = 'T'`` and `time_stepper = 3`. `adap_dt_tol` and `adap_dt_max_iters` are 1e-4 and 100, respectively, by default.
457465

458466
- `weno_order` specifies the order of WENO scheme that is used for spatial reconstruction of variables by an integer of 1, 3, 5, and 7, that correspond to the 1st, 3rd, 5th, and 7th order, respectively.
459467

@@ -474,7 +482,14 @@ It is recommended to set `weno_eps` to $10^{-6}$ for WENO-JS, and to $10^{-40}$
474482

475483
- `mp_weno` activates monotonicity preservation in the WENO reconstruction (MPWENO) such that the values of reconstructed variables do not reside outside the range spanned by WENO stencil ([Balsara and Shu, 2000](references.md); [Suresh and Huynh, 1997](references.md)).
476484

477-
- `riemann_solver` specifies the choice of the Riemann solver that is used in simulation by an integer from 1 through 3.
485+
- `muscl_order` specifies the order of the MUSCL scheme that is used for spatial reconstruction of variables by an integer of 1, or 2, that corresponds to the 1st, and 2nd order respectively. When using `muscl_order = 2`, `muscl_lim` must be defined.
486+
487+
- `muscl_lim` specifies the slope limiter that is used in 2nd order MUSCL Reconstruction by an integer from 1 through 5.
488+
`muscl_lim = 1`, `2`, `3`, `4`, and `5` correspond to minmod, monotonized central, Van Albada, Van Leer, and SUPERBEE, respectively.
489+
490+
- `int_comp` activates interface compression using THINC used in MUSCL Reconstruction, with control parameters (`ic_eps`, and `ic_beta`).
491+
492+
- `riemann_solver` specifies the choice of the Riemann solver that is used in simulation by an integer from 1 through 4.
478493
`riemann_solver = 1`, `2`, and `3` correspond to HLL, HLLC, and Exact Riemann solver, respectively ([Toro, 2013](references.md)).
479494
`riemann_solver = 4` is only for MHD simulations. It resolves 5 of the full seven-wave structure of the MHD equations ([Miyoshi and Kusano, 2005](references.md)).
480495

@@ -743,7 +758,6 @@ Implementation of the parameters into the model follow [Ando (2010)](references.
743758
| `polydisperse` | Logical | Polydispersity in equilibrium bubble radius R0 |
744759
| `nb` | Integer | Number of bins: [1] Monodisperse; [$>1$] Polydisperse |
745760
| `poly_sigma` | Real | Standard deviation for probability density function of polydisperse bubble populations |
746-
| `R0_type` | Integer | Quadrature rule for probability density function of polydisperse bubble populations |
747761
| `Ca` | Real | Cavitation number |
748762
| `Web` | Real | Weber number |
749763
| `Re_inv` | Real | Inverse Reynolds number |
@@ -761,15 +775,12 @@ When ``polytropic = 'F'``, the gas compression is modeled as non-polytropic due
761775
- `thermal` specifies a model for heat transfer across the bubble interface by an integer from 1 through 3.
762776
`thermal = 1`, `2`, and `3` correspond to no heat transfer (adiabatic gas compression), isothermal heat transfer, and heat transfer with a constant heat transfer coefficient based on [Preston et al., 2007](references.md), respectively.
763777

764-
- `polydisperse` activates polydispersity in the bubble model through a probability density function (PDF) of the equilibrium bubble radius.
778+
- `polydisperse` activates polydispersity in the bubble model through a probability density function (PDF) of the equilibrium bubble radius. Simpson's rule is used for integrating the log-normal PDF of equilibrium bubble radius for polydisperse populations.
765779

766780
- `R0ref` specifies the reference bubble radius.
767781

768782
- `nb` specifies the number of discrete bins that define the probability density function (PDF) of the equilibrium bubble radius.
769783

770-
- `R0_type` specifies the quadrature rule for integrating the log-normal PDF of equilibrium bubble radius for polydisperse populations.
771-
`R0_type = 1` corresponds to Simpson's rule.
772-
773784
- `poly_sigma` specifies the standard deviation of the log-normal PDF of equilibrium bubble radius for polydisperse populations.
774785

775786
- `Ca`, `Web`, and `Re_inv` respectively specify the Cavitation number, Weber number, and the inverse Reynolds number that characterize the offset of the gas pressure from the vapor pressure, surface tension, and liquid viscosity when the polytropic gas compression model is used.

docs/documentation/testing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ A test is considered passing when our error tolerances are met in order to maint
1616
- `--percent` (`%`) to specify a percentage of the test suite to select at random and test
1717
- `--max-attempts` (`-m`) the maximum number of attempts to make on a test before considering it failed
1818
- `--no-examples` skips the testing of cases in the examples folder
19+
- `--rdma-mpi` runs additional tests where RDMA MPI is enabled.
1920

2021
To specify a computer, pass the `-c` flag to `./mfc.sh run` like so:
2122
```shell

examples/0D_bubblecollapse_adap/case.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
"adv_n": "T",
119119
# adap_dt
120120
"adap_dt": "T",
121+
"adap_dt_max_iters": 200,
121122
# Gas compression model
122123
"polytropic": "T",
123124
"thermal": 1,

examples/1D_poly_bubscreen/case.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@
157157
"bubbles_euler": "T",
158158
"bubble_model": 2,
159159
"polytropic": "T",
160-
"R0_type": 1,
161160
"thermal": 3,
162161
"R0ref": myr0,
163162
"nb": 1,

examples/1D_qbmm/case.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@
171171
"bubble_model": 2,
172172
"polytropic": "F",
173173
"polydisperse": "T",
174-
"R0_type": 1,
175174
"poly_sigma": 0.3,
176175
"thermal": 3,
177176
"R0ref": myr0,
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#!/usr/bin/env python3
2+
import math
3+
import json
4+
5+
# Numerical setup
6+
Nx = 399
7+
dx = 1.0 / (1.0 * (Nx + 1))
8+
9+
Tend, Nt = 0.1, 1000
10+
mydt = Tend / (1.0 * Nt)
11+
12+
# Configuring case dictionary
13+
print(
14+
json.dumps(
15+
{
16+
# Logistics
17+
"run_time_info": "T",
18+
# Computational Domain Parameters
19+
"x_domain%beg": 0.0e00,
20+
"x_domain%end": 1.0e00,
21+
"m": Nx,
22+
"n": 0,
23+
"p": 0,
24+
"dt": mydt,
25+
"t_step_start": 0,
26+
"t_step_stop": int(Nt),
27+
"t_step_save": int(math.ceil(Nt / 10.0)),
28+
# Simulation Algorithm Parameters
29+
"num_patches": 2,
30+
"model_eqns": 2,
31+
"alt_soundspeed": "F",
32+
"num_fluids": 1,
33+
"mpp_lim": "F",
34+
"mixture_err": "F",
35+
"time_stepper": 3,
36+
"recon_type": 2,
37+
"muscl_order": 2,
38+
"muscl_lim": 2,
39+
"int_comp": "T",
40+
"riemann_solver": 2,
41+
"wave_speeds": 1,
42+
"avg_state": 2,
43+
"bc_x%beg": -3,
44+
"bc_x%end": -3,
45+
# Formatted Database Files Structure Parameters
46+
"format": 1,
47+
"precision": 2,
48+
"prim_vars_wrt": "T",
49+
"parallel_io": "T",
50+
# Patch 1 L
51+
"patch_icpp(1)%geometry": 1,
52+
"patch_icpp(1)%x_centroid": 0.25,
53+
"patch_icpp(1)%length_x": 0.5,
54+
"patch_icpp(1)%vel(1)": 0.0,
55+
"patch_icpp(1)%pres": 1.0,
56+
"patch_icpp(1)%alpha_rho(1)": 1.0e00,
57+
"patch_icpp(1)%alpha(1)": 1.0,
58+
# Patch 2 R
59+
"patch_icpp(2)%geometry": 1,
60+
"patch_icpp(2)%x_centroid": 0.75,
61+
"patch_icpp(2)%length_x": 0.5,
62+
"patch_icpp(2)%vel(1)": 0.0,
63+
"patch_icpp(2)%pres": 0.1,
64+
"patch_icpp(2)%alpha_rho(1)": 0.125e00,
65+
"patch_icpp(2)%alpha(1)": 1.0,
66+
# Fluids Physical Parameters
67+
"fluid_pp(1)%gamma": 1.0e00 / (1.4 - 1.0e00),
68+
"fluid_pp(1)%pi_inf": 0.0,
69+
}
70+
)
71+
)
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#!/usr/bin/env python3
2+
import json
3+
4+
# Configuring case dictionary
5+
print(
6+
json.dumps(
7+
{
8+
# Logistics
9+
"run_time_info": "T",
10+
# Computational Domain Parameters
11+
"x_domain%beg": 0.0e00,
12+
"x_domain%end": 1.0e00,
13+
"y_domain%beg": 0.0e00,
14+
"y_domain%end": 1.0e00,
15+
"m": 99,
16+
"n": 99,
17+
"p": 0,
18+
"dt": 5.0e-07,
19+
"t_step_start": 0,
20+
"t_step_stop": 1000,
21+
"t_step_save": 100,
22+
# Simulation Algorithm Parameters
23+
"num_patches": 2,
24+
"model_eqns": 3,
25+
"alt_soundspeed": "F",
26+
"num_fluids": 2,
27+
"mpp_lim": "T",
28+
"mixture_err": "T",
29+
"time_stepper": 3,
30+
"recon_type": 2,
31+
"muscl_order": 2,
32+
"muscl_lim": 2,
33+
"int_comp": "T",
34+
"null_weights": "F",
35+
"riemann_solver": 2,
36+
"wave_speeds": 1,
37+
"avg_state": 2,
38+
"bc_x%beg": -3,
39+
"bc_x%end": -3,
40+
"bc_y%beg": -3,
41+
"bc_y%end": -3,
42+
# Formatted Database Files Structure Parameters
43+
"format": 1,
44+
"precision": 2,
45+
"prim_vars_wrt": "T",
46+
"parallel_io": "T",
47+
# Patch 1: Base
48+
"patch_icpp(1)%geometry": 3,
49+
"patch_icpp(1)%x_centroid": 0.5e00,
50+
"patch_icpp(1)%y_centroid": 0.5e00,
51+
"patch_icpp(1)%length_x": 1.0e00,
52+
"patch_icpp(1)%length_y": 1.0e00,
53+
"patch_icpp(1)%vel(1)": 100.0e00,
54+
"patch_icpp(1)%vel(2)": 100.0e00,
55+
"patch_icpp(1)%pres": 1.0e05,
56+
"patch_icpp(1)%alpha_rho(1)": 1000.0e00,
57+
"patch_icpp(1)%alpha_rho(2)": 1.0,
58+
"patch_icpp(1)%alpha(1)": 1.0e-12,
59+
"patch_icpp(1)%alpha(2)": 1.0 - 1.0e-12,
60+
# Patch 2: Density to transport
61+
"patch_icpp(2)%geometry": 2,
62+
"patch_icpp(2)%smoothen": "T",
63+
"patch_icpp(2)%smooth_patch_id": 1,
64+
"patch_icpp(2)%smooth_coeff": 0.5e00,
65+
"patch_icpp(2)%x_centroid": 0.1e00,
66+
"patch_icpp(2)%y_centroid": 0.1e00,
67+
"patch_icpp(2)%radius": 0.1e00,
68+
"patch_icpp(2)%alter_patch(1)": "T",
69+
"patch_icpp(2)%vel(1)": 100.0e00,
70+
"patch_icpp(2)%vel(2)": 100.0e00,
71+
"patch_icpp(2)%pres": 1.0e05,
72+
"patch_icpp(2)%alpha_rho(1)": 1.0,
73+
"patch_icpp(2)%alpha_rho(2)": 1.0,
74+
"patch_icpp(2)%alpha(1)": 0,
75+
"patch_icpp(2)%alpha(2)": 1.0,
76+
# Fluids Physical Parameters
77+
"fluid_pp(1)%gamma": 1.0e00 / (2.35e00 - 1.0e00),
78+
"fluid_pp(1)%pi_inf": 2.35e00 * 1.0e09 / (2.35e00 - 1.0e00),
79+
"fluid_pp(2)%gamma": 1.0e00 / (1.4e00 - 1.0e00),
80+
"fluid_pp(2)%pi_inf": 0.0e00,
81+
}
82+
)
83+
)

0 commit comments

Comments
 (0)