[FLASH-USERS] Best practice for referencing Abar, Zbar

Dean Townsley Dean.M.Townsley at ua.edu
Thu May 5 19:10:31 EDT 2011


Hi Aaron,

Just looking at your code snippets, it appears that the unsplit hydro 
module is not quite fully compliant with multispecies.  Presumably this 
is because it has been tested mostly with one species (="no species") 
and with the ye/sumy scalars.

The EOS modules that use the sumy/ye scalars are not in the public 
release, at least as of 3.3, though they are not complicated.  These are 
used when fluid properties such as abar and zbar are derived from some 
other dynamic value such as a reaction progress variable or something 
more general.  They can be used to represent fluid properties without 
resorting to a large number of species.

If you're interested in what this is used for, see:
http://adsabs.harvard.edu/abs/2009ApJ...701.1582T
particularly section 3 discussing the nuclear burning model.

On the error you are seeing:  you have to initialize the mass scalars on 
the grid, otherwise abar will be infinity.

Cheers,

Dean

Aaron Froese wrote:
> Hi all,
>
> A method for calling the local ion mass and charge averaged over all species is listed in the manual.
>
> --------------
> #include "Flash.h"
> #include "Multispecies.h"
> USE Multispecies_interface, ONLY: Multispecies_getSumInv, Multispecies_getSumFrac
>
> call Multispecies_getSumInv(A,abar_inv)
> abar = 1.e0 / abar_inv
> call Multispecies_getSumFrac(Z,zbar)
> zbar = abar * zbar
> --------------
>
> However, hy_uhd_getFaceFlux.F90 contains the following code which does not include the Multispecies header file.
>
> --------------
> #ifdef YE_MSCALAR
>               eosData(EOS_ABAR)=1./U(SUMY_MSCALAR,i-1,j,k)
>               eosData(EOS_ZBAR)=U(YE_MSCALAR,i-1,j,k)/U(SUMY_MSCALAR,i-1,j,k)
> #endif
> --------------
>
> It obviously relies on the ion and electron densities per unit mass SUMY and YE being included as mass scalars in the Config file.
>
> --------------
> MASS_SCALAR YE    EOSMAPIN: YE
> MASS_SCALAR SUMY  EOSMAPIN: SUMY
> --------------
>
> However, when I run a test with one specie of A=1 and Z=1, the latter code gives me Abar=Inf and Zbar=NaN.  Does using mass scalars confer any advantage over using the Multispecies subroutines?  If so, does anyone have an MHD example where the mass scalar approach is working properly?
>
> Thanks,
> Aaron
>
>   



More information about the flash-users mailing list