-
Notifications
You must be signed in to change notification settings - Fork 142
Questions about Differences Between HLLC Scheme and PDEBench Implementation #95
Description
Hi, I noticed some differences between the standard HLLC scheme and the implementation in /PDEBench/pdebench/data_gen/data_gen_NLE/CompressibleFluid/CFD_multi_Hydra.py.
According to Riemann Solvers and Numerical Methods for Fluid Dynamics by E. F. Toro, the wave speeds
However, the implementation in the code uses:
Sfl = jnp.minimum(QL[iX, 2:-1], QR[iX, 1:-2]) - jnp.maximum(
cfL[2:-1], cfR[1:-2]
) # left-going wave
Sfr = jnp.maximum(QL[iX, 2:-1], QR[iX, 1:-2]) + jnp.maximum(
cfL[2:-1], cfR[1:-2]
) # right-going waveI could not find a corresponding formulation for this version of
In addition, the middle-wave speed
but in the code it is implemented as:
Va = (
(Sfr - QL[iX, 2:-1]) * UL[iX, 2:-1]
- (Sfl - QR[iX, 1:-2]) * UR[iX, 1:-2]
- QL[4, 2:-1]
+ QR[4, 1:-2]
)
Va /= (Sfr - QL[iX, 2:-1]) * QL[0, 2:-1] - (Sfl - QR[iX, 1:-2]) * QR[0, 1:-2]The expressions appear structurally different from the standard form, and similar discrepancies also show up in the computation of
Could you please clarify the source of these differences?
Are they based on a specific variant of HLLC, an optimization for JAX/vectorization, or an intentional modification for stability or performance?