[FLASH-USERS] Multiphase MHD
Aaron Froese
aaron.froese at generalfusion.com
Thu Sep 29 21:21:29 EDT 2011
Hi all,
Has anyone successfully performed a multiphase simulation using FLASH? I have adjusted the pressure calculation in Eos.F90 to account for liquid and gas fractions, as follows:
iGas = specieStart + GAS_SPEC - SPECIES_BEGIN
iLiq = specieStart + LIQ_SPEC - SPECIES_BEGIN
gasDens = dens*massFrac(iGas)
liqDens = dens*massFrac(iLiq)
minLiquidDens = rho0*1.01 !arbitrary value slightly greater than unity
if( liqDens >= minLiquidDens ) then
pres = TaitPresFactor*((liqDens/rho0)**Tait_n - 1.)
else
if( massFrac(iLiq) < 1e-6 ) then
liqVolFrac = 0.
elseif( massFrac(iLiq) > 0.999999 ) then
liqVolFrac = 1.
else
liqVolFrac = liqDens/minLiquidDens
endif
pres = Rgas*gasDens*temp/(abar * (1.-liqVolFrac) )
endif
However, I am generating errors in which the mass fraction becomes 1 for each fluid.
get grid single cell coords 5 5 1 0.0000000000000000
Error: non-conservation in block, 1
Abundance non-conservation by 1.0000000000000000
x = -0.25796875000000002
y = 0.13203124999999999
z = -0.26000000000000001
density = 1.00000000000000004E-010
xnuc = 1.0000000000000000 1.0000000000000000
DRIVER_ABORT: Error too high in abundances
Hopefully someone else will have encountered a similar problem and have some tips. If I am demanding too much of FLASH, does anyone know of another shock-capturing MHD code that can handle liquid/gas interactions?
Thanks,
Aaron
More information about the flash-users
mailing list