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

Dean Townsley Dean.M.Townsley at ua.edu
Thu Jan 28 20:21:33 EST 2021


Hi Antoine,

Flash is "operator split" between hydrodynamics and energy deposition.  
Flash applies these two operators consecutively to make up a full update 
of the state of the fluid.  Meaning that the current state is modified 
by a hydrodynamics operator and then by the energy deposition operator.  
Once the hydrodynamics operation is complete, the state of the fluid at 
the beginning of the operation (your EINT^n) is no longer available.

So it would be something like

EINT^n+1/2 = EINT^n + hydrochange

EINT^n+1 = EINT^n+1/2 + energydeposition

(also note that there are two energy variables in flash, with ENER, 
which include kinetic energy, being the main one.)

The shortcomings of this strategy and when they may or may not be a 
concern is a whole can of worms, but hopefully this at least helps you 
understand how flash does this.

Dean



On 1/27/21 7:20 AM, Antoine Gintrand wrote:
> 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.
>
>
>
>
>



More information about the flash-users mailing list