[Mesa-users] convergence problem

sheyda najafi sh.najafi8590 at gmail.com
Sun Oct 21 13:23:18 EDT 2018


Dear Josiah and MESA users


I have another question regarding my previous emails. i have asked it
before but unfortunately no one answered.

As i  said I wanted to study the evolution of 1 solar mass star in the
presence of
new extra acceleration term :(-beta*(clight**2)*(dphi/dr)).
 i have changed the
extra_dPdm subroutine of MESA code to add
the extra term (-beta*rho(clight**2)*(dphi/dm)) ==>( in lagrangian framework) .
 where phi depends on local density of each layer(cell density: s% rho).
 which is named (xn) in the code. and beta is a constant.

           do k = 1,2
             s% extra_dPdm(k) = -( ((   xn(k)-    xn(k+1))/(s%
dm_bar(k+1)))*((beta*(clight**(2.0d0)))*(s% rho_face(k))) )

         end do

         do k = 2, s% nz-1
          s% extra_dPdm(k) = -( (((   xn(k)-    xn(k+1))/(s% dm_bar(k+1)))+ &
         ((   xn(k-1) -   xn(k))/(s% dm_bar(k))))
*((beta*(clight**(2.0d0)))*(s% rho_face(k))*(1.d0/2.d0)) )

         end do

         do k = s% nz-1, s% nz
          s% extra_dPdm(k) = -( ((   xn(k-1) -    xn(k))/(s%
dm_bar(k)))*((beta*(clight**(2.0d0)))*(s% rho_face(k))) )

        end do

Since i did not know the value of s%rho(0) i did'nt have xn(0) to
write extra_dpdm it in 1 part therefore i have split it in three
parts. how it is possible to write this term in 1 part. i mean if i
want to write the extra term as :

         do k = 1, s% nz
s% extra_dpdm(k)= -((   xn(k-1)-    xn(k)) / s% dm_bar(k)) * beta*
(clight**2)* ( s%rho_face(k)).
        end do

I will have problem in finding the value of xn(0). because xn is
related to cell density s%rho(0) via

   xn(i)= (( n1*(lambda**(4.d0+n1)) )/(((mpl)**(n1))*clight*beta*s%
rho(i)))**(1.d0/(n1+1.d0))

lambda, mpl, n1 and beta are constant.

 which density should i use as rho(0) ??

(for your kindly information my codes are attached in the email)
Thank you in advance


Sheyda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: run_star_extras.f
Type: text/x-fortran
Size: 36977 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20181021/e10c8173/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inlist
Type: application/octet-stream
Size: 1340 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20181021/e10c8173/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inlist_project
Type: application/octet-stream
Size: 2423 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20181021/e10c8173/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inlist_load
Type: application/octet-stream
Size: 1192 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20181021/e10c8173/attachment-0002.obj>


More information about the Mesa-users mailing list