Input and Output files
Input
There are two required input files to run a simulation with mcdust, setup.par and prepocs.opt. The details are each file are explained below.
Input file 1: setup.par
This is the file to specify the simulation parameters. The parameters to be entered in the file are written below
number_of_particles_per_cell - Number of particles in a cellnumber_of_radial_zones - Number of radial gridsnumber_of_vertical_zones - Number of vertical gridssteps_between_outputs - Number of iterations between outputstime_between_outputs_[yrs] - time interval between outputsmaximum_time_of_simulation_[yrs] - simulation time in yrsminimum_radius_[AU] - inner radial boundary of the simulation in AUmaximum_radius_[AU] - outer radial boundary of the simulation in AUmonomer_radius_[cm] - radius of the particle monomers in cmmaterial_density_[g/cm3] - internal density of the particles in g/cm3dmmax - mass optimization value for grouped collisionsevaporation_radius_[AU] - radius inside which particles will not be tracked anymoredust_to_gas_ratio - the dust to gas ratio in the diskfragmentation_velocity_[cm/s] - fragmentation velocity of the particlesalpha - the alpha turbulence value to specifiy the strength of the turbulence in the disksigma_gas_[g/cm2] - gas surface density at 1 AUtemperature_[K] - temperature in K at 1 AUerosion_mass_ratio - mass ratio condition to trigger erosiondata_directory - directory name to write the dataIf the values for the parameters are not specified in the setup.par file, the default values will be taken as specified in the parameters.F90 file. New parameters can also be added to the simulation via the parameters.F90 file.
Input file 2: preprocs.opt
This file specifies the regions of the code to be compiled based on compiler options. The current compiler options are listed:
VERTICALMODEL: activate this to setup a 1D vertical modelTRANSPORT: activate dust transportVERTSETTLING: activate vertical settling of particlesRADRIFT: activate radial drift of particlesCOLLISIONS: activate dust coagulationEROSION: activate erosion as a collision outcomeAUXDATA: write timestep dataRESTART: continue a simulation from a snapshotComment or uncomment the options with # in the file based on the setup of the run.
Output
The output files are of the HDF5 file format with the extension .h5. Each snapshot has its own file and can accessed in outputs/ directory.
Each data file contains the properties of all representative particles (called as swarms). The properties that are stored in the default version are given below:
Teh data file contains the snapshot time of the data file in the group times` where the snapshot time (in years) is stored in the :code:`timesout dataset. Each data file also contains the mass of a swarm (in g) and the output number of the file as metadata.
The metadata of the code can be accessed using the h5dump command as shown in the example below.
h5dump -H data/swarms-00000.h5
The output of the command shows the metadata of the file swarms-00000.h5
HDF5 "swarms-00000.h5" {
GROUP "/" {
ATTRIBUTE "author" {
DATATYPE H5T_STRING {
STRSIZE 20;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
}
DATASPACE SCALAR
}
ATTRIBUTE "code" {
DATATYPE H5T_STRING {
STRSIZE 9;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
}
DATASPACE SCALAR
}
ATTRIBUTE "mass_of_swarm" {
DATATYPE H5T_IEEE_F32LE
DATASPACE SCALAR
}
ATTRIBUTE "output_number" {
DATATYPE H5T_IEEE_F32LE
DATASPACE SCALAR
}
GROUP "swarms" {
DATASET "swarmsout" {
DATATYPE H5T_COMPOUND {
H5T_STD_I32LE "id_number";
H5T_IEEE_F64LE "mass_of_a_particle_[g]";
H5T_IEEE_F64LE "cylindrical_radius_[AU]";
H5T_IEEE_F64LE "height_above_midplane_[AU]";
H5T_IEEE_F64LE "Stokes_number";
H5T_IEEE_F64LE "Radial_velocity_v_r_[cm/s]";
H5T_IEEE_F64LE "Vertical_velocity_v_z_[cm/s]";
}
DATASPACE SIMPLE { ( 1, 1048576 ) / ( H5S_UNLIMITED, 1048576 ) }
}
}
GROUP "times" {
DATASET "timesout" {
DATATYPE H5T_IEEE_F64LE
DATASPACE SIMPLE { ( 1 ) / ( H5S_UNLIMITED ) }
}
}
}
To add new properties to the data, one can modify the hdf5output.F90 file.
There are also more files that can be written out for auxilliary data. timesout.dat contains the snapshot times [in yr] of the output files in plain text format. timestep.dat contains the advection timestep [in yr] for each iteration.
Writing these files can be turned on/off using the AUXDATA`preprocessor directive in :code:`preprocs.opt as described in the section Input File 2.