[mesa-users] add dR/dt to history.data
Josiah Schwab
jwschwab at berkeley.edu
Sat Jan 12 11:32:19 EST 2013
> There seems no option of the change rate of stellar radius, dR/dt, in "history_columns.list" file.
> Is it possible to add it to "history.data" file?
Yes, you can whatever you want to the history data file. There is a sketch of how to do this at http://mesa.sourceforge.net/how_to_use_mesa_star.html#part6
The page is a bit out of date. The correct place to find 'standard_run_star_extras.inc' is now /star/job.
(@Bill, etc: can you update that path on the website?)
Hopefully that helps,
Josiah
P.S. In the end, the relevant functions that you edited in run_star_extras.f might look like
integer function how_many_extra_history_columns(s, id, id_extra)
use star_def, only: star_info
type (star_info), pointer :: s
integer, intent(in) :: id, id_extra
how_many_extra_history_columns = 1
end function how_many_extra_history_columns
subroutine data_for_extra_history_columns(s, id, id_extra, n, names, vals, ierr)
use const_def, only: dp
use star_def, only: maxlen_history_column_name, star_info
type (star_info), pointer :: s
integer, intent(in) :: id, id_extra, n
character (len=maxlen_history_column_name) :: names(n)
real(dp) :: vals(n)
integer, intent(out) :: ierr
names(1) = "v_surf"
vals(1) = s% r(1)*s% dlnR_dt(1)
end subroutine data_for_extra_history_columns
More information about the Mesa-users
mailing list