[Mesa-users] Failure of getting the effective temperature in run_binary_extras

M Sun sunmeng1118 at gmail.com
Sun Mar 14 00:33:47 UTC 2021


Dear MESA users,

I am trying to add a wind mass accretion mechanism in MESA 12115. I failed
to get the effective temperature of the donor star in the subroutine
my_other_binary_wind_transfer from src/run_binary_extras.f. I guess that I
misuse/misunderstand the pointers. Here is the detail ---

The declaration and association of the star and binary pointers are:
subroutine my_other_binary_wind_transfer(binary_id, s_i, ierr)
      implicit none
      integer, intent(in) :: binary_id, s_i ! s_i is index of the wind mass
losing star
      integer, intent(out) :: ierr
      type (binary_info), pointer :: b
      type (star_info), pointer :: s
      ierr = 0
      call binary_ptr(binary_id, b, ierr)
      if (ierr /= 0) then
         write(*,*) 'failed in binary_ptr'
         return
      end if

      if (s_i == 1) then
         s => b% s1
      else
         s => b% s2
      end if
      print*, b% s1% T(1)

I call the effective temperature by "b% s1% T(1)". The output looks good at
the very first step, then it becomes "NaN" at the following steps.

I realize T(1) is surface temperature, not the effective temperature, just
use it as an example of calling the star information from the binary
module. The run_binary_extras.f and the binary inlist are attached
(starting at line 99 in run_binary_extras is my code). Please let me know
if you need more information. Many thanks!!

cheers,
--------------
Sun, Meng
Research Associate
Department of Astronomy
University of Wisconsin - Madison
https://sunmeng1118.wixsite.com/mysite
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20210313/3ddc1e9c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: run_binary_extras_simplify.f
Type: application/octet-stream
Size: 9072 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20210313/3ddc1e9c/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inlist_project
Type: application/octet-stream
Size: 969 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20210313/3ddc1e9c/attachment-0001.obj>


More information about the Mesa-users mailing list