[FLASH-USERS] initial density and temperature distribution in laser slab

Lee Ellison lee at pacificfusion.com
Thu Jul 18 14:03:20 EDT 2024


Glad to hear you're making progress, Kavin.

I suggest spending some time with Chapter 3.5 in the User guide:
https://flash.rochester.edu/site/flashcode/user_support/flash_ug_devel.pdf
It has some good discussion on this initBlock routine.

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.

Best of luck!
Leland

On Thu, Jul 18, 2024 at 10:56 AM Kavin Tangtartharakul <ktangtar at ucsd.edu>
wrote:

> Hi Leland,
>
> Thank you for pointing me in the right direction!
> 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.
> [image: image.png]
>
> Below are what the initial temperature and density look like.  Any idea
> what is causing this behavior in the density?
>
> Thank you,
> Kavin Tangtartharkaul
>
> [image: image.png]
> [image: image.png]
>
> On Wed, Jul 17, 2024 at 4:07 PM Lee Ellison <lee at pacificfusion.com> wrote:
>
>> Hi Kavin,
>>
>> 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.
>>
>> Best of luck!
>> Lee
>> ________________
>> Leland Ellison PhD
>> Pacific Fusion
>> Lead - Modeling and Simulations
>>
>> On Wed, Jul 17, 2024 at 3:41 PM Kavin Tangtartharakul <ktangtar at ucsd.edu>
>> wrote:
>>
>>> Hi,
>>>
>>> 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.
>>>
>>> Thank you,
>>> Kavin Tangtartharakul
>>> _______________________________________________
>>> flash-users mailing list
>>> flash-users at flash.rochester.edu
>>>
>>> For list info, including unsubscribe:
>>> https://flash.rochester.edu/mailman/listinfo/flash-users
>>> <https://urldefense.com/v3/__https://flash.rochester.edu/mailman/listinfo/flash-users__;!!Mih3wA!Aqb0vfk9M3B416iUVrW42YV47lVYdW5wVJpsrGtSbEFjCcviDpGkwiJctECVH93mvl1xR07fkREOYpDB$>
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20240718/a53d79a9/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 26781 bytes
Desc: not available
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20240718/a53d79a9/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 73644 bytes
Desc: not available
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20240718/a53d79a9/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 72581 bytes
Desc: not available
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20240718/a53d79a9/attachment-0005.png>


More information about the flash-users mailing list