[mesa-users] astero module: NaNs in profile, possibly uninitialized velocity variable?

Warrick Ball wball at bison.ph.bham.ac.uk
Fri Feb 10 11:12:17 EST 2017


Hi,

I think I've stumbled upon an innocent bug while working with the MESA 
module.  This is quite easy to reproduce: in r8845, copy a new 
star/astero/work folder and set

   write_profile_for_best_model = .true. ! instead of .false.
   best_model_profile_filename = 'best.profile' ! or whatever

then make and run.  When the star gets sufficiently close to the observed 
data to start writing profiles, I get a star's worth of lines of the form

                       total_energy           1                       NaN
                            v_div_r           1                       NaN

I think I correctly traced the error message down to the function do_col 
in star/private/profile.f90, which has a block checking for NaNs after a 
call to some getval_for_profile in star/private/profile_getval.f90. 
Rummaging through there, it looks like the problem is probably the 
variable v, since total_energy and v_div_r have that in common.

I haven't dug any further through the logic but my suspicion is that this 
is a case of v(k) having not been set.  Since I'm not following the 
velocity variable, it doesn't actually matter to me.  (The run is 
otherwise behaving perfectly normally.)  But the NaNs were worrying, 
though I'm sure they would also be suppressed by removing total_energy and 
v_div_r from profile_columns.list.

I'll try to dig a bit further to see if I can find where v is initialized.

Cheers,
Warrick



------------
Warrick Ball
Postdoc, School of Physics and Astronomy
University of Birmingham, Edgbaston, Birmingham B15 2TT
wball at bison.ph.bham.ac.uk
+44 (0)121 414 4552




More information about the Mesa-users mailing list