<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi,</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I hope this message finds you well. I've implemented the settings you recommended, including<span style="font-family: Consolas, Courier, monospace;"> useHydro, updateHydroFluxes</span>, and setting
<span style="font-family: Consolas, Courier, monospace;">useDiffuseComputeDtMagnetic</span> to .true. with
<span style="font-family: Consolas, Courier, monospace;">dt_diff_factor</span> set to 1. Despite these adjustments, I'm encountering an issue where no magnetic field is generated by the zPinch current, and the solution appears the same as when
<span style="font-family: Consolas, Courier, monospace;">useMagneticResistivity</span> is disabled.</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
A colleague with more experience in FLASH suggested that transitioning to an explicit solver might require adjusting the magnetic field's boundary conditions in
<span style="font-family: Consolas, Courier, monospace;">Grid_bcApplyToRegionSpecialized.F90</span>. Could you confirm if this is the case? If so, could you guide me on the necessary modifications?</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Additionally, if the zPinch simulation operates with an implicit solver, would switching to an explicit solver necessitate changes in files such as
<span style="font-family: Consolas, Courier, monospace;">diff_advanceMag.F90</span> or
<span style="font-family: Consolas, Courier, monospace;">MagneticResistivity_fullState.F90</span>?</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Your expertise and advice would be greatly valued as I navigate this issue. </div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Warm regards,</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Bowen ZHU</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>发件人:</b> Hansen, Eddie <ehansen@pas.rochester.edu><br>
<b>发送时间:</b> 2024年3月25日 15:29<br>
<b>收件人:</b> Bowen Zhu (Student at CentraleSupelec) <bowen.zhu@student-cs.fr>; flash-users@flash.rochester.edu <flash-users@flash.rochester.edu><br>
<b>主题:</b> Re: Switching Magnetic Diffusion Solvers in Zpinch Simulations</font>
<div> </div>
</div>
<style>
<!--
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Calibri}
@font-face
{font-family:Aptos}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Aptos",sans-serif}
span.x_EmailStyle19
{font-family:"Aptos",sans-serif;
color:windowtext}
.x_MsoChpDefault
{font-size:10.0pt}
@page WordSection1
{margin:1.0in 1.0in 1.0in 1.0in}
div.x_WordSection1
{}
-->
</style>
<div lang="EN-US" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="x_WordSection1">
<p class="x_MsoNormal"><span style="font-size:11.0pt">Hi Bowen,</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">We don’t always include descriptions of unit tests in the guide, because these are intended to test specific parts of the code rather than provide users with example setups. The MagDiff test you mentioned
is a simple Gaussian diffusion of B-field, which has an analytic solution when the diffusivity is constant.</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt">When you switch to the ‘explicit’ solver, you have to keep a couple of things in mind. The explicit solver is in the Hydro unit, so you need useHydro and updateHydroFluxes to be true. You will also need
to be limiting your timestep dt by the magnetic diffusion time, so you need useDiffuseComputeDtMagnetic = .true. and dt_diff_factor should be set to a value <= 1.</span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<div>
<p class="x_MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:black">--</span><span style="font-size:10.0pt; font-family:"Calibri",sans-serif; color:black"></span></p>
<p class="x_MsoNormal"><span style="font-family:"Arial",sans-serif; color:#181A1B">Eddie Hansen</span><span style="font-size:10.0pt; font-family:"Calibri",sans-serif; color:black"></span></p>
<p class="x_MsoNormal"><span style="font-family:"Arial",sans-serif; color:#181A1B">Applications Group Leader</span></p>
<p class="x_MsoNormal"><span style="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"></span></p>
</div>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal"><span style="font-size:11.0pt"> </span></p>
<div id="x_mail-editor-reference-message-container">
<div>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal" style="margin-bottom:12.0pt"><b><span style="color:black">From:
</span></b><span style="color:black">flash-users <flash-users-bounces@flash.rochester.edu> on behalf of Bowen Zhu (Student at CentraleSupelec) <bowen.zhu@student-cs.fr><br>
<b>Date: </b>Saturday, March 23, 2024 at 3:18 PM<br>
<b>To: </b>flash-users@flash.rochester.edu <flash-users@flash.rochester.edu><br>
<b>Subject: </b>[FLASH-USERS] Switching Magnetic Diffusion Solvers in Zpinch Simulations</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="color:black">Dear Community,</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="color:black">I'm currently exploring Z-pinch simulations in FLASH, focusing on comparing the explicit and implicit magnetic diffusion solvers. While I aim to validate computation results and address concerns about potential
bugs in the implicit solver, I've encountered challenges in switching from the implicit to the explicit solver. Changing resistivitySolver from "implicit" to "explicit" doesn't seem to activate the explicit solver effectively; the simulation results mimic
those without applying magnetic resistivity (useMagneticResistivity = .false.), where the plasma remains static.</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="color:black">As someone new to FLASH, I wonder if there are additional steps required to successfully switch to the explicit solver.</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="color:black">Furthermore, in my efforts to validate the solvers' differences, I discovered an example under /magnetoHD/unitTest/MagDiff that seems to implement both solvers. However, I found no description of this example
in the user manual or user archives. Could anyone provide insights into the problem this example addresses and any available analytical solutions for reference?</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="color:black">Your guidance on these matters would be immensely appreciated.</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="color:black">Bon weekend,</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="color:black">Best regards,</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="color:black">Bowen ZHU</span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>