Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ my_utils/

#parameter files
*.para
*.dat
utils/*
3 changes: 3 additions & 0 deletions src/read_phantom.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,9 @@ subroutine phantom_2_mcfost(np,nptmass,ntypes,ndusttypes,ldust_moments,n_files,d
etoile(i_etoile)%vz = vxyz_ptmass(3,i_etoile) * uvelocity

etoile(i_etoile)%M = xyzmh_ptmass(4,i_etoile) * usolarmass

! TODO: Add conditions for forced Mdot
etoile(i_etoile)%Mdot = xyzmh_ptmass(16,i_etoile) * usolarmass / utime_scaled * year_to_s ! Accretion rate is in Msun/year
Comment on lines +1125 to +1126

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

It's great that you're adding the Mdot update for the lfix_star case. As your TODO comment indicates, the condition to check for force_Mdot is missing. To maintain consistency with the else block (lines 1164-1166) and to ensure that manually set accretion rates are not overwritten, you should wrap this assignment in a check for etoile(i_etoile)%force_Mdot.

I've also noticed a minor indentation inconsistency. The new code is indented with 10 spaces, while surrounding assignments use 9. My suggestion corrects this for consistency.

         if (.not.etoile(i_etoile)%force_Mdot) then
            etoile(i_etoile)%Mdot = xyzmh_ptmass(16,i_etoile) * usolarmass / utime_scaled * year_to_s ! Accretion rate is in Msun/year
         endif

enddo
else

Expand Down