From 89da3e7d2c5678794f02158994e1fbe9e0478e8b Mon Sep 17 00:00:00 2001 From: Christophe Pinte Date: Fri, 31 May 2024 10:06:07 +1000 Subject: [PATCH] Updating the ducumentation --- docs/{3D_models.rst => hydro_models.rst} | 131 +++++++++++++++++++++-- docs/index.rst | 3 +- docs/mcfost+phantom.rst | 75 ------------- src/Makefile | 25 ----- 4 files changed, 124 insertions(+), 110 deletions(-) rename docs/{3D_models.rst => hydro_models.rst} (61%) delete mode 100644 docs/mcfost+phantom.rst diff --git a/docs/3D_models.rst b/docs/hydro_models.rst similarity index 61% rename from docs/3D_models.rst rename to docs/hydro_models.rst index 2a00d8a90..67ba5cc9e 100644 --- a/docs/3D_models.rst +++ b/docs/hydro_models.rst @@ -10,27 +10,28 @@ specific needs. Current interfaces where mcfost can natively read dumps exist fo * fargo-3d * athena++ * idefix +* pluto - Generic interface (via fits files) -################################### +Generic interface (via fits files) +################################## There is also a default interface using FITS file to input MCFOST with any arbitrary density structure. This interface is -likely to fulfill most of the needs. +likely to fulfill most of the needs if you are not using one the hydro codes above. -It can be used with either a structure or unstructed grid. +It can be used with either a structured or unstructed grid. Structured grid --------------- -For a structured grid, the fits interface can be used as +For a structured grid, the fits interface can be used as:: -$ mcfost -density_file -3D (+ any other option) + $ mcfost -density_file -3D (+ any other option) -or +or:: -$ mcfost -density_file (+ any other option) + $ mcfost -density_file (+ any other option) The `-sigma_file` option works in a similar way as the `-density_file` option but without the vertical dimension. mcfost use the scale height and flaring index provided in the parameter file to reconstruct the 3D density structure. @@ -147,3 +148,117 @@ The fits file needs to have at least 2 hdus: .. note:: because the volume of a Voronoi cell can be different from the initial volume in the hydro model, the mass and not the density of each particle is required. * the 2nd hdu must be 2D with dimensions of ``3 x n_points``, and provide the x,y,z coordinates for all the data points + + + +Phantom interface +################# + +MCFOST can read both the standard and hdf5 phantom dump formats. +Typical syntax for reading a phantom file is:``mcfost -phantom `` +Any additional option can be used in conjonction with the `-phantom` option. + +When reading a phantom dump, sections of the parameter file will be ignored, in particular any section describing the disc density, model grid and stellar properties (unless the stellar properties are forced). + +Idefix, pluto, fargo3d and athena++ interfaces +############################################## + +MCFOST can also read native dumps from idefix, pluto, fargo3d, athena++ if they are on a regular grid. The mcfost grid will be matched eactly to the hydro grid, which means mcfost can used the density in each cell, rather than the mass (as for a set of points or a SPH model). Syntax is the similar to the phantom case. + +For idefix:: + + $ mcfost -idefix + +For pluto:: + + $ mcfost -pluto + +For athena++:: + + $ mcfost -athena++ + +For fargo3d:: + + $ mcfost -fargo3d + + + + +Scaling units +############# + +Values in hydro simulations might be provided in code units rather than physical units. They can be rescaled with the options ``-scale_length_units `` and ``-scale_mass_units ``. + + + + +Important sections in parameter file +#################################### + +Here are some important sections to consider for post-processing hydro dump files. + +Number of photons for temperature and image calculation +------------------------------------------------------- + +You may need to use more photons than for a 2D model to compute the temperature. As a rule of thumb, you should use at least 100 more packets than SPH particles or grid cells, ie the section is the parameter file should be something similar to + +:: + + #Number of photon packages + 1.28e8 nbr_photons_eq_th : T computation + 1.28e3 nbr_photons_lambda : SED computation + 1.28e6 nbr_photons_image : images computation + + + +Turn off SED computation +------------------------ + +You probably don't want to compute an SED if you have a hydro file. Turning it off will save computtation time. + +:: + + T F T compute temperature?, compute sed?, use default wavelength grid for ouput ? + + +Turn off image symmetries +------------------------- + +You don't want image symmetries if you are processing an hydrodynamical dump. + +:: + + #Symetries + F image symmetry + F central symmetry + F axial symmetry (important only if N_phi > 1) + +Can ignore the following, they come from the hydro dump +------------------------------------------------------- + +:: + + #Grid geometry and size + #Disk physics + #Number of zones : 1 zone = 1 density structure + corresponding grain properties + +Density structure +----------------- + +The density structure comes from the hydro dump, so can ignore "#Density structure" however you need +to set "gas-to-dust mass ratio" in your model does not have dust: + +:: + + 1.e-3 100. dust mass, gas-to-dust mass ratio + + +.. note:: You can force the gas mass to the value in the parameter file using the option ``-force_Mgas``. + + +Star properties +--------------- + +By default, mcfost will use the properties (ie mass) of the sink particles to estimate the brightness temperature and luminosity. +mcfost will do so by interpolating through isochrones, assuming an age of 3Myr by default. The age can be change with the ``-age`` option. +The stellar properties can be fixed to the values in the parameter files with ``-fix_stars``. Note that in that case, the number of stars in the mcfost parameter file must matches the number of sink particles in the hydro dump. diff --git a/docs/index.rst b/docs/index.rst index 0ceab9635..e86643d8f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -12,8 +12,7 @@ Welcome to MCFOST's documentation parameter_file input options - 3D_models - mcfost+phantom + hydro_models tools test_suite troubleshooting diff --git a/docs/mcfost+phantom.rst b/docs/mcfost+phantom.rst deleted file mode 100644 index 33c2fe4bc..000000000 --- a/docs/mcfost+phantom.rst +++ /dev/null @@ -1,75 +0,0 @@ -MCFOST + Phantom -================ - - -MCFOST can read both the standard and hdf5 phantom dump formats. -Typical syntax for reading a phantom file is:``mcfost -phantom `` -Any additional option can be used in conjonction with the `-phantom` option. - -When reading a phantom dump, sections of the parameter file will be ignored, in particular any section describing the disc density, model grid and stellar properties (unless the stellar properties are forced). - - -Here are some important sections to consider for post-processing Phantom dump files. - -Number of photons for temperature and image calculation -####################################################### - -You may need to use more photons to compute the temperature. As a rule of thumb, you should use at least 100 more packets than phantom SPH particles, ie the section is the parameter file should be something similar to - -:: - - #Number of photon packages - 1.28e8 nbr_photons_eq_th : T computation - 1.28e3 nbr_photons_lambda : SED computation - 1.28e6 nbr_photons_image : images computation - - - -Turn off SED computation -######################## - -You probably don't want to compute an SED if you have a Phantom dump file. - -:: - - T F T compute temperature?, compute sed?, use default wavelength grid for ouput ? - - -Turn off image symmetries -######################### - -You don't want image symmetries if you have a Phantom dump file. - -:: - - #Symetries - F image symmetry - F central symmetry - F axial symmetry (important only if N_phi > 1) - -Can ignore the following, they come from the phantom dump -######################################################### - -:: - - #Grid geometry and size - #Disk physics - #Number of zones : 1 zone = 1 density structure + corresponding grain properties - -Density structure -################# - -Density comes from phantom, so can ignore "#Density structure" however you need -to set "gas-to-dust mass ratio": - -:: - - 1.e-3 100. dust mass, gas-to-dust mass ratio - - -Star properties -############### - -By default, mcfost will use the properties (ie mass) of the sink particles to estimate the brightness temperature and luminosity. -mcfost will do so by interpolating through isochrones, assuming an age of 3Myr by default. The age can be change with the `-age` option. -The stellar properties can be fixed to the values in the parameter files with `-fix_stars`. Note that in that case, the number of stars in the mcfost parameter file must matches the number of sink particles in the phantom dump. diff --git a/src/Makefile b/src/Makefile index 849141b15..7688b74ec 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,10 +4,6 @@ IS_DARWIN := $(shell uname | tr '[a-z]' '[A-Z]' 2>&1 | grep -c DARWIN) -# Linux compiling server -LINUX_SERVER=gadi -IPAG_SERVER=ipag-nfs - KNOWN_SYSTEM=no LIB= $(MCFOST_INSTALL)/lib @@ -332,18 +328,6 @@ release_utils : scp -r mcfost_utils.tgz mcfost_utils.sha1 ../utils/Version $(IPAG_SERVER):/user/publicdir/pintec/mcfost_utils/ rm -f mcfost_utils.tgz mcfost_utils.sha1 -fosti : - rsync -Pur *.f90 Makefile fosti:mcfost/src - ssh fosti "cd mcfost/src ; make clean mcfost fostino=yes; \cp -f mcfost ~/mcfost_cigri/" - -dmz : - rsync -Pur *.f90 Makefile dmz:mcfost/src - ssh dmz "cd mcfost/src ; make clean mcfost" - -wardlaw : - rsync -Pur *.f90 Makefile wardlaw:mcfost/src - ssh wardlaw "source .login ; cd mcfost/src ; make clean mcfost ; \cp -f mcfost ~/bin/" - #------------------------------------------------------------------------------# # Cleaning @@ -365,15 +349,6 @@ cleanall : clean cleandata cleanGasmod : rm -rf $(gdir)/*.o $(gdir)/*.mod -#------------------------------------------------------------------------------# -# Backup - -.PHONY : save - -save : - git push bitbucket --all - git push github --all - #------------------------------------------------------------------------------# # Testing