The MOLLIE code
Corrections and Improvements
 
Jul 10, 2013
This version has been tested on large grids. In the Other Examples section of Mollie's main web page there are files to set up 512 grid and a 2048 x 8 x 8 grid. In the previous version, there was one cell size. Now each cell has 2 sizes, one for the X direction and one for Y and Z. They should always be the same unless you want to test a 1-D radiative transfer. At the moment, MOLLIE does not distribute the model grid but holds all the memory on the master processor. MOLLIE just distributes the RT calculations. The memory requirements can be reduced by 50 for the molecules without hyperfine structure. The explanation and modified files are in the Other Examples section "CO with a 512

A new feature is the ability to write out intermediate results as the Lambda iteration progresses. With the parameters, "iterations" and "number_models" in the setup.c file, MOLLIE will write a complete output set after a number of iterations and continue for a total of iterations*number_models. Useful for checking convergence and stopping the code once converged rather than waiting until the total number of iterations has been reached to get the output.

Apr 5, 2013
The upward collisional rates are now calculated from the downward rates after the latter are interpolated to the gas temperature. Previously, both the upward and downward rates were calculated by interpolation. However, small deviations from detailed balance could prevent convergence at high optical depth

April 2, 2013
Thanks to Shadi Chitsazzadeh, University of Victoria, the LTE ammonia now includes the magnetic hyperfine splitting for the (1,1), (2,2), and (3,3) lines. The magnetic splitting in the (3,3) line will already be difficult to observe so there is no reason to go to higher rotational transitions.

Mar 8, 2013
Cnotes0 includes the optical depth per cell printed after every iteration along with source, Jbar, opacity, Lambda. Corrected to print this data along the ray through the center of the cube. This changes cmain.h.

Feb 15, 2013
Some of the collision rates were calculated by linearly interpolating both the upward and downward rates between temperatures. It is possible that the rates could be out of detailed balance and cause the solution to drift at very high optical depth. Now interpolate the downward rates and set the upward by detailed balance.

Jan 24, 2013
Corrected a problem in cmain.c which initialized the molecular opacity and emissivity to zero before the statistical equilibrium calculation. This prevented convergence at very high optical depth. The initialization to zero was meant to apply only to cells defined as ionized gas. This is a potentially serious problem that should be fixed. Either use the newer version of fsub.f and cmain.c. Both must be used together. Or alternatively in your version of cmain.c, in the function, int stateq, change these lines:

for (line=0;line<NLINES;line++){
for (ihyp=0;ihyp<atomic.nhyp[line];ihyp++){
srcopc[ibox][i][j][k].emissivity[line][0] = 0.0;
srcopc[ibox][i][j][k].opacity[line][0] = 0.0;
}}
if (model[ibox][i][j][k].phase != 0) goto continuum;

to this:

if (model[ibox][i][j][k].phase == 2) {
for (line=0;line<NLINES;line++){
for (ihyp=0;ihyp<atomic.nhyp[line];ihyp++){
srcopc[ibox][i][j][k].emissivity[line][0] = 0.0;
srcopc[ibox][i][j][k].opacity[line][0] = 0.0;
}}
goto continuum;
}

With this correction, the molecular emissivity and opacity are only set to zero if the phase = 2 (ionized gas). If your version of cmain.c does not have these lines, then it is an earlier version that does not allow for ionized gas. Earlier versions do not have this problem.

Jan 11, 2013
This version modifies the ALI for consistency in case the normalization of the line profile function is not exactly one. The line profile function is required to be correct to within 1%. The exact number is now propagated from the slaves to the master and included in the rate equations with ALI. Changes to functions acceleratedlambda, and newrt. So far this improvement has not made a significant difference because in the test cases, the line normalization was correct to machine accuracy.

Jul 31, 2012
In NEWRT, changed diagnostic output file from 22 to lun22 which is myid+22. Prevents the output printed for one specific ray from being overwritten by a different slave. This is only relevant for debugging.
In subcritical.f defined rtbis, apops, and balance as *8 for compatibility with latest GNU compilers.

Nov 1, 2011
Corrected more problems in fsub.f where the code checks the rotation of the rays. The check did not allow for the fact that the projected size of the model box is smaller when viewed from the perspective of a rotated ray. The check code has caused more problems than code it is supposed to check. Deleted.

July 27, 2011
Corrected typo in dmatt, gt corrected to .gt. This is a print subroutine, not normally used.

May 4, 2011
Corrected gridding for the case where the model sphere is much larger than the model box.
In setup.c, renamed alng, alat, nviews to outlng, outlat, outviews to improve clarity about the meaning of these input variabilities. Previous setup.c files are no longer consistent.

May 2 2011
The main model output file now includes rest frequencies. This requires an updated version of the IDL program load_model.pro available here.

8 April 2011
Argument list to define_model.c now includes molecule. read_lynds reads new hydro output files with H2O abundance.

18 March 2011
New chemistry function with improved CO and new H2O ice model. Fixed an asymmetry in the calculation of Av.

3 March 2010
Corrected the geometry to fix the problem that the number of angles in the C and F77 parts of the code were not the same when the view down the north pole was included. This is serious problem for views at angles other than the default along the x-axis.