Ahmed-Naceur / dragon5

Three-Dimensional Discrete Ordinates Neutron, Photon, Electron and Positron Transport Code
7 stars 1 forks source link

clash between ESTOPW and DENMIXTURES #29

Closed Ahmed-Naceur closed 2 years ago

Ahmed-Naceur commented 2 years ago

Saving voxels' densities in MACROLIB (see #28) is now clashing with stopping powers saving. Seems modifying macroscopic stopping powers values.

Ahmed-Naceur commented 2 years ago

This issue is now resolved with DENMIXTURES recovering at the end of LIBEST.f. This is not the optimal way to do it since a non-coupled photons transport can lead to dose deposition while LIBEST.f is only called in charged particle transport mode.

Two ways of doing this implementation.

*----
*  RECOVER AD MIXTURES DENSITIES
*----
CALL LCMLEN(IPLIB,'DENMIXTURES',ILONG,ITYLCM) 
IF (ILONG.GT.0) THEN
   ALLOCATE(DENMIX(ILONG)) 
   CALL LCMGET(IPLIB,'DENMIXTURES',DENMIX)
   CALL LCMPUT(KPLIB,'DENMIXTURES',ILONG,ITYLCM,DENMIX)
ENDIF

or.

*----
*  RECOVER AD MIXTURES DENSITIES
*----
DO IBM=1,NBMIX
   CALL LIBCON(IPLIB,IBM,NBISO,MIX,DEN,DENMIXR,2)
   DENMIX(IBM)=DENMIXR !g/cm3
ENDDO
CALL LCMPUT(KPLIB,'DENMIXTURES',NBMIX,2,DENMIX)

These two methods lead to mixture density in g/cm3.