[Mesa-users] (no subject)

Ebrahim Hassani ee.haji at gmail.com
Mon Jun 29 03:05:06 EDT 2020


Dear Dr. Marchant

Thank you for the time you spent answering my questions.

May I ask why star evolve until step 1650 (and when its age is about 10
Giga Year) and after that, the error occurs?

Is my question correct when I say: If my code is wrong the error must occur
at the first step and before star starts to evolve.

Cheers

On Sun, Jun 28, 2020 at 11:03 PM Pablo Marchant <pamarca at gmail.com> wrote:

> Hi Ebrahim, please keep mesa-users in your replies.
>
> as I mentioned you're accessing values beyond s% nz. Just from a quick
> glance at your code I see this
>
>       do i = s% nz, 1, -1
>       part3_he4 = part3_he4 + ((avogad * (s% rho(i)) &
>       *(s% xa(s% net_iso(ihe4),i)) &
>       / (At_he4))) * ((s% r(i))**2) * ((s% r(i)) - (s% r(i+1))) &
>       * 1D0
>       end do
>
> when i=s% nz you are reading s% r(s% nz+1) which is wrong. I assume you're
> trying to compute an integral in radius here, for that you'll have to treat
> the innermost cell in a special way.
>
> Cheers
>
> On Sun, Jun 28, 2020 at 7:51 PM Ebrahim Hassani <ee.haji at gmail.com> wrote:
>
>> Dear Dr. Pablo
>>
>> Thank you so much for your useful guidance.
>>
>> The attached files are the "inlist_project" and the "run_star_extras.f"
>> files that I edited and used in my work.
>>
>> I wonder why the star evolves until step 1650 and after that, the error
>> will occur (why the error didn't occur in step 1).
>>
>> It is worth mentioning that I am using the 12778 version of MESA and the
>> 20.3.1 version of MESA SDK in the ubuntu 2020 operating system.
>>
>> Best regards
>>
>> Ebrahim
>>
>>
>>
>> On Sun, Jun 28, 2020 at 2:26 PM Pablo Marchant <pamarca at gmail.com> wrote:
>>
>>> Hi Ebrahim,
>>>
>>> can't assess in detail your issue if you do not provide adequate
>>> information to reproduce your problem. Please note the section "Post a
>>> question to mesa-users" on the webpage to see what information needs to be
>>> provided for others to assist you.
>>>
>>> As the error message indicates, you are trying to access an index of the
>>> array beyond its size. You should verify that you do not access anything
>>> beyond s% r(s% nz), which specifies the number of grid points in the mesh.
>>> Note that the array might have elements beyond s% nz, this is solely
>>> because the arrays are allocated with extra space such that each remeshing
>>> action that increases the number of grid points does not need another
>>> allocation. But anything beyond s% nz should not be used. Beware that you
>>> running into this error might be an indication that you are not accessing
>>> the physical point you want in your star, but again, absent proper
>>> information we cannot assess if this is the case.
>>>
>>> Cheers
>>>
>>> On Sun, Jun 28, 2020 at 10:36 AM Ebrahim Hassani via Mesa-users <
>>> mesa-users at lists.mesastar.org> wrote:
>>>
>>>> Dear Mesa-users
>>>>
>>>> I edited "run_star_extras.f" file and used "s%r" parameter in my work.
>>>> Everything is right and my code (for one solar mass star) works correctly.
>>>> But after about 1650 steps I encountered with the below error:
>>>>
>>>> At line 327 of file ../src/run_star_extras.f
>>>> Fortran runtime error: Index '1524' of dimension 1 of array 's%r' above
>>>> upper bound of 1523
>>>>
>>>> If I want to evolve the star more than 1650 steps what I must to?
>>>> Does the error has physical interpretation?
>>>>
>>>> Best Regards
>>>>
>>>> Ebrahim Hassani
>>>> _______________________________________________
>>>> mesa-users at lists.mesastar.org
>>>> https://lists.mesastar.org/mailman/listinfo/mesa-users
>>>>
>>>>
>>>
>>> --
>>> Pablo Marchant Campos
>>> M.Sc on Astrophysics, Universidad Católica de Chile
>>> PhD on Astrophysics, Argelander-Institut für Astronomie, Universität Bonn
>>>
>>
>
> --
> Pablo Marchant Campos
> M.Sc on Astrophysics, Universidad Católica de Chile
> PhD on Astrophysics, Argelander-Institut für Astronomie, Universität Bonn
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20200629/26260f5e/attachment.htm>


More information about the Mesa-users mailing list