Skip to content

Commit

Permalink
Merge pull request #603 from kandrych/master
Browse files Browse the repository at this point in the history
set isink=1for ieos=6 in case where isink was not set
  • Loading branch information
danieljprice authored Dec 5, 2024
2 parents 9062fb7 + 1a847eb commit 46dc481
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/main/eos.f90
Original file line number Diff line number Diff line change
Expand Up @@ -481,9 +481,8 @@ subroutine init_eos(eos_type,ierr)
!--Check that if using ieos=6, then isink is set properly
!
if (isink==0) then
call error('eos','ieos=6, but isink is not set')
ierr = ierr_isink_not_set
return
call error('eos','ieos=6, but isink is not set, setting to 1')
isink = 1
endif

case(8)
Expand Down
12 changes: 9 additions & 3 deletions src/setup/setup_disc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@ subroutine equation_of_state(gamma)
ieos = 6
print "(/,a)",' setting ieos=6 for locally isothermal disc around sink'
else
isink = 0
if (discstrat > 0) then
ieos = 7
print "(/,a)",' setting ieos=7 for locally isothermal disc with stratification'
Expand All @@ -695,10 +696,15 @@ subroutine equation_of_state(gamma)
polyk2 = (cs*(1./R_ref(onlydisc))**(-qfacdisc2))**2
z0 = z0_ref/R_ref(onlydisc)**beta_z
else
ieos = 3
print "(/,a)",' setting ieos=3 for locally isothermal disc around origin'
if (ieos == 6) then
! handle the case where ieos=6 is already set in the .in file; do not override this
isink = 1
print "(/,a)",' keeping ieos=6 for locally isothermal disc with bright primary'
else
ieos = 3
print "(/,a)",' setting ieos=3 for locally isothermal disc around origin'
endif
endif
isink = 0 ! In the case isink==3, to be generalized
endif
qfacdisc = qindex(onlydisc)
endif
Expand Down

0 comments on commit 46dc481

Please sign in to comment.