[Mesa-users] A Query regarding storing an extra variable
Pulkit Ojha
pulkit.ojha at niser.ac.in
Thu Apr 13 11:24:29 UTC 2023
Dear Earl,
Thanks for your reply.
Yes, it works!
Thank you
Pulkit
On Tue, Apr 11, 2023 at 12:33 AM Earl Bellinger <earlbellinger at gmail.com>
wrote:
> Dear Pulkit,
>
> It sounds like you want to compute a variable in one subroutine, and
> access it in another.
>
> For this you can use `s% xtra(1) = mdot_edd_eta` and then read it later
> from this xtra array in data_for_extra_binary_columns.
>
> See e.g.
>
> https://docs.mesastar.org/en/release-r22.11.1/using_mesa/extending_mesa.html?highlight=xtra#the-star-info-structure
> > The s% xtra(1:30) array is a place to write temporary data of type
> real(dp) which follow the logic of a time-step and so get carried over
> across restarts, restored in retries, etc.
>
> Does that solve it?
>
> Best wishes,
> Earl
>
>
> *Earl Patrick Bellinger *
> Postdoctoral Research Fellow
> Max Planck Institute for Astrophysics
> Stellar Astrophysics Centre
> https://earlbellinger.com
>
> On Mon, Apr 10, 2023 at 8:20 PM Pulkit Ojha via Mesa-users <
> mesa-users at lists.mesastar.org> wrote:
>
>> Dear MESA-users,
>>
>> I'm working with MESA Binary to evolve a binary system consisting of a
>> point mass accretor and an evolving donor star. I'm getting stuck in
>> storing a variable which has been defined in one of the subroutines in
>> run_binary_extras file. Can anyone suggest me how to store such a variable?
>>
>> For instance, I've defined "mdot_edd_eta" in the subroutine
>> eval_mdot_edd. To store the variable as an output column, I tried to define
>> it in the subroutine "data_for_extra_binary_columns" or
>> "data_for_extra_binary_history_header_items(for getting it as a binary
>> header)" as it's done for any other variable, but it shows the error
>> "Error: Symbol 'mdot_edd_eta' at (1) has no IMPLICIT type" .
>>
>> I shall be grateful for your kind help.
>>
>> Truly
>> Pulkit
>>
>>
>> Pulkit Ojha
>> 5th Year Integrated MSc.,
>> School of Physical Sciences,
>> National Institute of Science Education and Research
>> <https://www.niser.ac.in/>
>> Bhubaneswar, INDIA
>>
>>
>>
>> _______________________________________________
>> mesa-users at lists.mesastar.org
>> https://lists.mesastar.org/mailman/listinfo/mesa-users
>>
>>
--
Pulkit Ojha
5th Year Integrated MSc.,
School of Physical Sciences,
National Institute of Science Education and Research
<https://www.niser.ac.in/>
Bhubaneswar, INDIA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20230413/8eb29cc3/attachment.htm>
More information about the Mesa-users
mailing list