Search Site | Contact Details | FAQ

ADAS Subroutine v2bnmod

       SUBROUTINE V2BNMOD(IPOSNT , JDENS  , JTE    , NREP   , F1     ,
     &                    F2     , F3     , BNCALC , BNACT  , XPOP   , 
     &                    IMAX   , DENSH  , DENS   , DENSP  , TE     ,
     &                    TP     , BMENER , FLUX   , DEXPTE , ALFA   ,
     &                    S      , DSLPATH, NIMP   , ZIMPA  , ZEFF   ,
     &                    DNIMPA)

       IMPLICIT REAL*8 (A-H,O-Z)

C-----------------------------------------------------------------------
C
C  ****************** FORTRAN77 SUBROUTINE: V2BNMOD ********************
C
C  VERSION:  (ADAS91) - SEE SC CS COMMENTS FOR VERSION NO.
C
C  PURPOSE:  THIS CODE PERFORMS THE ACTUAL CALCULATIONS FOR ADAS 310
C            IT IS IN AN INCOMPLETE VERSION AND THESE COMMENTS DO NOT
C            YET FOLLOW THE STANDARD ADAS PATTERN.
C-----------------------------------------------------------------------
C      CALCULATION OF BN -1 CASE A,B
C
C      EXCIT. XSECT. OPTIONS:
C      ----------------------
C                     (A) VAN REGEMORTER    - ELECTRONS
C                     (B) IMPACT PARAMETER  - ELECTRONS
C                                             PROTONS
C                     (C) PERCIVAL-RICHARDS - ELECTRONS
C                                           - PROTONS & ZIMP IONS
C                     (D) VAINSHTEIN        - PROTONS & ZIMP IONS
C                     (E) SPECIAL LOW LEVEL - ELECTRONS
C                                           - PROTONS & ZIMP IONS
C      IONIS. XSECT. OPTIONS:
C      ----------------------
C                     (A) ECIP              - ELECTRONS
C                     (B) PERCIVAL-RICHARDS - PROTONS & ZIMP IONS
C                     (C) SPECIAL LOW LEVEL - ELECTRONS
C                                           - PROTONS & ZIMP IONS
C      CX RECOM. XSECT. OPTIONS:
C      -------------------------
C                     (A) SPECIAL           - H(1S) DONOR
C
C
C  NOTES
C  -----
C      (A) SPECIAL LOW LEVEL DATA ACCESSED BY SPECIFIC ION ROUTINE
C
C          ION   ROUTINE    ACCESSED FILE              ACQUIS. ROUTINE
C          ---   -------    -------------              ---------------
C           H0    NSUPH1    IONATOM.DATA(H)                 QH
C                           HLIKE.DATA(AGG1984)              -
C
C
C      (B) SPECIAL CHARGE EXCHANGE DATA FROM  CHEXDATA.DATA
C
C          ION    DONOR     ROUTINE    DATA MEMBER     ACQUIS. ROUTINE
C          ---    -----     -------    -----------     ---------------
C           H0    H(1S)     BNQCTB       H1NEW1            BNQCTB
C
C
C
C
C  INPUT
C      IPOSNT   = 0  BYPASS
C               = 1  LEAVE W1.NE.0 AND FORCE DENSH.EQ.0
C               = 2  FORCE W1.EQ.0 AND FORCE DENSH.EQ.0
C               = 3  LEAVE W1.NE.0 AND LEAVE DENSH.NE.0
C               = 4  FORCE W1.EQ.0 AND LEAVE DENSH.NE.0
C               = 5  BYPASS
C      JDENS    = DENSITY     SELECTOR
C      JTE      = TEMPERATURE SELECTOR
C      NREP(I)  = PRINCIPAL QUANTUM NUMBER OF ITH REPRESENTATIVE LEVEL
C      XPOP(I)  = POPULATIONS OF REPRESENTATIVE LEVELS
C      IMAX     = NUMBER OF REPRESENTATIVE LEVELS
C      DENSH    = NEUTRAL HYDROGEN DENSITY IN BEAM  (CM-3)
C      DENS     = ELECTRON DENSITY  (CM-3)
C      DENSP    = PROTON/DEUTERON DENSITY  (CM-3)
C      TE       = ELECTRON TEMPERATURE (K)
C      TP       = PROTON/DEUTERON TEMPERATURE (K)   (SAME FOR ZIMP IONS)
C      BMENER   = NEUTRAL BEAM PARTICLE ENERGY  (EV/AMU)
C      FLUX     = NEUTRAL BEAM FLUX  (CM-2 SEC-1)
C      DEXPTE(I)= EXP(ATE/NREP(I)**2) FOR ITHE REPRESENTATIVE LEVEL
C      DSLPATH  = STRING CONTAINING PATH TO THE REQUIRED INPUT FILES
C                 CALLED BY NSUPH1.FOR
C
C  OUTPUT
C      F1       =
C      F2       =
C      F3       =
C      BNCALC   =
C      BNACT    =
C      ALPHA    =
C      S        =
C
C  INPUT SPECIFICATION FOR STREAM 51 DATA FILE
C
C      NUCCHG = NUCLEAR CHARGE
C      EXMEMB = DATA SET NAME OF EXPANSION FILE USED BY CLDLBN2
C      CXMEMB = DATA SET NAME FOR CHARGE EXCHANGE DATA TO BE USED BY
C               BNQCTB
C      IBLOCK = SUB-BLOCK SELECTOR FOR CXMEMB
C
C      JDENSM = NUMBER OF DENSITIES
C      JTEM   = NUMBER OF TEMPERATURES
C      TS     = EXTERNAL RADIATION FIELD TEMPERATURE (K)
C      W      = EXTERNAL RADIATION FIELD DILUTION FACTOR (HIGH LEVELS)
C      Z      = RECOMBINING ION CHARGE  (Z1 IN USUAL NOTATION)
C      CION   = MULTIPLIER OF GROUND LEVEL ELECTRON IMPACT IONISATION
C               RATE COEFFICIENT
C      CPY    = MULTIPIER ON ELECTRON IMPACT EXCITATION RATE COEFFICIENT
C               FORM THE GROUND LEVEL
C      W1     = EXTERNAL RADIATION FIELD DILUTION FACTOR FOR PHOTO-IONI
C               SATION FORM THE GROUND LEVEL.
C
C      NIP    = RANGE OF DELTA N FOR IMPACT PARAMETER XSECTS. (LE.4)
C      INTD   = ORDER OF MAXWELL QUADRATURE FOR XSECTS. (LE.3)
C      IPRS   = 0   DEFAULT TO VAN REGEMORTER XSECTS. BEYOND NIP RANGE
C               1   USE PERCIVAL-RICHARDS XSECTS.     BEYOND NIP RANGE
C      ILOW   = 0   NO SPECIAL LOW LEVEL DATA ACCESSED
C               1      SPECIAL LOW LEVEL DATA ACCESSED
C      IONIP  = 0   NO ION IMPACT COLLISIONS INCLUDED
C               1      ION IMPACT EXCITATION AND IONISATION INCLUDED
C      NIONIP = RANGE OF DELTA N FOR ION IMPACT EXCITATION XSECTS.
C      ILPRS  = 0   DEFAULT TO VAINSHTEIN XSECTS.
C               1   USE LODGE-PERCIVAL-RICHARDS XSECTS.
C      IVDISP = 0   ION IMPACT AT THERMAL MAXWELLIAN ENERGIES
C               1   ION IMPACT AT DISPLACED THERMAL ENERGIES ACCORDING
C                   TO THE NEUTRAL BEAM ENERGY PARAMETER
C                   *   IF(IVDISP=0 THEN SPECIAL LOW LEVEL DATA FOR ION
C                       IMPACT IS NOT SUBSTITUTED - ONLY VAINSHTEIN AND
C                       LODGE ET AL. OPTIONS ARE OPEN.  ELECTRON IMPACT
C                       DATA SUBSTITUTION DOES OCCUR.
C      1   = PLASMA Z EFFECTIVE
C      NOSCAN = 0   EXECUTE SCANNING VERSION OF CODE
C               1   EXECUTE SIMULTANEOUS IMPURITY NO SCAN RUN
C      NIMP   = NUMBER OF IMPURITIES (EXCL.H+) IN NO SCAN CASE
C  ROUTINES:
C          ROUTINE    SOURCE    BRIEF DESCRIPTION
C          -------------------------------------------------------------
C          MATINV     ADAS      MATRIX INVERSION WITH ACCOMPANYING 
C                               SOLUTION OF LINEAR EQUATIONS
C          DIEL_310    ????      
C
C
C
C  ********* H.P.SUMMERS, JET               11 APR 1990  ***************
C  *********                           ALT. 17 JUL 1991  SUB. RQINEW,
C                                                        RQLNEW, RQVNEW
C  *********                           ALT. 10 JAN 1994  ALLOW MULTIPLE
C                                                        SIMULT.IMPURITY
C-----------------------------------------------------------------------
C
C-----------------------------------------------------------------------
C
C UPDATE:  19/01/94 - JONATHAN NASH - TESSELLA SUPPORT SERVICES PLC
C
C          THE FOLLOWING MODIFICATIONS HAVE BEEN MADE TO THE SUBROUTINE:
C
C          1) THE INPUT FILE UNIT NUMBER HAS BEEN CHANGED FROM 5 TO 51.
C
C          2) THE SIZES OF 'EXMEMB' AND 'CXMEMB' HAVE BEEN INCREASED
C             AS THEY NOW CONTAIN THE FULL DATA SET NAMES RATHER THAN
C             JUST THE MEMBER NAMES.
C
C          3) A PARAMETER FLAG HAS BEEN ADDED TO SWITCH ON/OFF
C             DIAGNOSTIC PRINTING (UNIT 6).
C
C  NOTES:  NO ATTEMPT HAS BEEN MADE TO RESTRUCTURE THE ROUTINE. RATHER
C          THE MINIMUM AMOUNT OF WORK TO INTEGRATE THE ROUTINE INTO
C          ADAS310 HAS BEEN COMPLETED.
C
C UNIX-IDL PORT:
C
C VERSION: 1.1                          DATE: 12-12-95
C MODIFIED: TIM HAMMOND (TESSELLA SUPPORT SERVICES PLC)
C               - FIRST VERSION
C               - REPLACED ALL HOLLERITH CONSTANTS H0 ANF H1 WITH 
C                 H<SPACE>
C               - REPLACED HOLLERITH CONSTANTS WITH STANDARD STRINGS
C                 IN FORMAT STATEMENTS 117, 128 AND 129.
C               - TIDIED UP PARTS OF THE COMMENTS AND CODE
C               - ADDED STRING DSLPATH TO BE USED TO CONSTRUCT UNIX
C                 STYLE FILENAMES IN NSUPH1.FOR
C
C VERSION: 1.2                          DATE: 24-01-96
C MODIFIED: TIM HAMMOND (TESSELLA SUPPORT SERVICES PLC)
C               - ADDED NBENG TO INPUT LIST AND CALL TO BNQCTB
C
C VERSION: 1.3                          DATE: 24-01-96
C MODIFIED: TIM HAMMOND (TESSELLA SUPPORT SERVICES PLC)
C               - REVERSED ABOVE CHANGE
C
C VERSION: 1.4                          DATE: 27-09-96
C MODIFIED: WILLIAM OSBORN + HUGH SUMMERS
C               - REMOVED MISTAKEN TEST FOR 1.LE.0.0D0 IN
C                 THE CASE OF MULTIPLE IMPURITIES.
C VERSION: 1.5
C MODIFIED: HARVEY ANDERSON
C               - IMPROVED THE HANDLING OF MULTIPLE IMPURITIES TO
C                 INCLUDE HYDROGEN.
C               - ALTERED THE CALLING STRUCTURE OF THIS ROUTINE TO
C                 ALLOW ADDITIONAL VARIABLES TO BE PASSED TO RUN310.
C               - INCREASED THE SIZE OF THE ARRAYS DENSA, DENPA, TEA
C                 AND TPA FROM 10 TO 25.
C
C VERSION : 1.6                                                  
C DATE    : 04-04-2000
C MODIFIED: RICHARD MARTIN
C               - CHANGED NAME OF DIEL SUBROUTINE TO DIEL_310
C
C VERSION : 1.7                                                  
C DATE    : 22-02-2005
C MODIFIED: Martin O'Mullane
C               - A real*8 parameter of cldlbn2 which was passed as an 
C                 integer (1) to cldlbn2 is changed to a double (1.0D0).
C               - Direct debug output stream to unit 0.
C               - Remove IBM error underflow and errset routines.
C
C VERSION : 1.8                                                  
C DATE    : 27-06-2007
C MODIFIED: Martin O'Mullane
C               - Add lpass as argument to cldlbn2. Set to .TRUE.
C
C-----------------------------------------------------------------------
      CHARACTER*80        DSLPATH
      INTEGER             IMAX,        IPOSNT,      JDENS,       JTE
      INTEGER             NIMP,        NREP(31)
      REAL*8              ALFA,        BMENER,      BNACT(30)
      REAL*8              BNCALC(30),  DENS,        DENSH,       DENSP
      REAL*8              DEXPTE(550), DNIMPA(10),  F1(30),      F2(30)
      REAL*8              F3(30),      FLUX,        S,           TE
      REAL*8              TP,          XPOP(2),     ZEFF
      REAL*8              ZIMPA(10)
© Copyright 1995-2024 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk