Hi everyone, I believe the routines in GRHydro_SlopeLimiter.F90 are all either mislabelled or simply the wrong formulae. As a quick reminder, for the upwind slope ("dupw") and downwind slope ("dloc"), we expect to get the following results:
If dupw * dloc <= 0, delta=0 [slope limiters go flat near extrema, by design]
else
if (minmod)
delta = sign(dupw) * min( abs(dupw), abs(dloc))
else if (MC)
delta = sign(dupw) * min( 2*abs(dupw), 2*abs(dloc), abs(dupw+dloc)/2 )
else if (superbee)
delta = sign(dupw) * max[ min(2*abs(dupw), dloc) , min(2*abs(dloc),dupw) ]
On the rather nice wikipedia page, http://en.wikipedia.org/wiki/Flux_limiter
they take variables r = dupw/dloc and phi = delta / dloc, but the results are the same.
Attached are a spreadsheet where I tried to reproduce what the current routine actually calculates for various inputs, along with the recommended code fix for GRHydro_TVDReconstruct.F90.
In summmary: the current "MC2" and "minmod" options work like they should. "MC1" is actually minmod with a floor for very small values. minmod2, minmod3, and superbee are all incorrect expressions.
Cheers, Josh
On 09/01/12 20:47, Joshua Faber wrote:
Hi everyone, I believe the routines in GRHydro_SlopeLimiter.F90 are all either mislabelled or simply the wrong formulae. As a quick reminder, for the upwind slope ("dupw") and downwind slope ("dloc"), we expect to get the following results:
[snip]
On the rather nice wikipedia page, http://en.wikipedia.org/wiki/Flux_limiter
they take variables r = dupw/dloc and phi = delta / dloc, but the results are the same.
Assuming the ET files follow Whisky, then I would note:
1) The Whisky results follow from my thesis, which follow from Toro (1st edition) 2) Toro gives a formula to convert Flux limiters to Slope limiters; they are _not_ the same thing in his notation. The flux limiters are the canonical values, but the slope limiters "corresponding" to the flux limiters use different formulas. 3) I didn't revisit them after implementation, and it should be noted that Toro fixed a large number of typos between 1st and 2nd edition, so it wouldn't surprise me if some followed through.
Saying all that, is there really a great call for the slope limiters? I would have thought that minmod and MC (the correct version is MC2) would be enough for basic testing. I've had similar thoughts with the Roe solver in the past; only inertia and not wanting to redo testsuites stopped me from taking them out of Whisky ages ago. Why not just remove them? Less to maintain, especially if they're not used.
Ian
Hi Ian, I completely agree with you about slope limiters. I'd keep minmod and MC2, code in superbee just for historical reasons (it's in the sample code I sent along), but eliminate all the others as obsolete. That way, there would be two commonly used options,and one more for comparison, but everything in one subroutine and much more condensed than before.
Cheers, J
On Tue, Jan 10, 2012 at 6:05 AM, Ian Hawke I.Hawke@soton.ac.uk wrote:
On 09/01/12 20:47, Joshua Faber wrote:
Hi everyone, I believe the routines in GRHydro_SlopeLimiter.F90 are all either mislabelled or simply the wrong formulae. As a quick reminder, for the upwind slope ("dupw") and downwind slope ("dloc"), we expect to get the following results:
[snip]
On the rather nice wikipedia page, http://en.wikipedia.org/wiki/Flux_limiter
they take variables r = dupw/dloc and phi = delta / dloc, but the results are the same.
Assuming the ET files follow Whisky, then I would note:
- The Whisky results follow from my thesis, which follow from Toro (1st
edition) 2) Toro gives a formula to convert Flux limiters to Slope limiters; they are _not_ the same thing in his notation. The flux limiters are the canonical values, but the slope limiters "corresponding" to the flux limiters use different formulas. 3) I didn't revisit them after implementation, and it should be noted that Toro fixed a large number of typos between 1st and 2nd edition, so it wouldn't surprise me if some followed through.
Saying all that, is there really a great call for the slope limiters? I would have thought that minmod and MC (the correct version is MC2) would be enough for basic testing. I've had similar thoughts with the Roe solver in the past; only inertia and not wanting to redo testsuites stopped me from taking them out of Whisky ages ago. Why not just remove them? Less to maintain, especially if they're not used.
Ian _______________________________________________ Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users
Hi Josh, Ian,
On 1/10/12 9:17 AM, Joshua Faber wrote:
Hi Ian, I completely agree with you about slope limiters. I'd keep minmod and MC2, code in superbee just for historical reasons (it's in the sample code I sent along), but eliminate all the others as obsolete. That way, there would be two commonly used options,and one more for comparison, but everything in one subroutine and much more condensed than before.
I fully agree with this!
- Christian
On Tue, Jan 10, 2012 at 12:17:08PM -0500, Joshua Faber wrote:
Hi Ian, I completely agree with you about slope limiters. I'd keep minmod and MC2, code in superbee just for historical reasons (it's in the sample code I sent along), but eliminate all the others as obsolete. That way, there would be two commonly used options,and one more for comparison, but everything in one subroutine and much more condensed than before.
I agree as well.
Frank
users@lists.einsteintoolkit.org