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 cooling approximation #610

Draft
wants to merge 221 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
221 commits
Select commit Hold shift + click to select a range
c5bc253
added interp_optab.F90 to read opacity table for Stamatellos+ 2007 co…
alisonkyoung1 Jan 18, 2023
79282cb
Stamatellos+2007 cooling implemented. Compiles but not tested.
alisonkyoung1 Jan 25, 2023
bceda49
Changed so that cooling is called from step in the form dudt_cool, li…
alisonkyoung1 Jan 27, 2023
a50fc56
added interp_optab.F90 to read opacity table for Stamatellos+ 2007 co…
alisonkyoung1 Jan 18, 2023
e1f9a72
Stamatellos+2007 cooling implemented.
alisonkyoung1 Jan 25, 2023
fd462b0
Resolve conflict
alisonkyoung1 Feb 15, 2023
5bc6863
Renamed module for eos_stamatellos
alisonkyoung1 Feb 7, 2023
929d1d3
Implementing Stamatellos+ 2007 EOS rather than adiabatic with polytro…
alisonkyoung1 Feb 15, 2023
145972d
Changes to eos_stamatellos implementation
alisonkyoung1 Feb 17, 2023
e91de33
Fixes for Stamatellos eos & cooling
alisonkyoung1 Feb 28, 2023
81459e1
src/setup/setup_sphere.f90
alisonkyoung1 Mar 1, 2023
9bed0da
Move OPTABLE to eos_stamatellos
alisonkyoung1 Mar 8, 2023
e4c4b43
Adding variable (de)allocation for cooling
alisonkyoung1 Mar 8, 2023
1473e6d
Correcting potential used in Stamatellos cooling
alisonkyoung1 Mar 10, 2023
382d757
Merge remote-tracking branch 'upstream/master' into cooling
alisonkyoung1 Mar 13, 2023
11ee26d
Changing Stamatellos cooling to icooling = 8
alisonkyoung1 Mar 13, 2023
be29a80
Fix typo
alisonkyoung1 Mar 13, 2023
458f034
Error handling for failure to read EOS table
alisonkyoung1 Mar 13, 2023
0b22f73
Read/write options for Stamatellos cooling
alisonkyoung1 Mar 13, 2023
f05cbd9
Contribution from stellar heating to Stamatellos cooling
alisonkyoung1 Mar 13, 2023
e38b52d
Add option to choose method for estimating the optical depth in Stama…
alisonkyoung1 Mar 15, 2023
1270daf
Stellar heating edits in cooling_stamatellos.f90
alisonkyoung1 Mar 16, 2023
ebcae73
merging
alisonkyoung1 Mar 16, 2023
3a625f5
remove redundant file
alisonkyoung1 Mar 16, 2023
12b0e94
Merge remote-tracking branch 'upstream/master'
alisonkyoung1 Mar 16, 2023
e7fc37e
Implements reading of named tabulated EOS file for Stamatellos/Lombar…
alisonkyoung1 Mar 27, 2023
4e39f99
merge conflicts fixed
alisonkyoung1 Mar 27, 2023
169e7d5
Merge conflicts resolved
alisonkyoung1 Mar 27, 2023
4070d66
Bug fixes
alisonkyoung1 Mar 27, 2023
e1ff32e
Add default opacity method
alisonkyoung1 Mar 27, 2023
83298af
Merge branch 'cooling'
alisonkyoung1 Mar 27, 2023
4972d85
Edits to equations for Lombardi+ 2015 cooling
alisonkyoung1 Mar 28, 2023
4a88d60
correction to gradP_cool
alisonkyoung1 Mar 31, 2023
c2ddedb
Changes to generalise opacity table read.
alisonkyoung1 Apr 3, 2023
c468ad2
Cooling gradP_cool: make usej consistent
alisonkyoung1 Apr 3, 2023
dfcd951
FLD additions for hybrid cooling:
alisonkyoung1 Apr 28, 2023
f1489c4
Fix merge conflicts
alisonkyoung1 May 15, 2023
fa0b21c
Use code values of kboltz and amu
alisonkyoung1 May 15, 2023
14eeae2
small changes to Stamatellos cooling
alisonkyoung1 May 25, 2023
a9dbbeb
Small edits for EOS=21
alisonkyoung1 May 26, 2023
e36f508
Edit to cooling_stamatellos.f90 for pressure method
alisonkyoung1 Jun 1, 2023
a847bfb
attempted fixes to Stamatellos cooling
alisonkyoung1 Jun 1, 2023
5a97456
edits to force.F90 for Stamatellos cooling
alisonkyoung1 Jun 2, 2023
6e4b095
Correction for icooling=8
alisonkyoung1 Jun 2, 2023
ab58785
comment out write Gpot_cool to file
alisonkyoung1 Jun 5, 2023
ebd56e5
Edits to gamma calc in eos_stamatellos.f90
alisonkyoung1 Jun 7, 2023
b0b5caa
Merge remote-tracking branch 'upstream/master'
alisonkyoung1 Jun 7, 2023
099459b
remove debug file write
alisonkyoung1 Jun 7, 2023
a89c55e
fix merge conflicts
alisonkyoung1 Jun 7, 2023
4db2a04
delete comment
alisonkyoung1 Jun 7, 2023
89d0306
Merge branch 'cooling_dev'
alisonkyoung1 Jun 7, 2023
00e43e6
remove debug write
alisonkyoung1 Jun 7, 2023
6f58ede
Changes to potential Gpot_cool
alisonkyoung1 Jun 8, 2023
08141b8
gamma checks
alisonkyoung1 Jun 8, 2023
3372386
Correction to Gpot_cool sum
alisonkyoung1 Jun 8, 2023
281e0c9
Fix merge conflicts
alisonkyoung1 Jun 12, 2023
8587c4d
fix typos
alisonkyoung1 Jun 14, 2023
a696cd6
change to ieos 21
alisonkyoung1 Jun 14, 2023
1622f05
resolve merge conflicts
alisonkyoung1 Jun 14, 2023
a6e46bb
fix error in eos 21
alisonkyoung1 Jun 14, 2023
a3c7808
comment out write debug info file
alisonkyoung1 Jun 15, 2023
620e357
changes for ieos=21
alisonkyoung1 Jun 16, 2023
646491e
small changes to ieos=21 and icooling=8
alisonkyoung1 Jun 16, 2023
b981a79
merge conflicts resolved
alisonkyoung1 Jun 16, 2023
58eabed
Resolve merge conflict
alisonkyoung1 Jun 16, 2023
ca1c01c
Comment out debug file write
alisonkyoung1 Jun 16, 2023
1c78796
Merge remote-tracking branch 'upstream/master'
alisonkyoung1 Jun 16, 2023
d4a7abe
Fix to energy updates in step when using icooling=8
alisonkyoung1 Jul 5, 2023
54bcbea
[tab-bot] tabs removed
alisonkyoung1 Jul 5, 2023
766f882
[format-bot] obsolete .gt. .lt. .ge. .le. .eq. .ne. replaced
alisonkyoung1 Jul 5, 2023
2165d0d
[header-bot] updated file headers
alisonkyoung1 Jul 5, 2023
cc7027c
[space-bot] whitespace at end of lines removed
alisonkyoung1 Jul 5, 2023
16ed142
[author-bot] updated AUTHORS file
alisonkyoung1 Jul 5, 2023
bbf6cb5
[format-bot] end if -> endif; end do -> enddo; if( -> if (
alisonkyoung1 Jul 5, 2023
af0aa75
[indent-bot] standardised indentation
alisonkyoung1 Jul 5, 2023
22ea193
fix merge conflicts
alisonkyoung1 Jul 6, 2023
6014ac9
fix errors
alisonkyoung1 Jul 6, 2023
5f69f22
Start of fixes for FLD for hybrid cooling
alisonkyoung1 Jul 7, 2023
034fc78
Added self contribution to lambda FLD (hybrid cooling)
alisonkyoung1 Jul 10, 2023
b067995
Fix bug in moddump_sphNG2phantom_disc.f90
alisonkyoung1 Jul 13, 2023
b2b7e17
Minor change to if statement format:
alisonkyoung1 Jul 18, 2023
9523e4b
fix merge conflicts
alisonkyoung1 Jul 19, 2023
c3db75b
Fix bugs from merge
alisonkyoung1 Jul 19, 2023
cba0882
fix for gradPcool
alisonkyoung1 Jul 25, 2023
2a765ae
Fixes for Lombardi cooling approximation
alisonkyoung1 Jul 26, 2023
b17a914
fix merge conflicts
alisonkyoung1 Jul 27, 2023
577e6e7
Revert "Fix bugs from merge"
alisonkyoung1 Jul 27, 2023
b13ecd4
change .ne. to /= in icooling = 8
alisonkyoung1 Jul 27, 2023
38834b9
bug fixes
alisonkyoung1 Jul 27, 2023
68acaab
bugfixes
alisonkyoung1 Jul 27, 2023
5461e35
minor edit
alisonkyoung1 Jul 27, 2023
30b6e25
minor edit
alisonkyoung1 Jul 27, 2023
8ad43ec
fix merge conflicts
alisonkyoung1 Jul 27, 2023
826f8f0
Revert to 2a765ae
alisonkyoung1 Aug 31, 2023
38f5840
made subroutine public in eos_stamatellos.f90
alisonkyoung1 Sep 1, 2023
328cbff
Added extra file handling tests for reading opacity table
alisonkyoung1 Sep 29, 2023
9db1fff
fix merge conflicts
alisonkyoung1 Sep 29, 2023
848ccff
fix merge conflicts
alisonkyoung1 Sep 29, 2023
7dadeeb
Merge update phantom
alisonkyoung1 Oct 11, 2023
8b8338b
Fix merge bugs
alisonkyoung1 Oct 11, 2023
277adce
Added FLD for hybrid cooling after Forgan+ 2009
alisonkyoung1 Nov 16, 2023
0ea6382
FLD edits
alisonkyoung1 Nov 21, 2023
e933a36
Added combined Stamatellos/Lombardi cooling method
alisonkyoung1 Nov 30, 2023
f746def
Bug fix in cooling_stamatellos.f90
alisonkyoung1 Nov 30, 2023
af4566a
FLD implemented in dens module
alisonkyoung1 Jan 8, 2024
864b48d
Tidying code
alisonkyoung1 Jan 9, 2024
d70220f
delete old file
alisonkyoung1 Jan 10, 2024
725b2ab
Tidying code
alisonkyoung1 Jan 10, 2024
d8045db
adding Stamatellos/Lombardi opacity
alisonkyoung1 Jan 10, 2024
8a4f3a7
merge FLD- fixed conflicts
alisonkyoung1 Jan 11, 2024
a5c16dc
fixes after merge
alisonkyoung1 Jan 11, 2024
28bc64f
bug fix
alisonkyoung1 Jan 11, 2024
8561015
bug fix
alisonkyoung1 Jan 12, 2024
f72bbbf
Tidying after merge
alisonkyoung1 Jan 12, 2024
494983b
Added Modified Lombardi cooling method
alisonkyoung1 Jan 23, 2024
6a5ccc5
Added FLD as a runtime option for icooling=8
alisonkyoung1 Jan 29, 2024
cc0567e
Rearranged Modified Lombardi equation
alisonkyoung1 Jan 30, 2024
1e9a9f9
Bug fix for Modified Lombardi cooling
alisonkyoung1 Feb 2, 2024
4f90475
Adjust stellar heating estimate in cooling_stamatellos.f90 and write …
alisonkyoung1 Feb 21, 2024
1313236
Corrected sink read in moddump_sphNG2phantom_disc.f90
alisonkyoung1 Feb 21, 2024
3971f1b
Fixes for icooling=8
alisonkyoung1 Feb 21, 2024
1d0327b
Changes to write opacity to dump (icooling=8)
alisonkyoung1 Feb 28, 2024
9f290e6
merge
alisonkyoung1 Apr 9, 2024
723e155
merge upstream
alisonkyoung1 Apr 10, 2024
e5fda5a
restoring upstream changes part 1
alisonkyoung1 Apr 10, 2024
c04a21a
restoring upstream changes part 2
alisonkyoung1 Apr 10, 2024
2c802a9
restoring upstream changes part 3
alisonkyoung1 Apr 11, 2024
b373d4d
restoring upstream changes part 4
alisonkyoung1 Apr 11, 2024
3be9f36
restoring upstream changes part5. Passes test suite!
alisonkyoung1 Apr 11, 2024
c67364c
Edits to analysis_disc_stresses.f90 for variable gamma (eos = 21) and…
alisonkyoung1 Apr 15, 2024
f444944
Fixing bugs in ModLom cooling
alisonkyoung1 May 1, 2024
2fcb4f6
partial update to main repo
alisonkyoung1 May 1, 2024
2ea5679
Further updates from Upstream
alisonkyoung1 May 2, 2024
39e3c11
Incomplete updates from Upstream
alisonkyoung1 May 2, 2024
a037668
Further updates
alisonkyoung1 May 2, 2024
77632d0
Changing Stamatellos cooling implementation for new step_leapfrog and…
alisonkyoung1 May 3, 2024
c52b4d0
Move cooling icooling=9 call to derivs
alisonkyoung1 May 7, 2024
c15c82a
Set fxyzu(4,:) =0 for step_leapfrog integration
alisonkyoung1 May 14, 2024
245b4a3
Set fxyzu(4,:) =0 for step_leapfrog integration - part 2
alisonkyoung1 May 14, 2024
170823e
bugfixes
alisonkyoung1 May 22, 2024
0f10f4d
edits so it passes tests again
alisonkyoung1 May 24, 2024
324c1a1
debug printouts
alisonkyoung1 Jun 18, 2024
780d7c4
edit to when cooling called
alisonkyoung1 Jun 20, 2024
79466cb
Batch 1 of upstream changes added
alisonkyoung1 Jun 21, 2024
e9e5bba
Merged Phantom upstream updates
alisonkyoung1 Jun 24, 2024
be3c685
fixed bug in cooling_radapprox.f90 (does not skip inactive particles …
alisonkyoung1 Jun 25, 2024
5d4e521
Updated test suite from upstream
alisonkyoung1 Jun 26, 2024
12367c0
Improve error handling in radapprox cooling
alisonkyoung1 Jul 1, 2024
11ca2bd
Adds dradcool/dU_hydro check to icooling=9
alisonkyoung1 Jul 8, 2024
7ae4d40
Merging upstream changes
alisonkyoung1 Jul 8, 2024
32de3d1
Adds upstream changes
alisonkyoung1 Jul 8, 2024
cc61452
Adds upstream changes
alisonkyoung1 Jul 8, 2024
6913b19
Adds upstream changes
alisonkyoung1 Jul 8, 2024
03403c8
Calling cooling_radapprox from evolve.f90
alisonkyoung1 Jul 10, 2024
d317ef7
radapprox bugfix and upstream updates
alisonkyoung1 Jul 11, 2024
a6499e0
Edits for radapprox cooling
alisonkyoung1 Jul 23, 2024
ec1a584
Fixes for cooling_radapprox
alisonkyoung1 Jul 24, 2024
1ee547f
minor changes to cooling_radapprox.f90
alisonkyoung1 Jul 25, 2024
0f1469e
Edits to icooling = 9
alisonkyoung1 Jul 26, 2024
018c251
Upstream changes added
alisonkyoung1 Jul 29, 2024
d16edd7
More upstream updates
alisonkyoung1 Jul 29, 2024
292fca2
Edits to make upstream changes work
alisonkyoung1 Jul 29, 2024
51f071a
More updates from upstream
alisonkyoung1 Jul 31, 2024
7a0c0ce
Changes Stamatellos EOS to ieos=23
alisonkyoung1 Jul 31, 2024
832d111
[indent-bot] standardised indentation
alisonkyoung1 Jul 31, 2024
ff647d9
Bugs fixed in icooling=9
alisonkyoung1 Aug 1, 2024
952a540
bug fix for radapprox cooling
alisonkyoung1 Aug 9, 2024
ac318f9
Merge upstream changes
alisonkyoung1 Aug 9, 2024
b8185e5
Fix bugs from merge
alisonkyoung1 Aug 9, 2024
8d9ccc7
Fix bug from merge
alisonkyoung1 Aug 9, 2024
2ac071a
Removed non Modified Lombardi cooling options from radiative cooling …
alisonkyoung1 Aug 10, 2024
40db47f
Removed FLD from radapprox cooling
alisonkyoung1 Aug 10, 2024
4e3c1b1
merged master into updates
alisonkyoung1 Sep 5, 2024
7786905
Merge remote-tracking branch 'upstream/master' into ModLomCool
alisonkyoung1 Sep 6, 2024
b6b62b4
Merge changes due to pulling updates from the main Phantom repo. N.B.…
alisonkyoung1 Sep 19, 2024
29d08ee
Fix bug from merge.
alisonkyoung1 Sep 19, 2024
e1bdebb
rge remote-tracking branch 'upstream/master' into ModLomCool
alisonkyoung1 Sep 19, 2024
d0c12c4
Add changes from master branch
alisonkyoung1 Sep 19, 2024
87a7d2c
Merge branch 'ModLomCool' of https://github.com/alisonkyoung1/phantom…
alisonkyoung1 Sep 19, 2024
7bbbd48
Add radiative cooling approximation to Docs
alisonkyoung1 Sep 20, 2024
db9c335
placeholder for eos_lom.dat
alisonkyoung1 Sep 26, 2024
5bc139e
Enable automatic download of EOS/opacity file for modified Lombardi r…
alisonkyoung1 Sep 26, 2024
c156cbf
Enable remote download of Lombardi EOS/opacity file
alisonkyoung1 Sep 26, 2024
a8d183f
Added eos_lom.dat to .gitignore
alisonkyoung1 Sep 26, 2024
9446bf4
Run bots
alisonkyoung1 Sep 26, 2024
35eb041
Bugfix for gfortran compilation
alisonkyoung1 Sep 26, 2024
b85f54a
Bugfix for Github tests
alisonkyoung1 Sep 26, 2024
4c113f3
Fix bug in init ieos=23 errors
alisonkyoung1 Oct 15, 2024
42a79f0
Fix bug in ieos=23 init err
alisonkyoung1 Oct 15, 2024
7207eb8
Removed unused variables
alisonkyoung1 Oct 16, 2024
0647f61
fixes for Github build
alisonkyoung1 Oct 16, 2024
9e14e04
Fixes for Github tests
alisonkyoung1 Oct 17, 2024
55eff86
Edits to enable blob setup to build
alisonkyoung1 Oct 21, 2024
344fc4d
merge upstream
Oct 22, 2024
2ec3ecc
Rad approx cooling: changed to update energy during leapfrog integrator.
alisonkyoung1 Nov 4, 2024
b60eef7
Rad approx cooling: prevent bug in substepping
alisonkyoung1 Nov 8, 2024
1b4c4ac
New setup designed for icooling=9. This sets the temperature/sound sp…
alisonkyoung1 Nov 12, 2024
1506740
removed duplicated opacity table read
alisonkyoung1 Nov 12, 2024
a82563b
Merge upstream
Nov 12, 2024
9ca68cb
Deleted unused module imports
alisonkyoung1 Nov 13, 2024
2744885
Removed superfluous optab read from cooling.f90
alisonkyoung1 Nov 13, 2024
95b167c
Merge
alisonkyoung1 Nov 13, 2024
5f42480
Merged in updates branch
alisonkyoung1 Nov 13, 2024
a3b6ba5
Edits to setup_disc.f90
alisonkyoung1 Nov 15, 2024
edd51c9
Added eos=23 handling to analysis_disc_stresses.f90
alisonkyoung1 Nov 18, 2024
bdffd76
finalised sgdisc setup for radiative approx cooling
alisonkyoung1 Nov 25, 2024
47cc012
Merged in new setup for radiative approx sgdisc
alisonkyoung1 Nov 25, 2024
1d0ab01
Tidying cooling_radapprox.f90
alisonkyoung1 Nov 25, 2024
2cd944c
Merge radapprox updates, new setup and upstream changes
alisonkyoung1 Nov 25, 2024
01b065d
tidying radapprox sgdisc setup
alisonkyoung1 Nov 26, 2024
8987fae
Edit for GitHub build
Dec 9, 2024
d580376
Edits for GitHub build
Dec 10, 2024
5adb359
Merge upstream updates
Dec 11, 2024
e8ec2d4
Merge branch 'master' into ModLomCool
Dec 17, 2024
d221762
Bug fixes
Dec 17, 2024
b3ab665
Fix bug in setup_disc.f90
alisonkyoung1 Dec 17, 2024
ca0202f
Fixing bugs in ModLom cooling
Dec 20, 2024
a7e2926
Merge branch 'ModLomCool' of https://github.com/alisonkyoung1/phantom…
Dec 20, 2024
53d3ae3
[indent-bot] standardised indentation
Jan 17, 2025
3f06612
Header bot applied
alisonkyoung1 Jan 20, 2025
c8cbbbe
[format-bot] end if -> endif; end do -> enddo; if( -> if (
alisonkyoung1 Jan 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ build/test000
*.cmod
*.ilm
*.stb

eos_lom.dat
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Yann Bernard <[email protected]>
Daniel Mentiplay <[email protected]>
Megha Sharma <[email protected]>
Arnaud Vericel <[email protected]>
Alison Young <[email protected]>
Mark Hutchison <[email protected]>
Mats Esseldeurs <[email protected]>
Rebecca Nealon <[email protected]>
Expand All @@ -34,7 +35,6 @@ Giovanni Dipierro <[email protected]>
Roberto Iaconi <[email protected]>
Amena Faruqi <[email protected]>
Hauke Worpel <[email protected]>
Alison Young <[email protected]>
Stephen Nielson <[email protected]>
Martina Toscani <[email protected]>
Benedetta Veronesi <[email protected]>
Expand Down
3 changes: 2 additions & 1 deletion build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -506,14 +506,15 @@ SRCCHEM= fs_data.f90 mol_data.f90 utils_spline.f90 \
cooling_koyamainutsuka.f90 \
cooling_ism.f90 \
cooling_molecular.f90 \
cooling_radapprox.f90\
cooling_functions.f90 \
cooling_solver.f90 \
h2chem.f90 cooling.f90
#
# equations of state
#
SRCMESA= eos_mesa_microphysics.f90 eos_mesa.f90
SRCEOS = eos_barotropic.f90 eos_stratified.f90 eos_piecewise.f90 ${SRCMESA} eos_shen.f90 eos_helmholtz.f90 eos_idealplusrad.f90 ionization.F90 eos_gasradrec.f90 eos_HIIR.f90 eos.f90
SRCEOS = eos_barotropic.f90 eos_stratified.f90 eos_piecewise.f90 ${SRCMESA} eos_shen.f90 eos_helmholtz.f90 eos_idealplusrad.f90 ionization.F90 eos_gasradrec.f90 eos_HIIR.f90 eos_stamatellos.f90 eos.f90

ifeq ($(HDF5), yes)
SRCREADWRITE_DUMPS= utils_hdf5.f90 utils_dumpfiles_hdf5.f90 readwrite_dumps_common.f90 readwrite_dumps_fortran.F90 readwrite_dumps_hdf5.F90 readwrite_dumps.F90
Expand Down
10 changes: 10 additions & 0 deletions data/eos/lombardi/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
The data tables for the equation of state and opacities for the modified Lombardi radiative cooling approximation are too large to be stored in the Phantom git repository.
They will be downloaded automatically when you run the code

or can be retrieved manually using wget from Zenodo, e.g.:

wget https://zenodo.org/records/13842491/files/eos_lom.dat

The files are:

eos_lom.dat
7 changes: 7 additions & 0 deletions docs/examples/selfgravity_gravitationalinstability.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@ In the *setup* file there are the disc parameters, and in the *input* file it is
- ieos = 2 , to choose an adiabatic equation of state
- icooling = 3, to choose a β cooling prescription with constant β (icooling = 7 prescribes a varying β cooling with the radius)
- beta_cool = #, to choose the value of β cooling

To use the radiative cooling approximation of Young et al. (2024) use:

- ieos = 23
- icooling = 9

See :doc:`Radiation hydrodynamics in phantom </physics/radiation>`.
6 changes: 6 additions & 0 deletions docs/physics/eos-list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,9 @@
| | from HORMONE, Hirai+2020, as used in Lau+2022b |
| | |
+-----------+----------------------------------------------------------------------------------+
| 23 | **Tabulated EoS of Stamatellos et al. 2007 (includes opacities)** |
| | |
| | Tabulated equation of state with opacities from Lombardi et al. 2015. For use |
| | with icooling = 9, the radiative cooling approximation (Young et al. 2024). | |
| | |
+-----------+----------------------------------------------------------------------------------+
22 changes: 22 additions & 0 deletions docs/physics/radiation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,28 @@ the star will just steadily cool. For red giants with a sink particle core a sim
is to supply a constant luminosity input from the core (:doc:`sink heating <sinks>`). This is experimental.
Another option would be to include a nuclear burning network (please somebody contribute this).


Polytropic radiative cooling approximation
-------------------------------------------
This is an alternative to computationally expensive radiative transfer in regimes where radiative cooling is
important. This method estimates the optical depth for each particle and its equilibrium temperature. From
these the new temperature and internal energy is updated at each timestep. The method implemented here is
the "modified Lombardi" method of `Young et al. (2024) <https://ui.adsabs.harvard.edu/abs/2024MNRAS.531.1746Y>`__,
which was based on Stamatellos et al. (2007) and Lombardi et al. (2015). This method is designed for
self-gravitating discs around a central star. Stellar heating is included from the most massive sink particle.

Use icooling = 9 and ieos = 23 to use the tabulated equation of state which has the opacity tables required
for the cooling calculation. The additional parameters are::

EOS_file = myeos.dat ! File containing tabulated EOS values
Lstar = 0.440 ! Luminosity of host star for calculating Tmin (Lsun)
Tfloor = 5.000 ! temperature floor (K); on if > 0


N.B. This version does not currently include radiation from more than one sink particle. This version does not
couple with flux-limited diffusion at the moment.


Irradiation from stars with phantom + MCFOST
---------------------------------------------
In regimes where the radiation diffusion time is relatively short, anything not inside stars
Expand Down
2 changes: 1 addition & 1 deletion src/main/H2regions.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!--------------------------------------------------------------------------!
! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. !
! Copyright (c) 2007-2024 The Authors (see AUTHORS) !
! Copyright (c) 2007-2025 The Authors (see AUTHORS) !
! See LICENCE file for usage and distribution conditions !
! http://phantomsph.github.io/ !
!--------------------------------------------------------------------------!
Expand Down
2 changes: 1 addition & 1 deletion src/main/apr.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!--------------------------------------------------------------------------!
! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. !
! Copyright (c) 2007-2024 The Authors (see AUTHORS) !
! Copyright (c) 2007-2025 The Authors (see AUTHORS) !
! See LICENCE file for usage and distribution conditions !
! http://phantomsph.github.io/ !
!--------------------------------------------------------------------------!
Expand Down
2 changes: 1 addition & 1 deletion src/main/apr_region.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!--------------------------------------------------------------------------!
! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. !
! Copyright (c) 2007-2024 The Authors (see AUTHORS) !
! Copyright (c) 2007-2025 The Authors (see AUTHORS) !
! See LICENCE file for usage and distribution conditions !
! http://phantomsph.github.io/ !
!--------------------------------------------------------------------------!
Expand Down
2 changes: 1 addition & 1 deletion src/main/bondiexact.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!--------------------------------------------------------------------------!
! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. !
! Copyright (c) 2007-2024 The Authors (see AUTHORS) !
! Copyright (c) 2007-2025 The Authors (see AUTHORS) !
! See LICENCE file for usage and distribution conditions !
! http://phantomsph.github.io/ !
!--------------------------------------------------------------------------!
Expand Down
2 changes: 1 addition & 1 deletion src/main/bondiexact_gr.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!--------------------------------------------------------------------------!
! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. !
! Copyright (c) 2007-2024 The Authors (see AUTHORS) !
! Copyright (c) 2007-2025 The Authors (see AUTHORS) !
! See LICENCE file for usage and distribution conditions !
! http://phantomsph.github.io/ !
!--------------------------------------------------------------------------!
Expand Down
2 changes: 1 addition & 1 deletion src/main/boundary.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!--------------------------------------------------------------------------!
! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. !
! Copyright (c) 2007-2024 The Authors (see AUTHORS) !
! Copyright (c) 2007-2025 The Authors (see AUTHORS) !
! See LICENCE file for usage and distribution conditions !
! http://phantomsph.github.io/ !
!--------------------------------------------------------------------------!
Expand Down
2 changes: 1 addition & 1 deletion src/main/boundary_dynamic.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!--------------------------------------------------------------------------!
! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. !
! Copyright (c) 2007-2024 The Authors (see AUTHORS) !
! Copyright (c) 2007-2025 The Authors (see AUTHORS) !
! See LICENCE file for usage and distribution conditions !
! http://phantomsph.github.io/ !
!--------------------------------------------------------------------------!
Expand Down
2 changes: 1 addition & 1 deletion src/main/centreofmass.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!--------------------------------------------------------------------------!
! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. !
! Copyright (c) 2007-2024 The Authors (see AUTHORS) !
! Copyright (c) 2007-2025 The Authors (see AUTHORS) !
! See LICENCE file for usage and distribution conditions !
! http://phantomsph.github.io/ !
!--------------------------------------------------------------------------!
Expand Down
2 changes: 1 addition & 1 deletion src/main/checkconserved.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!--------------------------------------------------------------------------!
! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. !
! Copyright (c) 2007-2024 The Authors (see AUTHORS) !
! Copyright (c) 2007-2025 The Authors (see AUTHORS) !
! See LICENCE file for usage and distribution conditions !
! http://phantomsph.github.io/ !
!--------------------------------------------------------------------------!
Expand Down
2 changes: 1 addition & 1 deletion src/main/checkoptions.F90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!--------------------------------------------------------------------------!
! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. !
! Copyright (c) 2007-2024 The Authors (see AUTHORS) !
! Copyright (c) 2007-2025 The Authors (see AUTHORS) !
! See LICENCE file for usage and distribution conditions !
! http://phantomsph.github.io/ !
!--------------------------------------------------------------------------!
Expand Down
2 changes: 1 addition & 1 deletion src/main/checksetup.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!--------------------------------------------------------------------------!
! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. !
! Copyright (c) 2007-2024 The Authors (see AUTHORS) !
! Copyright (c) 2007-2025 The Authors (see AUTHORS) !
! See LICENCE file for usage and distribution conditions !
! http://phantomsph.github.io/ !
!--------------------------------------------------------------------------!
Expand Down
2 changes: 1 addition & 1 deletion src/main/config.F90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!--------------------------------------------------------------------------!
! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. !
! Copyright (c) 2007-2024 The Authors (see AUTHORS) !
! Copyright (c) 2007-2025 The Authors (see AUTHORS) !
! See LICENCE file for usage and distribution conditions !
! http://phantomsph.github.io/ !
!--------------------------------------------------------------------------!
Expand Down
2 changes: 1 addition & 1 deletion src/main/cons2prim.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!--------------------------------------------------------------------------!
! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. !
! Copyright (c) 2007-2024 The Authors (see AUTHORS) !
! Copyright (c) 2007-2025 The Authors (see AUTHORS) !
! See LICENCE file for usage and distribution conditions !
! http://phantomsph.github.io/ !
!--------------------------------------------------------------------------!
Expand Down
2 changes: 1 addition & 1 deletion src/main/cons2primsolver.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
!--------------------------------------------------------------------------!
! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. !
! Copyright (c) 2007-2024 The Authors (see AUTHORS) !
! Copyright (c) 2007-2025 The Authors (see AUTHORS) !
! See LICENCE file for usage and distribution conditions !
! http://phantomsph.github.io/ !
!--------------------------------------------------------------------------!
Expand Down
Loading