[Mesa-users] Loss of angular moment

Rob Farmer r.j.farmer at uva.nl
Mon Apr 23 05:37:49 EDT 2018


>Don't you think the same?

Ah i never ran your model long enough, its always easiest (and faster) to
send models that are "near" problem points, so people don't waste time
constantly rerunning uninteresting bits of evolution.

I think you have a scale issue in your calculation:

omega(1) ~ 10**-5
irot(1) ~10**21
jdot(1) ~10**-10

So the existing angular momentum of the surface is ~ 10**21 * 10**-5 =
10**16 to which you then try to -10**-10, even your -1 value is small
compared to the existing angular momentum.

> could it be that I'm not propagating properly back the loss of angular
moment?

if your not sure what the codes does, have a look at the code:

grep -rinI other_torque $MESA_DIR/star/p*/*

The look in star/private/solve_omega_mix.f90 then follow where extra_jdot
is used.

Rob



On 21 April 2018 at 16:52, Roque Caballero Navarro <rcaballeron at hotmail.com>
wrote:

> Hi Rob,
>     I agree with you that it's needed a rotating model and I get it using
> the following configuration:
>
> *  ! Rotation off until near ZAMS*
> *  change_rotation_flag = .false.*
> *  new_rotation_flag = .true.*
> *  new_surface_rotation_v = 20 ! solar (km sec^1)*
> *  set_near_zams_surface_rotation_v_steps = 10*
>
>     The star starts to rotate with it approaches to the ZAMS. Using the
> "debug" option of my routine, I can confirm the other_torque hook is called
> as soon as the rotation is activated. I also dump the calculated loss of
> angular moment (and other partial results) in the history fie and non-zero
> values are reported. I'd say that the code is properly invoked. Don't you
> think the same? I'll do also some test with the rotation activated since
> the beginning.
>
>     Regarding s% omega_avg_surf value, I've also checked that isn't null
> when other_torque is invoked. The same values are reported in the history
> file as well. Nevertheless, I'll follow your advice and take a deeper look
> into star_utils.
>
>     So Rob, for me the question is, if the model is rotating and
> other_torque routine is invoked (let's put apart if the calculations done
> on it are right or not), could it be that I'm not propagating properly back
> the loss of angular moment? I'm assuming that even if I used an "absurd"
> value, an impact on s% omega_avg_surf value, right?
>
>     Many thanks for your help.
>
> Kind regards,
>
> Roque
>
> On 04/20/2018 05:27 PM, Rob Farmer wrote:
>
> Hi
> To use other_torque you need a rotating model, you need to set:
>
> change_rotation_flag = .true.
>
> in your star_job inlist to change the rotation flag, new_rotation_flag
> only  changes the rotation flag if change_rotation_flag = .true.
>
> The other issue is your using s% omega_avg_surf, but that gets set after
> the other_torque call. When using the other_ routine the best bet is to
> always "goto the source" of the stellar structure data, rather than any use
> any shorthand variables as they may not be set. In this case you'll want to
> look at the s% omega array which stores the rotation information for the
> star. See set_surf_avg_rotation_info in star/private/star_utils.f90 for how
> s% omega_avg_surf is implemented, you'll want to copy the relevant bits in
> your run_star_extras file for computing the surface averaged value.
>
> Rob
>
>
> On 20 April 2018 at 14:18, Roque Caballero Navarro <
> rcaballeron at hotmail.com> wrote:
>
>> Hi Rob,
>>
>>    Please find attached the requested files.
>>
>> Kind regards,
>>
>> Roque
>> ------------------------------
>> *De:* Rob Farmer <r.j.farmer at uva.nl>
>> *Enviado:* viernes, 20 de abril de 2018 12:12
>> *Para:* Roque Caballero Navarro
>> *Cc:* mesa-users at lists.mesastar.org
>> *Asunto:* Re: [Mesa-users] Loss of angular moment
>>
>> Hi
>>
>> This is not enough information to help you. Please provide your inlists
>> and run_star_extras.f
>>
>> Rob
>>
>> On 20 April 2018 at 12:06, Roque Caballero Navarro via Mesa-users <
>> mesa-users at lists.mesastar.org> wrote:
>>
>> 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/20180423/c7b728ab/attachment.html>


More information about the Mesa-users mailing list