-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Labels
Description
Remove_shells functionality for star_relax_to_cut is missing support for TDC. I label this as affecting the test_suite because this subroutine is called inside ppisn see below:
mesa/star/private/remove_shells.f90
Lines 1154 to 1157 in d4aeada
| ! Relax to a trimmed stellar model with surface cells removed down to k_remove | |
| ! (the cell k_remove will be the outermost in the new model). | |
| subroutine do_relax_to_star_cut( & | |
| id, k_remove, do_jrot, do_entropy, turn_off_energy_sources_and_sinks, ierr) |
mesa/star/private/remove_shells.f90
Lines 1224 to 1241 in d4aeada
| !!create interpolant for convective velocities | |
| ! TODO: adapt this for TDC | |
| !conv_vel_flag = .false. | |
| !if (s% conv_vel_flag) then | |
| ! conv_vel_flag = .true. | |
| ! allocate(interp_work((num_pts)*pm_work_size), & | |
| ! conv_vel_interp(4*(num_pts)), stat=ierr) | |
| ! do k0 = 1, num_pts | |
| ! conv_vel_interp(4*k0-3) = s% conv_vel(k0+k_remove-1) | |
| ! q(k0) = s% q(k0+k_remove-1)/s% q(k_remove) | |
| ! end do | |
| ! call interp_pm(q, num_pts, conv_vel_interp,& | |
| ! pm_work_size, interp_work, 'conv_vel interpolant', ierr) | |
| ! ! turn off conv vel flag to load model | |
| ! call set_conv_vel_flag(id, .false., ierr) | |
| ! if (dbg) write(*,*) "set_conv_vel_flag ierr", ierr | |
| !end if |
mesa/star/private/remove_shells.f90
Lines 1353 to 1371 in d4aeada
| !!take care of convective velocities | |
| ! TODO: adapt for TDC | |
| !if (s% conv_vel_flag) then | |
| ! do k0=1, s% nz | |
| ! call interp_value(q, num_pts, conv_vel_interp, s% q(k0), s% conv_vel(k0), ierr) | |
| ! !avoid extending regions with non-zero conv vel | |
| ! do k=2, num_pts-1 | |
| ! if(s% q(k0) < q(k) .and. s% q(k0) > q(k+1) & | |
| ! .and. (conv_vel_interp(4*k-3)<1d-5 .or. conv_vel_interp(4*(k+1)-3)<1d-5)) then | |
| ! s% conv_vel(k0) = 0d0 | |
| ! exit | |
| ! end if | |
| ! end do | |
| ! s% xh(s% i_ln_cvpv0, k0) = log(s% conv_vel(k0)+s% conv_vel_v0) | |
| ! end do | |
| ! write(*,*) 'need to rewrite some things here in do_relax_to_star_cut' | |
| ! call mesa_error(__FILE__,__LINE__,'do_relax_to_star_cut') | |
| ! deallocate(conv_vel_interp, interp_work) | |
| !end if |