!------------------------------------------------------------------------------
!
real(fp) FUNCTION SVTH_Z(TEMP,EPS,ITER,NREACT,KK,IW)
!	3/8/77
!============
! idecl:  explicitize implicit INTEGER declarations:
  use iso_c_binding, only: fp => c_double
  use sigtabl_mod, only :A,HOLD=>B,CON1=>CON,EPS1=>EPS,ITER1=>ITER,IW1=>IW
  use physconst_mod, only : two,sqpi,VC
  IMPLICIT NONE
  INTEGER iter,nreact,kk,iw
!============
! idecl:  explicitize implicit REAL declarations:
  real(fp) temp,eps,con,bmass,tmass,dummy,&
       rm,sigma_z,svthe_z
!============
  con=two*sqrt(two)/sqpi*VC
!	CON - =SQRT(8/PI)*C (m/sec)
!	THIS FUNCTION WAS WRITTEN BY HARRY H. TOWNER OF THE
!	PRINCETON PLASMA PHYSICS LAB.  THIS FUNCTION
!	WILL CALCULATE <SIGMA*V> FOR A GIVEN REACTION.	THIS FUNCTION
!	ASSUMES A MAWELLIAN DISTRIBUTION FOR EACH OF THE PARTICIPANTS.
!	THIS ROUTINE IS USED TO INITIALIZE SIGMA AND STORE VALUES
!	IN COMMON BLOCK CSVTH.	IT THEN CALLS FUNCTION SVTHE AND
!	CALCULATES <SIGMA*V> FOR THE GIVEN REACTION.  NOTE THAT IF THE
!	TEMPERATURE IS THE ONLY PARAMETER WHICH VARIES THEN SVTHE
!	SHOULD BE USED AFTER AN INITIALIZING CALL TO SVTH IS MADE.
!	PARAMETERS:
!	TEMP - THE TEMPERATURE AT WHICH YOU WANT <SIGMA*V>  (IN KEV)
!	EPS - THE DESIRED RELATIVE ERROR IN THE REACTIVITY
!	ITER - THE MAXIMUM NUMBER OF ITERATIONS TO BE TAKEN IN ORDER
!		TO ACHIEVE THE DESIRED RELATIVE ERROR (EPS).
!	NREACT - TELLS WHICH REACTION YOU WANT
!	  =1 YOU GET <SIGMAV> FOR THE REACTION	T(D,N)HE4
!	  =2 YOU GET <SIGMAV> FOR THE REACTION	HE3(D,P)HE4
!	  =3 YOU GET <SIGMAV> FOR THE REACTION	D(D,P)T
!	  =4 YOU GET <SIGMAV> FOR THE REACTION	D(D,N)HE3
!	  =5 YOU GET <SIGMAV> FOR THE REACTION	T(T,2N)HE4
!	  =12 YOU GET <SIGMAV> FOR THE REACTION	T(T,2N)HE4 DPC fit 06/2018
!	  =6 YOU GET <SIGMAV> FOR THE REACTION	T(HE3,X)Y
!	KK - IF KK=1 THAN YOU GET THE REVERSE REACTION IE IF N=1 AND
!	     KK=1 YOU GET <SIGMA*V> FOR THE REACTION D(T,N)HE4
!	IW - THE LOGICAL UNIT USED FOR PRINTING.
!	PARAMETER LIST FOR COMMON BLOCK CSVTH.
!	A - =RMASS/TMASS
!	HOLD - A PLACE HOLDER IN COMMON BLOCK CSVTH.
!	CON1 - =CON*A**1.5/SQRT(TMASS)
!	EPS1 - EPS
!	ITER1 - ITER
!	IW1 - IW
!	I NOW FIND THE MASSES FOR THE GIVEN REACTION.
  CALL RMASS_Z(NREACT,KK,BMASS,TMASS,DUMMY,DUMMY)
!	THE REDUCED MASS IS NOW CALCULATED.
  RM=TMASS*BMASS/(TMASS+BMASS)
!	I NOW INITIALIZE THE FUSION CROSS SECTION.
  DUMMY=SIGMA_Z(NREACT,KK,IW,100.0_fp)
!	I NOW FILL IN VALUES FOR COMMON BLOCK CSVTH.
  A=RM/TMASS
  CON1=CON*A**1.5_fp/SQRT(TMASS)
  EPS1=EPS
  ITER1=ITER
  IW1=IW
!	I NOW FIND <SIGMA*V> (M**3/SEC) FOR THE REACTION.
  SVTH_Z=SVTHE_Z(TEMP)
  RETURN
END FUNCTION SVTH_Z
!
!------------------------------------------------------------------------------
 
 
 
 
 
 
 
 
! 30Jun2000 fgtok -s r8_precision.sub "r8con.csh conversion"
