<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Aptos;
panose-1:2 11 0 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#467886;
text-decoration:underline;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:11.0pt;
mso-ligatures:none;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Markus,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif;color:black">--</span><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#181A1B">Eddie Hansen</span><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#181A1B">Applications Group Leader<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#181A1B">Flash Center for Computational Science</span><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div id="mail-editor-reference-message-container">
<div>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">flash-users <flash-users-bounces@flash.rochester.edu> on behalf of Dr. Markus Nöth <markus.noeth@marvelfusion.com><br>
<b>Date: </b>Wednesday, February 26, 2025 at 5:15 AM<br>
<b>To: </b>flash-users@flash.rochester.edu <flash-users@flash.rochester.edu><br>
<b>Subject: </b>[FLASH-USERS] Magnetic Resistivity Davies Wen<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="DE">Dear all,</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="DE"> </span><o:p></o:p></p>
<p class="MsoNormal">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<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">source/physics/materialProperties/MagneticResistivity/MagneticResistivityMain/DaviesWen/res_davieswen.F90<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">which is being called with only the <b>two mandatory arguments</b> solnVec and resPar by the unsplit hydro solver which resides in the file<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">source/physics/Hydro/HydroMain/unsplit/hy_uhd_unsplitUpdate.F90<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">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
<b>three arguments</b>). 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.
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">So my question is: Is the if clause in the code for initializing tau:<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><b>if (present(resPerp) .or. present(resCross)) then</b><o:p></o:p></p>
<p class="MsoNormal" style="text-indent:.5in">call PlasmaState_tau(ELE_ION, tele, llei, zbar, nion, tau)<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:.5in"><span lang="EN-GB">omega = res_dw_qele*xmag / (res_dw_mele*res_dw_speedlt)</span><o:p></o:p></p>
<p class="MsoNormal" style="text-indent:.5in"><span lang="EN-GB">…</span><o:p></o:p></p>
<p class="MsoNormal"><b><span lang="EN-GB">end if</span></b><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB">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?</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB">Best,</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB">Markus</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-GB"> </span><o:p></o:p></p>
<p style="margin-bottom:0in"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br>
Dr. Markus Nöth<br>
Scientist<br>
+49 89 262023263</span><o:p></o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="600" style="width:6.25in">
<tbody>
<tr style="height:16.5pt">
<td style="border:none;border-top:dotted #131313 1.0pt;padding:1.5pt 0in 1.5pt 0in;height:16.5pt;border-left-style:initial;border-right-style:initial;border-bottom-style:initial">
<p class="MsoNormal" align="center" style="text-align:center"><span style="font-size:10.0pt;color:white"><img width="96" height="61" style="width:1.0in;height:.6354in" id="Picture_x0020_3" src="cid:image001.png@01DB883C.384123D0"></span><o:p></o:p></p>
</td>
<td width="480" style="width:5.0in;border:none;border-top:dotted #131313 1.0pt;padding:1.5pt 0in 1.5pt 0in;height:16.5pt;border-left-style:initial;border-right-style:initial;border-bottom-style:initial">
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Calibri",sans-serif;color:#131313">MARVEL FUSION GmbH<br>
Theresienhöhe 12 | 80339 Munich | Germany<br>
Local Court Munich HRB 249969<br>
Managing Directors: Moritz von der Linden, Dr. Georg Korn, Heike Freund</span><o:p></o:p></p>
</td>
<td width="22" style="width:16.5pt;border:none;border-top:dotted #131313 1.0pt;padding:1.5pt 0in 1.5pt 0in;height:16.5pt;border-left-style:initial;border-right-style:initial;border-bottom-style:initial">
<p class="MsoNormal" align="center" style="text-align:center"><a href="https://marvelfusion.com/" title=""""><span style="color:windowtext;text-decoration:none"><span style="font-size:9.0pt;color:blue"><img border="0" width="20" height="13" style="width:.2083in;height:.1354in" id="_x0030_.az3k4bwnnhd" src="cid:image002.png@01DB883C.384123D0"></span></span></a><span style="font-size:9.0pt;color:#131313"><br>
</span><a href="https://www.linkedin.com/company/marvelfusion/mycompany/"><span style="color:windowtext;text-decoration:none"><span style="font-size:9.0pt;color:blue"><img border="0" width="20" height="20" style="width:.2083in;height:.2083in" id="Picture_x0020_2" src="cid:image003.png@01DB883C.384123D0"></span></span></a><a href="https://twitter.com/MarvelFusion"><span style="color:windowtext;text-decoration:none"><span style="font-size:9.0pt;color:blue"><img border="0" width="20" height="20" style="width:.2083in;height:.2083in" id="Picture_x0020_1" src="cid:image004.png@01DB883C.384123D0"></span></span></a><o:p></o:p></p>
</td>
</tr>
<tr style="height:38.25pt">
<td colspan="3" valign="top" style="border-top:dotted white 1.0pt;border-left:none;border-bottom:dotted #131313 1.0pt;border-right:none;padding:0in 0in 0in 0in;height:38.25pt;border-left-style:initial;border-right-style:initial">
<p class="MsoNormal"><i><span style="font-size:7.0pt;font-family:"Calibri",sans-serif">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 </span></i><span style="font-size:8.0pt;font-family:"Calibri",sans-serif"><a href="https://marvelfusion.com/imprint/"><i><span style="font-size:7.0pt;color:blue">https://marvelfusion.com/imprint/</span></i></a></span><i><span style="font-size:7.0pt;font-family:"Calibri",sans-serif"> .</span></i><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="font-size:10.0pt"> </span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>