[Mesa-users] Loss of angular moment
Roque Caballero Navarro
rcaballeron at hotmail.com
Fri Apr 20 06:06:36 EDT 2018
Dear all,
I'm trying to implement a magnetic braking routine based on Matteo Cantiello exercise propose during the Mesa school 2012 (here the details<http://cococubed.asu.edu/mesa_market/ewExternalFiles/2012_cantiello.zip>.) Well, for doing it I'm using the hook other_torque and the code is implemented, as usual, in the run_extras_star.f file. Below you can see the core part of the implementation:
1. if (s% use_other_torque) then
2.
3. !Star data
4. r_st = s% r(1)
5. m_st = s% m(1)
6. omega_surf = s% omega_avg_surf
7. m_dot = s% star_mdot
8.
9. v_esc = 618 * (((Rsun/r_st)*(m_st/Msun)))**0.5
10.
11. v_inf = 1.92 * v_esc
12.
13. B = s% x_ctrl(6)
14.
15. eta_surf = abs(((r_st/Rsun)**2/B**2)/(m_dot * v_inf))
16.
17. j_dot = two_thirds * m_dot * omega_surf * (r_st/Rsun)**2 * eta_surf
18.
19. s% extra_jdot(1) = j_dot
20. !s% extra_jdot(1) = -1
21.
22. if (debug_use_other_torque) then
23. write(*,*) "Rsun=", Rsun, "Msun=", Msun, "r_st=", r_st, "m_st=", m_st, &
24. "v_esc=", v_esc, "v_inf", v_inf, "B", B, "m_dot", m_dot, "eta_surf", eta_surf, &
25. "omega_surf", omega_surf, "j_dot", j_dot
26. end if
27.
28. s% x_ctrl(7) = v_esc
29. s% x_ctrl(8) = v_inf
30. s% x_ctrl(9) = eta_surf
31. s% x_ctrl(10) = j_dot
32. s% x_ctrl(11) = m_dot
33.
34. end if
The input parameters for the calculation are the radius, mass, loss of mass and velocity at surface (lines 4 to 7). After some calculations, I end up with a loss of angular moment j_dot which I pass back using the array extra_jdot (line 20). After running a simulation with this routine activated, I'd expect to have lower values of velocity at surface but I couldn't find any difference. I've even assigned an unreal value (line 20) to the extra_jdot array but nothing changed. So, something must be wrong or missing in the implementation. As you maybe has already noticed, I'm just providing a value to one cell, the outermost one. I'm assuming that only this layer is affected by the magnetic braking effect.
As usual, any help is more than welcome.
Kind regards,
Roque
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20180420/78d3b86d/attachment.html>
More information about the Mesa-users
mailing list