[Mesa-users] Is it possible to add a parameter to star.data.inc in order to use it in a computation in the run.star.extras?
Rob Farmer
r.j.farmer at uva.nl
Tue Dec 5 08:44:18 EST 2017
hi
To get access to history or profile data in your run_star_extras then there
are extra functions you can call from star_lib.f90
For history data:
star_get1_history_value(s,'history_column_name', value)
For profile data:
value=star_get_profile_output(s,'profile_column_name',zone)
So in your case to get the avg_charge_H you would add to your
run_star_extras:
use star_lib ! at the top of the file
then do something like:
real(dp),alocatable,dimension(:) :: avg_charge_H
allocate(avg_charge_H(1:s%nz))
do k=1,s%nz
avg_charge_H(k)=star_get_profile_output(s,'avg_charge_H',k)
end do
Rob
On 5 December 2017 at 13:15, aldanag--- via Mesa-users <
mesa-users at lists.mesastar.org> wrote:
> Hello,
>
>
> I am trying to inject energy to a star via the"run_star_extras", and the
> subroutine I use has access
>
>
> to the srar_info pointer, so I can use only the quantites that are defined
> in star/public/star_data.inc to make the energy computations.
>
>
> However, one of the paramaters I need to use- *avg_charge_H *(which I can
> see at the output of the profiles) is not defined in
>
>
> star.data.inc in any way.
>
>
> I found that this parameter is from the ionization module, and when it is
> passed to the star module via:
>
> get_ion_info(ion_iZ_H,k), this is from: star/private/profile_getval.f90 that
> contains the lines
>
> case (p_avg_charge_H)
> val = get_ion_info(ion_iZ_H,k)
>
> yet p_avg_charge_H also isn't defined in star.data.inc. I tried to add it
> manually and the runs still doesn't compile.
>
> My question is: Is it possible to add a parameter that exists in MESA to
> the star.data.inc, and if it is possible what is the right way to do that?
>
> Thanks in advance,
>
> Aldana.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20171205/84553083/attachment.html>
More information about the Mesa-users
mailing list