<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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.contentpasted0
{mso-style-name:contentpasted0;}
span.xcontentpasted0
{mso-style-name:x_contentpasted0;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@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="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Alvaro,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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:<br>
diff_magzXrBoundaryType = “circuit”<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hope that answers most of your initial questions.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="color:black">--</span><span style="font-size:10.0pt;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;color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:#181A1B">Research Scientist</span><span style="font-size:10.0pt;color:black"><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;color:black"><o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<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 Alvaro Sanchez <alvaro.sanchez@greentownsbyfusion.com><br>
<b>Date: </b>Wednesday, April 12, 2023 at 11:55 AM<br>
<b>To: </b>flash-users@flash.rochester.edu <flash-users@flash.rochester.edu><br>
<b>Subject: </b>Re: [FLASH-USERS] Help with Z-pinch example.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">"<span class="contentpasted0"><span style="background:white">So, to check densities in our simulation (we removed the liner btw) we compare with these papers by
</span></span></span><span class="contentpasted0"><span style="font-size:12.0pt;color:#ED5C57;background:white">multiplying</span></span><span class="contentpasted0"><span style="font-size:12.0pt;color:black;background:white"> the FLASH density in the Z-pinch
example with DD mass in grams (for the fill)"</span></span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">I said multiplying but I meant dividing, sorry for the mistake.<o:p></o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="0" width="91%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> Alvaro Sanchez<br>
<b>Sent:</b> Wednesday, April 12, 2023 5:51 PM<br>
<b>To:</b> flash-users@flash.rochester.edu <flash-users@flash.rochester.edu><br>
<b>Subject:</b> Help with Z-pinch example.</span> <o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">Hello dear folks from FLASH community, a pleasure to be here.
<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">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 :)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">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.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">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.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">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.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">Are we making a mistake calculating the number density?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">We've seen, in ../HydroMain/unsplit/MHD_StaggeredMesh/<b><i>hy_uhd_getFaceCurrents.F90</i></b><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:aqua;background:blue">!! Compute electron number density at (i,j,k)</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:aqua;background:blue">nele_rght = ye * hy_avogrado * U(DENS_VAR,i,j,k)</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">SO, we are worried about being wrong since the beginning.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">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.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">Does someone know where in the internal code is this issue coded? or...<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">Does someone know how it works? Does it goes through the higher density the higher the current density? Or am I completely wrong?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">Thank you very very much if you read it, I really appreciate it, so thank you very much.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal" style="background:white"><span class="xcontentpasted0"><span style="font-size:12.0pt;color:black">Any help is always nice, have a good day.</span></span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
</div>
</div>
</body>
</html>