Ahmed-Naceur / dragon5

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

mixture density saving in LIB: #28

Closed Ahmed-Naceur closed 2 years ago

Ahmed-Naceur commented 2 years ago

It is possible to save the DENMIX (g/cm3) is LIB while modifying

CALL LIBMIX(IPLIB,NBMIX,NGRO,NBISO,ISONAM,ISOMIX,DENISO,MASK,
     >   MASKL,ITSTMP,TMPDAY)

with

CALL LIBMIX(IPLIB,NBMIX,DENMIX ...

and then modify LIBMIX, LIBDEN.

This imply a subsequent need to modify all other routines calling LIBMIX.

So I came to the conclusion that it is better to re-construct DENMIX based on DENISO in LIBDEN.

Ahmed-Naceur commented 2 years ago

LIBCON.f could be used for this purpose with IN=2

*DECK LIBCON
      SUBROUTINE LIBCON(IPLIB,IMX,NBISO,ISOMIX,DENISO,DENMIX,IN)
*
*-----------------------------------------------------------------------
*
*Purpose:
* Convert weight percent to atomic density.
*Parameters: input
* IPLIB   pointer to the internal library.
* IMX     mixture index to process.
* NBISO   number of isotopes present in the calculation domain.
* ISOMIX  mix number of each isotope.
* IN      type of conversion:
*         =1 conversion of wgt% to nb atoms with denmix;
*         =2 conversion of nb atoms to wgt% and denmix.
* 
*Parameters: input/output
* DENISO  number density (if IN=1) or weight percent (if IN=2) for
*         isotopes present in mixture IMX on input. On optput,
*         number density.
* DENMIX  mixture density g*cm**(-3) (if IN=2).
Ahmed-Naceur commented 2 years ago

Voxel densities in g/cm3 are now saved in the embedded MACROLIB for subsequent use by the HEAT or DOSE module. The modification:

*----
*   CALCULATE AND SAVE MIXTURES DENSITIES
*----  
      !AHMED
      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)