Skip to content

Commit

Permalink
Enable remote download of Lombardi EOS/opacity file
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonkyoung1 committed Sep 26, 2024
1 parent 29d08ee commit c156cbf
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
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
2 changes: 2 additions & 0 deletions src/main/datafiles.f90
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ function map_dir_to_web(search_dir) result(url)
url = 'https://zenodo.org/records/13162815/files/'
case('data/starcluster')
url = 'https://zenodo.org/records/13164858/files/'
case('data/eos/lombardi')
url = 'https://zenodo.org/records/13842491/files/'
case default
url = 'https://users.monash.edu.au/~dprice/'//trim(search_dir)
end select
Expand Down
4 changes: 2 additions & 2 deletions src/main/eos_stamatellos.f90
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module eos_stamatellos
real,allocatable,public :: optable(:,:,:)
real,allocatable,public :: Gpot_cool(:),duFLD(:),gradP_cool(:),lambda_FLD(:),urad_FLD(:) !gradP_cool=gradP/rho
real,allocatable,public :: ttherm_store(:),teqi_store(:),opac_store(:),duSPH(:)
character(len=25), public :: eos_file= 'myeos.dat' !default name of tabulated EOS file
character(len=25), public :: eos_file= 'eos_lom.dat' !default name of tabulated EOS file
logical,public :: doFLD = .True., floor_energy = .False.
integer,public :: iunitst=19
integer,save :: nx,ny ! dimensions of optable read in
Expand Down Expand Up @@ -81,7 +81,7 @@ subroutine read_optab(eos_file,ierr)
character(len=120) :: filepath,junk

! read in data file for interpolation
filepath=find_phantom_datafile(eos_file,'cooling')
filepath=find_phantom_datafile(eos_file,'eos/lombardi')
print *,"EOS file: FILEPATH:",filepath
open(10, file=filepath, form="formatted", status="old",iostat=ierr)
if (ierr > 0) return
Expand Down

0 comments on commit c156cbf

Please sign in to comment.