[mesa-users] MLT problem

Kenny Van kvan at ualberta.ca
Tue Jan 19 12:39:19 EST 2016


Thanks Bill,

One thing I've also noticed going through the code is that there are
slightly different rho values used throughout the code. For example near
the beginning of "set_convective_mixing", there is the following

x = Q*Rho / (2*P)

d_x_dvb = x * (drho_dvb / rho  + dQ_dvb/Q - dP_dvb/P)

>From my understanding fortran is a keysensitive language, so are these two
"rho" values equivalent?

On Tue, Jan 19, 2016 at 10:19 AM, Bill Paxton <paxton at kitp.ucsb.edu> wrote:

>
> On Jan 19, 2016, at 8:47 AM, Kenny Van wrote:
>
> I'm not sure I'm properly implementing the ierr = -1. If I understand
> correctly, I would not only need to include ierr = -1 in the test of
> (is_bad_num(d_Bcubed_dvb(mlt_dgrada))), but I would also need to define it
> in the initial parameters of the subroutine correct?
>
>
> ierr /= 0 is used by "lower" level routines to indicate a failure.   it
> must be an arg to the routine so it can be returned to tell the caller what
> has happened.
>
> "higher" level routine go beyond a simple binary okay or failed to return
> an integer value from the following set (defined in
> star/public/star_def.inc)
>
>       ! result codes for various evolution routines
>       integer, parameter :: keep_going = 0
>       integer, parameter :: redo = 1
>          ! repeat current step with same timestep
>          ! for example, after changing a parameter such as mdot
>       integer, parameter :: retry = 2
>          ! repeat current step with smaller timestep
>       integer, parameter :: backup = 3
>          ! go back to previous model and retry with smaller timestep
>       integer, parameter :: terminate = 4
>
> Routines that are returning such a value may declare ierr as a local
> variable for use in calls to lower level routines.
>
> For an example of this, see 'integer function do_evolve_step_part1' in
> star/private/evolve
>
> -Bill
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20160119/81aee7d9/attachment.html>


More information about the Mesa-users mailing list