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

zuhone at flash.uchicago.edu zuhone at flash.uchicago.edu
Tue Jan 15 14:50:35 EST 2008


Dan,


     I think that you are correct, it should be the one-half the density
difference. In wr_integrals the "reference_density" parameter would
be included by adding the following line to wr_integrals.F90:

call get_parm_from_context('reference_density', reference_density)

and by making sure you have the real variable reference_density defined
somewhere. I recommend putting your own copy of wr_integrals.F90 into your
setup directory and doing this.

     The Jeans problem will be included with FLASH 3.0.

Best,

John ZuHone

> 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