[FLASH-USERS] energy inaccuracy in Sedov simulation

Klaus Weide klaus at flash.uchicago.edu
Mon Aug 15 17:14:32 EDT 2016


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



More information about the flash-users mailing list