Closed Ahmed-Naceur closed 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).
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)
It is possible to save the DENMIX (g/cm3) is LIB while modifying
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.