[FLASH-USERS] Magnetic Resistivity Davies Wen
Hansen, Eddie
ehansen at pas.rochester.edu
Wed Feb 26 13:43:28 EST 2025
Hi Markus,
That’s an error, and thank you for finding it. The call to PlasmaState_tau should be before that if statement. This has already been corrected in a newer version of the code (to be released in the near future).
--
Eddie Hansen
Applications Group Leader
Flash Center for Computational Science
From: flash-users <flash-users-bounces at flash.rochester.edu> on behalf of Dr. Markus Nöth <markus.noeth at marvelfusion.com>
Date: Wednesday, February 26, 2025 at 5:15 AM
To: flash-users at flash.rochester.edu <flash-users at flash.rochester.edu>
Subject: [FLASH-USERS] Magnetic Resistivity Davies Wen
Dear all,
I’m running a modified version of the Z Pinch example, still using unsplit hydro etc, but without the electric current and hence with basically zero Magnetic field. For many initial conditions I’m running into trouble. At the second timestep flash complains about temperature and pressure being NaN. I’ve traced the NaNs back to subroutine res_davieswen in the file
source/physics/materialProperties/MagneticResistivity/MagneticResistivityMain/DaviesWen/res_davieswen.F90
which is being called with only the two mandatory arguments solnVec and resPar by the unsplit hydro solver which resides in the file
source/physics/Hydro/HydroMain/unsplit/hy_uhd_unsplitUpdate.F90
With this combination the code for magnetic resistivity declares the variable tau and uses it to initialize the value of resPar, but itself is never initialized (it is only initialized if magnetic resistivity is called with at least three arguments). Then, in many instances, tau is zero after declaration which results in resPar==0 which results in infinite magnetic resistivity. The infinity is then caught by the minimum located towards the end of the implementation of magnetic resistivity and replaced by a very large number. However; this number is so large that an average over two magnetic resistivities of such a size yields infinity again which cause the NaNs in the rest of the code.
So my question is: Is the if clause in the code for initializing tau:
if (present(resPerp) .or. present(resCross)) then
call PlasmaState_tau(ELE_ION, tele, llei, zbar, nion, tau)
omega = res_dw_qele*xmag / (res_dw_mele*res_dw_speedlt)
…
end if
really necessary or useful? If so, should there not be a different initialization of tau in case the body of this if clause is not executed?
Best,
Markus
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Dr. Markus Nöth
Scientist
+49 89 262023263
[cid:image001.png at 01DB883C.384123D0]
MARVEL FUSION GmbH
Theresienhöhe 12 | 80339 Munich | Germany
Local Court Munich HRB 249969
Managing Directors: Moritz von der Linden, Dr. Georg Korn, Heike Freund
[cid:image002.png at 01DB883C.384123D0]<https://marvelfusion.com/>
[cid:image003.png at 01DB883C.384123D0]<https://www.linkedin.com/company/marvelfusion/mycompany/>[cid:image004.png at 01DB883C.384123D0]<https://twitter.com/MarvelFusion>
This email and any files transmitted with it are confidential and intended solely for the use of the named addressee. If you have received this email in error, please contact us and destroy the original message. For information on our handling of your personal data, please visit https://marvelfusion.com/imprint/ .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20250226/b052dd04/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 3198 bytes
Desc: image001.png
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20250226/b052dd04/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 627 bytes
Desc: image002.png
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20250226/b052dd04/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 339 bytes
Desc: image003.png
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20250226/b052dd04/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 1396 bytes
Desc: image004.png
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20250226/b052dd04/attachment-0003.png>
More information about the flash-users
mailing list