<div dir="auto"><div dir="auto">Hello Dean, <div dir="auto"><br></div><div dir="auto">Thank you very much for your response !</div><div dir="auto"><br></div><div dir="auto">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 ?</div><div dir="auto"><br></div><div dir="auto">Best, </div><div dir="auto"><br></div><div dir="auto">Antoine</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 29 janv. 2021 à 02:21, Dean Townsley <<a href="mailto:Dean.M.Townsley@ua.edu" rel="noreferrer noreferrer" target="_blank">Dean.M.Townsley@ua.edu</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Antoine,<br>
<br>
Flash is "operator split" between hydrodynamics and energy deposition. <br>
Flash applies these two operators consecutively to make up a full update <br>
of the state of the fluid. Meaning that the current state is modified <br>
by a hydrodynamics operator and then by the energy deposition operator. <br>
Once the hydrodynamics operation is complete, the state of the fluid at <br>
the beginning of the operation (your EINT^n) is no longer available.<br>
<br>
So it would be something like<br>
<br>
EINT^n+1/2 = EINT^n + hydrochange<br>
<br>
EINT^n+1 = EINT^n+1/2 + energydeposition<br>
<br>
(also note that there are two energy variables in flash, with ENER, <br>
which include kinetic energy, being the main one.)<br>
<br>
The shortcomings of this strategy and when they may or may not be a <br>
concern is a whole can of worms, but hopefully this at least helps you <br>
understand how flash does this.<br>
<br>
Dean<br>
<br>
<br>
<br>
On 1/27/21 7:20 AM, Antoine Gintrand wrote:<br>
> Dear flash users,<br>
><br>
> I have a question regarding the data during a hydrodynamic time step.<br>
><br>
> I need to modify the update of the data (density , pressure , velocity <br>
> ...) in some specific<br>
> cells inside the simulation domain.<br>
><br>
> For the specific cells I need to do modify the update of the solution <br>
> at the end of the hydro time step Dt^n = t^n+1 - t^n<br>
><br>
> When the time step is over I will do<br>
><br>
> EINT^n+1 = EINT^n + cte*Dt^n (1)<br>
><br>
> where EINT^n is the internal energy at time t^n<br>
><br>
> so for those specific cells the update of the solution is not given by <br>
> the hydro step<br>
> but by this equation (1). However I need the result of this hydro step <br>
> in that cell to compute the constant cte.<br>
><br>
> The question is how do I call the data in my new physic module before <br>
> and after the update.<br>
><br>
> For example I think that I could get the data after the time step by <br>
> doing something like<br>
><br>
> use Grid_interface, ONLY : Grid_getBlkPtr, Grid_getBlkIndexLimits<br>
><br>
> implicit none<br>
><br>
> integer,intent(IN) :: blockCount<br>
> integer,dimension(blockCount), intent(IN) :: blockList<br>
> real,intent(IN) :: dt, time<br>
><br>
> real,pointer,dimension(:,:,:,:) :: solnData<br>
> integer, dimension(2,MDIM) :: blkLimits, blkLimitsGC<br>
><br>
> do lb = 1, blockCount<br>
><br>
> blockID=blockList(lb)<br>
> call Grid_getBlkPtr(blockID,solnData)<br>
> call Grid_getBlkIndexLimits(blockID,blkLimits,blkLimitsGC)<br>
> do k = blkLimits(LOW,KAXIS), blkLimits(HIGH,KAXIS)<br>
> do j = blkLimits(LOW,JAXIS), blkLimits(HIGH,JAXIS)<br>
> do i = blkLimits(LOW,IAXIS), blkLimits(HIGH,IAXIS)<br>
><br>
> EINT^n+1 = solnData(EINT_VAR,i,j,k)<br>
><br>
> ....<br>
><br>
> but what about EINT^n (the internal energy before the update) ???<br>
><br>
> Thank you very much for any help on this !<br>
><br>
> Best regards,<br>
><br>
> Antoine.<br>
><br>
><br>
><br>
><br>
><br>
</blockquote></div></div>