[FLASH-USERS] Total energy in periodic self-gravitating fluids

Daniel Pfenniger Daniel.Pfenniger at obs.unige.ch
Tue Jan 15 14:22:41 EST 2008


Hello,

I am playing with the Jeans problem as given in Flash 2.5 in 3D by
using a slightly lower initial pressure in order to explore a
mildly unstable regime.

Obviously the total energy as outputted in the file flash.dat
is not the total energy, but the kinetic plus thermal energy.
But adding the potential energy does not give a conserved
quantity, even in the slightly inhomogeneous regime.

I suspect a miscalculation of the potential energy in
the periodic case because in the file io/wr_integrals.F90
the total gravitational contribution is calculated as
--------------------

! po! potential energy
                   if (igpot >= 0) &
      &                 lsum(8) = lsum(8) + 0.5*solnData(idens,i,j,k) * &
      &                                  solnData(igpot,i,j,k)*dvol

--------------------

while I would expect to see the potential solnData(igpot,i,j,k)
not multiplied by half the density 0.5*solnData(idens,i,j,k),
but by half the density difference with respect to the average
density.
In the input file flash.par the reference density is given
but I am not sure how to pass this quantity properly in
wr_integrals.F90.

Will the Jeans problem be included in FLASH 3.0?


Thanks for any tips,

	Dan




More information about the flash-users mailing list