TOVsolver icon indicating copy to clipboard operation
TOVsolver copied to clipboard

Run tov.py code

Open ishfaq333 opened this issue 5 years ago • 3 comments

Hello, I have installed the TOVsolver code as instructed.

Now I want to use my EoS to solve the TOV equation and calculate Mass, radius, etc. Where do I need to save my EoS and how do I then run tov.py

Please respond back. I will be waiting

ishfaq333 avatar Oct 19 '20 14:10 ishfaq333

Hello,

Well the tov.py is more a kind of libery that you call from a different code. In the easiest cases it is either Python or jupiter notebook as in the example. As you can see there is Input 3 you specify where the EOS data is coming from:

eos = np.genfromtxt("example_eos.dat", names=True, skip_header=1, unpack=True)

In this case it is a relative pass from where the jupiter notebook is, but you can also give a full path to where the EOS table is. eos will now contain a full table as numpy object.

In the next line you specify which colums really to use in the code.

I hope I could help you, Greetings

gnibeil avatar Aug 30 '21 15:08 gnibeil

Thank you for the response. I am able to run the codes successfully. However, I have a question. Well, the core EoS supplied is joined with the Crust EoS (already present). I want to calculate the MR profile for pure Quark star and don't want to take crust EoS into consideration, how would I do that? Please help, if you can.

ishfaq333 avatar Sep 09 '21 07:09 ishfaq333

Hi,

Well if you do not want to consider a crust eos you can switch adding a crust of by adding the following option add_crust=False:

tov_s = TOV(n_arr, p_arr, plot_eos=True,add_crust=False)

It mid be needed to add a row of 0 0 on the begin of your table in order to avoid problems with the ranges of the interpolations.

Have fun,

gnibeil avatar Sep 10 '21 17:09 gnibeil