<div dir="ltr">Thank you for the quick reply! I think that makes a lot of sense and I should be able to get it working looking more closely at the user guide. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 18, 2024 at 11:03 AM Lee Ellison <<a href="mailto:lee@pacificfusion.com">lee@pacificfusion.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Glad to hear you're making progress, Kavin.<div><br></div><div>I suggest spending some time with Chapter 3.5 in the User guide: <a href="https://urldefense.com/v3/__https://flash.rochester.edu/site/flashcode/user_support/flash_ug_devel.pdf__;!!Mih3wA!FORwe9VDPaoEz8MGBTWSv7pGIK9_U8Da-0mYGjEeceCCCDM9XcAx29tbIQUWlOLus0rvPUYzJbcYZte0$" target="_blank">https://flash.rochester.edu/site/flashcode/user_support/flash_ug_devel.pdf</a> <br>It has some good discussion on this initBlock routine.<br><br>The behaviour you're seeing is because the FLASH simulation domain is decomposed into blocks, so the index scan you're performing on lines 122 and 123 are not with respect to global index space but instead a block-specific index space, so you're seeing per-block behavior. Instead you'll want to do something like fetch the spatial position from the Grid unit (again, see the User guide for instructions on this) and use the spatial position instead of the logical index within the block.</div><div><br></div><div>Best of luck!<br>Leland</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 18, 2024 at 10:56 AM Kavin Tangtartharakul <<a href="mailto:ktangtar@ucsd.edu" target="_blank">ktangtar@ucsd.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Leland,<div><br></div><div>Thank you for pointing me in the right direction!</div><div>I gave it a try and there seems to be some strange behavior with the density. Below, I set some arbitrary functions for the density and electron temperature. It seems like the initial temperature distribution is as expected but the density does something unexpected. The density only worked when I had a constant value for it. </div><div><img src="cid:ii_lyrk2ivm3" alt="image.png" width="507" height="43"><br></div><div><br></div><div>Below are what the initial temperature and density look like. Any idea what is causing this behavior in the density?</div><div><br></div><div>Thank you,</div><div>Kavin Tangtartharkaul </div><div><br></div><div><img src="cid:ii_lyrk5b5v4" alt="image.png" width="507" height="297"><br></div><div><img src="cid:ii_lyrk5vs15" alt="image.png" width="507" height="291"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 17, 2024 at 4:07 PM Lee Ellison <<a href="mailto:lee@pacificfusion.com" target="_blank">lee@pacificfusion.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Kavin,<br><br>Take a look at Simulation_initBlock.F90. This is the Fortran routine that specifies the initial condition for the problem. Take a look around line ~100 for the body of a loop over the mesh that is specifying the initial state. You can modify this to put in whatever spatial dependence you like. <br><br>Best of luck!<br>Lee<br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><span style="color:rgb(34,34,34)">________________</span><div style="color:rgb(34,34,34)">Leland Ellison PhD<div>Pacific Fusion</div><div>Lead - Modeling and Simulations</div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 17, 2024 at 3:41 PM Kavin Tangtartharakul <<a href="mailto:ktangtar@ucsd.edu" target="_blank">ktangtar@ucsd.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I am a new user of flash and have started working with the LaserSlab example. Instead of just a single value fo the initial density or temperature, how can I specify the density or temperature as a function of position? For example, density = dens_base + alpha*y.</div><div><br></div><div>Thank you,</div><div>Kavin Tangtartharakul</div></div>
_______________________________________________<br>
flash-users mailing list<br>
<a href="mailto:flash-users@flash.rochester.edu" target="_blank">flash-users@flash.rochester.edu</a><br>
<br>
For list info, including unsubscribe:<br>
<a href="https://urldefense.com/v3/__https://flash.rochester.edu/mailman/listinfo/flash-users__;!!Mih3wA!Aqb0vfk9M3B416iUVrW42YV47lVYdW5wVJpsrGtSbEFjCcviDpGkwiJctECVH93mvl1xR07fkREOYpDB$" rel="noreferrer" target="_blank">https://flash.rochester.edu/mailman/listinfo/flash-users</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>