[FLASH-USERS] [EXT] how to modify hydro update ?

Ernesto Zurbriggen ezurbriggen at unc.edu.ar
Mon Sep 27 10:31:00 EDT 2021


Hi Antoine!

Taking into account this
>>The goal is to impose for a certain condition on the cell, that the
>>fluid cannot move during the hydro update at a given time step.
and this
>>I need to do during a hydro time step,
>>If the cell reaches a certain condition that depend on the hydro state
then
>>impose that the velocity is zero during computation of the fluxes during
this step (fluid is static)

and following Marissa's suggestion, I do not see why you may not do what
you want from the Simulation_adjustEvolution
routine. From there you can access all grid cells at any time step, and
force desired cells to have null speeds.
It may look like something like this:


  if (time > a .and. time < b) then

     do n=1,num_blocks
       blockId = blockList(n)

       call Grid_getBlkCenterCoords(blockId,blkCenterC)
       call Grid_getBlkPtr(blockId,S,CENTER)

       do k=blk(LOW,KAXIS),blk(HIGH,KAXIS)
         do j=blk(LOW,JAXIS),blk(HIGH,JAXIS)
           do i=blk(LOW,IAXIS),blk(HIGH,IAXIS)

             if (x > xa .and. x< xb)
               U(VELX_VAR,i,j,k) = 0.0
               U(VELY_VAR,i,j,k) = 0.0
               U(VELZ_VAR,i,j,k) = 0.0

               statement 1...
               statement 2...
             endif

           enddo
         enddo
       enddo

       call Grid_releaseBlkPtr(blockId,S)

     enddo

   endif

Would not it help something like this?


>>What I need is to look into the physics/hydro directory to modify the
computation of the fluxes.
This should be a much harder way. The path you should follow is

Flash.F90 --> Driver_evolveFlash.F90 --> Hydro.F90 --> hy_uhd_unsplit.F90
--> hy_uhd_getFaceFlux

Best!
Ernesto


El dom, 26 sept 2021 a las 14:53, Antoine Gintrand (<
antoine.gintrand at gmail.com>) escribió:

> Hi Marissa,
>
> Thank you very much  for the help,
>
> Unfortunately, this will not help because I need to do the modification
> during the simulation
> not impose something from the beginning that will not change during the
> simulation.
> So typically not in *Simulation_initBlock.F90.*
>
> What I need is to look into the physics/hydro directory to modify the
> computation of the fluxes.
>
> I need to do during a hydro time step,
>
> If the cell reaches a certain condition that depend on the hydro state
> then
>
> impose that the velocity is zero during computation of the fluxes during
> this step (fluid is static)
>
> If anyone has an idea on where to do this in the hydro part of the code it
> will help me a lot.
>
> All the best,
>
> Antoine
>
>
>
>
>
>
>
> Le dim. 26 sept. 2021 à 15:29, Marissa B. P. Adams <
> madams at pas.rochester.edu> a écrit :
>
>> Hi Antoine,
>>
>> Have you considered using a "mask"? Depending on the conditions, i.e. if
>> you want this to be the case for all time from the beginning, you can do
>> this in *Simulation_initBlock.F90*. It'd look something like this:
>>
>> call Grid_putPointData(blockId, CENTER, BDRY_VAR, EXTERIOR, axis, 1.0)
>>
>> See section 14.1.3.1. Implementation of Stationary Rigid Body in a
>> Simulation Domain for Unsplit Hydro Solver, in the user manual.
>>
>> I would also recommend using the routine *Simulation_adjustEvolution.F90*
>> for accessing things for each time step or advancement from the Driver.
>>
>> These are just my initial thoughts! I hope they can help.
>> Marissa
>>
>>
>> On Sun, Sep 26, 2021 at 5:20 AM Antoine Gintrand <
>> antoine.gintrand at gmail.com> wrote:
>>
>>> Dear Flash users,
>>>
>>> I need to modify the code for a "laser slab" type simulation.
>>>
>>> The goal is to impose for a certain condition on the cell, that the
>>> fluid cannot move during the hydro update at a given time step.
>>> The cell can only increase his internal energy (laser, heat conduction
>>> ...) in this
>>> condition.
>>>
>>> Thus, I think that I probably need to specify in the hydro part of the
>>> source code that the velocity should be zero during the computation of the
>>> fluxes.
>>>
>>> The problem is that I do not know which file I should modify to impose
>>> that
>>> during the update of the hydro step.
>>>
>>> Any suggestion would be highly appreciated,
>>>
>>> thank you for your help,
>>>
>>> All the best,
>>>
>>> Antoine
>>>
>>
>>
>> --
>> %---------------------------------------------%
>> Marissa B. P. Adams
>> (she/her/hers)
>> Phd Candidate, University of Rochester
>> *E-mail:* madams at pas.rochester.edu
>> *Website:* https://www.pas.rochester.edu/~madams
>> <http://www.pas.rochester.edu/~madams#>
>> *Current Location:*
>> Occupied Seneca Land
>> 471 Bausch and Lomb Hall
>> University of Rochester
>> Rochester, NY 14627
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20210927/7098bdf0/attachment.htm>


More information about the flash-users mailing list