Search Site | Contact Details | FAQ

ADAS Subroutine cxbms

      SUBROUTINE CXBMS(DSNIN,NSITYP,IOUNIT,SIFRAC,UBMENG,UTDENS,
     &  	       UTTEMP,NREQ,MXREQS,BSTOT)

C-----------------------------------------------------------------------
C
C       ********** FORTRAN 77 SUBROUTINE: CXBMS **********
C
C	PURPOSE: TO ASSEMBLE COMPOSITE BEAM STOPPING OF EMISSION
C		 COEFFICIENTS USING THE LINEAR INTERPOLATION
C		 AND COMBINATION METHOD.
C
C
C	INPUT
C
C	(R*8)  UBMENG	: USER REQUESTED NEUTRAL BEAM ENERGIES
C			  UNITS: EV/AMU
C			  DIMENSION: NREQ
C	(R*8)  UTDENS	: USER REQUESTED TARGET DENSITIES
C			  UNITS: CM-3
C			  DIMENSION: NREQ
C	(R*8)  UTTEMP	: USER REQUESTED TARGET TEMPERATURES
C 			  UNITS: EV
C			  DIMENSION: NREQ
C	(R*8)  SIFRAC   : FRACTIONAL IMPURITY CONTENT.
C			  1ST DIMENSION: MXREQS
C                         2ND DIMENSION: NSITYP
C	(I*4)  NSITYP	: NUMBER OF PLASMA IMPURITY IONS.
C	(I*4)  NREQ	: NUMBER OF REQUESTED ENERGIES,
C		          DENSITIES AND TEMPERATURES. 
C	(I*4)  MXREQS   : SIZE OF FIRST DIMENSION OF SIFRAC
C
C	(I*4)  IOUNIT	: UNIT NUMBER EMPLOYED TO READ ADF21
C			  AND ADF22 TYPE FILES.
C
C	(CHR)  DSNIN()	: ARRAY CONTAINING NAME OF EACH FILE TO BE READ.
C                         DIMENSION: NSITYP
C
C
C       OUTPUT
C
C       (R*8)  BSTOT()  : TOTAL BEAM STOPPING COEFFICIENTS.
C                         DIMENSION: NREQ
C
C	GENERAL
C
C       (R*8)  BEREF()  : REFERENCE BEAM ENERGIES.
C                         UNITS: EV/AMU
C                         DIMENSION: MXIT
C       (R*8)  TDREF()  : REFERENCE TARGET DENSITIES.
C                         UNITS: CM-3
C                         DIMENSION: MXIT
C       (R*8)  TTREF()  : REFERENCE TARGET TEMPERATURES.
C                         UNITS: EV
C                         DIMENSION: MXIT
C       (R*8)  SVREF()  : STOPPING COEFFT. AT REFERENCE BEAM ENERGY,
C                         TARGET DENSITY AND TEMPERATURE.
C                         UNITS: CM3 S-1
C                         DIMENSION: MXIT
C       (R*8)  BE(,)    : BEAM ENERGIES.
C                         UNITS: EV/AMU
C                         1ST DIMENSION: MXBE
C                         2ND DIMENSION: MXIT
C       (R*8)  TDENS(,) : TARGET DENSITIES.
C                         UNITS: CM-3
C                         1ST DIMENSION: MXTD
C                         2ND DIMENSION: MXIT
C       (R*8)  TTEMP(,) : TARGET TEMPERATURES.
C                         UNITS: EV
C                         1ST DIMENSION: MXTT
C                         2ND DIMENSION: MXIT
C       (R*8)  SVT(,)   : STOPPING COEFFT. AT REFERENCE BEAM ENERGY
C                         AND TARGET DENSITY.
C                         UNITS: CM3 S-1
C                         1ST DIMENSION: MXTT
C                         2ND DIMENSION: MXIT
C       (R*8)  SVED(,,) : STOPPING COEFFT. AT REFERENCE TARGET
C                         TEMPERATURE.
C                         UNITS: CM3 S-1
C                         1ST DIMENSION: MXBE
C                         2ND DIMENSION: MXTD
C                         3RD DIMENSION: MXIT
C       (R*8)  BSION(,) : BEAM STOPPING COEFFICIENTS FOR INDIVIDUAL
C                         IONS.
C                         1ST DIMENSION: MXREQ
C                         2ND DIMENSION: MXIT
C
C	(R*8)  FACT1    : FACTOR USED IN CALCULATING ZEFF
C	(R*8)  FACT2    : SIMILAR TO FACT1.
C	(R*8)  ZEFF()	: USED SO THAT THE BEAM STOPPING
C                         COEFFICIENTS FOR INDIVUDUAL
C			  IMPURITY IONS ARE EVALUATED AT THE
C                         CORRECT EFFECTIVE ELECTRON DENSITY.
C	(R*8)  WT	: WEIGHTING FACTOR.
C	(R*8)  TFRAC	: GENERAL VARIABLE.
C
C	(I*4)  MXREQ    : MAXIMUM NUMBER OF REQUESTED ENERGIES
C			  DENSITIES AND TEMPERATURES 
C	(I*4)  MXIT     : MAXIMUM POSSIBLE NUMBER OF DIFFERENT
C			  PLASMA IONS.
C	(I*4)  MXBE	: MAXIMUM NUMBER OF BEAM ENERGIES WHICH CAN
C			  BE READ FROM THE ADF21/22 TYPE FILES.
C	(I*4)  MXTD	: MAXIMUM NUMBER OF TARGET DENSITIES WHICH CAN
C			  BE READ FROM THE ADF21/22 TYPE FILES.
C	(I*4)  MXTT	: MAXIMUM NUMBER OF TARGET TEMPERATURES WHICH
C			  CAN BE READ FROM THE ADF21/22 TYPE FILES.
C       (I*4)  ITZ()    : TARGET ION CHARGE.
C                         DIMENSION: MXIT
C       (I*4)  NBE()    : NUMBER OF BEAM ENERGIES.
C                         DIMENSION: MXIT
C       (I*4)  NTDENS() : NUMBER OF TARGET DENSITIES.
C                         DIMENSION: MXIT
C       (I*4)  NTTEMP() : NUMBER OF TARGET TEMPERATURES.
C                         DIMENSION: MXIT
C
C       (CHR)  TSYM()   : TARGET ION ELEMENT SYMBOL.
C                         DIMENSION: MXIT
C
C       (L*4)  LIBMA(,) : FLAGS IF INTERPOLATION OR EXTRAPOLATION
C                         USED FOR REQUESTED BEAM ENERGIES.
C                         .TRUE.  => INTERPOLATION USED.
C                         .FALSE. => EXTRAPOLATION USED.
C                         1ST DIMENSION: MXREQ
C                         2ND DIMENSION: MXIT
C			  NOTE: USE OF FLAGS NOT IMPLEMENTED
C       (L*4)  LIDNA(,) : FLAGS IF INTERPOLATION OR EXTRAPOLATION
C                         USED FOR REQUESTED ION DENSITIES.
C                         .TRUE.  => INTERPOLATION USED.
C                         .FALSE. => EXTRAPOLATION USED.
C                         1ST DIMENSION: MXREQ
C                         2ND DIMENSION: MXIT
C			  NOTE: USE OF FLAGS NOT IMPLEMENTED
C       (L*4)  LITIA(,) : FLAGS IF INTERPOLATION OR EXTRAPOLATION
C                         USED FOR REQUESTED ION TEMPERATURES.
C                         .TRUE.  => INTERPOLATION USED.
C                         .FALSE. => EXTRAPOLATION USED.
C                         1ST DIMENSION: MXREQ
C                         2ND DIMENSION: MXIT
C			  NOTE: USE OF FLAGS NOT IMPLEMENTED
C
C 	ROUTINES:
C
C          ROUTINE    SOURCE    BRIEF DESCRIPTION
C          -------------------------------------------------------------
C          C4DATA     ADAS      READS INPUT DATA SET IN ADF21/22 FORMAT.
C          C4SPLN     ADAS      PERFORMS SPLINE ON INPUT DATA.
C          I4UNIT     ADAS      RETURNS UNIT NO. FOR OUTPUT OF MESSAGES.
C
C
C 	NOTE  : THE IMPURITY FRACTIONS ARE RENORMNALISED TO
C		ENSURE THAT THE TOTAL SUM OF EACH IMPURITY 
C	        FRACTION DOES NOT EXCEED THE VALUE OF ONE. 
C	
C      
C  	AUTHOR: HARVEY ANDERSON
C	        UNIVERSITY OF STRATHCLYDE
C		ANDERSON@PHYS.STRATH.AC.UK
C
C	DATE  : 30/09/99
C
C	VERSION : 1.1
C       DATE    : 3-6-2000
C	MODIFIED: Martin O'Mullane
C		  Repositioned declaration of variables into standard
C                 ADAS convention and to satisfy g77. 	
C
C	VERSION : 1.2
C       DATE    : 19-3-2003
C	MODIFIED: Lorne Horton
C		  Increased MXREQ to 1024.  Added check on internal
C                 matrix sizes. Added LSET flag to allow faster
C                 splines on repeated calls to C4SPLN.
C
C	VERSION : 1.3
C       DATE    : 03-12-2004
C	MODIFIED: Martin O'Mullane
C		   - Replace c4data with xxdata_21. 	
C		   - Increase dsnin length to 132 characters. 	
C		   - Merge L Horton's changes into central version. 	
C 
C	VERSION : 1.4
C       DATE    : 08-12-2004
C	MODIFIED: Martin O'Mullane/Allan Whiteford
C		   - Increase size of dsnsav to 132 and set initial
C                    values to ' ' rather than ''. 	
C 
C-----------------------------------------------------------------------
      CHARACTER*132       DSNIN(NSITYP)
      INTEGER             IOUNIT,      MXREQS,      NREQ,        NSITYP
      REAL*8              BSTOT(NREQ), SIFRAC(MXREQS,NSITYP)
      REAL*8              UBMENG(NREQ),             UTDENS(NREQ)
      REAL*8              UTTEMP(NREQ)
© Copyright 1995-2024 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk