Skip to content

Commit 86826d4

Browse files
author
Daniel Vickers
committed
Merge branch 'master' of github.com:danieljvickers/MFC-Dan
2 parents b42028a + 05fbe8f commit 86826d4

96 files changed

Lines changed: 4954 additions & 331 deletions

File tree

Some content is hidden

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

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ jobs:
149149
continue-on-error: true
150150

151151
github:
152-
name: ${{ matrix.nvhpc && format('NVHPC {0} ({1})', matrix.nvhpc, matrix.target) || format('Github ({0}, {1}, {2}, intel={3})', matrix.os, matrix.mpi, matrix.debug, matrix.intel) }}
152+
name: ${{ matrix.nvhpc && format('NVHPC {0} ({1})', matrix.nvhpc, matrix.target) || format('Github ({0}, {1}, {2}, {3})', matrix.os, matrix.mpi, matrix.debug, matrix.intel && 'intel' || 'GNU') }}
153153
needs: [lint-gate, file-changes, rebuild-cache]
154154
if: >-
155155
!cancelled() &&

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ exit 0
636636
target_compile_options(${a_target} PRIVATE -fopenmp)
637637
target_link_options(${a_target} PRIVATE -fopenmp)
638638
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang")
639-
target_compile_options(${a_target} PRIVATE -fopenmp --offload-arch=gfx90a)
639+
target_compile_options(${a_target} PRIVATE -fopenmp --offload-arch=gfx90a -fopenmp-target-fast -fopenmp-assume-threads-oversubscription -fopenmp-assume-teams-oversubscription)
640640
target_link_options(${a_target} PRIVATE -fopenmp --offload-arch=gfx90a)
641641
endif()
642642
endif()
@@ -1026,4 +1026,4 @@ site_name(SITE_NAME)
10261026

10271027
configure_file(
10281028
"${CMAKE_CURRENT_SOURCE_DIR}/toolchain/cmake/configuration.cmake.in"
1029-
"${CMAKE_CURRENT_BINARY_DIR}/configuration.txt")
1029+
"${CMAKE_CURRENT_BINARY_DIR}/configuration.txt")

docs/documentation/case.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ See @ref equations "Equations" for the mathematical models these parameters cont
445445
| `mp_weno` | Logical | Monotonicity preserving WENO |
446446
| `muscl_order` | Integer | MUSCL order [1,2] |
447447
| `muscl_lim` | Integer | MUSCL Slope Limiter: [1] minmod; [2] monotonized central; [3] Van Albada; [4] Van Leer; [5] SUPERBEE |
448+
| `muscl_eps` | Real | MUSCL limiter slope-product threshold (default: hard-coded thresholds; set to 0 for textbook behavior) |
448449
| `flux_lim` | Integer | Flux limiter for post-process: [1] minmod; [2] MUSCL; [3] OSPRE; [4] SUPERBEE |
449450
| `int_comp` | Logical | THINC Interface Compression |
450451
| `ic_eps` | Real | Interface compression threshold (default: 1e-4) |
@@ -542,6 +543,10 @@ It is recommended to set `weno_eps` to $10^{-6}$ for WENO-JS, and to $10^{-40}$
542543
- `muscl_lim` specifies the slope limiter that is used in 2nd order MUSCL Reconstruction by an integer from 1 through 5.
543544
`muscl_lim = 1`, `2`, `3`, `4`, and `5` correspond to minmod, monotonized central, Van Albada, Van Leer, and SUPERBEE, respectively.
544545

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

547552
- `riemann_solver` specifies the choice of the Riemann solver that is used in simulation by an integer from 1 through 4.
@@ -1068,8 +1073,20 @@ When ``cyl_coord = 'T'`` is set in 2D the following constraints must be met:
10681073

10691074
- `cantera_file` specifies the chemical mechanism file. If the file is part of the standard Cantera library, only the filename is required. Otherwise, the file must be located in the same directory as your `case.py` file
10701075

1076+
### 18. Chemistry-Specific Boundary Conditions
1077+
1078+
| Parameter | Type | Description |
1079+
| ---: | :----: | :--- |
1080+
| `bc_[x,y,z]%%isothermal_in` | Logical | Enable isothermal wall at the domain entrance (minimum coordinate). |
1081+
| `bc_[x,y,z]%%isothermal_out` | Logical | Enable isothermal wall at the domain exit (maximum coordinate). |
1082+
| `bc_[x,y,z]%%Twall_in` | Real | Temperature [K] of the entrance isothermal wall. |
1083+
| `bc_[x,y,z]%%Twall_out` | Real | Temperature [K] of the exit isothermal wall. |
1084+
1085+
This boundary condition can be used for fixed-temperature (isothermal) walls at the domain extremities. It is exclusively available for reacting flows and requires chemistry to be enabled. It properly evaluates heat and species fluxes at the interface when ``chemistry = 'T'``, ``chem_params%%diffusion = 'T'``, and the corresponding domain boundary is set to a slip wall (`bc_[x,y,z]%%[beg,end]` = -15) or a no-slip wall (`bc_[x,y,z]%%[beg,end]` = -16).
1086+
1087+
10711088

1072-
### 18. GPU Performance (NVIDIA UVM)
1089+
### 19. GPU Performance (NVIDIA UVM)
10731090

10741091
| Parameter | Type | Description |
10751092
| ---: | :---: | :--- |

docs/documentation/visualization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ Post-processed data in Silo-HDF5 format (`format=1`) can be opened directly in P
205205
Paraview 5.11.0 has been confirmed to work with the MFC databases for some parallel environments.
206206
Nevertheless, the installation and configuration of Paraview can be environment-dependent and are left to the user.
207207

208-
The user can launch Paraview and open the index files under `/silo_hdf5/root`.
208+
The user can launch Paraview and open the series file `/silo_hdf5/collection.silo.series`.
209209
Once the database is loaded, flow field variables contained in the database can be added to the render view.
210210
Further information on Paraview can be found in its [documentation](https://docs.paraview.org/en/latest/).
211211
The figure below shows the iso-contour of the liquid void fraction (`alpha1`) in the database generated by the example case `3D_sphbubcollapse`.

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
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
#!/usr/bin/env python3
2+
import json
3+
import math
4+
5+
import cantera as ct
6+
7+
Lx = 0.05
8+
Ly = 0.05
9+
10+
ctfile = "h2o2.yaml"
11+
sol_L = ct.Solution(ctfile)
12+
sol_L.TPY = 1125, ct.one_atm, "O2:0.21,N2:0.79"
13+
# Configuring case dictionary
14+
case = {
15+
"run_time_info": "T",
16+
"x_domain%beg": 0.0,
17+
"x_domain%end": Lx,
18+
"y_domain%beg": 0.0,
19+
"y_domain%end": Ly,
20+
"m": 699,
21+
"n": 699,
22+
"p": 0,
23+
"dt": 4.0e-08,
24+
"t_step_start": 0,
25+
"t_step_stop": 75000,
26+
"t_step_save": 4500,
27+
"num_patches": 1,
28+
"model_eqns": 2,
29+
"alt_soundspeed": "F",
30+
"num_fluids": 1,
31+
"mpp_lim": "F",
32+
"mixture_err": "T",
33+
"time_stepper": 3,
34+
"mp_weno": "F",
35+
"weno_order": 5,
36+
"weno_eps": 1e-16,
37+
"riemann_solver": 2,
38+
"wave_speeds": 1,
39+
"avg_state": 2,
40+
"bc_x%beg": -7,
41+
"bc_x%end": -3,
42+
"bc_y%beg": -16,
43+
"bc_y%end": -3,
44+
"bc_y%isothermal_in": "T",
45+
"bc_y%Twall_in": 600.0,
46+
"format": 1,
47+
"precision": 2,
48+
"prim_vars_wrt": "T",
49+
"parallel_io": "T",
50+
"chemistry": "T",
51+
"chem_params%diffusion": "T",
52+
"chem_params%reactions": "F",
53+
"cantera_file": ctfile,
54+
"chem_wrt_T": "T",
55+
"patch_icpp(1)%geometry": 3,
56+
"patch_icpp(1)%hcid": 291,
57+
"patch_icpp(1)%x_centroid": Lx / 2,
58+
"patch_icpp(1)%y_centroid": Ly / 2,
59+
"patch_icpp(1)%length_x": Lx,
60+
"patch_icpp(1)%length_y": Ly,
61+
"patch_icpp(1)%vel(1)": 0,
62+
"patch_icpp(1)%vel(2)": 0,
63+
"patch_icpp(1)%pres": 101325,
64+
"patch_icpp(1)%alpha_rho(1)": 1.00,
65+
"patch_icpp(1)%alpha(1)": 1,
66+
"fluid_pp(1)%gamma": 1.0e00 / (1.4e00 - 1.0e00),
67+
"fluid_pp(1)%pi_inf": 0.0e00,
68+
"viscous": "T",
69+
"fluid_pp(1)%Re(1)": 100000,
70+
}
71+
for i in range(len(sol_L.Y)):
72+
case[f"chem_wrt_Y({i + 1})"] = "T"
73+
case[f"patch_icpp(1)%Y({i + 1})"] = sol_L.Y[i]
74+
75+
if __name__ == "__main__":
76+
print(json.dumps(case))
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
import json
2+
import math
3+
4+
# Free stream
5+
p_inf = 16281
6+
rho_inf = 0.416
7+
c_inf = math.sqrt(1.4 * p_inf / rho_inf)
8+
vel_inf = 2.5 * c_inf
9+
10+
# Jet inlet conditions
11+
p_J = 1.0 * p_inf
12+
vel_J = 41.0
13+
rho_J = 1000.0
14+
15+
# Viscosities
16+
mu_inf = 1.85e-5
17+
mu_J = 2.67e-3
18+
19+
d_jet = 1.2e-3
20+
21+
# Simulation parameters
22+
Ny = 3999
23+
Nx = 11999
24+
time_end = 5e-4
25+
cfl = 0.6
26+
eps = 1e-8
27+
28+
# Case dictionary
29+
30+
print(
31+
json.dumps(
32+
{
33+
# Logistics
34+
"run_time_info": "T",
35+
# Computational domain parameters
36+
"x_domain%beg": -40 * d_jet,
37+
"x_domain%end": 60 * d_jet,
38+
"y_domain%beg": 0.0,
39+
"y_domain%end": 35 * d_jet,
40+
"m": int(Nx),
41+
"n": int(Ny),
42+
"p": 0,
43+
"cfl_adap_dt": "T",
44+
"t_stop": time_end,
45+
"t_save": time_end / 50,
46+
"n_start": 0,
47+
"cfl_target": cfl,
48+
# Simulation algorithm parameters
49+
"num_patches": 2,
50+
"model_eqns": 3,
51+
"alt_soundspeed": "F",
52+
"num_fluids": 2,
53+
"mpp_lim": "T",
54+
"mixture_err": "F",
55+
"time_stepper": 3,
56+
"recon_type": 2,
57+
"muscl_order": 2,
58+
"muscl_lim": 1,
59+
"riemann_solver": 2,
60+
"wave_speeds": 1,
61+
"avg_state": 2,
62+
"elliptic_smoothing": "T",
63+
"elliptic_smoothing_iters": 10, # 50,
64+
"bc_x%beg": -17,
65+
"bc_x%end": -12,
66+
"bc_y%beg": -17,
67+
"bc_y%end": -3,
68+
"num_bc_patches": 0,
69+
# Formatted Database File Structures
70+
"format": 1,
71+
"precision": 2,
72+
"prim_vars_wrt": "T",
73+
"parallel_io": "T",
74+
# Patch 1: Free stream
75+
"patch_icpp(1)%geometry": 3,
76+
"patch_icpp(1)%x_centroid": 0.0,
77+
"patch_icpp(1)%y_centroid": 50 * d_jet,
78+
"patch_icpp(1)%length_x": 1000 * d_jet,
79+
"patch_icpp(1)%length_y": 1000 * d_jet,
80+
"patch_icpp(1)%vel(1)": f"{vel_inf} * tanh(y / {d_jet / 4})",
81+
"patch_icpp(1)%vel(2)": 0.0,
82+
"patch_icpp(1)%pres": p_inf,
83+
"patch_icpp(1)%alpha_rho(1)": rho_inf * (1.0 - eps),
84+
"patch_icpp(1)%alpha(1)": 1.0 - eps,
85+
"patch_icpp(1)%alpha_rho(2)": eps,
86+
"patch_icpp(1)%alpha(2)": eps,
87+
# Patch 2: Jet
88+
"patch_icpp(2)%geometry": 3,
89+
"patch_icpp(2)%alter_patch(1)": "T",
90+
"patch_icpp(2)%x_centroid": 0.0,
91+
"patch_icpp(2)%y_centroid": 0.0,
92+
"patch_icpp(2)%length_x": d_jet,
93+
"patch_icpp(2)%length_y": d_jet,
94+
"patch_icpp(2)%vel(1)": 0.0,
95+
"patch_icpp(2)%vel(2)": vel_J,
96+
"patch_icpp(2)%pres": p_J,
97+
"patch_icpp(2)%alpha_rho(1)": eps,
98+
"patch_icpp(2)%alpha(1)": eps,
99+
"patch_icpp(2)%alpha_rho(2)": (1.0 - eps) * rho_J,
100+
"patch_icpp(2)%alpha(2)": 1.0 - eps,
101+
# Fluid properties
102+
"fluid_pp(1)%gamma": 1.00 / (1.4 - 1.0),
103+
"fluid_pp(1)%pi_inf": 0.0,
104+
"fluid_pp(2)%gamma": 1.0 / (6.12 - 1.0),
105+
"fluid_pp(2)%pi_inf": 6.12 * 3.43e8 / (6.12 - 1),
106+
"viscous": "T",
107+
"fluid_pp(1)%Re(1)": 1 / mu_inf,
108+
"fluid_pp(2)%Re(1)": 1 / mu_J,
109+
"surface_tension": "T",
110+
"cf_wrt": "T",
111+
"sigma": 0.072,
112+
}
113+
)
114+
)

examples/2D_mibm_shock_cylinder/case.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
"precision": 2,
8888
"prim_vars_wrt": "T",
8989
"E_wrt": "T",
90+
"ib_state_wrt": "T",
9091
"parallel_io": "T",
9192
# Patch: Constant Tube filled with air
9293
# Specify the cylindrical air tube grid geometry
@@ -128,7 +129,7 @@
128129
"patch_ib(1)%angular_vel(1)": 0.0, # x-axis rotational velocity in radians per second
129130
"patch_ib(1)%angular_vel(2)": 0.0, # y-axis rotation
130131
"patch_ib(1)%angular_vel(3)": 0.0, # z-axis rotation
131-
"patch_ib(1)%mass": 0.5, # z-axis rotation
132+
"patch_ib(1)%mass": 0.25, # z-axis rotation
132133
# Fluids Physical Parameters
133134
"fluid_pp(1)%gamma": 1.0e00 / (gam_a - 1.0e00), # 2.50(Not 1.40)
134135
"fluid_pp(1)%pi_inf": 0,

0 commit comments

Comments
 (0)