# [Mesa-users] dr_bar

Francis Timmes fxt44 at mac.com
Mon Oct 30 01:29:12 EDT 2017

```sometimes a perusal through \$MESA_DIR/star/public can be useful.
for example, in star_data.inc one finds

real(dp), pointer :: rmid(:) ! radius at center by mass (cm)

which can be accessed as s% rmid(k).
your desired quantities then follow.

side note - the "2" in the code below will be initially interpreted by the
complier as an integer, which is almost certainly not the desired "2.0",
or leaving nothing to interpretation, "2.0d0".

fxt

> On Oct 28, 2017, at 1:13 PM, sheyda najafi via Mesa-users <mesa-users at lists.mesastar.org> wrote:
>
> Hi MESA users
>
> I want to define a quantity named dr_bar which is the radial interval between the center of two successive zones (like dm_bar) and also a radius named rprime which is defined at center of each zone. I am not sure about the following definitions for rprime and dr_bar
>
> rprime(i)= s% r(i+1) + dr(i) / 2
>
> and
> ________________
>
> dr_bar( s% nz) = ( dr( s% nz) + dr( s% nz-1) )/2        Or       dr_bar( s% nz) = dr( s% nz) +( dr( s% nz-1) )/2
> dr_bar(j) = ( dr( j ) + dr( j-1) )/2
> dr_bar(1)= dr(1) / 2
>
> or      _ _ _ _ _ _ _ _ _ _ _
>
> dr_bar(nz) = dr(nz) / 2
> dr_bar(j)= ( dr(j)+dr(j+1) )/2
> dr_bar(1)= ( dr(1)+dr(2) )/2
> ________________
>
> I would be grateful if you could help me.
>
>
>
> Sheyda Najafi

```