[FLASH-USERS] E-MHD velocities and dt computation BUG

Adam Reyes adam.reyes at rochester.edu
Tue Apr 11 14:18:32 EDT 2023


Hi Jiri,

Thank you for reporting this bug! You are correct that those calculations
should be using the value calculated from "PlasmaState_tau".

I'm attaching a patch that users can apply to the FLASH4.7 source code.
Copy it into the FLASH4.7 directory (same level as source & RELEASE-NOTES)
and run

patch -p0 < XMHDdt_Patch.diff


*************************************************************************
Adam Reyes

Code Group Leader, Flash Center for Computational Science
Research Scientist, Dept. of Physics and Astronomy
University of Rochester
River Campus: Bausch and Lomb Hall, 369
500 Wilson Blvd. PO Box 270171, Rochester, NY 14627
Email adam.reyes at rochester.edu
Web https://flash.rochester.edu
 (he / him / his)

*************************************************************************

On Tue, Apr 11, 2023 at 11:11 AM Loffelmann, Jiri <loffejir at fjfi.cvut.cz>
wrote:

> Hello FLASH users,
>
> I discovered what seems to be an implementation bug in the new FLASH
> version 4.7.
> It concerns the computation of flux velocities and corresponding timesteps
> in the Extended MHD model. This is carried out in the function
> "hy_uhd_computeDtExtMHD.F90" inside the folder
> ".../source/physics/Hydro/HydroMain/unsplit".
> The bug is on line 191, where an uninitialised variable 'tauCent' is used for
> the computation of the magnetization 'chi'. This results in the chi being
> zero. The same problem is on line 204 for the computation of 'etatau',
> which also ends up always being zero.
> Further use of the variables 'tauCent', 'chi' or 'etatau' in the following
> computations results in wrong values (usually zero) of some of the flux
> velocities (Nernst, Hall, Resistive, ..) and incorrect computation of the
> time step limitation. Finally, this can lead to instability during the
> simulation for some problems.
>
> I used a quick fix that corrected the computation of the velocities and
> erased the instability in my simulation:
> Insert line "tauCent = tau" after line 189.
>
> I am happy to provide further details and the setup of the simulation
> where the instability appears. But I believe that the problem in the
> implementation should be obvious.
>
> Regards,
> Jiří Löffelmann
>
> _______________________________________________
> flash-users mailing list
> flash-users at flash.rochester.edu
>
> For list info, including unsubscribe:
> https://flash.rochester.edu/mailman/listinfo/flash-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20230411/f15b0970/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: XMHDdt_Patch.diff
Type: application/octet-stream
Size: 591 bytes
Desc: not available
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20230411/f15b0970/attachment.obj>


More information about the flash-users mailing list