[FLASH-USERS] [EXT] bug in hy_uhd_unsplitUpdate and hy_uhd_energyFix

Reyes, Adam adam.reyes at rochester.edu
Thu Jun 10 10:50:51 EDT 2021


Hi Maksim,

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.

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.

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.

Adam

On Jun 10, 2021, at 2:44 AM, Maksim Kozlov <maksim.kozlov at nu.edu.kz<mailto:maksim.kozlov at nu.edu.kz>> wrote:

Dear Flash users,
line 1054 of hy_uhd_unsplitUpdate
reads
if (.not. hy_useAuxEintEqn .or. eint > hy_eswitch*ekin) then
line 269 of hy_uhd_energyFix
reads
if (.not. hy_useAuxEintEqn .or. eint > hy_eswitch*(ekin+emag)) then

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.
regards
MAksim Kozlov
[https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]<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=>     Без вирусов. www.avast.com<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=>
<x-msg://5/#m_6984141989547071320_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20210610/8f0b070a/attachment.htm>


More information about the flash-users mailing list