[FLASH-USERS] how to use the data before updated by the hydro step

Antoine Gintrand antoine.gintrand at gmail.com
Wed Jan 27 08:20:38 EST 2021


Dear flash users,

I have a question regarding the data during a hydrodynamic time step.

I need to modify the update of the data (density , pressure , velocity ...)
in some specific
cells inside the simulation domain.

For the specific cells I need to do modify the update of the solution at
the end of the hydro time step Dt^n = t^n+1 - t^n

When the time step is over I will do

EINT^n+1 = EINT^n + cte*Dt^n     (1)

where EINT^n is the internal energy at time t^n

so for those specific cells the update of the solution is not given by the
hydro step
but by this equation (1). However I need the result of this hydro step in
that cell to compute the constant cte.

The question is how do I call the data in my new physic module before and
after the update.

For example I think that I could get the data after the time step by doing
something like

use Grid_interface, ONLY : Grid_getBlkPtr, Grid_getBlkIndexLimits

implicit none

  integer,intent(IN)  :: blockCount
  integer,dimension(blockCount), intent(IN) :: blockList
  real,intent(IN) :: dt, time

  real,pointer,dimension(:,:,:,:) :: solnData
  integer, dimension(2,MDIM) :: blkLimits, blkLimitsGC

do lb = 1, blockCount

     blockID=blockList(lb)
     call Grid_getBlkPtr(blockID,solnData)
     call Grid_getBlkIndexLimits(blockID,blkLimits,blkLimitsGC)
     do k = blkLimits(LOW,KAXIS), blkLimits(HIGH,KAXIS)
        do j = blkLimits(LOW,JAXIS), blkLimits(HIGH,JAXIS)
           do i = blkLimits(LOW,IAXIS), blkLimits(HIGH,IAXIS)

              EINT^n+1 =  solnData(EINT_VAR,i,j,k)

....

but what about EINT^n (the internal energy before the update) ???

Thank you very much for any help on this !

Best regards,

Antoine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20210127/13e5e620/attachment.htm>


More information about the flash-users mailing list