[FLASH-USERS] 回复: Switching Magnetic Diffusion Solvers in Zpinch Simulations

Bowen Zhu (Student at CentraleSupelec) bowen.zhu at student-cs.fr
Tue Mar 26 03:54:50 EDT 2024


Hi,

I hope this message finds you well. I've implemented the settings you recommended, including useHydro, updateHydroFluxes, and setting useDiffuseComputeDtMagnetic to .true. with dt_diff_factor 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 useMagneticResistivity is disabled.

A colleague with more experience in FLASH suggested that transitioning to an explicit solver might require adjusting the magnetic field's boundary conditions in Grid_bcApplyToRegionSpecialized.F90. Could you confirm if this is the case? If so, could you guide me on the necessary modifications?

Additionally, if the zPinch simulation operates with an implicit solver, would switching to an explicit solver necessitate changes in files such as diff_advanceMag.F90 or MagneticResistivity_fullState.F90?

Your expertise and advice would be greatly valued as I navigate this issue.

Warm regards,
Bowen ZHU
________________________________
发件人: Hansen, Eddie <ehansen at pas.rochester.edu>
发送时间: 2024年3月25日 15:29
收件人: Bowen Zhu (Student at CentraleSupelec) <bowen.zhu at student-cs.fr>; flash-users at flash.rochester.edu <flash-users at flash.rochester.edu>
主题: Re: Switching Magnetic Diffusion Solvers in Zpinch Simulations


Hi Bowen,



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.



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.



--

Eddie Hansen

Applications Group Leader

Flash Center for Computational Science





From: flash-users <flash-users-bounces at flash.rochester.edu> on behalf of Bowen Zhu (Student at CentraleSupelec) <bowen.zhu at student-cs.fr>
Date: Saturday, March 23, 2024 at 3:18 PM
To: flash-users at flash.rochester.edu <flash-users at flash.rochester.edu>
Subject: [FLASH-USERS] Switching Magnetic Diffusion Solvers in Zpinch Simulations

Dear Community,



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.



As someone new to FLASH, I wonder if there are additional steps required to successfully switch to the explicit solver.



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?



Your guidance on these matters would be immensely appreciated.



Bon weekend,



Best regards,

Bowen ZHU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20240326/3b586210/attachment.htm>


More information about the flash-users mailing list