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

Radiative torus #104

Merged
merged 281 commits into from
Oct 20, 2022
Merged

Radiative torus #104

merged 281 commits into from
Oct 20, 2022

Conversation

brryan
Copy link
Collaborator

@brryan brryan commented Apr 15, 2022

PR Summary

Add radiation as an option to the torus problem. Either zero initial radiation or equipartition of Fishbone solution pressure between fluid and radiation inside the initial torus.

PR Checklist

  • Adds a test for any bugs fixed. Adds tests for new features.
  • Format your changes by calling scripts/bash/format.sh.
  • Explain what you did.
  • Loop radiation floors and ceilings through parameters interface, and code
  • Remove Eddington assumption from various radiation calls
  • Get GetFlatIdx to return default values when variable not included in pack
  • Rebuild driver to agree with main
  • Loop over nspec for radiation sources
  • Loop over nspec during FixFluxes
  • Clean up plot_snap2d.py
  • Clean up torus_rad.pin
  • Replace scattering_fraction with separate scattering opacity call
  • Add kappa_max to radiation ceilings, propagate through radiation fluid source code
  • Add method for choosing between radiation source term methods
  • Replace NumRadiationTypes with MaxNumRadiationTypes
  • Fix the uncountably infinite number of radiation-related warnings I've introduced in the past
  • Figure out why compile times are so much slower with nvcc in this PR

src/pgen/torus.cpp Outdated Show resolved Hide resolved

const Real ug1 = rho_ * eos_.InternalEnergyFromDensityTemperature(rho_, T, lambda);

return ((ug1 - ug0_) + (dJ_tot)) / (ug0_ + J0_tot);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@lroberts36 Here is the implicit-in-fluid-temperature residual. I solve ug(T^n+1) - ug(T^n) = ur^n+1 - ur^n in the fluid frame. Then after I get T^n+1, I use LinearSourceUpdate to get dE and dF and update the conserved radiation and fluid variables as usual.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I like this, it is a good solution.

}
} // for ispec

/* for (int ispec = 0; ispec < num_species; ++ispec) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll go back and make the source update algorithm a runtime option, probably a templated FluidSourceImpl function like we do elsewhere.

@brryan
Copy link
Collaborator Author

brryan commented Oct 19, 2022

OK if tests pass I think this is ready to merge if you are happy with it @Yurlungur

@Yurlungur
Copy link
Collaborator

I am happy with it

@Yurlungur
Copy link
Collaborator

Also great work. Awesome to have GRRMHD working.

@brryan
Copy link
Collaborator Author

brryan commented Oct 20, 2022

Thanks for your detailed review @Yurlungur! Much appreciated.

@brryan brryan merged commit be6b9f0 into main Oct 20, 2022
@Yurlungur Yurlungur deleted the brryan/rad_torus branch October 25, 2022 23:16
@Yurlungur Yurlungur restored the brryan/rad_torus branch October 25, 2022 23:16
@Yurlungur Yurlungur deleted the brryan/rad_torus branch October 19, 2023 18:10
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.

3 participants