[Mesa-users] Help:Regarding extras routine error

ABHIJNAN KAR 20064 abhijnank20 at iiserbpr.ac.in
Mon Jun 27 15:58:09 UTC 2022


Thanks.It worked by declaring those variables.But now the following error message is coming stating that 'cant open file formats.inc' .

(base) abhijnankar at Abhijnans-MacBook-Air star_plus_point_mass % ./mk
gfortran -Wno-uninitialized -fno-range-check -fmax-errors=7  -fprotect-parens -fno-sign-zero -fbacktrace -ggdb -finit-real=snan -fopenmp -fbounds-check -Wuninitialized -Warray-bounds -ggdb -ffree-form -ffree-line-length-none -x f95-cpp-input -I../../../../include -I../src -c ../src/run_binary_extras.f90
../src/run_binary_extras.f90:114: Error: Can't open included file 'formats.inc'
make: *** [run_binary_extras.o] Error 1

> On 27-Jun-2022, at 8:58 PM, Thomas Steindl <thomas.steindl at uibk.ac.at> wrote:
> 
> Hello ABHIJNAN,
> 
> You can follow the example in other_null_wind to see how these should be declared. 
> 
> Thomas
> __________________________________________________________________
> 
> Thomas Steindl, MSc
> University of Innsbruck | Institute for Astro- and Particle Physics
> Tel: +43 512507 52031
> Mail: thomas.steindl at uibk.ac.at <mailto:thomas.steindl at uibk.ac.at>
> Homepage: www.thomassteindl.com <http://www.thomassteindl.com/>
> 
>> Am 27.06.2022 um 17:26 schrieb ABHIJNAN KAR 20064 <abhijnank20 at iiserbpr.ac.in <mailto:abhijnank20 at iiserbpr.ac.in>>:
>> 
>> <Screenshot 2022-06-27 at 5.19.15 PM.png>
>> Shall I declare the value of X,Y,Z like real(dp)….or integer…?(as in the screenshot attached above)I guess the declaration of values of X,Y,Z will be in integer.
>> 
>>> On 27-Jun-2022, at 4:17 PM, Thomas Steindl <thomas.steindl at uibk.ac.at <mailto:thomas.steindl at uibk.ac.at>> wrote:
>>> 
>>> Yes. The argument list needs to be exactly the same as in the null_other_wind subroutine. Keep in mind, these arguments also need to be declared in the subroutine, just like Lsurf, etc.
>>> 
>>> 
>>> Thomas
>>> __________________________________________________________________
>>> 
>>> Thomas Steindl, MSc
>>> University of Innsbruck | Institute for Astro- and Particle Physics
>>> Tel: +43 512507 52031
>>> Mail: thomas.steindl at uibk.ac.at <mailto:thomas.steindl at uibk.ac.at>
>>> Homepage: www.thomassteindl.com <http://www.thomassteindl.com/>
>>> 
>>>> Am 27.06.2022 um 11:27 schrieb ABHIJNAN KAR 20064 <abhijnank20 at iiserbpr.ac.in <mailto:abhijnank20 at iiserbpr.ac.in>>:
>>>> 
>>>> Thanks for the reply!So in general, I should put the X,Y,Z in the argument in that evaporation wind subroutine and accordingly give the values of it even tho the method need not calculate it in that way?
>>>> 
>>>>> On 27-Jun-2022, at 2:20 PM, Thomas Steindl <thomas.steindl at uibk.ac.at <mailto:thomas.steindl at uibk.ac.at>> wrote:
>>>>> 
>>>>> Hello ABHIJNAN,
>>>>> 
>>>>> When your write s% other_wind => pulsar_evaporation_wind, you are pointing to a subroutine called pulsar_evaporation_wind. Now, whenever MESA tries to run s% other_wind, it will run pulsar_evaporation_wind. For that to work, the structure of pulsar_evaporation_wind must be what MESA expects of s% other_wind. As stated before, MESA expects a subroutine like null_other_wind(id, Lsurf, Msurf, Rsurf, Tsurf, X, Y, Z, w, ierr), so it will try to call the subroutine with following arguments: id, Lsurf, Msurf, Rsurf, Tsurf, X, Y, Z, w, ierr. 
>>>>> The subroutine you have written, however, looks like  pulsar_evaporation_wind(id, Lsurf, Msurf, Rsurf, Tsurf, w, ierr), so it only has the following arguments id, Lsurf, Msurf, Rsurf, Tsurf, w, ier. In the following, the code will try to call your subroutine like pulsar_evaporation_wind(id, Lsurf, Msurf, Rsurf, Tsurf, X, Y, Z, w, ierr) but this will not work. The error tells you that something is wrong with X. 
>>>>> X, Y and Z are the hydrogen, helium and metal abundances. Your method of calculating the other wind does not need to use that (as null_other_wind als does not), but the subroutine you are providing needs to be able to handle the incoming arguments. 
>>>>> 
>>>>> I hope this helps,
>>>>> Thomas
>>>>> __________________________________________________________________
>>>>> 
>>>>> Thomas Steindl, MSc
>>>>> University of Innsbruck | Institute for Astro- and Particle Physics
>>>>> Tel: +43 512507 52031
>>>>> Mail: thomas.steindl at uibk.ac.at <mailto:thomas.steindl at uibk.ac.at>
>>>>> Homepage: www.thomassteindl.com <http://www.thomassteindl.com/>
>>>>> 
>>>>>> Am 27.06.2022 um 07:24 schrieb ABHIJNAN KAR 20064 <abhijnank20 at iiserbpr.ac.in <mailto:abhijnank20 at iiserbpr.ac.in>>:
>>>>>> 
>>>>>> Thanks for the reply.Sorry for the wrong files attached.I am attaching the correct run star extras and run binary extras.
>>>>>> Also,X,Y,Z stands for what?I mean, how to construct that wind.And I think binary exyras won’t be used in case oulsar evaporation wind cuz the evaporation will be of the donor str due to the wind from pulsar.
>>>>>> 
>>>>>>> On 27-Jun-2022, at 3:28 AM, Thomas Steindl <thomas.steindl at uibk.ac.at <mailto:thomas.steindl at uibk.ac.at>> wrote:
>>>>>>> 
>>>>>>> Dear ABHIJNAN,
>>>>>>> 
>>>>>>> It does seem to me like you have attached the wrong version of the run_star_extras file to this mail. 
>>>>>>> 
>>>>>>> Independent, it seems like your subroutine does not match the variables MESA is expecting.  mesa-r21.12.1/star/other shows that it other wind expects a function of the form subroutine null_other_wind(id, Lsurf, Msurf, Rsurf, Tsurf, X, Y, Z, w, ierr) while you are providing a function of the form subroutine pulsar_evaporation_wind(id, Lsurf, Msurf, Rsurf, Tsurf, w, ierr). As you can see, yours is missing the input variables X, Y, and Z. This should explain the error you are receiving.
>>>>>>> 
>>>>>>> That said, I find your run_star_extras looks like its missing some typical functions such as extras_startup, extras_start_step etc. I have no experience with the binary module in MESA, but since you are looking to evolve a binary, you might want look into run_binary_extras instead of run_star_extras. 
>>>>>>> 
>>>>>>> Best, Thomas
>>>>>>> __________________________________________________________________
>>>>>>> 
>>>>>>> Thomas Steindl, MSc
>>>>>>> University of Innsbruck | Institute for Astro- and Particle Physics
>>>>>>> Tel: +43 512507 52031
>>>>>>> Mail: thomas.steindl at uibk.ac.at <mailto:thomas.steindl at uibk.ac.at>
>>>>>>> Homepage: www.thomassteindl.com <http://www.thomassteindl.com/>
>>>>>>> 
>>>>>>>> Am 26.06.2022 um 21:06 schrieb ABHIJNAN KAR 20064 <abhijnank20 at iiserbpr.ac.in <mailto:abhijnank20 at iiserbpr.ac.in>>:
>>>>>>>> 
>>>>>>>> Hi,
>>>>>>>> I am trying to evolve a binary model with effects of evaporation wind being considered.For that i am implementing an extras routine but it is yielding error as follows.
>>>>>>>> <Screenshot 2022-06-27 at 12.34.57 AM.png>
>>>>>>>> Also I am attaching the extras file.
>>>>>>>> Can anyone please help?i am not understanding as to why this error is coming cuz the pointer is supposed to be like that per documentation.
>>>>>>>> Regards,
>>>>>>>> ABHIJNAN KAR
>>>>>>>> BS-MS,IISER Berhampur
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> <run_star_extras.f90>
>>>>>>> 
>>>>>> 
>>>>>> Regards,
>>>>>> ABHIJNAN KAR
>>>>>> BS-MS,IISER Berhampur
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> <run_binary_extras.f><run_star_extras.f>
>>>>> 
>>>> 
>>>> Regards,
>>>> ABHIJNAN KAR
>>>> BS-MS,IISER Berhampur
>>> 
>> 
>> Regards,
>> ABHIJNAN KAR
>> BS-MS,IISER Berhampur
> 

Regards,
ABHIJNAN KAR
BS-MS,IISER Berhampur






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20220627/5958f5f3/attachment.htm>


More information about the Mesa-users mailing list