[mesa-users] About eos and kap module

无心 63825174 at qq.com
Tue Sep 1 07:47:06 EDT 2015


Hi All,
  
 Thank you for your help. I looked into these two examples and still have below questions:
  
 1. In eos/test/src/sample_eos.f, it can not output gamma1 and gamma3 parameters. I run ./rn and can see gamma output. That seems from another code test_eos.f, so i looked into that and test_eos_support.f, but find they call functions like Do_One_Ideal_Gas_TRho, Do_One_TRho. Since i could not find the comment on how to call them myself.  Could you tell me which function can i call in order to get gamma1 and gamm3 parameter from T and Rho input? And i still find there are eosDE,eosDT,eosPT,eosQT, could you tell me the difference of them?
  
 2. In kap/test/src/sample_kap.f, if i run ./sample_kap, it give out error message like:
  
 must supply Zbase for Type2 opacities -1.0000000000000D+00
                                       frac_Type2    1.0000000000000D+00
  
 kap_get_failed at i=1
   
 it seems that code has something wrong with Zbase input. So i go to another program test_kap.f, this code can run but i still need some guide to modify that code to input my own parameters of T and rho. And i find in sample_kap.f, it read some star mode file, but do not exist in test_eos.f, is that not necessary? I only want to get kap and dkap_dlnT output.
  
 And in my problem, the range of T is: T around 8000K, or 40000<T<60000. 
 The range of rho is around: 0.5<rho<1.5
 Could you give me some guide to calculate those parameters?
  
 Thank you for your help in advance
  
 Chen DanDan

  

 ------------------ Original ------------------
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20150901/a76e1ea9/attachment.html>


More information about the Mesa-users mailing list