Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lsiess committed May 5, 2024
1 parent 65ab87e commit fd3f41a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/main/substepping.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ subroutine cooling_abundances_update(i,pmassi,xyzh,vxyzu,eos_vars,abundance,nucl
use cooling_ism, only:nabn,dphotflag
use options, only:icooling
use chem, only:update_abundances,get_dphot
use dust_formation, only:evolve_dust
use dust_formation, only:evolve_dust,calc_muGamma
use cooling, only:energ_cooling,cooling_in_step
use part, only:rhoh
#ifdef KROME
Expand All @@ -1031,7 +1031,7 @@ subroutine cooling_abundances_update(i,pmassi,xyzh,vxyzu,eos_vars,abundance,nucl
real, intent(in) :: dt,pmassi
integer, intent(in) :: i

real :: dudtcool,rhoi,dphot
real :: dudtcool,rhoi,dphot,pH,pH_tot
real :: abundi(nabn)

dudtcool = 0.
Expand Down
2 changes: 1 addition & 1 deletion src/setup/setup_wind.f90
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ subroutine setpart(id,npart,npartoftype,xyzh,massoftype,vxyzu,polyk,gamma,hfact,
!
! avoid failures in the setup by ensuring that tmax and dtmax are large enough
!
tmax = max(tmax,100.)
!tmax = max(tmax,100.)
!dtmax = max(tmax/10.,dtmax)

end subroutine setpart
Expand Down
10 changes: 5 additions & 5 deletions src/tests/test_wind.f90
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ subroutine test_wind(ntests,npass)
nfailed(:) = 0
eint = sum(vxyzu(4,1:npart))
ekin = sqrt(sum(vxyzu(1,1:npart)**2+vxyzu(2,1:npart)**2+vxyzu(3,1:npart)**2))
print '(5(1x,es22.15),i8)',xyzmh_ptmass(4,1),xyzmh_ptmass(7,1),xyzmh_ptmass(15,1),eint,ekin,npart
!print '(5(1x,es22.15),i8)',xyzmh_ptmass(4,1),xyzmh_ptmass(7,1),xyzmh_ptmass(15,1),eint,ekin,npart
call checkval(xyzmh_ptmass(4,1),1.199987894518367E+00,epsilon(0.),nfailed(1),'sink particle mass')
call checkval(xyzmh_ptmass(7,1),0.,epsilon(0.),nfailed(2),'mass accreted')
call checkval(npart,12180,0,nfailed(3),'number of ejected particles')
Expand All @@ -86,7 +86,7 @@ subroutine test_wind(ntests,npass)
nfailed(:) = 0
eint = sum(vxyzu(4,1:npart))
ekin = sqrt(sum(vxyzu(1,1:npart)**2+vxyzu(2,1:npart)**2+vxyzu(3,1:npart)**2))
print '(5(1x,es22.15),i8)',xyzmh_ptmass(4,1),xyzmh_ptmass(7,1),xyzmh_ptmass(15,1),eint,ekin,npart
!print '(5(1x,es22.15),i8)',xyzmh_ptmass(4,1),xyzmh_ptmass(7,1),xyzmh_ptmass(15,1),eint,ekin,npart
call checkval(xyzmh_ptmass(4,1),1.199987815414834E+00,epsilon(0.),nfailed(1),'sink particle mass')
call checkval(xyzmh_ptmass(7,1),0.,epsilon(0.),nfailed(2),'mass accreted')
call checkval(npart,21924,0,nfailed(3),'number of ejected particles')
Expand Down Expand Up @@ -203,7 +203,7 @@ subroutine init_testwind(icase,ntests,npass,npart_old,istepfrac,dtinject)

! check 1D wind profile
i = size(trvurho_1D(1,:))
print '((6(1x,es22.15)))',trvurho_1D(:,i),massoftype(igas)
!print '((6(1x,es22.15)))',trvurho_1D(:,i),massoftype(igas)
call checkval(massoftype(igas),1.490822861042279E-9,epsilon(0.),nfailed(1),'setting particle mass')
call checkval(trvurho_1D(2,i),7.058624412798283E+13,epsilon(0.),nfailed(2),'1D wind terminal radius')
call checkval(trvurho_1D(3,i),1.112160584479353E+06,epsilon(0.),nfailed(3),'1D wind terminal velocity')
Expand All @@ -218,9 +218,9 @@ subroutine init_testwind(icase,ntests,npass,npart_old,istepfrac,dtinject)
call inject_particles(t,0.,xyzh,vxyzu,xyzmh_ptmass,vxyz_ptmass,npart,npart_old,npartoftype,dtinject)
call update_injected_particles(npart_old,npart,istepfrac,nbinmax,t,dtmax,dt,dtinject)

! check 1D wind profile
! check 1D wind profile
i = size(trvurho_1D(1,:))
print '((6(1x,es22.15)))',trvurho_1D(:,i),massoftype(igas)
!print '((6(1x,es22.15)))',trvurho_1D(:,i),massoftype(igas)
call checkval(massoftype(igas),6.820748526700016E-10,epsilon(0.),nfailed(1),'setting particle mass')
call checkval(trvurho_1D(2,i), 1.546371444697654E+14,epsilon(0.),nfailed(2),'1D wind terminal radius')
call checkval(trvurho_1D(3,i), 4.298693548460183E+06,epsilon(0.),nfailed(3),'1D wind terminal velocity')
Expand Down

0 comments on commit fd3f41a

Please sign in to comment.