diff --git a/.mailmap b/.mailmap index b39c4b27e..567c60b95 100644 --- a/.mailmap +++ b/.mailmap @@ -1,3 +1,4 @@ +# The Hall of Shame Daniel Price dprice Daniel Price Daniel Price Daniel Price Daniel Price (Monash University) @@ -32,6 +33,7 @@ James Wurster jameswurster James Wurster James Wurster James Wurster James Wurster James +James Wurster James James Wurster James Wurster Ben Ayliffe Owen Kaluza okaluza @@ -81,6 +83,8 @@ David Liptai <31463304+dliptai@users.noreply.github.com> Fangyi (Fitz) Hu Fitz Fangyi (Fitz) Hu Fitz-Hu <54089891+Fitz-Hu@users.noreply.github.com> Fangyi (Fitz) Hu root +Fangyi (Fitz) Hu root +Fangyi (Fitz) Hu fitzHu <54089891+Fitz-Hu@users.noreply.github.com> Megha Sharma Megha Sharma <40732335+msha0023@users.noreply.github.com> Megha Sharma megha sharma Mike Lau Mike Lau <55525335+themikelau@users.noreply.github.com> @@ -88,4 +92,14 @@ Elisabeth Borchert emborchert <69176538+emborche Ward Homan ward Ward Homan wardhoman <33419533+wardhoman@users.noreply.github.com> Benedetta Veronesi benedetta veronesi +Benedetta Veronesi Phantom benchmark bot Ubuntu +Stephane Michoulier StephaneMichoulier +Jolien Malfait Jolien128 <72729152+Jolien128@users.noreply.github.com> +Martina Toscani +Martina Toscani +Sahl Rowther +Sahl Rowther +Sahl Rowther sahl95 +Caitlyn Hardiman caitlynhardiman <72479852+caitlynhardiman@users.noreply.github.com> +Amena Faruqi <42060670+amenafaruqi@users.noreply.github.com> diff --git a/AUTHORS b/AUTHORS index d96357912..4564eb11c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -26,44 +26,42 @@ Mats Esseldeurs Enrico Ragusa Giovanni Dipierro Hauke Worpel -Roberto Iaconi Caitlyn Hardiman +Roberto Iaconi +Martina Toscani Simon Glover Thomas Reichardt +Benedetta Veronesi +Cristiano Longarini Jean-François Gonzalez -Martina Toscani MatsEsseldeurs Alison Young -Benedetta Veronesi Simone Ceppi +Stephen Neilson <36410751+s-neilson@users.noreply.github.com> +Amena Faruqi +Stephane Michoulier Christopher Russell -Alessia Franchini +Sahl Rowther Alex Pettitt +Alessia Franchini Megha Sharma -Stephen Neilson <36410751+s-neilson@users.noreply.github.com> -fitzHu <54089891+Fitz-Hu@users.noreply.github.com> Kieran Hirsh Nicole Rodrigues Chris Nixon -Jolien128 <72729152+Jolien128@users.noreply.github.com> -Nicolas Cuello +Jolien Malfait Phantom benchmark bot -Sahl Rowther +Nicolas Cuello Benoit Commercon -Cristiano Longarini David Trevascus -Giulia Ballabio -Joe Fisher Orsola De Marco +Joe Fisher +Giulia Ballabio +Amena Faruqi Zachary Pellow -caitlynhardiman <72479852+caitlynhardiman@users.noreply.github.com> -sahl95 -Alison Young +s-neilson <36410751+s-neilson@users.noreply.github.com> Cox, Samuel -James -Jorge Cuadra Maxime Lombart -Sahl Rowther +Jorge Cuadra Steven Rieder Stéven Toupin -s-neilson <36410751+s-neilson@users.noreply.github.com> +Alison Young diff --git a/build/Makefile b/build/Makefile index 86f90b5d6..02ca4357a 100644 --- a/build/Makefile +++ b/build/Makefile @@ -21,9 +21,9 @@ .KEEP_STATE: -PHANTOM_VERSION_MAJOR=2022 +PHANTOM_VERSION_MAJOR=2023 PHANTOM_VERSION_MINOR=0 -PHANTOM_VERSION_MICRO=1 +PHANTOM_VERSION_MICRO=0 VERSION=$(PHANTOM_VERSION_MAJOR).$(PHANTOM_VERSION_MINOR).$(PHANTOM_VERSION_MICRO) KNOWN_SYSTEM=no diff --git a/docs/releasenotes.rst b/docs/releasenotes.rst index 335726bf7..af41725c2 100644 --- a/docs/releasenotes.rst +++ b/docs/releasenotes.rst @@ -1,16 +1,128 @@ Release notes ============= +v2023.0.0 - 10th Mar 2023 +------------------------- + +Physics +~~~~~~~ +- Dust nucleation: chemical network allows for self-consistent (carbon-rich) dust formation in simulations once the temperature drops below the condensation temperature, e.g. in AGB star winds (`Siess et al. 2022 `__). Just set DUST_NUCLEATION=yes +- Implementation of implicit flux limited diffusion solver for radiation based on `Whitehouse & Bate 2004 `__, `Whitehouse, Bate & Monaghan (2005) `__ and `Bate & Keto (2015) `__. The implementation is a direct port of the solver used in Matthew Bate's sphNG code, generously contributed by Matthew and ported to phantom by Mike Lau and Daniel Price. +- Compute and store a mass accretion rate for each sink particle based on the accreted mass over one dtmax interval. This can be used in MCFOST to provide accretion luminosity from each sink particle (`Borchert et al. 2022a `__, `2022b `__) +- Allow for use of PdV work and shock heating as source terms in MCFOST when performing live-coupled simulations with phantom+MCFOST (thanks to Elli Borchert and Sahl Rowther, #344; see appendix of `Borchert et al. 2022b `__) +- New equation of state that implements gas plus radiation pressure plus recombination of Hydrogen and Helium (`Lau et al. 2022 `__; #267) +- New stratified disc locally isothermal equation of state added (thanks to Caitlyn Hardiman; #268, #278, #308) +- GR simulations now work with the gas+radiation equation of state by implementing an option to evolve "s" as the entropy instead of P/rho^gamma (thanks to Fitz Hu; #250, #324) +- New spherical raytracer for sink particle radiation / dust acceleration, particularly in the context of stellar winds (thanks to Mats Esseldeurs, Lionel Siess, Ward Homan) +- option to use reconstruction on velocities to reduce dissipation away from shocks in the GR code (where the standard Cullen & Dehnen shock switch cannot be used) +- added conservation check which stops the MHD code if hdivB/B is too large AND hdivbbmax_max == 1 (thanks to James Wurster) +- added an override to force sink creation if density is too high; also an addition step in the barotropic equation of state at very high densities (thanks to James Wurster) +- option for heating from sink particles, which adds heats all particles within the softening radius of the sink according to the sink particle luminosity (#216) +- mass-weighted interpolations of dust-gas quantities are now default in dust growth (#377; thanks to Stephane Michoulier) +- option for Aeolian erosion in dust growth module (#365, #372; thanks to Stephane Michoulier) +- Added possibility of varying beta cooling with radius as a power law (#361; thanks to Cristiano Longarini) +- option for damping boundary conditions for comparing phantom to simulations of planet-disc interaction with grid codes (#351) + + +Setup +~~~~~ +- can now set up hierarchical quadruple star systems in setup_disc (thanks to Amena Faruqi; #355) +- setup and simple cooling function added for cooling shock problem from `Creasey et al. (2011) `__ +- can now give --maxp=1e7 flag to phantomsetup instead of compiling with MAXP= which is now obsolete +- major reorganisation of setup_star into neat subroutines with high level functions (#297, also #203) +- dumps written during relax_star now usable as starting file +- various improvements to setting up stars with variable composition (thanks to Mike Lau) +- can now setup triple stars in the stellar wind setup (thanks to Lionel Siess), see e.g. `Maes et al. 2021 `__, `Malfait et al. 2021 `__ +- major overhaul of setup_sphereinbox to include turbulence and one-fluid dust; and many more optional input variables (thanks to James Wurster) +- option for particle shuffling in the Sedov blast wave setup (thanks to James Wurster) +- simplified setup options when adding planets in setup_disc +- sensible physical units chosen for special relativistic shock tubes (thanks to Fitz Hu) +- added versatility to setup of power-law size distribution when setting up dust (thanks to Mark Hutchison) +- new SETUP options for isothermal (dusty) self gravitating disc setups (thanks to Cristiano Longarini) +- fixed default cooling in disc_setup (#114; thanks to Benedetta Veronesi) + +Bugs +~~~~ +- Bugs fixed with using dump files from sphNG to phantom (thanks to Alison Young; #343) +- Bug fix with hsoft=0 when reading MESA file without softening in star setup +- Various bug fixes when setting up Bonnor-Ebert density profiles in the sphere-in-box setup (thanks to James Wurster; #303) +- Bug fix with automated download of data files +- Bug fix in implicit cooling when du/dt goes to zero (#328; thanks to Lionel Siess) +- Various bug fixes with dust nucleation and cooling (Siess) +- Bug fix with artificial conductivity when employing the Minkowski metric in General Relativity +- various issues compiling phantom with MCFOST fixed (thanks to Christophe Pinte; #199) +- seg fault in dump file read utilities fixed if attempting to read an array that has not been allocated +- various bugs with phantom2hdf5 fixed (thanks to Stephen Nielson #368) +- Bug fix reading the default star data files from the data/ directory +- Bug fix in `Farris et al. (2014) `__ equation of state (#282; thanks to Enrico Ragusa) +- Bug fix for dustfrac and dust-to-gas ratio in dustydisc setup (#273; thanks to Mark Hutchison) +- Bug fix in the initialisation of dustfrac in setup_disc +- Fixed critical bug in calculation of Teff in stellar wind setups (thanks to Lionel Siess) +- Fix the makefiles qscript target to write correct slurm scripts for MPI jobs (#269) +- Bug fix with sink particle creation in MPI (Chan, Liptai via ADACS; #234) +- Bug fix with Koyama & Inutuska cooling; works now for both implicit & explicit (thanks to James Wurster) +- Bug fixes in gravitational wave inspiral with star+sink (thanks to Martina Toscani; #367) +- libtool error fixed, use ar rcs to create libraries + +Utils +~~~~~ +- New moddump utility for importing sphNG dumps containing sink particles into phantom (thanks to Alison Young) +- New moddump to add a flyby to an evolved simulation (sink particle in parabolic orbit); thanks to Cristiano Longarini +- improved common envelope analysis routines (Lau, Gonzalez, Nielson; #334) +- moddump_sink allows modification of all sink particles in the simulation +- better error messages in moddump_binary if not enough memory is allocated to add a second star (Lau) +- cleanup of moddump_binary to improve code clarity (#257) +- moddump_binary can be used to set up binary of two stars with sink-particle stellar cores (thanks to Mike Lau; #362) +- moddump_rotate to add solid body rotation to a sphere of gas (Lau; #290) +- diffdumps returns a non-zero exit code if files differ (Chan, Liptai via ADACS; #237) + + +Performance +~~~~~~~~~~~ +- major optimisation of MPI communication to avoid bottleneck of openMP code (#310; Chan, Liptai via ADACS) +- optimisation of particle balance between MPI threads (Chan, Liptai via ADACS; #316) +- timing information written in the log file for local and remote parts of density and force (Chan, Liptai via ADACS; #271) +- various MPI and OpenMP memory allocation optimisations and bug fixes (Chan, Liptai via ADACS; #209, #262; #243) +- Optimisations to reduce unnecessary calls when compiling with `MPI=yes` but running with only 1 MPI task (Chan, Liptai via ADACS; #259) + +Other +~~~~~ +- Switched off the automatic decrease of dtmax if the time between dumps is too large (#342) +- added option to create restart dumps if we go > 24h without a dump (#352; thanks to James Wurster) +- better help for SETUP= flag in Makefile +- configuration added for Flatiron cluster (SYSTEM=rusty and SYSTEM=popeye; thanks to Mike Lau) +- further work to remove unnecessary ifdefs (#55) +- Added MPI unit tests to the testsuite (Chan, Liptai via ADACS; #220, #222, #229, #235, #217, #322) +- major reorganisation of cooling modules; added cooling_solver, cooling_functions and other modules +- bots script can be run as a pre-commit action (Chan, Liptai via ADACS; #223, #317) +- Makefile split into Makefile_setups, Makefile_systems and Makefile_qscripts to avoid clutter (Liptai via ADACS; #261; see #253) +- Timing hierarchy drawn in a nicer way using a tree diagram (Chan via ADACS; #254) +- makefile exit codes are propagated through to calling scripts (#256) +- test suite is now also run using ifort on github runners (Chan, Liptai via ADACS; #228) +- github actions checks on pull requests are now run in parallel (Chan, Liptai via ADACS; #224) +- if dt is too small, exit in step with useful information rather than in get_ibin (thanks to James Wurster) +- option to run bots on staged files only (#213) + +Documentation +~~~~~~~~~~~~~ +- added list of pre-cooked setups (SETUP=blah) to docs +- added list of all equation of state options (#311) +- additional documentation on the file format specification +- Documentation added regarding Sarracen +- Machine-specific instructions added for Kennedy (St. Andrews) and DiAL +- Documentation for self-gravitating and gravitationally unstable disc setups (thanks to Cristiano Longarini) + + v2022.0.0 - 17th Jan 2022 ------------------------- Physics ~~~~~~~ - Option for gravitational wave emission in quadrupole approximation from any simulation (`Toscani et al. 2022 `__) -- Further improvements to wind injection/line cooling/dust formation (contributed by Lionel Siess and Ward Homan) +- Further improvements to wind injection/line cooling/dust formation (`Siess et al. 2022 `__) - Ideal + radiation + H/He ionisation equation of state (Lau, Hirai) - Allow for variable composition (X, Z, mu) in stars (Lau, Hirai) -- Radiative feedback implemented via MCFOST based on sink particle Mdot (`Borchert et al. 2021 `__) +- Radiative feedback implemented via MCFOST based on sink particle Mdot (`Borchert et al. 2022 `__) - Sink particles can now merge (thanks to James Wurster; #172) - Option for thermal energy floor / minimum temperature (Wurster) - Fixes/improvements to implicit cooling (Wurster) @@ -20,7 +132,7 @@ Setup ~~~~~ - Further improvements to automated relax-star procedure and to setup_star in general (See Appendix C of `Lau et al. 2022 `__) - Real star profiles allowed in GR tidal disruption event setup and moddump (Hu, Sharma) -- Set up for an hierarchical triple system embedded in a circum-triple disc (Ceppi, Cuello; #102, #110) +- Set up for an hierarchical triple system embedded in a circum-triple disc (`Ceppi et al. 2022 `__; `2023 `__; #102, #110) - Firehose setup added for testing tidal disruption flows Bugs diff --git a/docs/setups-list.rst b/docs/setups-list.rst index f4991f1fb..525d4214b 100644 --- a/docs/setups-list.rst +++ b/docs/setups-list.rst @@ -39,6 +39,8 @@ +------------------+---------------------------------------------------------------+----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ | dustydisc | locally isothermal dusty discs | dust, disc viscosity, isothermal | `setup_disc.f90 `__ | +------------------+---------------------------------------------------------------+----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| dustyisosgdisc | isothermal self-gravitating dustydisc | dust, self-gravity, disc viscosity, isothermal | `setup_disc.f90 `__ | ++------------------+---------------------------------------------------------------+----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ | dustysedov | Sedov blast wave test with dust | dust, periodic | `setup_dustysedov.f90 `__ | +------------------+---------------------------------------------------------------+----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ | dustysgdisc | self-gravitating dustydisc | dust, self-gravity | `setup_disc.f90 `__ | @@ -53,6 +55,8 @@ +------------------+---------------------------------------------------------------+----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ | evrard | Evrard collapse test problem | self-gravity | `setup_star.f90 `__ | +------------------+---------------------------------------------------------------+----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| exoALMA | exoALMA comparison project: planet disc interaction with fixed planet orbit | isothermal | `setup_disc.f90 `__ | ++------------------+---------------------------------------------------------------+----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ | firehose | injection of a stream of gas as a firehose | | `setup_firehose.f90 `__ | +------------------+---------------------------------------------------------------+----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ | galaxies | galaxy merger using data from Wurster & Thacker (2013a,b) | self-gravity | `setup_galaxies.f90 `__ | @@ -79,6 +83,8 @@ +------------------+---------------------------------------------------------------+----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ | gwdisc | disc around inspiralling binary with gravitational wave decay | disc viscosity, isothermal | `setup_gwdisc.f90 `__ | +------------------+---------------------------------------------------------------+----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ +| isosgdisc | isothermal self-gravitating disc | self-gravity, disc viscosity, isothermal | `setup_disc.f90 `__ | ++------------------+---------------------------------------------------------------+----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ | isowind | isothermal spherical wind | isothermal | `setup_wind.F90 `__ | +------------------+---------------------------------------------------------------+----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ | jadvect | MHD current loop advection problem | MHD, periodic | `setup_jadvect.f90 `__ | diff --git a/src/main/checksetup.F90 b/src/main/checksetup.F90 index dab4b687c..2017e766a 100644 --- a/src/main/checksetup.F90 +++ b/src/main/checksetup.F90 @@ -181,15 +181,15 @@ subroutine check_setup(nerror,nwarn,restart) ! !--check that no empty particle types have been added ! - do i=1,size(npartoftype) - if (labeltype(i)=='empty' .and. npartoftype(i) > 0) then - print "(/,1x,a,i0,a,i0,a,/)",'ERROR: ',npartoftype(i),' particles of type ',i,& + do i=1,size(npartoftype) + if (labeltype(i)=='empty' .and. npartoftype(i) > 0) then + print "(/,1x,a,i0,a,i0,a,/)",'ERROR: ',npartoftype(i),' particles of type ',i,& ' set up but type=='//trim(labeltype(i)) - if (i==2) print "(a,/)",& + if (i==2) print "(a,/)",& ' *** This is the old dust particle type: edit setup to use itype=idust ***' - nerror = nerror + 1 - endif - enddo + nerror = nerror + 1 + endif + enddo endif ! !--should not have negative or zero smoothing lengths in initial setup diff --git a/src/main/cooling.F90 b/src/main/cooling.F90 index 0f5a7afa4..1734d75c0 100644 --- a/src/main/cooling.F90 +++ b/src/main/cooling.F90 @@ -26,9 +26,9 @@ module cooling ! - Tfloor : *temperature floor (K); on if > 0* ! - icooling : *cooling function (0=off, 1=cooling library (step), 2=cooling library (force),* ! -! :Dependencies: chem, cooling_gammie, cooling_ism, cooling_koyamainutsuka, -! cooling_molecular, cooling_solver, dim, eos, infile_utils, io, options, -! part, physcon, timestep, units +! :Dependencies: chem, cooling_gammie, cooling_gammie_PL, cooling_ism, +! cooling_koyamainutsuka, cooling_molecular, cooling_solver, dim, eos, +! infile_utils, io, options, part, physcon, timestep, units ! use options, only:icooling diff --git a/src/main/cooling_gammie_PL.f90 b/src/main/cooling_gammie_PL.f90 index 5ba3ce82c..1846c678b 100644 --- a/src/main/cooling_gammie_PL.f90 +++ b/src/main/cooling_gammie_PL.f90 @@ -12,10 +12,12 @@ module cooling_gammie_PL ! :References: ! Gammie (2001), ApJ 553, 174-183 ! -! :Owner: Daniel Price +! :Owner: Cristiano Longarini ! ! :Runtime parameters: -! - beta_cool : *beta factor in Gammie (2001) cooling* +! - beta_cool : *beta factor in Gammie (2001) cooling @ R_beta* +! - eta : *Power law coefficient of the cooling factor* +! - r_beta : *Characteristic radius of the cooling power law profile* ! ! :Dependencies: infile_utils, io ! @@ -88,4 +90,4 @@ subroutine read_options_cooling_gammie_PL(name,valstring,imatch,igotall,ierr) end subroutine read_options_cooling_gammie_PL -end module cooling_gammie_PL \ No newline at end of file +end module cooling_gammie_PL diff --git a/src/main/force.F90 b/src/main/force.F90 index 7dcc4a344..ba795aac7 100644 --- a/src/main/force.F90 +++ b/src/main/force.F90 @@ -39,11 +39,11 @@ module forces ! ! :Runtime parameters: None ! -! :Dependencies: boundary, cooling, dim, dust, eos, eos_shen, fastmath, -! growth, io, io_summary, kdtree, kernel, linklist, metric_tools, -! mpiderivs, mpiforce, mpimemory, mpiutils, nicil, omputils, options, -! part, physcon, ptmass, ptmass_heating, radiation_utils, timestep, -! timestep_ind, timestep_sts, timing, units, utils_gr, viscosity +! :Dependencies: boundary, cooling, dim, dust, eos, eos_shen, fastmath, io, +! io_summary, kdtree, kernel, linklist, metric_tools, mpiderivs, +! mpiforce, mpimemory, mpiutils, nicil, omputils, options, part, physcon, +! ptmass, ptmass_heating, radiation_utils, timestep, timestep_ind, +! timestep_sts, timing, units, utils_gr, viscosity ! use dim, only:maxfsum,maxxpartveciforce,maxp,ndivcurlB,ndivcurlv,& maxdusttypes,maxdustsmall,do_radiation diff --git a/src/main/growth.F90 b/src/main/growth.F90 index e84c0b55e..09e2c4d19 100644 --- a/src/main/growth.F90 +++ b/src/main/growth.F90 @@ -18,19 +18,19 @@ module growth ! :Runtime parameters: ! - Tsnow : *snow line condensation temperature in K* ! - bin_per_dex : *(mcfost) number of bins of sizes per dex* +! - cohacc : *strength of the cohesive acceleration in g/s^2* +! - dsize : *size of ejected grain during erosion in cm* ! - flyby : *use primary for keplerian freq. calculation* ! - force_smax : *(mcfost) set manually maximum size for binning* ! - grainsizemin : *minimum allowed grain size in cm* +! - ieros : *erosion of dust (0=off,1=on)* ! - ifrag : *fragmentation of dust (0=off,1=on,2=Kobayashi)* -! - ieros : *erosion of dust (0=off,1=on) ! - isnow : *snow line (0=off,1=position based,2=temperature based)* ! - rsnow : *snow line position in AU* ! - size_max_user : *(mcfost) maximum size for binning in cm* ! - vfrag : *uniform fragmentation threshold in m/s* ! - vfragin : *inward fragmentation threshold in m/s* ! - vfragout : *inward fragmentation threshold in m/s* -! - cohacc : *strength of the cohesive acceleration in g/s^2* -! - dsize : *size of ejected grain during erosion in cm* ! ! :Dependencies: checkconserved, dim, dust, eos, infile_utils, io, options, ! part, physcon, table_utils, units, viscosity @@ -361,8 +361,8 @@ subroutine write_options_growth(iunit) endif endif if (ieros == 1) then - call write_inopt(cohacccgs,'cohacc','strength of the cohesive acceleration in g/s^2',iunit) - call write_inopt(dsizecgs,'dsize','size of ejected grain during erosion in cm',iunit) + call write_inopt(cohacccgs,'cohacc','strength of the cohesive acceleration in g/s^2',iunit) + call write_inopt(dsizecgs,'dsize','size of ejected grain during erosion in cm',iunit) endif #ifdef MCFOST diff --git a/src/main/mpi_tree.F90 b/src/main/mpi_tree.F90 index 613cc242d..66cf2ea81 100644 --- a/src/main/mpi_tree.F90 +++ b/src/main/mpi_tree.F90 @@ -1,6 +1,6 @@ !--------------------------------------------------------------------------! ! The Phantom Smoothed Particle Hydrodynamics code, by Daniel Price et al. ! -! Copyright (c) 2007-2022 The Authors (see AUTHORS) ! +! Copyright (c) 2007-2023 The Authors (see AUTHORS) ! ! See LICENCE file for usage and distribution conditions ! ! http://phantomsph.bitbucket.io/ ! !--------------------------------------------------------------------------! @@ -10,7 +10,7 @@ module mpitree ! ! :References: None ! -! :Owner: Not Committed Yet +! :Owner: Conrad Chan ! ! :Runtime parameters: None ! diff --git a/src/main/readwrite_infile.F90 b/src/main/readwrite_infile.F90 index 1dd92aa7f..fe2a48fc8 100644 --- a/src/main/readwrite_infile.F90 +++ b/src/main/readwrite_infile.F90 @@ -248,7 +248,7 @@ subroutine write_infile(infile,logfile,evfile,dumpfile,iwritein,iprint) 'Should mcfost use the PdV work and shock heating?',iwritein) call write_inopt(mcfost_keep_part,'mcfost_keep_part',& 'Fraction of particles to keep for MCFOST',iwritein) - call write_inopt(ISM,'ISM',& + call write_inopt(ISM,'ISM',& 'ISM heating : 0 -> no ISM radiation field, 1 -> ProDiMo, 2 -> Bate & Keto',iwritein) call write_inopt(mcfost_dust_subl,'mcfost_dust_subl',& 'Should mcfost do dust sublimation (experimental!)',iwritein) @@ -529,7 +529,7 @@ subroutine read_infile(infile,logfile,evfile,dumpfile) case('mcfost_keep_part') read(valstring,*,iostat=ierr) mcfost_keep_part case('ISM') - read(valstring,*,iostat=ierr) ISM + read(valstring,*,iostat=ierr) ISM case('mcfost_dust_subl') read(valstring,*,iostat=ierr) mcfost_dust_subl #endif diff --git a/src/main/utils_filenames.f90 b/src/main/utils_filenames.f90 index 118bc1c07..002f6ca5f 100644 --- a/src/main/utils_filenames.f90 +++ b/src/main/utils_filenames.f90 @@ -38,7 +38,7 @@ function getnextfilename(filename,ifilename) integer :: idot,istartnum,ilen,i,ierr,num integer, optional, intent(out) :: ifilename character(len=10) :: fmtstring - ! + ! !--extract current number from filename ! idot = get_idot(filename) diff --git a/src/setup/setup_disc.f90 b/src/setup/setup_disc.f90 index 444d6b880..39b428c1e 100644 --- a/src/setup/setup_disc.f90 +++ b/src/setup/setup_disc.f90 @@ -25,11 +25,11 @@ module setup ! - Ratm_in : *inner atmosphere radius (planet radii)* ! - Ratm_out : *outer atmosphere radius (planet radii)* ! - accr1 : *single star accretion radius* -! - accr1a : *tight binary 1 primary accretion radius* -! - accr1b : *tight binary 1 secondary accretion radius* +! - accr1a : *single star accretion radius* +! - accr1b : *single star accretion radius* ! - accr2 : *perturber accretion radius* -! - accr2a : *tight binary 2 primary accretion radius* -! - accr2b : *tight binary 2 secondary accretion radius* +! - accr2a : *tight binary primary accretion radius* +! - accr2b : *tight binary secondary accretion radius* ! - alphaSS : *desired alphaSS* ! - alpha_z : *height of transition in tanh vertical temperature profile* ! - atm_type : *atmosphere type (1:r**(-3); 2:r**(-1./(gamma-1.)))* @@ -79,6 +79,8 @@ module setup ! - ramp : *Do you want to ramp up the planet mass slowly?* ! - rho_core : *planet core density (cgs units)* ! - subst : *star to substitute* +! - subst1 : *first star to substitute* +! - subst2 : *second star to substitute* ! - surface_force : *model m1 as planet with surface* ! - temp_atm0 : *atmosphere temperature scaling factor* ! - temp_mid0 : *midplane temperature scaling factor* @@ -887,15 +889,15 @@ subroutine setup_central_objects() print "(a,g10.3,a)",' Accretion Radius 2b: ', accr2b, trim(dist_unit) if (subst1>0) then - print "(a,g10.3,a)",' Tight binary 1 orientation referred to: substituted star orbital plane' - else - print "(a,g10.3,a)",' Tight binary 1 orientation referred to: sky' - endif - if (subst2>0) then - print "(a,g10.3,a)",' Tight binary 2 orientation referred to: substituted star orbital plane' - else - print "(a,g10.3,a)",' Tight binary 2 orientation referred to: sky' - endif + print "(a,g10.3,a)",' Tight binary 1 orientation referred to: substituted star orbital plane' + else + print "(a,g10.3,a)",' Tight binary 1 orientation referred to: sky' + endif + if (subst2>0) then + print "(a,g10.3,a)",' Tight binary 2 orientation referred to: substituted star orbital plane' + else + print "(a,g10.3,a)",' Tight binary 2 orientation referred to: sky' + endif call set_multiple(m1,m2,semimajoraxis=binary_a,eccentricity=binary_e, & posang_ascnode=binary_O,arg_peri=binary_w,incl=binary_i, & @@ -1938,18 +1940,18 @@ subroutine setup_interactive() print "(a)", '================================' ibinary = 0 - !-- Wide binary - m1 = 1. - m2 = 0.2 - binary_a = 10. - binary_e = 0. - binary_i = 0. - binary_O = 0. - binary_w = 270. - binary_f = 180. - accr1 = 1. - - !-- Tight binary 1 + !-- Wide binary + m1 = 1. + m2 = 0.2 + binary_a = 10. + binary_e = 0. + binary_i = 0. + binary_O = 0. + binary_w = 270. + binary_f = 180. + accr1 = 1. + + !-- Tight binary 1 subst1 = 11 q1 = 1 m1a = m1/(q1+1) @@ -1963,19 +1965,19 @@ subroutine setup_interactive() accr1a = 0.1 accr1b = 0.1 - !-- Tight binary 2 - subst2 = 12 - q2 = 1 - m2a = m2/(q2+1) - m2b = m2*q2/(q2+1) - binary2_a = 1. - binary2_e = 0. - binary2_i = 0. - binary2_O = 0. - binary2_w = 270. - binary2_f = 180. - accr2a = 0.1 - accr2b = 0.1 + !-- Tight binary 2 + subst2 = 12 + q2 = 1 + m2a = m2/(q2+1) + m2b = m2*q2/(q2+1) + binary2_a = 1. + binary2_e = 0. + binary2_i = 0. + binary2_O = 0. + binary2_w = 270. + binary2_f = 180. + accr2a = 0.1 + accr2b = 0.1 end select @@ -2002,26 +2004,26 @@ subroutine setup_interactive() iuse_disc(3) = .false. call prompt('Do you want a circumprimary disc?',iuse_disc(2)) call prompt('Do you want a circumsecondary disc?',iuse_disc(3)) - elseif (nsinks==3) then - !--bound binary: circum-triple - iuse_disc(1) = .false. - iuse_disc(2) = .false. - iuse_disc(3) = .false. - iuse_disc(4) = .true. - call prompt('Do you want a circum-triple disc?',iuse_disc(4)) - if (.not.iuse_disc(4)) then - call prompt('Do you want a circumbinary disc around the first hierarchical level secondary?',iuse_disc(1)) - else - print "(/,a)",'Setting circum-triple disc.' - endif - elseif (nsinks==4) then - !--2 bound binaries: circumbinary - iuse_disc(1) = .true. - iuse_disc(2) = .false. - iuse_disc(3) = .false. - iuse_disc(4) = .false. - print "(/,a)",'Setting circumbinary disc around the first hierarchical level secondary.' + elseif (nsinks==3) then + !--bound binary: circum-triple + iuse_disc(1) = .false. + iuse_disc(2) = .false. + iuse_disc(3) = .false. + iuse_disc(4) = .true. + call prompt('Do you want a circum-triple disc?',iuse_disc(4)) + if (.not.iuse_disc(4)) then + call prompt('Do you want a circumbinary disc around the first hierarchical level secondary?',iuse_disc(1)) + else + print "(/,a)",'Setting circum-triple disc.' endif + elseif (nsinks==4) then + !--2 bound binaries: circumbinary + iuse_disc(1) = .true. + iuse_disc(2) = .false. + iuse_disc(3) = .false. + iuse_disc(4) = .false. + print "(/,a)",'Setting circumbinary disc around the first hierarchical level secondary.' + endif if (.not.any(iuse_disc)) iuse_disc(1) = .true. !--number of discs ndiscs = count(iuse_disc) @@ -2428,20 +2430,20 @@ subroutine write_setupfile(filename) call write_inopt(use_global_iso,'use_global_iso',& 'globally isothermal or Farris et al. (2014)',iunit) elseif (nsinks == 3) then - write(iunit,"(/,a)") '# options for multiple discs' - call write_inopt(iuse_disc(1),'use_'//trim(disctype(1))//'disc','setup circum' & + write(iunit,"(/,a)") '# options for multiple discs' + call write_inopt(iuse_disc(1),'use_'//trim(disctype(1))//'disc','setup circum' & //trim(disctype(1))//' disc',iunit) - call write_inopt(iuse_disc(4),'use_'//trim(disctype(4))//'disc','setup circum' & + call write_inopt(iuse_disc(4),'use_'//trim(disctype(4))//'disc','setup circum' & //trim(disctype(4))//' disc',iunit) - call write_inopt(use_global_iso,'use_global_iso',& + call write_inopt(use_global_iso,'use_global_iso',& 'globally isothermal or Farris et al. (2014)',iunit) elseif (nsinks == 4) then - write(iunit,"(/,a)") '# options for multiple discs' - call write_inopt(iuse_disc(1),'use_'//trim(disctype(1))//'disc','setup circum' & + write(iunit,"(/,a)") '# options for multiple discs' + call write_inopt(iuse_disc(1),'use_'//trim(disctype(1))//'disc','setup circum' & //trim(disctype(1))//' disc',iunit) - call write_inopt(use_global_iso,'use_global_iso',& + call write_inopt(use_global_iso,'use_global_iso',& 'globally isothermal or Farris et al. (2014)',iunit) - endif + endif endif !--individual disc(s) do i=1,maxdiscs diff --git a/src/utils/analysis_mcfost.f90 b/src/utils/analysis_mcfost.f90 index eb60bcafa..fca11ca4e 100644 --- a/src/utils/analysis_mcfost.f90 +++ b/src/utils/analysis_mcfost.f90 @@ -75,7 +75,7 @@ subroutine do_analysis(dumpfile,num,xyzh,vxyzu,particlemass,npart,time,iunit) endif if (ISM > 0) then - ISM_heating = .true. + ISM_heating = .true. endif if (.not.init_mcfost) then diff --git a/src/utils/moddump_addflyby.f90 b/src/utils/moddump_addflyby.f90 index c3e049d2e..431c220a7 100644 --- a/src/utils/moddump_addflyby.f90 +++ b/src/utils/moddump_addflyby.f90 @@ -14,7 +14,8 @@ module moddump ! ! :Runtime parameters: None ! -! :Dependencies: centreofmass, part, physcon, prompting, units, vectorutils, setflyby +! :Dependencies: centreofmass, part, physcon, prompting, setflyby, units, +! vectorutils ! implicit none @@ -85,7 +86,7 @@ subroutine modify_dump(npart,npartoftype,massoftype,xyzh,vxyzu) ! assigning position, velocity and accretion radius to the sink particle xyzmh_ptmass(1:3,nptmass) = xp xyzmh_ptmass(4,nptmass) = mperturber - xyzmh_ptmass(5,nptmass) = accrperturber + xyzmh_ptmass(5,nptmass) = accrperturber xyzmh_ptmass(6,nptmass) = 0. vxyz_ptmass(:,nptmass) = vp diff --git a/src/utils/moddump_sinkbinary.f90 b/src/utils/moddump_sinkbinary.f90 index 3c03a63b5..6e55a8177 100644 --- a/src/utils/moddump_sinkbinary.f90 +++ b/src/utils/moddump_sinkbinary.f90 @@ -14,8 +14,8 @@ module moddump ! ! :Runtime parameters: None ! -! :Dependencies: centreofmass, part, physcon, prompting, setbinary, -! timestep, units +! :Dependencies: centreofmass, extern_gwinspiral, externalforces, options, +! part, physcon, prompting, setbinary, timestep, units ! implicit none