Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lateral spreading revision #243

Merged
merged 3 commits into from
Nov 13, 2024
Merged

Lateral spreading revision #243

merged 3 commits into from
Nov 13, 2024

Conversation

GPLamb
Copy link
Contributor

@GPLamb GPLamb commented Nov 5, 2024

Updated the spreading description in my fork. From pure sound-speed (exponential) to something more ~Granot & Piran 2012
Allows better comparison with hydro results

Updated the expansion description within the redback_afterglow model from exponential, to quasi-(Granot-Piran 2012).
The original sound-speed approximation was an absolute upper-limit and overestimates spreading compared to hydro-simulations.
A better way to approximate expansion -- acts like Granot & Piran 2012 and not the exponential sound speed
fac = 0.5 * latstep
OmG = rotstep * (np.cos(thi - fac) - np.cos(ex + thi + fac)) # equivalent form for linear spacing
OmG = rotstep * (np.cos(thi - fac) - np.cos(ex/self.res + thi + fac)) # equivalent form for linear spacing
else:
te = np.ones(te.size) # no expansion
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be ex = np.ones(te.size)

@GPLamb
Copy link
Contributor Author

GPLamb commented Nov 5, 2024

new-lateral_spread
Plot with new spreading routine -- top-hat and Gaussian on- and off-axis, with and without lateral spreading

@nikhil-sarin
Copy link
Owner

Thanks @GPLamb, is this ready to go or are you still working on it? I need to fix a few things on other pull requests before I can merge this in.

@GPLamb
Copy link
Contributor Author

GPLamb commented Nov 6, 2024

This should be good to - I've run extra checks against JetSimpy and PyBlastAftefglowMag and it's spot on

@nikhil-sarin
Copy link
Owner

Nice one

@GPLamb
Copy link
Contributor Author

GPLamb commented Nov 6, 2024

new_check__redback_AG_vs_JetSimpy_vs_PyBlastAfterglowMag
FYI -- here is the comparison using a top-hat structure and expansion on/off
I can't figure out how to, or if, spreading can be turned off in PyBlastAfterglowMag, but it seems to be trying to do both at different times!?

@nikhil-sarin nikhil-sarin merged commit 1b02af6 into nikhil-sarin:master Nov 13, 2024
3 of 4 checks passed
@GPLamb
Copy link
Contributor Author

GPLamb commented Nov 13, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants