[FLASH-USERS] Help with Z-pinch example.

Hansen, Eddie ehansen at pas.rochester.edu
Wed Apr 12 12:38:44 EDT 2023


Hi Alvaro,

The ZPinch problem is definitely just an example/template, and most (if not all) users who want to run their own Z-pinch will need to change the densities, dimensions, materials, etc.

Yes, FLASH is in CGS by default so ‘dens’ is in g/cm^3. To convert this to number density, multiply by Avogadro’s number and divide by the atomic mass of your material (e.g., 1.00784 g/mol for hydrogen). That gives you ion number density. To calculate electron number density, you would multiply that by the average ionization state (zbar).

The interpolation of the current input file (when you’re using the FileInput circuit implementation) is done in Circuit.F90. This current is used with Ampere’s Law to set a boundary condition for the azimuthal field on the upper-r boundary. In the flash.par file, this line enables that BC:
diff_magzXrBoundaryType = “circuit”

Hope that answers most of your initial questions.

--
Eddie Hansen
Research Scientist
Flash Center for Computational Science


From: flash-users <flash-users-bounces at flash.rochester.edu> on behalf of Alvaro Sanchez <alvaro.sanchez at greentownsbyfusion.com>
Date: Wednesday, April 12, 2023 at 11:55 AM
To: flash-users at flash.rochester.edu <flash-users at flash.rochester.edu>
Subject: Re: [FLASH-USERS] Help with Z-pinch example.
"So, to check densities in our simulation (we removed the liner btw) we compare with these papers by multiplying the FLASH density in the Z-pinch example with DD mass in grams (for the fill)"

I said multiplying but I meant dividing, sorry for the mistake.
________________________________
From: Alvaro Sanchez
Sent: Wednesday, April 12, 2023 5:51 PM
To: flash-users at flash.rochester.edu <flash-users at flash.rochester.edu>
Subject: Help with Z-pinch example.

Hello dear folks from FLASH community, a pleasure to be here.

I'm new in FLASH so I still probably have beginner mistakes and questions, but I really need help with a couple of things, so thank you very much in advance :)

We are working on a Z-pinch, using the example as a template, so we are trying to understand pretty much everything (or as much as possible) it has.

First is a very basic thing, density units. We suppose g/cm^3. The problem we have with the example is the high density of vacuum, even the density of the fill seems too high for us, as well as the density during the stagnation period. We've been researching and, in almost every seen paper, number density is used.
So, to check densities in our simulation (we removed the liner btw) we compare with these papers by multiplying the FLASH density in the Z-pinch example with DD mass in grams (for the fill). And we get much lower values than those used in BC and simulated in the example (which could make sense, since our Z-pinch is a different one). We are also using lower values as initial conditions because we need, during our stagnation period, values of 1e17 cm^-3 for dens.

Are we making a mistake calculating the number density?
We've seen, in ../HydroMain/unsplit/MHD_StaggeredMesh/hy_uhd_getFaceCurrents.F90


!! Compute electron number density at (i,j,k)
nele_rght = ye * hy_avogrado * U(DENS_VAR,i,j,k)

SO, we are worried about being wrong since the beginning.


We found that .F90 in our search of the interpolation of the current from the Circuit source term. We don't understand how FLASH spatially interpolates the input current (we use the FileInput way) in a 2D cylindrical axisymmetric plane.
Does someone know where in the internal code is this issue coded? or...
Does someone know how it works? Does it goes through the higher density the higher the current density? Or am I completely wrong?

Thank you very very much if you read it, I really appreciate it, so thank you very much.

Any help is always nice, have a good day.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20230412/0a5aaadf/attachment.htm>


More information about the flash-users mailing list