<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="auto">Magnetic resistivity is currently handled explicitly, which is why you have/need small time steps. For most users, it will be handled by the unsplit implementation of the Hydro unit in hy_uhd_addResistiveFluxes. The Diffuse unit has its own
Diffuse<span style="font-size: 17pt;"></span>FluxBased routine, which you are most likely not using with your setup.</div>
<div dir="auto" style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<br>
</div>
<div dir="auto" style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
With Hydro's explicit approach for resistivity, you have to run at the diffusion time step, which is controlled by dt_diff_factor as you said. There are also logical parameters to turn on/off diffusion dt calculations for the various diffusive processes:</div>
<div dir="auto" style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
useDiffuseComputeDtMagnetic, for example, is likely the only one that you need to be .true. in your par file.</div>
<div dir="auto" style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<br>
</div>
<div dir="auto" style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
You can improve the diffusion time step by increasing the initial temperature and/or by using res_maxRes to set a maximum resistivity. </div>
<div><br>
</div>
<div id="ms-outlook-mobile-signature" dir="auto">
<div dir="auto" style="">******************************************</div>
<div dir="auto" style="">Eddie Hansen | Research Scientist</div>
<div dir="auto" style="">Flash Center for Computational Science</div>
<div dir="auto" style="">Dept. of Physics and Astronomy</div>
<div dir="auto" style="">University of Rochester, Rochester, NY</div>
<div dir="auto" style="">Cell 607-341-6126 | flash.rochester.edu</div>
<div dir="auto" style="">(he / him / his)</div>
<div dir="auto" style="">******************************************</div>
</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>From:</b> flash-users <flash-users-bounces@flash.rochester.edu> on behalf of Yigeng Tian <ygtian@udel.edu><br>
<b>Sent:</b> Friday, October 7, 2022 3:18:44 PM<br>
<b>To:</b> flash-users@flash.rochester.edu <flash-users@flash.rochester.edu><br>
<b>Subject:</b> [FLASH-USERS] Some questions about magnetic resistivity</font>
<div> </div>
</div>
<div>
<div dir="ltr">Dear FLASH users,
<div><br>
</div>
<div>I'm working on a modified MHD laser-slab simulation. I tried to add magnetic fields (~ 15T) and Biermann Battery effects (source version) for the laser-slab simulation, it worked well. But when I turn on the magnetic resistivity (SpitzerHighZ resistivity),
the simulation is soon killed by a "Negative 3T internal energy" error. <br>
</div>
<div><br>
</div>
<div>I noticed that FLASH manual (18.1.2) said "In general, implicit schemes are numerically stable for any time step, so the runtime parameter dt_diff_factor could be set to a large value to ignore the diffusion time. However, there are cases in which HYPRE
will have trouble converging on a solution, and decreasing dt_diff_factor less than 1.0 may resolve the issue." </div>
<div><br>
</div>
<div>So I changed the dt_diff_factor to 0.8, which makes the simulation run but gives a pretty low diffusion time step (~ e-16 to e-15 s). Our past simulation time step without magnetic resistivity can reach ~ e-13 to e-12 s, and the super time stepping method
doesn't help a lot for overcoming the small diffusion time step.<br>
</div>
<div><br>
</div>
<div>Besides, the FLASH manual (18.1) said "Flux-Based Diffusion Solvers are used for magnetic resistivity", but 18.1.1 said "MHD implementations, currently implement some diffusive effects in their own flux-based way that does not use the DiffuseFluxBased
unit." I'm also confused which diffusion solver should be used for magnetic resistivity, is the Flux-Based version (explicit) or implicit version?<br>
</div>
<div><br>
</div>
<div>If you have any suggestions or any examples about how to set up the magnetic resistivity correctly, I would appreciate it. Thanks.<br>
</div>
<div><br>
</div>
<div>
<div>Best regards,</div>
<div>Yigeng Tian</div>
<div>
<div>Department of Physics and Astronomy</div>
<div>University of Delaware</div>
</div>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</body>
</html>