smaret / astrochem

A code to compute the abundances of chemical species in the interstellar medium
Other
19 stars 12 forks source link

Initial abundances are not correctly set by the Python module #85

Closed smaret closed 2 years ago

smaret commented 2 years ago

The Python example model from the documentation gives incorrect results:

% python model.py
-------------------------------------------------------------
| Time (yr) | X(CO)     | X(H3(+))  | X(e(-))   | X(HCO(+)) |
-------------------------------------------------------------
| 1.00e-06  | 0.00e+00  | 0.00e+00  | 7.31e-05  | 0.00e+00  |
| 2.63e-06  | 0.00e+00  | 0.00e+00  | 7.31e-05  | 0.00e+00  |
| 6.90e-06  | 0.00e+00  | 0.00e+00  | 7.31e-05  | 0.00e+00  |
| 1.81e-05  | 0.00e+00  | 0.00e+00  | 7.31e-05  | 0.00e+00  |
| 4.76e-05  | 0.00e+00  | 0.00e+00  | 7.31e-05  | 0.00e+00  |
| 1.25e-04  | 0.00e+00  | 0.00e+00  | 7.31e-05  | 0.00e+00  |
| 3.28e-04  | 0.00e+00  | 0.00e+00  | 7.31e-05  | 0.00e+00  |
| 8.62e-04  | 0.00e+00  | 0.00e+00  | 7.31e-05  | 0.00e+00  |
| 2.26e-03  | 0.00e+00  | 0.00e+00  | 7.31e-05  | 0.00e+00  |
(...)

This is because the initial abundances are not correctly set by the Python module (most likely a buffer overflow).