Skip to content

Commit

Permalink
Merge radapprox updates, new setup and upstream changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonkyoung1 committed Nov 25, 2024
2 parents 344fc4d + 1d0ab01 commit 2cd944c
Show file tree
Hide file tree
Showing 24 changed files with 765 additions and 742 deletions.
2 changes: 2 additions & 0 deletions scripts/test_analysis_ce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ SEP
no
2
1.667
0.6182
0.6984
0.0142
BOUND
Expand All @@ -38,4 +39,5 @@ BOUND
no
2
1.667
0.6182
ENERGIES
14 changes: 4 additions & 10 deletions src/main/cooling.f90
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,11 @@ subroutine init_cooling(id,master,iprint,ierr)
use cooling_ism, only:init_cooling_ism,abund_default
use cooling_koyamainutsuka, only:init_cooling_KI02
use cooling_solver, only:init_cooling_solver
use eos_stamatellos, only:read_optab,eos_file
use cooling_radapprox, only:init_star,od_method
use viscosity, only:irealvisc

integer, intent(in) :: id,master,iprint
integer, intent(out) :: ierr
logical :: ex

cooling_in_step = .true.
ierr = 0
Expand All @@ -90,10 +88,6 @@ subroutine init_cooling(id,master,iprint,ierr)
var='ieos',ival=ieos)
if (irealvisc > 0 .and. od_method == 4) call warning('cooling',&
'Using real viscosity will affect optical depth estimate',var='irealvisc',ival=irealvisc)
inquire(file=eos_file,exist=ex)
if (.not. ex ) call fatal('cooling','file not found',var=eos_file)
if (ieos == 2) call read_optab(eos_file,ierr)
if (ierr > 0) call fatal('cooling','Failed to read EOS file',var='ierr',ival=ierr)
call init_star()
case(6)
call init_cooling_KI02(ierr)
Expand Down Expand Up @@ -132,7 +126,7 @@ end subroutine init_cooling
!
!-----------------------------------------------------------------------

subroutine energ_cooling(xi,yi,zi,ui,rho,dt,divv,dudt,Tdust_in,mu_in,gamma_in,K2_in,kappa_in,abund_in,ipart)
subroutine energ_cooling(xi,yi,zi,ui,rho,dt,divv,dudt,Tdust_in,mu_in,gamma_in,K2_in,kappa_in,abund_in,duhydro,ipart)
use io, only:fatal
use dim, only:nabundances
use eos, only:gmw,gamma,ieos,get_temperature_from_u
Expand All @@ -143,12 +137,12 @@ subroutine energ_cooling(xi,yi,zi,ui,rho,dt,divv,dudt,Tdust_in,mu_in,gamma_in,K2
use cooling_solver, only:energ_cooling_solver
use cooling_koyamainutsuka, only:cooling_KoyamaInutsuka_explicit,&
cooling_KoyamaInutsuka_implicit
use cooling_radapprox, only:radcool_update_energ
use cooling_radapprox, only:radcool_update_du

real(kind=4), intent(in) :: divv ! in code units
real, intent(in) :: xi,yi,zi,ui,rho,dt ! in code units
real, intent(in), optional :: Tdust_in,mu_in,gamma_in,K2_in,kappa_in ! in cgs
real, intent(in), optional :: abund_in(nabn)
real, intent(in), optional :: abund_in(nabn),duhydro
integer,intent(in),optional:: ipart
real, intent(out) :: dudt ! in code units
real :: mui,gammai,Tgas,Tdust,K2,kappa
Expand Down Expand Up @@ -187,7 +181,7 @@ subroutine energ_cooling(xi,yi,zi,ui,rho,dt,divv,dudt,Tdust_in,mu_in,gamma_in,K2
case (7)
call cooling_Gammie_PL_explicit(xi,yi,zi,ui,dudt)
case (9)
call radcool_update_energ(ipart,xi,yi,zi,rho,ui,Tfloor,dt,dudt)
call radcool_update_du(ipart,xi,yi,zi,rho,ui,duhydro,Tfloor)
case default
call energ_cooling_solver(ui,dudt,rho,dt,mui,gammai,Tdust,K2,kappa)
end select
Expand Down
Loading

0 comments on commit 2cd944c

Please sign in to comment.