<html>#2383: Enhancement to Newton-Raphson and Bisection methods when computing T from a given epsilon in the EOS_Omni thorn.
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Federico Cipolletta</td></tr>
<tr><td style='text-align:right'>   Status:</td><td>new</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'>  Version:</td><td></td></tr>
<tr><td style='text-align:right'>     Type:</td><td>enhancement</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>minor</td></tr>
<tr><td style='text-align:right'>Component:</td><td>EinsteinToolkit thorn</td></tr>
</table>

<p>Running TOV tests with GRHydro and Spritz with the LS220 EOS, we see that the calculation of T, in some cases, may not perform well. Specifically, with the GRHydro code, roughly after 144 iterations the T goes above the prescribed parameter "GRHydro_max_temp" (which we imagine being chosen in accordance with the maximum value of T given in the Table), so the simulation is stopped. With Spritz, as well, we clearly get one wrong T value (well above T_max given in the table). This issue is probably related to a weak dependence of T on \epsilon and can be solved by using the bisection method, see Section IV of Galeazzi, Kastaun, Rezzolla, and Font, PRD (2013). Lorenzo Sala implemented a modification to the Newton-Raphson routine in EOS_Omni/src/nuc_eos_cxx/helpers.hh file: if the energy dependence on the temperature is weak, i.e., if the derivative of the function is too large and therefore the Newton-Raphson routine may overshoot (in the routine "nuc_eos_findtemp"), the code 
 switches to a safer bisection method (in the routine "bisection"). In addition, the "bisection" routine presents a slight modification in order to be sure of not going below the minimum of tabulated temperature value. With these modifications, both tests with GRHydro and Spritz result to be successful and well in accordance. I attach two pdf plots showing comparisons for rho_max and T_max between Spritz and GRHydro with the enhanced and standard thorn. Please, have a look at the pull request at <a data-is-external-link="true" href="https://bitbucket.org/einsteintoolkit/einsteineos/pull-requests/6/enhancement-to-newton-raphson-and/diff" rel="nofollow">https://bitbucket.org/einsteintoolkit/einsteineos/pull-requests/6/enhancement-to-newton-raphson-and/diff</a>.</p>
<p><table><tr><td>attachment:</td><td><a href="LS220_RHOmax.pdf">https://api.bitbucket.org/2.0/repositories/einsteintoolkit/tickets/issues/2383/attachments/LS220_RHOmax.pdf</a></td></tr>
<tr><td>attachment:</td><td><a href="LS220_Tmax.pdf">https://api.bitbucket.org/2.0/repositories/einsteintoolkit/tickets/issues/2383/attachments/LS220_Tmax.pdf</a></td></tr>
</table></p>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2383/enhancement-to-newton-raphson-and'>https://bitbucket.org/einsteintoolkit/tickets/issues/2383/enhancement-to-newton-raphson-and</a></p>
</html>