Skip to content

Commit

Permalink
Merge pull request #99 from njoy/feature/updatedConstants
Browse files Browse the repository at this point in the history
Feature/updated constants
  • Loading branch information
jlconlin authored Sep 13, 2018
2 parents d72bbb6 + 3d9f204 commit ce2e791
Show file tree
Hide file tree
Showing 92 changed files with 1,390,468 additions and 1,390,445 deletions.
1 change: 0 additions & 1 deletion src/acefc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -19681,4 +19681,3 @@ end subroutine ascll

end module acefc


8 changes: 3 additions & 5 deletions src/broadr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1516,6 +1516,7 @@ subroutine bsigma(kn,en,sn,e,s,nx)
! smaller temperature change.
!-------------------------------------------------------------------
use util ! provides mess
use physics ! get global physics constants
! externals
integer::kn,nx
real(kr)::en
Expand All @@ -1525,12 +1526,9 @@ subroutine bsigma(kn,en,sn,e,s,nx)
real(kr)::aamin,denom,slope,factor,xp,xm
real(kr)::sbt(ntt)
character(60)::strng
! real(kr),dimension(5),parameter::fzero=(/0.5e0_kr,&
! 1.e0_kr/(2.e0_kr*sqrt(pi)),0.25e0_kr,&
! 1.e0_kr/(2.e0_kr*sqrt(pi)),0.375e0_kr/)
real(kr),dimension(5),parameter::fzero=(/0.5e0_kr,&
0.2820947917738783e0_kr,0.25e0_kr,&
0.2820947917738783e0_kr,0.375e0_kr/)
1.e0_kr/(2.e0_kr*sqrt(pi)),0.25e0_kr,&
1.e0_kr/(2.e0_kr*sqrt(pi)),0.375e0_kr/)
real(kr),parameter::one=1.e0_kr
real(kr),parameter::two=2.e0_kr
real(kr),parameter::atop=4.e0_kr
Expand Down
2 changes: 1 addition & 1 deletion src/errorr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -7903,7 +7903,7 @@ subroutine resprp(nwscr,cflx,scr,ncg)
real(kr),parameter::r2=0.333333333e0_kr
real(kr),parameter::r3=0.08e0_kr
real(kr),parameter::zero=0
cwaven=sqrt(2*amassn*amu*ev)*1.d-12/hbar
cwaven=sqrt(2*amassn*amu*ev)*1.e-12_kr/hbar

nresg=0
ifresr=0
Expand Down
6 changes: 3 additions & 3 deletions src/gaminr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ subroutine gaminr
use mainio ! provides nsysi,nsyso,nsyse
use endf ! provides endf routines and variables
use util ! provides timer,repoz,skiprz,closz
use physics ! provides electron mass
integer::nw,nb,nwds,nggp1,np,loc,nleft,icnt,mflg,nl
integer::idis,ng2,iglo,nq,ig1,ig,ig2lo,it,iz,il
integer::idone,igzero,j,ibase,i,lim,l
Expand Down Expand Up @@ -124,7 +125,6 @@ subroutine gaminr
real(kr),dimension(:,:,:),allocatable::ans
real(kr),parameter::ekn=12.4e3_kr
real(kr),parameter::emax=1.e12_kr
real(kr),parameter::epair=.5110034e6_kr
real(kr),parameter::zero=0
integer,parameter::ncnt=9
integer,parameter::nwpff=5000
Expand Down Expand Up @@ -1166,6 +1166,7 @@ subroutine gtff(e,enext,idisc,ff,nl,ng,iglo,nq,pff,nwpff)
use util ! provides error
use endf ! provides endf routines and variables
use mathm ! provides legndr
use physics ! provides electron mass
! externals
integer::idisc,nl,ng,iglo,nq,nwpff
real(kr)::e,enext,ff(nl,*),pff(nwpff)
Expand Down Expand Up @@ -1201,7 +1202,6 @@ subroutine gtff(e,enext,idisc,ff,nl,ng,iglo,nq,pff,nwpff)
real(kr),parameter::c5=20.60744e0_kr
real(kr),parameter::toler=1.e-6_kr
real(kr),parameter::rndoff=1.0000001e0_kr
real(kr),parameter::epair=1.0220068e6_kr
real(kr),parameter::emax=1.e12_kr
real(kr),parameter::two=2.e0_kr
real(kr),parameter::half=0.5e0_kr
Expand Down Expand Up @@ -1501,7 +1501,7 @@ subroutine gtff(e,enext,idisc,ff,nl,ng,iglo,nq,pff,nwpff)
iglo=ig2pp
nq=0
ff(1,1)=2
ff(1,2)=e-epair
ff(1,2)=e-2.0*epair
endif
return
endif
Expand Down
27 changes: 11 additions & 16 deletions src/groupr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -5577,15 +5577,10 @@ subroutine parts(mfd,mtd)
!-------------------------------------------------------------------
! Set up particles for reactions that use file 4.
!-------------------------------------------------------------------
use physics !get global physics and light particle mass constants
use endf ! provides iverf
! externals
integer::mfd,mtd
! internals
real(kr),parameter::awr1=.99862e0_kr
real(kr),parameter::awr2=1.99626e0_kr
real(kr),parameter::awr3=2.98960e0_kr
real(kr),parameter::awr4=2.98903e0_kr
real(kr),parameter::awr5=3.96713e0_kr

law=0
zap=1
Expand All @@ -5601,35 +5596,35 @@ subroutine parts(mfd,mtd)
endif
else if (mtd.ge.700.and.mtd.lt.720) then
zap=1001
aprime=awr1
aprime=pnratio
if (mfd.ne.31) then
aprime=awr+1-aprime
law=4
endif
else if (mtd.ge.720.and.mtd.lt.740) then
zap=1002
aprime=awr2
aprime=dnratio
if (mfd.ne.32) then
aprime=awr+1-aprime
law=4
endif
else if (mtd.ge.740.and.mtd.lt.760) then
zap=1003
aprime=awr3
aprime=tnratio
if (mfd.ne.33) then
aprime=awr+1-aprime
law=4
endif
else if (mtd.ge.760.and.mtd.lt.780) then
zap=2003
aprime=awr4
aprime=hnratio
if (mfd.ne.34) then
aprime=awr+1-aprime
law=4
endif
else if (mtd.ge.780.and.mtd.lt.800) then
zap=2004
aprime=awr5
aprime=anratio
if (mfd.ne.35) then
aprime=awr+1-aprime
law=4
Expand All @@ -5653,35 +5648,35 @@ subroutine parts(mfd,mtd)
endif
else if (mtd.ge.600.and.mtd.lt.650) then
zap=1001
aprime=awr1
aprime=pnratio
if (mfd.ne.31) then
aprime=awr+1-aprime
law=4
endif
else if (mtd.ge.650.and.mtd.lt.700) then
zap=1002
aprime=awr2
aprime=dnratio
if (mfd.ne.32) then
aprime=awr+1-aprime
law=4
endif
else if (mtd.ge.700.and.mtd.lt.750) then
zap=1003
aprime=awr3
aprime=tnratio
if (mfd.ne.33) then
aprime=awr+1-aprime
law=4
endif
else if (mtd.ge.750.and.mtd.lt.800) then
zap=2003
aprime=awr4
aprime=hnratio
if (mfd.ne.34) then
aprime=awr+1-aprime
law=4
endif
else if(mtd.ge.800.and.mtd.lt.850) then
zap=2004
aprime=awr5
aprime=anratio
if (mfd.ne.35) then
aprime=awr+1-aprime
law=4
Expand Down
26 changes: 11 additions & 15 deletions src/heatr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1821,6 +1821,7 @@ subroutine disbar(ee,ebar,dame,q,za,awr,ntape,matd,mtd,a,nwa)
!-------------------------------------------------------------------
use endf ! provides iverf,terp1
use mathm ! provides legndr
use physics !get global physics and light particle mass constants
! externals
integer::ntape,matd,mtd,nwa
real(kr)::ee,ebar,dame,q,za,awr,a(*)
Expand Down Expand Up @@ -1877,11 +1878,6 @@ subroutine disbar(ee,ebar,dame,q,za,awr,ntape,matd,mtd,a,nwa)
8.84675983E-03_kr, 6.50445797E-03_kr, 4.14703326E-03_kr,&
1.78328072E-03_kr/)
real(kr),parameter::edis=25.e0_kr
real(kr),parameter::am1=.99924e0_kr
real(kr),parameter::am2=1.9968e0_kr
real(kr),parameter::am3=2.9896e0_kr
real(kr),parameter::am4=3.e0_kr
real(kr),parameter::am5=3.9682e0_kr
real(kr),parameter::step=1.1e0_kr
real(kr),parameter::small=1.e-10_kr
real(kr),parameter::zero=0
Expand All @@ -1907,16 +1903,16 @@ subroutine disbar(ee,ebar,dame,q,za,awr,ntape,matd,mtd,a,nwa)
endif
thresh=((awr+1)/awr)*(-q)
awp=1
if (iverf.le.5.and.mtd.ge.700.and.mtd.lt.718) awp=am1
if (iverf.le.5.and.mtd.ge.720.and.mtd.lt.738) awp=am2
if (iverf.le.5.and.mtd.ge.740.and.mtd.lt.758) awp=am3
if (iverf.le.5.and.mtd.ge.760.and.mtd.lt.778) awp=am4
if (iverf.le.5.and.mtd.ge.780.and.mtd.lt.798) awp=am5
if (iverf.ge.6.and.mtd.ge.600.and.mtd.lt.649) awp=am1
if (iverf.ge.6.and.mtd.ge.650.and.mtd.lt.699) awp=am2
if (iverf.ge.6.and.mtd.ge.700.and.mtd.lt.749) awp=am3
if (iverf.ge.6.and.mtd.ge.750.and.mtd.lt.799) awp=am4
if (iverf.ge.6.and.mtd.ge.800.and.mtd.lt.849) awp=am5
if (iverf.le.5.and.mtd.ge.700.and.mtd.lt.718) awp=pnratio
if (iverf.le.5.and.mtd.ge.720.and.mtd.lt.738) awp=dnratio
if (iverf.le.5.and.mtd.ge.740.and.mtd.lt.758) awp=tnratio
if (iverf.le.5.and.mtd.ge.760.and.mtd.lt.778) awp=hnratio
if (iverf.le.5.and.mtd.ge.780.and.mtd.lt.798) awp=anratio
if (iverf.ge.6.and.mtd.ge.600.and.mtd.lt.649) awp=pnratio
if (iverf.ge.6.and.mtd.ge.650.and.mtd.lt.699) awp=dnratio
if (iverf.ge.6.and.mtd.ge.700.and.mtd.lt.749) awp=tnratio
if (iverf.ge.6.and.mtd.ge.750.and.mtd.lt.799) awp=hnratio
if (iverf.ge.6.and.mtd.ge.800.and.mtd.lt.849) awp=anratio
afact=awp/((awr+1)**2)
arat=awp/(awr+1-awp)
en=0
Expand Down
23 changes: 13 additions & 10 deletions src/leapr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1924,8 +1924,6 @@ subroutine coldh(itemp,temp)
real(kr),parameter::dmass=3.343586e-24_kr
real(kr),parameter::deh=0.0147e0_kr
real(kr),parameter::ded=0.0074e0_kr
real(kr),parameter::amassh=3.3465e-24_kr
real(kr),parameter::amassd=6.69e-24_kr
real(kr),parameter::sampch=0.356e0_kr
real(kr),parameter::sampcd=0.668e0_kr
real(kr),parameter::sampih=2.526e0_kr
Expand Down Expand Up @@ -1959,14 +1957,19 @@ subroutine coldh(itemp,temp)
de=deh
if (law.gt.3) de=ded
x=de/tev
amassm=amassh
if (law.gt.3) amassm=amassd
bp=hbar/2*sqrt(2/deh/ev/pmass)/angst
if (law.gt.3) bp=hbar/2*sqrt(2/ded/ev/dmass)/angst
sampc=sampch
if (law.gt.3) sampc=sampcd
sampi=sampih
if (law.gt.3) sampi=sampid
if (law.gt.3) then
amassm=6.69E-24_kr
! amassm=2*(amassd+amasse)*amu*ev/(clight*clight)
sampc=sampcd
bp=hbar/2*sqrt(2/ded/ev/dmass)/angst
sampi=sampid
else
amassm=3.3464e-24_kr
! amassm=2*(amassp+amasse)*amu*ev/(clight*clight)
sampc=sampch
bp=hbar/2*sqrt(2/deh/ev/pmass)/angst
sampi=sampih
endif
wt=twt+tbeta
tbart=tempf(itemp)/tempr(itemp)

Expand Down
52 changes: 43 additions & 9 deletions src/phys.f90
Original file line number Diff line number Diff line change
@@ -1,17 +1,51 @@
module physics
! Provides pi and physics constants taken from CODATA'89 as
! given on the NIST site; namely, bk (Boltzmann's constant),
! Provides pi and physics constants taken from CODATA'2014 as
! given on the NIST site:
! https://physics.nist.gov/cuu/Constants
! namely, bk (Boltzmann's constant),
! amassn (the neutron mass in amu), amu (the amu value itself),
! hbar (Planck's constant), ev (the conversion to eV), and
! clight (the speed of light).
use locale ! provides kr
implicit none
real(kr),parameter,public::pi=3.14159265358979e0_kr
real(kr),parameter,public::bk=8.617385e-5_kr
real(kr),parameter,public::amassn=1.008664904e0_kr
real(kr),parameter,public::amu=1.6605402e-24_kr
real(kr),parameter,public::hbar=1.05457266e-27_kr
real(kr),parameter,public::ev=1.60217733e-12_kr
real(kr),parameter,public::clight=2.99792458e10_kr
!
! Constants per ENDF-102, Appendix H (February 1, 2018) edition, also
! identified as SVN Commit: Revision 215). This is the manual version
! available from http://www.nndc.bnl.gov/csewg/docs/endf-manual.pdf in
! the Summer 2018.
! - numerical values are given for pi, Boltzmann's constant, eV
! speed of light, atomic mass unit in eV, Planck's constant and
! the fine structure constant.
! - other values are given in terms of the above.
real(kr),parameter,public::pi=3.14159265359e0_kr !
real(kr),parameter,public::euler=0.55721566490153286e0_kr !
real(kr),parameter,public::bk=8.6173303e-5_kr !eV/degK
real(kr),parameter,public::ev=1.6021766208e-12_kr !erg/eV
real(kr),parameter,public::clight=2.99792458e10_kr !cm/s
real(kr),parameter,public::amu=931.4940954e6_kr*ev/&
(clight*clight) !g/amu
real(kr),parameter,public::hbar=6.58219514e-16_kr*ev !Planck/2pi, erg
real(kr),parameter,public::finstri=1.e16_kr*hbar/(ev*ev*clight) !inv fine str
! ****************************************************************
! * Light particle masses (in amu), per ENDF-102, Appendix H: *
! * - note, these are particle masses, not atomic masses. *
! * - we use "a" to start the variable name due to the legacy *
! * fortran naming convention that would have considered a *
! * name of the form "massn" to be an integer variable. *
! ****************************************************************
real(kr),parameter,public::amassn=1.00866491588e0_kr !neutron
real(kr),parameter,public::amassp=1.007276466879e0_kr !proton
real(kr),parameter,public::amassd=2.013553212745e0_kr !deuteron
real(kr),parameter,public::amasst=3.01550071632e0_kr !triton
real(kr),parameter,public::amassh=3.014932234673e0_kr !hellion (3)
real(kr),parameter,public::amassa=4.001506179127e0_kr !alpha
real(kr),parameter,public::amasse=5.485799090e-4_kr !electron
real(kr),parameter,public::pnratio=amassp/amassn ! proton/neutron mass
real(kr),parameter,public::dnratio=amassd/amassn ! deuteron/neutron mass
real(kr),parameter,public::tnratio=amasst/amassn ! triton/neutron mass
real(kr),parameter,public::hnratio=amassh/amassn ! helion/neutron mass
real(kr),parameter,public::anratio=amassa/amassn ! alpha/neutron mass

real(kr),parameter,public::epair=amasse*amu*clight*clight/ev
end module physics

Loading

0 comments on commit ce2e791

Please sign in to comment.