Note : The code continues its evolution and will me made more ergonomic


Contributors : Jacques Masson, Pierre Marchand (Marchand et al. 2016)

This program solve a chemical network to compute the equilibrium abundances at typical temperatures and densities of collapsing molecular clouds.
The network is based on Umebayashi & Nakano (1990) and Kunz & Mouschovias (2009).

The main file is Abondances.f90
You can change the parameters in the namelist parameters.nml :
      alpha : number of bins of size for grains
      active_vap : active the grain evaporation,
      act_eos : active the barotropic equation of state (cf eos.f90)
      mag : Evolution of magnetic field with density (does not influence the abundances, only the resistivities) (see calc_mag.f90)
      rho_min : starting density (in cc)
      rho_max : final density (in cc)
      ltot : Number of points in density
      Tmin : starting temperature (deactivated if act_eos = true)
      Tmax : final temperature (deactivated if act_eos = true)
      Ttot : Number of points in temperature
      xi : Ionisation rate (s^-1)
The output are resnh.dat (abundances) and res_sig.dat (resistivities).
You can find the reaction rates in Reactions.f90
See the related paper, P. Marchand & al (2015) for more informations.

The output abundance table is resnh.dat
Structure of resnh.dat :
density (cm-3), electrons, M+, m+, H3+, H+, C+, He+, K+, Na+, total grains+, total grains-, total neutral grains, alpha*(grains+, grains-, neutral grains), integration time, Temperature
Plot script : abundances.gp

Structure of res_sig.dat :
density (cm-3), mag field (G), sigma_P (s-1), sigma_O (s-1), sigma_Hall (s-1), eta_AD (s), eta_Ohm (s), eta_Hall (s), Temperature
Plot_script : eta_sigma.gp

If the code does not converge correctly, here are the things you can try :
- Decrease 'prec' : the code will run longer for each density step until the "time step dt over the total time ti" quotient falls below 'prec'
- Increase ntrial : If ntrial is reached (the code is making ntrial time steps per density steps), you maybe want to integrate longer
- Change prec-jco : Either increase or decrease it to change the maximum allowed variation in one time step



CONCERNING THE ABUNDANCE TABLE
The file is Table_abundances.dat
Be careful, the structure is slighly different from the standard output described above.
Please look read_table.f90 if you want to use the table
