FUNCTION RCU(RRRR,TTI,BBF) C** function to calculate resistance of Cu as a function of C temp and RRR. Also calculates magneto resistance for BF C in Tesla. Uses POLFIT to interpolate. implicit double precision (a-h,o-z) real rrrr,tti,bbf dimension b(4),x(4),y(4) data r273,rup,r373,rupp/1.553,4.28d-3,1.981,3.8d-3/ C *** points where curves merge: C RRR1000=500 at 50 C =200 at 60 C =100 at 80 C =50 at 150 C =20 at 200 C two options for RRR<20 : =10 then linear in log t from 4 to 273 C =1 C *** ti=dble(tti) rrr=dble(rrrr) bf=dble(bbf) t=log(ti) t10=log10(ti) rrrl=log(rrr) rla=log(1000.) rlb=log(500.) rlc=log(200.) rld=log(100.) rle=log(50.) rlf=log(20.) C ** check for rrr<20 if (rrr.lt.15.)go to 151 if (rrr.lt.20.)rrrl=rlf C ** check flat region where r=r273/rrr t_flat=4.723436d1-7.201784d00*rrrl+3.075152d-1*rrrl**2 if(ti.lt.t_flat)then rho=r273/rrr go to 99 endif C ** check to see if t .ge. 273 then rho independent of rrr 151 if(ti.ge.373.)then rho=r373+rupp*(ti-373.) go to 99 endif if(ti.gt.273.)then rho=r273+rup*(ti-273.) go to 99 endif C check to see if rrr is a reference curve C ** if rrr.lt.15 reset to 20, if rrr.gt.1000 reset to 1000 C ** if rrr.lt.15 or lt. 5 use rrr=10 or rrr=1 if (rrr.lt.5)then rho=exp(r1(t)) go to 99 endif if(rrr.lt.15.)then rho=exp(r10(t)) go to 99 endif if(rrr.le.20.)then rho=exp(r20(t)) go to 99 endif if(rrr.eq. 50.)then rho=exp(r50(t)) go to 99 endif if(rrr.eq. 100.)then rho=exp(r100(t)) go to 99 endif if(rrr.eq. 200.)then rho=exp(r200(t)) go to 99 endif if(rrr.eq. 500.)then rho=exp(r500(t)) go to 99 endif if(rrr.ge. 1000.)then rho=exp(r1000(t)) go to 99 endif C ** find input data for 20