[FLASH-USERS] What data is stored in ENER_VAR in MHD simulations?

Dominik Derigs derigs at ph1.uni-koeln.de
Wed Oct 18 10:44:02 EDT 2017


Dear Ernesto,

Check the file source/IO/IOMain/IO_writeIntegralQuantities.F90:

Here you see that ENER does only contain the magnetic field energy if
the variable MAGP_VAR is defined.

#ifdef ENER_VAR
              lsum(5) = lsum(5) + solnData(ENER_VAR,i,j,k) * &
                   &                               
solnData(DENS_VAR,i,j,k)*dvol
#ifdef MAGP_VAR
              ! total plasma energy
!!$              lsum(5) = lsum(5) + (solnData(ENER_VAR,i,j,k) * &
!!$                   &    solnData(DENS_VAR,i,j,k) +
solnData(MAGP_VAR,i,j,k))*dvol

              lsum(5) = lsum(5) + solnData(MAGP_VAR,i,j,k)*dvol
#endif
#endif

should likely be replaced by something like

#ifdef ENER_VAR
              lsum(5) = lsum(5) + solnData(ENER_VAR,i,j,k) * &
                   &                               
solnData(DENS_VAR,i,j,k)*dvol
#ifdef MAGX_VAR
              lsum(5) = lsum(5) +
0.5*(solnData(MAGX_VAR,i,j,k)**2+solnData(MAGY_VAR,i,j,k)**2+solnData(MAGZ_VAR,i,j,k)**2)*dvol
#endif
#endif

as there is no need for MAGP_VAR here.

Best regards,
Dominik


On 18.10.2017 16:34, ERNESTO ZURBRIGGEN wrote:
> Hi everybody!
> I'm having a doubt about what data is stored in the UNK specific total
> energy ENER_VAR in MHD simulations. 
>
> The flash4.2.2 user's guide equation 14.22 says for the perfect-gas
> equation of state that
> ENER_VAR= 0.5*v + PRES/(DENS*(gamma-1)) + B**2/(2*DENS)
>
> But, the outputs seem to show that
> ENER_VAR= 0.5*v + PRES/(DENS*(gamma-1))
>
> So, I'm confused. Any idea?
>
>
> I'm using flash4.2.2 release in an ideal MHD simulation with 1T
> perfect-gas equation of state. 
>
>
> -- 
> /Ernesto Zurbriggen// /
> /
> /
> /Instituto de Astronomía Teórica y Experimental (IATE). /
> /Observatorio Astronómico de Córdoba (OAC), //Universidad Nacional de
> Córdoba //(UNC)//. /
> /Teléfono: +54 0351 4331064-5, interno 222. /
> /Laprida 854, Bº Observatorio (CP 5000), Córdoba, Argentina./

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20171018/e6353ac4/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20171018/e6353ac4/attachment.sig>


More information about the flash-users mailing list