[mesa-users] Rotation : relax_initial_omega_div_omega_crit + preserving omega in several inlists
Héctor MR
hector.mr at pitt.edu
Fri Jun 17 12:00:22 EDT 2016
Hi Frank,
Thank you so much for your reply!
I have followed your advice and seen that
integer function relax_omega_check_model(s, id, lipar, ipar, lrpar, rpar)
[...]
! kind_of_relax = 1 => target = new_omega_div_omega_crit
[...]
else if (kind_of_relax == 1) then
call set_surf_avg_rotation_info(s)
new_omega = target_value*s% omega_crit_avg_surf
[...]
else
write(*,2) 'relax to omega: wanted-current, current, wanted', &
s% model_number, new_omega-s% omega(1), s% omega(1),
new_omega
end if
subroutine set_surf_avg_rotation_info(s)
[...]
gamma_factor = 1d0 - min(s% Lrad_div_Ledd_avg_surf, 0.9999d0)
[...]
omega_crit_sum = 0
[...]
do k = 1, s% nz - 1
rmid = s% rmid(k)
dm = s% dm(k)
[...]
dmsum = dmsum + dm
cgrav = 0.5d0*(s% cgrav(k) + s% cgrav(k+1))
mmid = 0.5d0*(s% m_grav(k) + s% m_grav(k+1))
[...]
[...]
omega_crit = sqrt(gamma_factor*cgrav*mmid/pow3(rmid))
[...]
omega_crit_sum = omega_crit_sum + dm*omega_crit
[...]
s% omega_crit_avg_surf = omega_crit_sum/dmsum
Is everything stemming from the way omega_crit_avg_surf is being averaged
starting from the surface? Other than that, I might still be missing
something :) .
[And is it bad that I loved to delve in the code, as you suggested?]
--
Héctor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20160617/62f0833e/attachment.html>
More information about the Mesa-users
mailing list