[mesa-users] Access to structure derivatives
Bill Paxton
paxton at kitp.ucsb.edu
Sat Feb 21 15:21:54 EST 2015
Hi Chris,
With the new improved support for hydrodynamics in mesa/star, those values are no longer always calculated.
But, just for you, I've now added a routine to star_lib so you can get dlnPdm_qhse when you need it.
It is in 7448 if you'd like to get it now. Or just add the following to your star_lib -- it should work in previous versions such as 7385.
Cheers,
Bill
! get the hydrostatic equilibrium value for dlnP/dm at point k
! Ppoint is the pressure at point k
! multiply dlnP_dm_qhse by Ppoint to get dP_dm_qhse
! multiply dlnP_dm_qhse by s% gradT(k) to get dlnT_dm_qhse at k
subroutine star_dlnPdm_qhse(id, k, dlnP_dm_qhse, Ppoint, ierr)
use hydro_vars, only: eval_dlnPdm_qhse
use star_def, only: star_info
integer, intent(in) :: id, k
real(dp), intent(out) :: dlnP_dm_qhse, Ppoint
integer, intent(out) :: ierr
type (star_info), pointer :: s
real(dp) :: &
m, d_dlnPdm_dlnR, d_dlnPdm_dL, &
d_dlnPdm_dlnd00, d_dlnPdm_dlnT00, &
d_dlnPdm_dlndm1, d_dlnPdm_dlnTm1, &
d_dlnPdm_dlnPgas00_const_T, d_dlnPdm_dlnT00_const_Pgas, &
d_dlnPdm_dlnPgasm1_const_T, d_dlnPdm_dlnTm1_const_Pgas, &
dPpoint_dlnd00, dPpoint_dlndm1, dPpoint_dlnT00, dPpoint_dlnTm1, &
dPpoint_dlnPgas00_const_T, dPpoint_dlnPgasm1_const_T, &
dPpoint_dlnT00_const_Pgas, dPpoint_dlnTm1_const_Pgas
call star_ptr(id, s, ierr)
if (ierr /= 0) return
call eval_dlnPdm_qhse(s, k, &
m, dlnP_dm_qhse, d_dlnPdm_dlnR, d_dlnPdm_dL, &
d_dlnPdm_dlnd00, d_dlnPdm_dlnT00, &
d_dlnPdm_dlndm1, d_dlnPdm_dlnTm1, &
d_dlnPdm_dlnPgas00_const_T, d_dlnPdm_dlnT00_const_Pgas, &
d_dlnPdm_dlnPgasm1_const_T, d_dlnPdm_dlnTm1_const_Pgas, &
Ppoint, &
dPpoint_dlnd00, dPpoint_dlndm1, dPpoint_dlnT00, dPpoint_dlnTm1, &
dPpoint_dlnPgas00_const_T, dPpoint_dlnPgasm1_const_T, &
dPpoint_dlnT00_const_Pgas, dPpoint_dlnTm1_const_Pgas, &
ierr)
end subroutine star_dlnPdm_qhse
On Feb 21, 2015, at 11:29 AM, Chris Mankovich wrote:
> Hi all,
>
> 7385 no longer has dP_dm, dlnP_dm, etc. available in the star_info structure. These are handy for computing 'good' spatial derivatives following the comments at the top of star_data.inc.
>
> Where have they gone?
>
> Chris
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk_______________________________________________
> mesa-users mailing list
> mesa-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mesa-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20150221/161071d8/attachment.html>
More information about the Mesa-users
mailing list