Closed AstroBarker closed 1 year ago
Also the logic to make it work with IdealGas is kind of hacky.. I would like to fix this in the future by unifying the adiabat framework to work for an arbitrary EoS (without crash) but I need to better understand the kappa
business first, and also this PR is already quite long..
@AstroBarker looks like the singularity-eos submodule this is pinned to doesn't contain the entropy... Maybe something funny with git submodule
s?
@AstroBarker looks like the singularity-eos submodule this is pinned to doesn't contain the entropy... Maybe something funny with
git submodule
s?
Oh I just saw your comment above. Not sure what's going on here. I'll chat with you on slack
@AstroBarker This should work fine with the existing radiative torus setup. To do that, we take in a GRMHD solution with known density/temperature everywhere, and then in each zone treat the GRMHD pressure as the total pressure and then solve the equation P_tot = P_gas(T) + P_rad(T) for T, where T will in general be less than the initial GRMHD solution's temperature. As long as the EOS used by your PR and that gas/rad partitioning step are the same (they should be of course) this should be fine.
I will try to test for my use case soon, and at least review/approve ~tomorrow.
@brryan we're currently facing a GPU bug with singularity-eos. Trying to track it down.
@AstroBarker where is this as far as being able to merge it in?
@AstroBarker where is this as far as being able to merge it in?
I've got some local changes that I need to finish testing and push. The changes try to use the adiabat framework for the ideal gas after converting kappa
-> entropy
. Letting the root find go to much lower rho, T like we talked about helps but it's still a bit fickle to get rho_rmax
the same, but is closer than before.
@AstroBarker where is this as far as being able to merge it in?
I've got some local changes that I need to finish testing and push. The changes try to use the adiabat framework for the ideal gas after converting
kappa
->entropy
. Letting the root find go to much lower rho, T like we talked about helps but it's still a bit fickle to getrho_rmax
the same, but is closer than before.
How far off are they from each other now?
@AstroBarker where is this as far as being able to merge it in?
I've got some local changes that I need to finish testing and push. The changes try to use the adiabat framework for the ideal gas after converting
kappa
->entropy
. Letting the root find go to much lower rho, T like we talked about helps but it's still a bit fickle to getrho_rmax
the same, but is closer than before.How far off are they from each other now?
Only a couple percent, so long as things are set correctly. It took some playing with e.g., how close to 0 I let the density/temp go on the adiabats and the number of samples used.
@AstroBarker where is this as far as being able to merge it in?
I've got some local changes that I need to finish testing and push. The changes try to use the adiabat framework for the ideal gas after converting
kappa
->entropy
. Letting the root find go to much lower rho, T like we talked about helps but it's still a bit fickle to getrho_rmax
the same, but is closer than before.How far off are they from each other now?
Only a couple percent, so long as things are set correctly. It took some playing with e.g., how close to 0 I let the density/temp go on the adiabats and the number of samples used.
Hmm. That's probably fine... but since the torus is a standard test problem, it's probably useful to be able to retain the old original ideal gas setup as well.
How gross would it be to include both that machinery and a runtime flag that reverts to the old analytic formula? Not set on the eos type but something like torus/use_legacy_init
or something?
Have elected to keep the switches on EoS in the torus init. Made a few changes to root find tolerances. I think this is good to go. There may need to be some additional work when it is time for radiation, but that can be done at that time.
Looks like tests are failing: https://github.com/lanl/phoebus/actions/runs/4622700920/jobs/8175695524?pr=159#step:5:344
Thanks for the feedback @Yurlungur -- all comments should be addressed.
Will merge as soon as tests pass. :+1:
This PR adds necessary functionality to get the torus problem working with StellarCollapse EoS.
PR Summary
I add the following functionalities:
adiabats.hpp
which includes necessary functions to compute adiabats from the table given S, Ye.rho
andu
are replaced byGetStateFromEnthalpy
which returnsrho
andu
for either the ideal gas or stellar collapse EoS.Misc change: bug found in
root_find
wherestatus
was not passed through correctly and it complained when the root find failed even when status was passed in.TODO:
singularity-eos
to its latest and checkoutjhp/entropy
.kappa
.jhp/entropy
branch ofsingularity-eos
. Once that is through I need to update the used version of singularity to latest commit. @jonahm-LANL I tried committingsingularity-eos
to latest but I think it did not stick. What is the way to do this?PR Checklist
scripts/bash/format.sh
.