ADAS Subroutine d6mpop
SUBROUTINE D6MPOP( NTDIM , IZDIMD , IPDIMD , IMDIMD , & NSTAGE , ITMAX , NPRT , NMSUM , & ACDA , SCDA , CCDA , QCDA , XCDA , & DENS , DENSH , & FABUN0 , & ITEM , TIMEF , & POPE , POPF , PINTE , PINTF & ) C C----------------------------------------------------------------------- C C ****************** FORTRAN 77 SUBROUTINE: D6MPOP ******************** C C PURPOSE: CALCULATION OF METASTABLE RESOLVED IONISATION STAGE C POPULATIONS OF A PARTICULAR ELEMENT FOR A GIVEN TEMPERATURE C AND DENSITY C C CALLING PROGRAM: ADAS405 C C SUBROUTINE: C C C INPUT :(I*4) NTDIM = MAXIMUM NUMBER OF MODEL TEMPS/DENSITIES C INPUT :(I*4) IZDIMD = MAXIMUM NUMBER OF STAGES-1 C INPUT :(I*4) IPDIMD = MAXIMUM SIZE OF METASTABLES FRO A STAGE C INPUT :(I*4) IMDIMD = MAXIMUM NUMBER OF POPULATIONS C INPUT :(I*4) NSTAGE = NUMBER OF STAGES-1 C INPUT :(I*4) ITMAX = NUMBER OF MODEL TEMPS/DENSITIES C INPUT :(R*8) NPRT( ) = PARTITION OF TOTAL METASTABLES ACCORDING C TO IONISATION STAGES C 1ST DIM: STAGE INDEX C INPUT :(I*4) NMSUM = TOTAL NUMBER OF POPULATIONS C INPUT :(R*8) ACDA(,,,) = GENERALISED CR RECOMBINATION COEFFICIENT C 1ST DIM: TEMPERATURE INDEX C 2ND DIM: STAGE INDEX (LESS 1) C 3RD DIM: METASTABLE INDEX C 4TH DIM: METASTABLE INDEX C INPUT :(R*8) SCDA(,,,) = GENERALISED CR IONISATION COEFFICIENT C 1ST DIM: TEMPERATURE INDEX C 2ND DIM: STAGE INDEX (LESS 1) C 3RD DIM: METASTABLE INDEX C 4TH DIM: METASTABLE INDEX C INPUT :(R*8) CCDA(,,,) = GENERALISED CR CHARGE EXCH. COEFFICIENT C 1ST DIM: TEMPERATURE INDEX C 2ND DIM: STAGE INDEX (LESS 1) C 3RD DIM: METASTABLE INDEX C 4TH DIM: METASTABLE INDEX C INPUT :(R*8) QCDA(,,,) = GENERALISED CR CROSS-COUPL. COEFFICIENT C 1ST DIM: TEMPERATURE INDEX C 2ND DIM: STAGE INDEX (LESS 1) C 3RD DIM: METASTABLE INDEX C 4TH DIM: METASTABLE INDEX C INPUT :(R*8) XCDA(,,,) = GENERALISED CR PARENT X-CP. COEFFICIENT C 1ST DIM: TEMPERATURE INDEX C 2ND DIM: STAGE INDEX (LESS 1) C 3RD DIM: METASTABLE INDEX C 4TH DIM: METASTABLE INDEX C INPUT :(R*8) DENS() = ELECTRON DENSITIES FOR MODEL C 1ST DIM: TEMPERATURE INDEX C INPUT :(R*8) DENSH() = NEUTRAL HYDROGEN DENSITIES FOR MODEL C 1ST DIM: TEMPERATURE INDEX C C INPUT :(R*8) FABUN0() = INITIAL POPULATION ABUNDANCES AT TIME = 0 C 1ST DIM: POPULATION INDEX C C INPUT :(I*4) ITEM = CURRENT TEMP/DENSITY INDEX C INPUT :(R*8) TIMEF = INTEGRATION TIME (SEC) C C OUTPUT:(R*8) POPE() = IONISATION BALANCE POPULATIONS C OUTPUT:(R*8) POPF() = POPULATIONS AT T = TIMEF C OUTPUT:(R*8) PINTE() = POPULATION EXCESS INTEGRAL TO T = INFIN. C OUTPUT:(R*8) PINTF() = POPULATION EXCESS INTEGRAL TO T = TIMEF C C (I*4) ISTATE = STAGE INDEX C (I*4) ITEM = GENERAL INDEX C (I*4) I = GENERAL INDEX C (I*4) J = GENERAL INDEX C (I*4) K = GENERAL INDEX C (R*8) FV1() = WORK ARRAY USED BY XXEIGN C (I*4) IV1() = WORK ARRAY USED BY XXEIGN C C ROUTINES: C ROUTINE SOURCE BRIEF DESCRIPTION C ---------------------------------------------------------- C D6MFLL ADAS FILL UP IONIS./RECOM. MATRIX C XXEIGN ADAS/NETLIB GENERAL MATRIX DIAGONALISATION C XXSIM ADAS/NETLIB SIMULTANEOUS EQUATION SOLUTION C C C AUTHOR: H. P. SUMMERS, JET C K1/1/57 C JET EXT. 4941 C C DATE: 27/06/94 C C UNIX-IDL PORT: C C AUTHOR: WILLIAM OSBORN (TESSELLA SUPPORT SERVICES PLC) C C DATE: 07/06/96 C C VERSION: 1.1 DATE:07/06/96 C MODIFIED: WILLIAM OSBORN C - FIRST VERSION C VERSION: 1.2 DATE:27/06/96 C MODIFIED: WILLIAM OSBORN C - REMOVED UNUSED VARIABLES C VERSION: 1.3 DATE:13/09/96 C MODIFIED: WILLIAM OSBORN C - CHANGED PARAMETERS OF XXSIM IN LINE WITH CHANGES FOR C NON-SQUARE MATRICES. C C VERSION: 1.4 DATE: 13/05/2004 C MODIFIED: Martin O'Mullane C - Increased NMDIM to 83 to accommodate lead. C C----------------------------------------------------------------------- INTEGER IMDIMD, IPDIMD, ITEM, ITMAX INTEGER IZDIMD, NMSUM, NPRT(IZDIMD) INTEGER NSTAGE, NTDIM REAL*8 ACDA(NTDIM,IZDIMD,IPDIMD,IPDIMD) REAL*8 CCDA(NTDIM,IZDIMD,IPDIMD,IPDIMD) REAL*8 DENS(NTDIM), DENSH(NTDIM) REAL*8 FABUN0(IMDIMD), PINTE(IMDIMD) REAL*8 PINTF(IMDIMD), POPE(IMDIMD) REAL*8 POPF(IMDIMD) REAL*8 QCDA(NTDIM,IZDIMD,IPDIMD,IPDIMD) REAL*8 SCDA(NTDIM,IZDIMD,IPDIMD,IPDIMD), TIMEF REAL*8 XCDA(NTDIM,IZDIMD,IPDIMD,IPDIMD)