<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Maksim,
<div class=""><br class="">
</div>
<div class="">The code is correct for how the auxiliary internal energy equation is intended to be used, that is only in cells where the internal energy makes up a small fraction of the total energy, set by the runtime parameter “eintswitch". In this case there
is the potential for small errors in the calculation of kinetic or magnetic energy to result in negative internal energy and pressure.</div>
<div class=""><br class="">
</div>
<div class="">Because the governing equation for the internal energy is a non-conservative hyperbolic system (due to the PdV work term) the Rankine-Hugoniot condition across shocks is ambiguous, and using the internal energy equation directly will result in
incorrect physical behavior at shocks. For this reason it should only be used when necessary to ensure the positivity of pressure. </div>
<div class=""><br class="">
</div>
<div class="">As an exercise you can run the Sod shock-tube problem with “useAuxEintEqn=.true.” and “eintswitch = 1.e30” and you would find that the solution predicts shock speeds that disagrees with the analytic solution, even if the grid is increasingly resolved.</div>
<div class=""><br class="">
</div>
<div class="">Adam<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Jun 10, 2021, at 2:44 AM, Maksim Kozlov <<a href="mailto:maksim.kozlov@nu.edu.kz" class="">maksim.kozlov@nu.edu.kz</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Dear Flash users,
<div class="">line 1054 of hy_uhd_unsplitUpdate</div>
<div class="">reads <br class="">
</div>
<div class="">if (.not. hy_useAuxEintEqn .or. eint > hy_eswitch*ekin) then</div>
<div class="">
<div class="">line 269 of hy_uhd_energyFix</div>
<div class="">reads </div>
</div>
<div id="m_6984141989547071320DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" class="">if (.not. hy_useAuxEintEqn .or. eint > hy_eswitch*(ekin+emag)) then</div>
<div class=""><br class="">
</div>
<div class="">I believe it should be .and. instead of .or. in both cases because auxiliary internal energy equation should be used whenever the corresponding option is set to true.</div>
<div class="">regards</div>
<div class="">MAksim Kozlov<br class="">
</div>
<div class="">
<table style="border-top:1px solid #d3d4de" class="">
<tbody class="">
<tr class="">
<td style="width:55px;padding-top:18px" class=""><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.avast.com_sig-2Demail-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Dwebmail&d=DwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=1C4d97g-LRBm3GqeRtlZHfnzFQIEWizIeq2b_IZClJA&m=nESA7e0dWER3vMhPabFBWmRydDMWU0uohWEuIrptP78&s=YA-trP-rzau2EcgzAquqJfIoF0V9ol_OD7dwpKIX6Ng&e=" target="_blank" class=""><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" class=""></a></td>
<td style="width:470px;padding-top:17px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px" class="">
Без вирусов. <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.avast.com_sig-2Demail-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Dwebmail&d=DwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=1C4d97g-LRBm3GqeRtlZHfnzFQIEWizIeq2b_IZClJA&m=nESA7e0dWER3vMhPabFBWmRydDMWU0uohWEuIrptP78&s=YA-trP-rzau2EcgzAquqJfIoF0V9ol_OD7dwpKIX6Ng&e=" style="color:#4453ea" target="_blank" class="">
www.avast.com</a> </td>
</tr>
</tbody>
</table>
<a href="x-msg://5/#m_6984141989547071320_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1" class=""></a></div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>