Skip to content

Commit

Permalink
(lightcurve) use updated formula in Matsumoto & Metzger 2022
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljprice committed Jul 4, 2024
1 parent 3970b06 commit a46aec2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions src/lightcurve_utils.f90
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,8 @@ real elemental function get_opacity(rho,T,X,Y,use_all) result(kappa)

Z = max(1. - X - Y,0.) ! metallicity

! free-free emission (Kramer's law)
!kappa_ff = 0.64e23*rho*T**(-3.5)
!kappa_ff = 4.e25*(1. + X)*(Z + 0.001)*rho*T**(-3.5)

! opacity due to Kramer's law (free-free and bound-free transitions)
!kappa_K = 4e25*Z*(1.+X)*rho*T**(-3.5) ! Metzger & Pejcha (2017)
kappa_K = 1.2e26*Z*(1.+X)*rho*T**(-3.5) ! from Matsumoto & Metzger (2022)

! opacity due to negative Hydrogen
Expand All @@ -115,7 +112,8 @@ real elemental function get_opacity(rho,T,X,Y,use_all) result(kappa)

if (use_all) then
! total opacity, valid between T = 1.5 x 10^3 and 10^9 K
kappa = kappa_mol + 1./(1./kappa_H + 1./(kappa_es + kappa_K))
!kappa = kappa_mol + 1./(1./kappa_H + 1./(kappa_es + kappa_K)) ! Metzger & Pejcha (2017)
kappa = kappa_mol + kappa_es + 1./(1./kappa_H + 1./kappa_K) ! MM22
else
kappa = kappa_es
endif
Expand Down
2 changes: 1 addition & 1 deletion src/read_data_sphNG.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2238,7 +2238,7 @@ subroutine read_data_sphNG(rootname,indexstart,iposn,nstepsread)
if (get_kappa .and. ikappa > 0 .and. required(ikappa) .and. itemp > 0) then
write(*,"(1x,a,3(f5.2,1x))",advance='no') 'X,Y,Z = ',Xfrac,Yfrac,1.-Xfrac-Yfrac
if (get_kappa_tot) then
write(*,*) ' (opacity uses electron scattering, free-free and H-)'
write(*,*) ' (opacity uses electron scattering, Kramers and H-)'
else
write(*,*) ' (electron scattering opacity only)'
endif
Expand Down

0 comments on commit a46aec2

Please sign in to comment.