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

Adiabatic heating in macro-atom mode #929

Open
Higginbottom opened this issue Dec 10, 2021 · 1 comment
Open

Adiabatic heating in macro-atom mode #929

Higginbottom opened this issue Dec 10, 2021 · 1 comment

Comments

@Higginbottom
Copy link
Collaborator

Negative values of adiabatic cooling - i.e. heating is often a problem in python simulations. It is usually only seen in imported hydro models - and this is one. The problem is that in macro atom mode, two errors are produced:

100001 -- kpkt: Photon %d. Adiabatic cooling negative! Major problem if inwind (%d) == 0
100000 -- kpkt: Photon %d. Setting adiabatic kpkt destruction probability to zero for this matom.

which are causing the run to stop due to too many errors.
We should either remove this as an error if we think the code is dealing with the situation properly, or fix it!

It takes a long time to get to the error - but here are the files to run it..

input.pf.txt
00000578.pluto.txt

@jhmatthews
Copy link
Collaborator

So, the reason this happens is because all energy is initially created as r-packets in a macro-atom simulation (although there was an attempt to put in extra heating, it's never really been fully working or tested). Thus, in a normal run, there's no way to account for nonradiative heating as in this case - whereas in the non-macro atom case the temperature would increase and so would the thermal wind radiation, there's no way to create the extra packets in the non-macro atom mode.

The actual error is occurring when the code decides how to eliminate k-packets by k->r transitions. Normally it would have a nonzero probability of destroying the packet via adiabatic cooling, but if adiabatic cooling is -ve then it sets this probability to zero.

It's possible it wouldn't be that much work to implement given I already had a bit of a go at it, but I'd need to think about it and I'm wary of introducing new schemes we don't have time to fully test given recent history.

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

No branches or pull requests

2 participants