[FLASH-USERS] Issue with Mass Fractions in LasersLab Simulation

封项晨 fenchylfeng at stu.pku.edu.cn
Wed Apr 23 08:46:39 EDT 2025


Dear Flash Users,
Hello! I am currently modifying LasersLab and have encountered an issue related to mass fractions. My simulation involves two materials, CHAM_SPEC and TARG_SPEC, with EOS tables "he-imx-005.cn4" and "polystyrene-imx-008.cn4" respectively.
To ensure a smooth variation of volume fractions across the interface, I made the following changes in the code "Simulation_initBlock.F90":
xshift = -sim_initA * cos(2*pi*ycent(j)/sim_lambda)
fracCham = erfc( (xcent(i)-xshift)*slopeCoe ) / 2
fracTarg = 1.0 - fracCham
rho = sim_rhoCham * fracCham + sim_rhoTarg * fracTarg
MfracCham = sim_rhoCham * fracCham / rho

call Grid_putPointData(blockId, CENTER, DENS_VAR, EXTERIOR, axis, rho)
call Grid_putPointData(blockID, CENTER, CHAM_SPEC, EXTERIOR, axis, MfracCham)
call Grid_putPointData(blockID, CENTER, TARG_SPEC, EXTERIOR, axis, 1.0 - MfracCham)


However, during execution, the simulation encountered the following error:
Newton-Raphson failed in multitemp, multitype Eos.F90
MODE_DENS_EI_ION
INPUTS:
mass density                 =                      NaN
ion specific internal energy =                      NaN

CURRENT ITERATION:
ion specific internal energy =                      NaN
ion temperature              =                      NaN
mass fractions:
  cham   1.000000000000000E+00
  targ   1.000000000000000E+00

 too many iterations, reached          50

  k    =            1           1           1
  temp =                        NaN
  dens =                        NaN
  pres =                        NaN
 DRIVER_ABORT: [Eos] Error: too many iterations in Newton-Raphson


What’s puzzling is that the mass fractions for both cham and targ appear to be 1.0 simultaneously. I used VisIt to examine the pseudocolor plots of cham and targ, and they show a smooth transition at the interface as expected. I also verified that cham + targ equals 1.0 across the domain.
I’m trying to understand what might be going wrong and how I should modify the code to resolve this. Any advice would be greatly appreciated.

Best regards,
 Xiangchen Feng




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20250423/69a3e87c/attachment-0001.htm>


More information about the flash-users mailing list