Skip to content

Commit 5a8ca06

Browse files
committed
MTHINC interface compression method
1 parent 52e8af1 commit 5a8ca06

81 files changed

Lines changed: 2397 additions & 2069 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.

docs/documentation/case.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,8 @@ See @ref equations "Equations" for the mathematical models these parameters cont
433433
| `mp_weno` | Logical | Monotonicity preserving WENO |
434434
| `muscl_order` | Integer | MUSCL order [1,2] |
435435
| `muscl_lim` | Integer | MUSCL Slope Limiter: [1] minmod; [2] monotonized central; [3] Van Albada; [4] Van Leer; [5] SUPERBEE |
436+
| `int_comp` | Integer | Interface Compression [1] THINC [2] MTHINC |
436437
| `flux_lim` | Integer | Flux limiter for post-process: [1] minmod; [2] MUSCL; [3] OSPRE; [4] SUPERBEE |
437-
| `int_comp` | Logical | THINC Interface Compression |
438438
| `ic_eps` | Real | Interface compression threshold (default: 1e-4) |
439439
| `ic_beta` | Real | Interface compression sharpness parameter (default: 1.6) |
440440
| `riemann_solver` | Integer | Riemann solver algorithm: [1] HLL*; [2] HLLC; [3] Exact*; [4] HLLD (only for MHD) |
@@ -530,7 +530,7 @@ It is recommended to set `weno_eps` to $10^{-6}$ for WENO-JS, and to $10^{-40}$
530530
- `muscl_lim` specifies the slope limiter that is used in 2nd order MUSCL Reconstruction by an integer from 1 through 5.
531531
`muscl_lim = 1`, `2`, `3`, `4`, and `5` correspond to minmod, monotonized central, Van Albada, Van Leer, and SUPERBEE, respectively.
532532

533-
- `int_comp` activates interface compression using THINC used in MUSCL Reconstruction, with control parameters (`ic_eps`, and `ic_beta`).
533+
- `int_comp` activates interface compression using [1] THINC or [2] MTHINC used in variable reconstruction, with control parameters (`ic_eps`, and `ic_beta`).
534534

535535
- `riemann_solver` specifies the choice of the Riemann solver that is used in simulation by an integer from 1 through 4.
536536
`riemann_solver = 1`, `2`, and `3` correspond to HLL, HLLC, and Exact Riemann solver, respectively (\cite Toro09).

docs/module_categories.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"m_weno",
88
"m_riemann_solvers",
99
"m_muscl",
10-
"m_variables_conversion"
10+
"m_variables_conversion",
11+
"m_thinc"
1112
]
1213
},
1314
{

examples/1D_sodshocktube_muscl/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"recon_type": 2,
3737
"muscl_order": 2,
3838
"muscl_lim": 2,
39-
"int_comp": "T",
39+
"int_comp": 1,
4040
"riemann_solver": 2,
4141
"wave_speeds": 1,
4242
"avg_state": 2,

examples/2D_advection_muscl/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"recon_type": 2,
3131
"muscl_order": 2,
3232
"muscl_lim": 2,
33-
"int_comp": "T",
33+
"int_comp": 1,
3434
"null_weights": "F",
3535
"riemann_solver": 2,
3636
"wave_speeds": 1,

examples/2D_riemann_test_muscl/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
# "weno_eps": 1e-16,
3535
"muscl_order": 2,
3636
"muscl_lim": 1,
37-
"int_comp": "T",
37+
"int_comp": 1,
3838
"riemann_solver": 2,
3939
"wave_speeds": 1,
4040
"avg_state": 2,

examples/2D_shockdroplet_muscl/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"recon_type": 2,
6060
"muscl_order": 2,
6161
"muscl_lim": 4,
62-
"int_comp": "T",
62+
"int_comp": 1,
6363
"null_weights": "F",
6464
"riemann_solver": 2,
6565
"wave_speeds": 1,

examples/3D_rayleigh_taylor_muscl/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"recon_type": 2,
5858
"muscl_order": 2,
5959
"muscl_lim": 4,
60-
"int_comp": "T",
60+
"int_comp": 1,
6161
"avg_state": 2,
6262
"riemann_solver": 2,
6363
"wave_speeds": 1,

examples/3D_shockdroplet_muscl/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202
"recon_type": 2,
203203
"muscl_order": 2,
204204
"muscl_lim": 3,
205-
"int_comp": "T",
205+
"int_comp": 1,
206206
"riemann_solver": 2,
207207
"wave_speeds": 1,
208208
"avg_state": 2,

src/simulation/m_global_parameters.fpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ module m_global_parameters
162162
logical :: mixture_err !< Mixture properties correction
163163
logical :: hypoelasticity !< hypoelasticity modeling
164164
logical :: hyperelasticity !< hyperelasticity modeling
165-
logical :: int_comp !< THINC interface compression
165+
integer :: int_comp !< Interface compression: 0=off, 1=THINC, 2=MTHINC
166166
real(wp) :: ic_eps !< THINC Epsilon to compress on surface cells
167167
real(wp) :: ic_beta !< THINC Sharpness Parameter
168168
integer :: hyper_model !< hyperelasticity solver algorithm
@@ -561,7 +561,7 @@ contains
561561
ptgalpha_eps = dflt_real
562562
hypoelasticity = .false.
563563
hyperelasticity = .false.
564-
int_comp = .false.
564+
int_comp = 0
565565
ic_eps = dflt_ic_eps
566566
ic_beta = dflt_ic_beta
567567
elasticity = .false.
@@ -845,7 +845,6 @@ contains
845845
846846
#:if not MFC_CASE_OPTIMIZATION
847847
! Determining the degree of the WENO polynomials
848-
849848
if (recon_type == WENO_TYPE) then
850849
weno_polyn = (weno_order - 1)/2
851850
if (teno) then
@@ -894,8 +893,7 @@ contains
894893
E_idx = mom_idx%end + 1
895894
896895
if (igr) then
897-
! IGR: volume fractions after energy (N-1 for N fluids; skipped when num_fluids=1)
898-
adv_idx%beg = E_idx + 1 ! Alpha for fluid 1
896+
adv_idx%beg = E_idx + 1
899897
adv_idx%end = E_idx + num_fluids - 1
900898
else
901899
! Volume fractions are stored in the indices immediately following the energy equation. WENO/MUSCL + Riemann
@@ -990,11 +988,11 @@ contains
990988
internalEnergies_idx%end = adv_idx%end + num_fluids
991989
sys_size = internalEnergies_idx%end
992990
else if (model_eqns == 4) then
993-
cont_idx%beg = 1 ! one continuity equation
991+
cont_idx%beg = 1
994992
cont_idx%end = 1 ! num_fluids
995-
mom_idx%beg = cont_idx%end + 1 ! one momentum equation in each direction
993+
mom_idx%beg = cont_idx%end + 1
996994
mom_idx%end = cont_idx%end + num_vels
997-
E_idx = mom_idx%end + 1 ! one energy equation
995+
E_idx = mom_idx%end + 1
998996
adv_idx%beg = E_idx + 1
999997
adv_idx%end = adv_idx%beg ! one volume advection equation
1000998
alf_idx = adv_idx%end
@@ -1173,7 +1171,7 @@ contains
11731171
fd_number = max(1, fd_order/2)
11741172
end if
11751173
1176-
if (mhd) then ! TODO merge with above; waiting for hyperelasticity PR
1174+
if (mhd) then
11771175
fd_number = max(1, fd_order/2)
11781176
end if
11791177
@@ -1196,7 +1194,7 @@ contains
11961194
grid_geometry = 1
11971195
else if (cyl_coord .and. p == 0) then ! Axisymmetric cylindrical grid
11981196
grid_geometry = 2
1199-
else ! Fully 3D cylindrical grid
1197+
else
12001198
grid_geometry = 3
12011199
end if
12021200

src/simulation/m_mpi_proxy.fpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ contains
7676
& 'num_probes', 'num_integrals', 'bubble_model', 'thermal', &
7777
& 'num_source', 'relax_model', 'num_ibs', 'n_start', &
7878
& 'num_bc_patches', 'num_igr_iters', 'num_igr_warm_start_iters', &
79-
& 'adap_dt_max_iters' ]
79+
& 'adap_dt_max_iters', 'int_comp' ]
8080
call MPI_BCAST(${VAR}$, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
8181
#:endfor
8282

@@ -92,7 +92,7 @@ contains
9292
& 'bc_z%grcbc_in', 'bc_z%grcbc_out', 'bc_z%grcbc_vel_out', &
9393
& 'cfl_adap_dt', 'cfl_const_dt', 'cfl_dt', 'surface_tension', &
9494
& 'shear_stress', 'bulk_stress', 'bubbles_lagrange', &
95-
& 'hyperelasticity', 'down_sample', 'int_comp','fft_wrt', &
95+
& 'hyperelasticity', 'down_sample', 'fft_wrt', &
9696
& 'hyper_cleaning', 'ib_state_wrt']
9797
call MPI_BCAST(${VAR}$, 1, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr)
9898
#:endfor
@@ -245,7 +245,6 @@ contains
245245

246246
#ifdef MFC_MPI
247247
integer :: ierr !< Generic flag used to identify and report MPI errors
248-
249248
call MPI_BCAST(phi_rn, num_freq, mpi_p, 0, MPI_COMM_WORLD, ierr)
250249
#endif
251250

0 commit comments

Comments
 (0)