<div dir="ltr"><div>Hi Maksim,</div><div><br></div><div>I had a similar problem once that may be what you are seeing. Does this happen right after the mesh has refined?</div><div><br></div><div>I was working with a relativistic hydro solver. The problem was that when the mesh refined, new guard cells were created but not filled. Thus no values were set for the variables. Some of the sweeps included guard cells, but as the new block just had some random gibberish in the guard cells, the requirement that |v| < c was not always satisfied and the code would stop.</div><div><br></div><div>You could try adding a call to guard cell filling just before you call the EOS to be sure you have "fresh" values in the guard cells.</div><div><br></div><div>Hope this helps!</div><div><br></div><div>Alan<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 26, 2021 at 7:58 AM Maksim Kozlov <<a href="mailto:maksim.kozlov@nu.edu.kz">maksim.kozlov@nu.edu.kz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear flash users,<div>I would really appreciate it if somebody helps me with the following issue.</div><div>I am experimenting with the equation of state (EOS). Don't ask me how it is possible but my pressure becomes negative sometimes. To make sure that sound speed is real, after calculating Gamma=Cs^2*rho/P (Gamma is GAMC, P is pressure, rho is density, Cs is sound speed). I am checking if Gamma*P is positive (density is always positive). And
Gamma*P is always positive in subroutine EOS. However
I receive an error message from subroutine hy_uhd_shockDetec because Gamma*P/rho becomes negative so sound speed becomes imaginary. What I know is that it happens in guard cells only. However I do not understand how it can happen. Somewhere on the way from subroutine EOS to subroutine hy_uhd_shockDetect
Gamma*P in guard cells becomes negative yet as far as I understand both Gamma and P are calculated only in EOS.</div><div>Many thanks!</div><div>MAksim</div></div><div id="gmail-m_7649547502971364744DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br> <table style="border-top:1px solid rgb(211,212,222)">
<tbody><tr>
<td style="width:55px;padding-top:18px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" style="width: 46px; height: 29px;" width="46" height="29"></a></td>
<td style="width:470px;padding-top:17px;color:rgb(65,66,78);font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Без вирусов. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" style="color:rgb(68,83,234)" target="_blank">www.avast.com</a> </td>
</tr>
</tbody></table>
<a href="#m_7649547502971364744_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Alan C. Calder<br>Department of Physics and Astronomy<br>State University of New York at Stony Brook<br>Stony Brook, NY 11794-3800<br><br>office: ESS 438<br>phone: (631) 632-1176<br>fax: (631) 632-1745<br>web: <a href="http://www.astro.sunysb.edu/acalder" target="_blank">http://www.astro.sunysb.edu/acalder</a><br></div></div>