[mesa-users] About eos and kap module
Josiah Schwab
jwschwab at berkeley.edu
Mon Aug 31 10:33:15 EDT 2015
Hello DanDan,
> Now i want to use eos to calculate adiabatic exponent and use kap to
> calculate opacity derivatives, independently, from a series of rho
> and temperature parameters.
Here's a the broad answer, with a few specifics noted below.
The files
eos/test/src/sample_eos.f
kap/test/src/sample_kap.f
demonstrate how to use the eos & kap modules on your own.
The capability to just read a density/temperature/composition from a
namelist and output the information that you want does not already exist
(as far as I know).
You can get from the sample files to what you want relatively quickly,
but you're going to have to write some Fortran.
> I have below questions:
>
> 1. In eos module test, there is a file helm_test.in. Is that the
> input file of eos module? If i want to calculate series of data, how
> can i do? Just list each input parameter in that file each one in
> each lines? And if i only want to input temperature, density, X, Z
> instead of XH,XHE,XC,XO, how can i do?
I think helm_test.in is just some leftover. I didn't see any code in
test/ that reads it.
> 2. In kap module, i could not find input file like in eos module. How
> can i input my parameters independently?
>
> 3. Since i could not find namelist files in eos and kap modules, just
> like in star and binary modules, if i want to plot above two module
> result into one figure, or at least, into individual figures. should
> i create such namelist files in these two modules to plot the figure?
A very nice example of how to use your own namelists to control MESA
modules is given by the "one_zone_burn" stuff in net/test. See in
particular the files
inlist_one_zone_burn
src/mod_one_zone_burn.f
As far a plotting goes, output the data, then plot it however you like.
Best,
Josiah
More information about the Mesa-users
mailing list