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

Antoine Gintrand antoine.gintrand at gmail.com
Sat Jan 30 07:09:37 EST 2021


Hello Dean,

Thank you very much for your response !

Do you think there is a way to store the value of the energy Eint^n before
the hydro operation so I could use it at the end of the time step and where
to find it in the source code ?

Best,

Antoine

Le ven. 29 janv. 2021 à 02:21, Dean Townsley <Dean.M.Townsley at ua.edu> a
écrit :

> 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.
> >
> >
> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20210130/3738a843/attachment.htm>


More information about the flash-users mailing list