diff --git a/src/init_mcfost.f90 b/src/init_mcfost.f90 index 12468ba07..8b38ff568 100644 --- a/src/init_mcfost.f90 +++ b/src/init_mcfost.f90 @@ -214,6 +214,7 @@ subroutine set_default_variables() image_offset_centre(:) = (/0.0,0.0,0.0/) loverwrite_s12 = .false. lnot_random_Voronoi = .false. + lignore_sink=.false. tmp_dir = "./" @@ -1463,6 +1464,9 @@ subroutine initialisation_mcfost() case("-not_random_Voronoi") i_arg = i_arg + 1 lnot_random_Voronoi = .true. + case("-ignore_sink") + i_arg = i_arg + 1 + lignore_sink=.true. case default write(*,*) "Error: unknown option: "//trim(s) write(*,*) "Use 'mcfost -h' to get list of available options" @@ -2073,6 +2077,7 @@ subroutine display_help() write(*,*) " (only works with 1 grain size dump)" write(*,*) " : -force_Mgas : force the gas mass to be the value given the mcfost parameter file" write(*,*) " : -not_random_Voronoi : force the particle order to remain the same" + write(*,*) " : -ignore_sink : forces nptmass to 0, ie not stars in mcfost" write(*,*) "" write(*,*) "You can find the full documentation at:" write(*,*) trim(doc_webpage) diff --git a/src/parameters.f90 b/src/parameters.f90 index 90a23190e..40d3a255d 100644 --- a/src/parameters.f90 +++ b/src/parameters.f90 @@ -162,7 +162,7 @@ module parametres logical :: ldelete_inside_rsph, ldelete_outside_rsph, ldelete_above_theta real(kind=dp) :: ufac_implicit,scale_length_units_factor,scale_mass_units_factor,correct_density_factor_elongated_cells real(kind=dp) :: SPH_amin, SPH_amax, fluffyness, gap_factor, rsph_min, rsph_max - logical :: lupdate_velocities, lno_vr, lno_vz, lvphi_Kep, lfluffy, lnot_random_Voronoi + logical :: lupdate_velocities, lno_vr, lno_vz, lvphi_Kep, lfluffy, lnot_random_Voronoi, lignore_sink integer :: isink_centre ! Disk parameters diff --git a/src/read_phantom.f90 b/src/read_phantom.f90 index eea193e17..12f8e61c8 100644 --- a/src/read_phantom.f90 +++ b/src/read_phantom.f90 @@ -984,23 +984,26 @@ subroutine phantom_2_mcfost(np,nptmass,ntypes,ndusttypes,ldust_moments,n_files,d ldudt_implicit = .false. endif - write(*,*) "# Stars/planets:" - n_etoiles_old = n_etoiles - n_etoiles = 0 - do i=1,nptmass - n_etoiles = n_etoiles + 1 - if (real(xyzmh_ptmass(4,i)) * scale_mass_units_factor > 0.013) then - write(*,*) "Star #", i, "xyz=", real(xyzmh_ptmass(1:3,i) * ulength_au), "au, M=", & - real(xyzmh_ptmass(4,i) * usolarmass), "Msun, Mdot=", & - real(xyzmh_ptmass(16,i) * usolarmass / utime_scaled * year_to_s ), "Msun/yr" - else - write(*,*) "Planet #", i, "xyz=", real(xyzmh_ptmass(1:3,i) * ulength_au), "au, M=", & - real(xyzmh_ptmass(4,i) * GxMsun/GxMjup * usolarmass), "Mjup, Mdot=", & - real(xyzmh_ptmass(16,i) * usolarmass / utime_scaled * year_to_s ), "Msun/yr" - endif - if (i>1) write(*,*) " distance=", real(norm2(xyzmh_ptmass(1:3,i) - xyzmh_ptmass(1:3,1))*ulength_au), "au" - enddo - + if (lignore_sink) then + n_etoiles = 0 + else + write(*,*) "# Stars/planets:" + n_etoiles_old = n_etoiles + n_etoiles = 0 + do i=1,nptmass + n_etoiles = n_etoiles + 1 + if (real(xyzmh_ptmass(4,i)) * scale_mass_units_factor > 0.013) then + write(*,*) "Star #", i, "xyz=", real(xyzmh_ptmass(1:3,i) * ulength_au), "au, M=", & + real(xyzmh_ptmass(4,i) * usolarmass), "Msun, Mdot=", & + real(xyzmh_ptmass(16,i) * usolarmass / utime_scaled * year_to_s ), "Msun/yr" + else + write(*,*) "Planet #", i, "xyz=", real(xyzmh_ptmass(1:3,i) * ulength_au), "au, M=", & + real(xyzmh_ptmass(4,i) * GxMsun/GxMjup * usolarmass), "Mjup, Mdot=", & + real(xyzmh_ptmass(16,i) * usolarmass / utime_scaled * year_to_s ), "Msun/yr" + endif + if (i>1) write(*,*) " distance=", real(norm2(xyzmh_ptmass(1:3,i) - xyzmh_ptmass(1:3,1))*ulength_au), "au" + enddo + endif if (lupdate_velocities) then if (lno_vz) vz(:) = 0.