Skip to content

Commit ddaaec3

Browse files
committed
test regenerate?
1 parent 16fc0fe commit ddaaec3

File tree

672 files changed

+31946
-20087
lines changed

Some content is hidden

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

672 files changed

+31946
-20087
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ They are organized below. Just click the drop-downs!
132132

133133
* Shock and interface capturing schemes
134134
* First-order upwinding
135-
* WENO reconstructions of order 3 and 5
135+
* WENO reconstructions of order 3, 5, and 7
136136
* WENO variants: WENO-JS, WENO-M, WENO-Z, TENO
137137
* Monotonicity-preserving reconstructions
138138
* Reliable handling of high density ratios

docs/documentation/case.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ For example, $m=n=p=499$ discretizes the domain into $500^3$ cells.
123123
When the simulation is 2D/axi-symmetric or 1D, it requires that $p=0$ or $p=n=0$, respectively.
124124

125125
- `stretch_[x,y,z]` activates grid stretching in the $[x,y,z]$ directions.
126-
The grid is gradually stretched such that the domain boundaries are pushed away from the origin along a specified axis.
126+
The grid is gradually stretched such that the domain boundaries are pushed away from the origin along a specified axis. WENO7 does not support grid stretching.
127127

128128
- `a_[x,y,z]`, `[x,y,z]_a`, and `[x,y,z]_b` are parameters that define the grid stretching function. When grid stretching along the $x$ axis is considered, the stretching function is given as:
129129

@@ -347,6 +347,7 @@ Details of implementation of viscosity in MFC can be found in [Coralic (2015)](r
347347
| `weno_eps` | Real | WENO perturbation (avoid division by zero) |
348348
| `mapped_weno` | Logical | WENO-M (WENO with mapping of nonlinear weights) |
349349
| `wenoz` | Logical | WENO-Z |
350+
| `wenoz_q` | Real | WENO-Z power parameter q (only for WENO7) |
350351
| `teno` | Logical | TENO (Targeted ENO) |
351352
| `teno_CT` | Real | TENO threshold for smoothness detection |
352353
| `null_weights` | Logical | Null WENO weights at boundaries |
@@ -406,18 +407,20 @@ Note that `time_stepper = 3` specifies the total variation diminishing (TVD), th
406407

407408
- `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 = 'T'``, ``polytropic = 'T'``, ``adv_n = 'T'`` and `time_stepper = 3`.
408409

409-
- `weno_order` specifies the order of WENO scheme that is used for spatial reconstruction of variables by an integer of 1, 3, and 5, that correspond to the 1st, 3rd, and 5th order, respectively.
410+
- `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. WENO7 does not support grid stretching.
410411

411412
- `weno_eps` specifies the lower bound of the WENO nonlinear weights.
412-
Practically, `weno_eps` $<10^{-6}$ is used.
413+
It is recommended to set `weno_eps` to $10^{-6}$ for WENO-JS, and to $10^{-40}$ for other WENO variants.
413414

414415
- `mapped_weno` activates the WENO-M scheme in place of the default WENO-JS scheme ([Henrick et al., 2005](references.md#Henrick05)). WENO-M a variant of the WENO scheme that remaps the nonlinear WENO-JS weights by assigning larger weights to non-smooth stencils, reducing dissipation compared to the default WENO-JS scheme, at the expense of higher computational cost. Only one of `mapped_weno`, `wenoz`, and `teno` can be activated.
415416

416417
- `wenoz` activates the WENO-Z scheme in place of the default WENO-JS scheme ([Borges et al., 2008](references.md#Borges08)). WENO-Z is a variant of the WENO scheme that further reduces the dissipation compared to the WENO-M scheme. It has similar computational cost to the WENO-JS scheme.
417418

418-
- `teno` activates the TENO scheme in place of the default WENO-JS scheme ([Fu et al., 2016](references.md#Fu16)). TENO is a variant of the ENO scheme that is the least dissipative, but could be less robust for extreme cases. It uses a threshold to identify smooth and non-smooth stencils, and applies optimal weights to the smooth stencils. Only available for `weno_order = 5`. Requires `teno_CT` to be set.
419+
- `wenoz_q` specifies the power parameter `q` used in the WENO-Z scheme. It controls how aggressively the smoothness coefficients scale the weights. A higher value of `wenoz_q` increases the sensitivity to smoothness, improving stability but worsening numerical dissipation. For WENO3 and WENO5, `q=1` is fixed, so `wenoz_q` must not be set. For WENO7, `wenoz_q` can be set to 2, 3, or 4.
419420

420-
- `teno_CT` specifies the threshold for the TENO scheme. This dimensionless constant, also known as $C_T$, sets a threshold to identify smooth and non-smooth stencils. Larger values make the scheme more robust but also more dissipative. A recommended value for teno_CT is `1e-6`. When adjusting this parameter, it is recommended to try values like `1e-5` or `1e-7`.
421+
- `teno` activates the TENO scheme in place of the default WENO-JS scheme ([Fu et al., 2016](references.md#Fu16)). TENO is a variant of the ENO scheme that is the least dissipative, but could be less robust for extreme cases. It uses a threshold to identify smooth and non-smooth stencils, and applies optimal weights to the smooth stencils. Only available for `weno_order = 5` and `7`. Requires `teno_CT` to be set.
422+
423+
- `teno_CT` specifies the threshold for the TENO scheme. This dimensionless constant, also known as $C_T$, sets a threshold to identify smooth and non-smooth stencils. Larger values make the scheme more robust but also more dissipative. A recommended value for teno_CT is `1e-6`. When adjusting this parameter, it is recommended to try values like `1e-5` or `1e-7` for TENO5. A smaller value can be used for TENO7.
421424

422425
- `null_weights` activates nullification of the nonlinear WENO weights at the buffer regions outside the domain boundaries when the Riemann extrapolation boundary condition is specified (`bc_[x,y,z]%%beg[end]} = -4`).
423426

docs/documentation/running.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ When used, `--roc` will run the simulation and generate files in the case direct
103103
`results.json` can then be imported in [Perfetto's UI](https://ui.perfetto.dev/).
104104
Learn more about AMD Rocprof [here](https://rocm.docs.amd.com/projects/rocprofiler/en/docs-5.5.1/rocprof.html)
105105
It is best to run case files with few timesteps to keep the report file sizes manageable.
106-
- Omniperf (OMNI): `./mfc.sh run ... -t simulation --omni [omniperf flags]` allows one to conduct kernel-level profiling with [AMD Omniperf](https://rocm.github.io/omniperf/introduction.html#what-is-omniperf).
106+
- Omniperf (OMNI): `./mfc.sh run ... -t simulation --omni [omniperf flags]` allows one to conduct kernel-level profiling with [AMD's Omniperf](https://rocm.docs.amd.com/projects/omniperf/en/latest/index.html).
107107
When used, `--omni` will output profiling information for all subroutines, including rooflines, cache usage, register usage, and more, after the simulation is run.
108108
Adding this argument will moderately slow down the simulation and run the MFC executable several times.
109109
For this reason, it should only be used with case files with few timesteps.
File renamed without changes.

examples/1D_shuosher_teno7/case.py

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#!/usr/bin/env python3
2+
3+
import math
4+
import json
5+
6+
# Numerical setup
7+
Nx = 1000
8+
dx = 1./(1.*(Nx+1))
9+
10+
Tend, Nt = 1.8, 2000
11+
mydt = Tend/(1.*Nt)
12+
13+
# Configuring case dictionary
14+
print(json.dumps({
15+
# Logistics ================================================================
16+
'run_time_info' : 'T',
17+
# ==========================================================================
18+
19+
# Computational Domain Parameters ==========================================
20+
'x_domain%beg' : 0.,
21+
'x_domain%end' : 10.,
22+
'm' : Nx,
23+
'n' : 0,
24+
'p' : 0,
25+
'dt' : mydt,
26+
't_step_start' : 0,
27+
't_step_stop' : int(Nt),
28+
't_step_save' : int(math.ceil(Nt/10.0)),
29+
# ==========================================================================
30+
31+
# Simulation Algorithm Parameters ==========================================
32+
'num_patches' : 2,
33+
'model_eqns' : 2,
34+
'alt_soundspeed' : 'F',
35+
'num_fluids' : 1,
36+
'mpp_lim' : 'F',
37+
'mixture_err' : 'F',
38+
'time_stepper' : 3,
39+
'weno_order' : 7,
40+
'weno_eps' : 1.E-40,
41+
'teno' : 'T',
42+
'teno_CT' : 1.E-9,
43+
'null_weights' : 'F',
44+
'mp_weno' : 'F',
45+
'riemann_solver' : 2,
46+
'wave_speeds' : 1,
47+
'avg_state' : 2,
48+
'bc_x%beg' : -3,
49+
'bc_x%end' : -3,
50+
# ==========================================================================
51+
52+
# Formatted Database Files Structure Parameters ============================
53+
'format' : 2,
54+
'precision' : 2,
55+
'prim_vars_wrt' :'T',
56+
'rho_wrt' :'T',
57+
'parallel_io' :'T',
58+
# ==========================================================================
59+
60+
61+
# Background to cover whole domain with basic line patch
62+
# Patch 1 Left (0 < x < 1) ===============================================
63+
'patch_icpp(1)%geometry' : 1,
64+
'patch_icpp(1)%x_centroid' : 0.5,
65+
'patch_icpp(1)%length_x' : 1.,
66+
'patch_icpp(1)%vel(1)' : 2.629,
67+
'patch_icpp(1)%pres' : 10.333,
68+
'patch_icpp(1)%alpha_rho(1)' : 3.857,
69+
'patch_icpp(1)%alpha(1)' : 1.,
70+
# ==========================================================================
71+
72+
73+
# One anlytic patch to take care of 1 < x < 10
74+
# Patch 2 Analytic =========================================================
75+
'patch_icpp(2)%geometry' : 1,
76+
'patch_icpp(2)%x_centroid' : 5.5,
77+
'patch_icpp(2)%length_x' : 9.,
78+
'patch_icpp(2)%vel(1)' : 0.,
79+
'patch_icpp(2)%pres' : 1.,
80+
'patch_icpp(2)%alpha_rho(1)' : '1 + 0.2*sin(5*x)',
81+
'patch_icpp(2)%alpha(1)' : 1.,
82+
# ==========================================================================
83+
84+
# Fluids Physical Parameters ===============================================
85+
'fluid_pp(1)%gamma' : 1.E+00/(1.4-1.E+00),
86+
'fluid_pp(1)%pi_inf' : 0.0,
87+
# ==========================================================================
88+
}))
89+
90+
# ==============================================================================

examples/1D_shuosher_wenojs/case.py renamed to examples/1D_shuosher_wenojs5/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
'mixture_err' : 'F',
3838
'time_stepper' : 3,
3939
'weno_order' : 5,
40-
'weno_eps' : 1.E-40,
40+
'weno_eps' : 1.E-6,
4141
'mapped_weno' : 'F',
4242
'null_weights' : 'F',
4343
'mp_weno' : 'F',
File renamed without changes.
File renamed without changes.

src/common/m_checker_common.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ contains
194194
!> Checks constraints regarding WENO order.
195195
!! Called by s_check_inputs_common for all three stages
196196
subroutine s_check_inputs_weno
197-
@:PROHIBIT(all(weno_order /= (/1, 3, 5/)), "weno_order must be 1, 3, or 5")
197+
@:PROHIBIT(all(weno_order /= (/1, 3, 5, 7/)), "weno_order must be 1, 3, 5, or 7")
198198
@:PROHIBIT(m + 1 < weno_order, "m must be at least weno_order - 1")
199199
@:PROHIBIT(n > 0 .and. n + 1 < weno_order, "n must be at least weno_order - 1")
200200
@:PROHIBIT(p > 0 .and. p + 1 < weno_order, "p must be at least weno_order - 1")

src/pre_process/m_checker.fpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ contains
116116

117117
! Common checks for all directions (stretch_x, stretch_y, and stretch_z)
118118
#:for X in ['x', 'y', 'z']
119+
@:PROHIBIT(stretch_${X}$ .and. weno_order == 7, "weno_order = 7 does not support stretched grids")
119120
@:PROHIBIT(stretch_${X}$ .and. old_grid, "old_grid and stretch_${X}$ are incompatible")
120121
@:PROHIBIT(stretch_${X}$ .and. f_is_default(a_${X}$), "a_${X}$ must be set with stretch_${X}$ enabled")
121122
@:PROHIBIT(stretch_${X}$ .and. f_is_default(${X}$_a), "${X}$_a must be set with stretch_${X}$ enabled")

0 commit comments

Comments
 (0)