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

Kavin Tangtartharakul ktangtar at ucsd.edu
Thu Jul 18 16:12:01 EDT 2024


Everything seems to be working now for defining the initial density and
temperature distribution!

But now I was just thinking that an initial velocity distribution could be
interesting as well.  It doesn't look like LaserSlab has any implementation
for an initial velocity.  Is there a straightforward way to do this?

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

> 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.
>
> On Thu, Jul 18, 2024 at 11:03 AM Lee Ellison <lee at pacificfusion.com>
> wrote:
>
>> 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
>> <https://urldefense.com/v3/__https://flash.rochester.edu/site/flashcode/user_support/flash_ug_devel.pdf__;!!Mih3wA!FORwe9VDPaoEz8MGBTWSv7pGIK9_U8Da-0mYGjEeceCCCDM9XcAx29tbIQUWlOLus0rvPUYzJbcYZte0$>
>>
>> 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/faeb6bd1/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/faeb6bd1/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/faeb6bd1/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/faeb6bd1/attachment-0005.png>


More information about the flash-users mailing list