Skip to content

Commit 5b00648

Browse files
committed
Revert HLL/LF adv gsrc change; update comment to explain PR #800 intent
The previous commit incorrectly set flux_gsrc(adv) = 0 for HLL and LF, which would have reverted PR #800. Per the analysis in issue #1402 comment by ChrisZYJ: flux_rs(adv) in HLL/LF is the numerical diffusion component (not transport), and any face-flux in cylindrical coordinates requires the full geometric divergence (1/r)*d(rF)/dr = dF/dr + F/r. The flux_gsrc term provides the F/r correction for the diffusion. The transport half is handled separately via flux_src_rs (non-conservative source). PR #800 was correct. The comment is updated to document this so future readers do not repeat the mistake. The convergence test is unaffected: for num_fluids=1, alpha=1 everywhere so flux_rs(adv) = 0 at all faces regardless.
1 parent 743016a commit 5b00648

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/simulation/m_riemann_solvers.fpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -772,10 +772,10 @@ contains
772772
! Recalculating the radial momentum geometric source flux
773773
flux_gsrc_rs${XYZ}$_vf(j, k, l, eqn_idx%cont%end + 2) = flux_rs${XYZ}$_vf(j, k, l, &
774774
& eqn_idx%cont%end + 2) - (s_M*pres_R - s_P*pres_L)/(s_M - s_P)
775-
! Geometrical source of the void fraction(s) is zero
775+
! Cylindrical correction for HLL/LF numerical diffusion of void fraction(s)
776776
$:GPU_LOOP(parallelism='[seq]')
777777
do i = eqn_idx%adv%beg, eqn_idx%adv%end
778-
flux_gsrc_rs${XYZ}$_vf(j, k, l, i) = 0._wp
778+
flux_gsrc_rs${XYZ}$_vf(j, k, l, i) = flux_rs${XYZ}$_vf(j, k, l, i)
779779
end do
780780
end if
781781

@@ -1382,10 +1382,10 @@ contains
13821382
! Recalculating the radial momentum geometric source flux
13831383
flux_gsrc_rs${XYZ}$_vf(j, k, l, eqn_idx%cont%end + 2) = flux_rs${XYZ}$_vf(j, k, l, &
13841384
& eqn_idx%cont%end + 2) - (s_M*pres_R - s_P*pres_L)/(s_M - s_P)
1385-
! Geometrical source of the void fraction(s) is zero
1385+
! Cylindrical correction for HLL/LF numerical diffusion of void fraction(s)
13861386
$:GPU_LOOP(parallelism='[seq]')
13871387
do i = eqn_idx%adv%beg, eqn_idx%adv%end
1388-
flux_gsrc_rs${XYZ}$_vf(j, k, l, i) = 0._wp
1388+
flux_gsrc_rs${XYZ}$_vf(j, k, l, i) = flux_rs${XYZ}$_vf(j, k, l, i)
13891389
end do
13901390
end if
13911391

0 commit comments

Comments
 (0)