Search Site | Contact Details | FAQ

ADAS Subroutine cxsqef

      subroutine cxsqef( iunit  , dsname , ibsel  ,
     &                   nqeff  , epro   , ttar   ,
     &                   em1    , em2    , iord   ,
     &                   ti     , densi  , zeff   , bmag   ,
     &                   nener  , ener   , qener  ,
     &                   csymb  , czion  , cwavel , cdonor , crecvr  ,
     &                   ctrans , cfile  , ctype  , cindm  ,
     &                   qeff   , ircode
     &                 )
C-----------------------------------------------------------------------
C
C ********************* FORTRAN77 SUBROUTINE : CXSQEF ******************
C
C  PURPOSE:  Subroutine to evaluate Maxwell averaged effective rate
C            coefficients for charge exchange/Stark studies.
C
C            The source data is effective coefficients in the
C            collisional/radiative sense or effective emission
C            coefficients for photon emission but before averaging
C            over ion/atom speed distribution functions.
C
C            The function also returns the raw eff. coefft. data for
C            verification and graphing purposes.
C
C            The effective rate coefficient appropriate to one of
C            the particles being in a monoenergetic beam and the other
C            belonging to a Maxwell distribution may be returned.
C            The target and projectile roles may be reversed. Arbitrary
C            relative speeds are allowed.
C
C  SUBROUTINE:
C
C  input : (i*4) iunit   = unit number on which ionatom file is opened
C  input : (c)   dsname  = full name of data set to be opened and read
C  input : (i*4) ibsel   = selector for particular rate coefft.
C
C  input : (i*4) nqeff   = number of rates to be evaluated (when ttar>0)
C                          a 1d array of plasma/beam conditions are
C                          evaluated to give a vector of rates. at
C                          the moment, epro, ttar, ti, densi, zeff &
C                          bmag are allowed to vary along the vector.
C  input : (r*8) epro    = incident particle energy (ev/amu)
C  input : (r*8) ttar    = maxwell temperature of target particles (ev)
C                          if (ttar.le.0) then rates for t=0 are
C                          returned
C  input : (r*8) em1     = atomic mass number of first particle
C  input : (r*8) em2     = atomic mass number of second particle
C  input : (i*4) iord    = 1 for 1st particle incident and monoenergetic
C                        = 2 for 2nd particle incident and monoenergetic
C  input : (r*8) ti      = plasma ion temperature (ev)
C  input : (r*8) densi   = plasma ion density (cm-3)
C  input : (r*8) zeff    = plasma z effective
C  input : (r*8) bmag    = plasma magnetic field (tesla)
C
C  output: (r*8) qeff    = rate coefficient (cm3 sec-1)
C  output: (i*4) nener   = number of source data values
C  output: (r*8) ener(i) = set of energies (ev/amu) for
C                          selected source data
C  output: (r*8) qener(i)= rate coeffts.(cm**3 sec-1) for
C                          selected source data
C  output: (c*2) csymb   = element symbol
C  output: (c*3) czion   = emitting ion charge
C  output: (c*8) cwavel  = wavelength (A)
C  output: (c*6) cdonor  = donor neutral atom
C  output: (c*5) crecvr  = receiver nucleus
C  output: (c*7) ctrans  = transition
C  output: (c*10)cfile   = specific ion file source
C  output: (c*2) ctype   = type of emissivity
C  output: (c*3) cindm   = emissivity index
C  output: (i*4) ircode  = return code from subroutine:
C                          0 => normal completion - no error detected
C                          1 => error opening requested data set
C                               exist - data set not connected
C                          3 => the selected data-block 'ibsel' is out
C                               of range or does not exist.
C
C
C  ROUTINES:
C           ROUTINE    SOURCE    BRIEF DESCRIPTION
C           ------------------------------------------------------------
C           xxdata_12   ADAS     reads values from 'ionatom' dataset
C           c3corr      ADAS     calculates scaled plasma parameter
C           c3alrs      ADAS     calculates rate coefficient
C
C  AUTHOR:  C. J. WHITEHEAD,  UNIVERSITY OF STRATHCLYDE
C
C  DATE:    25/11/94
C
C  UPDATE:  19/12/94  HP SUMMERS - TIDIED UP FORMATTING
C           03/01/95  HP SUMMERS - CORRECTED THERMAL AVERAGED RATE
C                                  COEFFICIENT BY INTRODUCING OAA ARRAY
C
C  UPDATE:  11/01/95  PE BRIDEN  - CHANGED DSNAME FROM C*30 TO C*44
C                                  TO AGREE WITH THAT IN C2FILE.
C                                - INITIALISE NBSEL AS ZERO.
C
C  UPDATE:  03/05/95  PE BRIDEN  - C3DATA CHANGED TO C3DATAO AS CURRENT
C                                  VERSION OF SQEF NEEDS TTO BE UPDATED
C                                  TO USE THE NEW VERSION OF C3DATA.
C
C  UPDATE:  15/05/95  Tim Hammond - UNIX PORT
C                                   Put under SCCS control
C----------------------------------------------------------------------
C
C  Copied from ...adas3xx/adas303/sqef.for, renamed and relocated as
C  ...adas3xx/adaslib/cxsqef.for.
C
C  VERSION  : 1.1                          
C  DATE     : 15-11-2002
C  MODIFIED : Lorne Horton
C               - First version
C               - Switched to ADAS-standard C3DATA.
C                 This is primarily a change to requiring the full 
C                 input file name as input.
C               - Increased NSTORE to 150 - consistent with ADAS303
C               - Added loop to allow multiple evaluations per call.
C                 This means changing from a function to a
C                 subroutine
C               - Removed IPASS. Routine now re-reads data sets only 
C                 when theinput name has changed.
C               - Added SAVE statement
C
C
C  VERSION  : 1.2                          
C  DATE     : 02-12-2004
C  MODIFIED : Martin O'Mullane
C               - Replace c3data with xxdata_12.
C               - Place into central ADAS.
C
C  VERSION  : 1.3                          
C  DATE     : 17-05-2007
C  MODIFIED : Allan Whiteford
C               - Updated comments as part of subroutine documentation
C                 procedure.
C
C  VERSION  : 1.4                          
C  DATE     : 05-06-2007
C  MODIFIED : Martin O'Mullane
C               - New version of xxdata_12 with extra outputs.
C
C----------------------------------------------------------------------
C----------------------------------------------------------------------
      CHARACTER*6         CDONOR
      CHARACTER*10        CFILE
      CHARACTER*3         CINDM
      CHARACTER*5         CRECVR
      CHARACTER*2         CSYMB
      CHARACTER*7         CTRANS
      CHARACTER*2         CTYPE
      CHARACTER*8         CWAVEL
      CHARACTER*2         CZION
      CHARACTER*132       DSNAME
      INTEGER             IBSEL,       IORD,        IRCODE,      IUNIT
      INTEGER             NENER,       NQEFF
      REAL*8              BMAG(NQEFF), DENSI(NQEFF),             EM1
      REAL*8              EM2,         ENER(MENER), EPRO(NQEFF)
      REAL*8              QEFF(NQEFF), QENER(MENER,NQEFF)
      REAL*8              TI(NQEFF),   TTAR(NQEFF), ZEFF(NQEFF)
© Copyright 1995-2024 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk