lanl / phoebus

Phifty One Ergs Blows Up A Star
BSD 3-Clause "New" or "Revised" License
32 stars 0 forks source link

Hyperexponential coordinates #166

Closed brryan closed 1 year ago

brryan commented 1 year ago

PR Summary

An alternative (going back to ~Tchekhovskoy+ 2011) to having an outer boundary near a disk is to use hyperexponential coordinates such that, beyond some break radius, zones grow radially in size very rapidly with radius.

This PR implements the hyperexponential coordinates based on how they are implemented in KHARMA.

PR Checklist

brryan commented 1 year ago

Code sharing!

Does copy and pasting count? Lol

bprather commented 1 year ago

Code sharing!

Does copy and pasting count? Lol

You changed the names!

(Honestly I like your naming better, and hadn't considered adding HExp to FMKS since I'm using it so differently, so I'll probably steal it back even more literally)

brryan commented 1 year ago

We should probably make sure this doesn't break anything and also add a test. Other than that, 👍 nice improvement.

The original FMKS unit test was actually good for this -- the answer is unchanged in the region below the hyperexponential break radius. I also updated that test to sample a region outside the break radius.

2D torus runs fine for a short time, and grid looks correct.

Yurlungur commented 1 year ago

Is this ready to go in @brryan ?

brryan commented 1 year ago

@Yurlungur This is ready to go in, but I think it would be easiest to merge #165 first when everyone thinks thats ready, then I can deal with the merge conflicts and undoing the less-good fix to gcov ghost cell pruning in phoedf.py that is currently in this PR if thats OK with you