[FLASH-USERS] energy inaccuracy in Sedov simulation
Slavin, Jonathan
jslavin at cfa.harvard.edu
Fri Dec 1 12:01:51 EST 2017
Hi Klaus,
I've decided to give this another go, especially because since the time of
this email exchange I have altered IO_writeIntegralQuantities and
Simulation_adjustEvolution successfully so I have a better idea how it
should work.
I have now tried it and it sort of works. That is, I can calculate the
total explosion energy, which in my case is just the thermal energy above
the ambient thermal energy, and a correction factor. The correction factor
should be multiplied by the pressure (or internal energy) of the parcels
that have a pressure above the ambient pressure. However, when I do that
it seems like nothing is changed when it returns. I print out the
correction factor and it seems right. It's odd because I have previously
been able to use Simulation_adjustEvolution to set off a new explosion.
Would you be interested in taking a look at the code? It's pretty simple
and maybe you could see the problem quickly.
Jon
On Mon, Aug 15, 2016 at 5:14 PM, Klaus Weide <klaus at flash.uchicago.edu>
wrote:
> On Wed, 27 Jul 2016, Slavin, Jonathan wrote:
>
> > An alternative approach that I thought of that could be applied to the
> > thermal energy only case is to, after all blocks have been initialized,
> 1)
> > total up the thermal energy, 2) calculate the ratio
> sim_expEnergy/E_total
> > and 3) adjust the pressure in all the zones in which the pressure is
> above
> > the ambient pressure by multiplying by that factor.
> >
> > While I think I could write the code to calculate the ratio and apply
> it, I
> > don't fully understand the structure of FLASH, so I'm not sure where it
> > would need to be called from. One advantage to this approach is that one
> > is pretty much guaranteed that the explosion energy will be what is
> desired.
>
> You would need to introduce an additional global loop over all blocks
> to do this - or actually, two: a first one for accumulating the current
> energy values from all cells of all (leaf) blocks, and a second one for
> rescaling them.
>
> This should be done logically at the end of Driver_initFlash, or the
> beginning of Driver_evolveFlash. A convenient place to put something like
> this could be your own implementation of Simulation_adjustEvolution; the
> call already exists in Driver_evolveFlash.F90. You'd have to make
> sure you do the rescaling only in the very first call, for example, by
> checking the nstep argument.
>
> Klaus
>
--
________________________________________________________
Jonathan D. Slavin Harvard-Smithsonian CfA
jslavin at cfa.harvard.edu 60 Garden Street, MS 83
phone: (617) 496-7981 Cambridge, MA 02138-1516
cell: (781) 363-0035 USA
________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20171201/1925a081/attachment.htm>
More information about the flash-users
mailing list