Skip to content

Commit 5d1a48a

Browse files
committed
merge upstream/master
2 parents fda872c + d513442 commit 5d1a48a

45 files changed

Lines changed: 2631 additions & 13 deletions

Some content is hidden

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

docs/documentation/case.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ See @ref equations "Equations" for the mathematical models these parameters cont
455455
| `mp_weno` | Logical | Monotonicity preserving WENO |
456456
| `muscl_order` | Integer | MUSCL order [1,2] |
457457
| `muscl_lim` | Integer | MUSCL Slope Limiter: [1] minmod; [2] monotonized central; [3] Van Albada; [4] Van Leer; [5] SUPERBEE |
458+
| `muscl_eps` | Real | MUSCL limiter slope-product threshold (default: hard-coded thresholds; set to 0 for textbook behavior) |
458459
| `flux_lim` | Integer | Flux limiter for post-process: [1] minmod; [2] MUSCL; [3] OSPRE; [4] SUPERBEE |
459460
| `int_comp` | Logical | THINC Interface Compression |
460461
| `ic_eps` | Real | Interface compression threshold (default: 1e-4) |
@@ -552,6 +553,10 @@ It is recommended to set `weno_eps` to $10^{-6}$ for WENO-JS, and to $10^{-40}$
552553
- `muscl_lim` specifies the slope limiter that is used in 2nd order MUSCL Reconstruction by an integer from 1 through 5.
553554
`muscl_lim = 1`, `2`, `3`, `4`, and `5` correspond to minmod, monotonized central, Van Albada, Van Leer, and SUPERBEE, respectively.
554555

556+
- `muscl_eps` controls the slope-product activation threshold for all MUSCL limiters.
557+
When not set (default), the threshold is 1e-9 for minmod/MC, and 1e-6 for others.
558+
Setting `muscl_eps = 0` gives textbook limiter behavior where limiters activate whenever both slopes have the same sign.
559+
555560
- `int_comp` activates interface compression using THINC used in MUSCL Reconstruction, with control parameters (`ic_eps`, and `ic_beta`).
556561

557562
- `riemann_solver` specifies the choice of the Riemann solver that is used in simulation by an integer from 1 through 4.

docs/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
{ name: "Mach 0.3 flow over a corgi (2M STL)", image: "res/simulations/u.png", computer: "HiPerGator", computerUrl: "https://www.rc.ufl.edu/about/hipergator/", accelerators: "2 GPUs", walltime: "80s", source: "https://www.youtube.com/watch?v=O8dSRqHLp_o" },
5959
// Shock-droplet
6060
{ name: "Shedding water droplet", image: "res/simulations/a.png", computer: "Summit", computerUrl: "https://www.olcf.ornl.gov/summit/", accelerators: "960 V100s", walltime: "4h", source: "https://www.youtube.com/watch?v=Gjj-qZkXcrg" },
61+
{ name: "1K resolved particles", image: "res/simulations/x.jpg", computer: "Phoenix", computerUrl: "https://www.pace.gatech.edu/", accelerators: "4 A100s", walltime: "~1.5h", source: "https://www.youtube.com/watch?v=ufisHG0KkOU" },
6162
// Biomedical & acoustics
6263
{ name: "Burstwave lithotripsy", image: "res/simulations/k.png", computer: "Delta", computerUrl: "https://www.ncsa.illinois.edu/research/project-highlights/delta/", accelerators: "128 A100s", walltime: "30m", source: "https://www.youtube.com/watch?v=XWsUTaJXGF8" },
6364
{ name: "Cavitation fragments kidney stone", image: "res/simulations/d.png", computer: "Summit", computerUrl: "https://www.olcf.ornl.gov/summit/", accelerators: "576 V100s", walltime: "30m", source: "https://doi.org/10.48550/arXiv.2305.09163" },
@@ -74,6 +75,7 @@
7475
{ name: "Breakup of vibrated interface", image: "res/simulations/f.png", computer: "Summit", computerUrl: "https://www.olcf.ornl.gov/summit/", accelerators: "128 V100s", walltime: "4h", source: "https://www.youtube.com/watch?v=XQ3g1oSg8mc" },
7576
{ name: "Viscous Taylor-Green vortex", image: "res/simulations/h.png", computer: "Delta", computerUrl: "https://www.ncsa.illinois.edu/research/project-highlights/delta/", accelerators: "128 A100s", walltime: "17h", source: "https://www.youtube.com/watch?v=7i2h08dlDQw" },
7677
{ name: "Mach 1.5 shock-helium bubble", image: "res/simulations/t.png", computer: "Phoenix", computerUrl: "https://www.pace.gatech.edu/", accelerators: "1 A100", walltime: "1h", source: "https://www.youtube.com/watch?v=zDJoe0NYZsQ" },
78+
{ name: "Sphere collision and wall rebound", image: "res/simulations/w.jpg", computer: "Phoenix", computerUrl: "https://www.pace.gatech.edu/", accelerators: "4 A100s", walltime: "~2h", source: "https://www.youtube.com/watch?v=5ugLuDtV0C0" },
7779
];
7880

7981
const scalings = [

docs/res/simulations/w.jpg

20.3 KB
Loading

docs/res/simulations/x.jpg

78.6 KB
Loading

src/simulation/m_global_parameters.fpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ module m_global_parameters
152152
logical :: nv_uvm_pref_gpu !< Enable explicit gpu memory hints (default FALSE)
153153
!> @}
154154

155+
real(wp) :: muscl_eps !< MUSCL limiter slope-product threshold
155156
real(wp) :: weno_eps !< Binding for the WENO nonlinear weights
156157
real(wp) :: teno_CT !< Smoothness threshold for TENO
157158
logical :: mp_weno !< Monotonicity preserving (MP) WENO
@@ -201,6 +202,7 @@ module m_global_parameters
201202
$:GPU_DECLARE(create='[recon_type, muscl_order, muscl_polyn, muscl_lim]')
202203
#:endif
203204

205+
$:GPU_DECLARE(create='[muscl_eps]')
204206
$:GPU_DECLARE(create='[mpp_lim, model_eqns, mixture_err, alt_soundspeed]')
205207
$:GPU_DECLARE(create='[avg_state, mp_weno, weno_eps, teno_CT, hypoelasticity]')
206208
$:GPU_DECLARE(create='[hyperelasticity, hyper_model, elasticity, low_Mach]')
@@ -547,6 +549,7 @@ contains
547549
model_eqns = dflt_int
548550
mpp_lim = .false.
549551
time_stepper = dflt_int
552+
muscl_eps = dflt_real
550553
weno_eps = dflt_real
551554
teno_CT = dflt_real
552555
mp_weno = .false.
@@ -892,7 +895,16 @@ contains
892895
$:GPU_UPDATE(device='[igr, igr_order, igr_iter_solver]')
893896
#:endif
894897
895-
! Initialize viscous fluid count and curvature tracking
898+
! muscl_eps: use per-limiter defaults when user did not set it
899+
if (f_is_default(muscl_eps)) then
900+
if (muscl_lim <= 2) then
901+
muscl_eps = 1e-9_wp ! minmod, MC
902+
else
903+
muscl_eps = 1e-6_wp ! Van Albada, Van Leer, SUPERBEE
904+
end if
905+
end if
906+
907+
! Initialize counts: viscous fluids, surface-tension interfaces, curvature interfaces
896908
Re_size = 0
897909
Re_size_max = 0
898910
@@ -1254,6 +1266,7 @@ contains
12541266
$:GPU_UPDATE(device='[num_fluids, num_dims, viscous, num_vels, nb, muscl_lim]')
12551267
#:endif
12561268
1269+
$:GPU_UPDATE(device='[muscl_eps]')
12571270
$:GPU_UPDATE(device='[dir_idx, dir_flg, dir_idx_tau]')
12581271
12591272
$:GPU_UPDATE(device='[relax, relax_model, palpha_eps, ptgalpha_eps]')

src/simulation/m_muscl.fpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,27 +169,26 @@ contains
169169
slope = 0._wp
170170

171171
if (muscl_lim == 1) then ! minmod
172-
if (slopeL*slopeR > 1e-9_wp) then
172+
if (slopeL*slopeR > muscl_eps) then
173173
slope = min(abs(slopeL), abs(slopeR))
174174
end if
175175
if (slopeL < 0._wp) slope = -slope
176176
else if (muscl_lim == 2) then ! MC
177-
if (slopeL*slopeR > 1e-9_wp) then
177+
if (slopeL*slopeR > muscl_eps) then
178178
slope = min(2._wp*abs(slopeL), 2._wp*abs(slopeR))
179179
slope = min(slope, 5e-1_wp*(abs(slopeL) + abs(slopeR)))
180180
end if
181181
if (slopeL < 0._wp) slope = -slope
182182
else if (muscl_lim == 3) then ! Van Albada
183-
if (abs(slopeL) > 1e-6_wp .and. abs(slopeR) > 1e-6_wp .and. abs(slopeL + slopeR) &
184-
& > 1e-6_wp .and. slopeL*slopeR > 1e-6_wp) then
183+
if (slopeL*slopeR > muscl_eps) then
185184
slope = ((slopeL + slopeR)*slopeL*slopeR)/(slopeL**2._wp + slopeR**2._wp)
186185
end if
187186
else if (muscl_lim == 4) then ! Van Leer
188-
if (abs(slopeL + slopeR) > 1.e-6_wp .and. slopeL*slopeR > 1.e-6_wp) then
187+
if (slopeL*slopeR > muscl_eps) then
189188
slope = 2._wp*slopeL*slopeR/(slopeL + slopeR)
190189
end if
191190
else if (muscl_lim == 5) then ! SUPERBEE
192-
if (slopeL*slopeR > 1e-6_wp) then
191+
if (slopeL*slopeR > muscl_eps) then
193192
slope = -1._wp*min(-min(2._wp*abs(slopeL), abs(slopeR)), -min(abs(slopeL), &
194193
& 2._wp*abs(slopeR)))
195194
end if

src/simulation/m_pressure_relaxation.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ contains
217217
type(scalar_field), dimension(sys_size), intent(inout) :: q_cons_vf
218218
integer, intent(in) :: j, k, l
219219
#:if not MFC_CASE_OPTIMIZATION and USING_AMD
220-
real(wp), dimension(2) :: alpha_rho, alpha
220+
real(wp), dimension(3) :: alpha_rho, alpha
221221
#:else
222222
real(wp), dimension(num_fluids) :: alpha_rho, alpha
223223
#:endif

src/simulation/m_start_up.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ contains
8888

8989
namelist /user_inputs/ case_dir, run_time_info, m, n, p, dt, &
9090
t_step_start, t_step_stop, t_step_save, t_step_print, &
91-
model_eqns, mpp_lim, time_stepper, weno_eps, &
91+
model_eqns, mpp_lim, time_stepper, weno_eps, muscl_eps, &
9292
rdma_mpi, teno_CT, mp_weno, weno_avg, &
9393
riemann_solver, low_Mach, wave_speeds, avg_state, &
9494
bc_x, bc_y, bc_z, &

tests/01DC0251/golden-metadata.txt

Lines changed: 157 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/01DC0251/golden.txt

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)