SUBROUTINE fric_coef (fCoef, fCoefDeriv, nBlock, nProps,nTemp, $ nFields, iData, rData, surfInt, surfSec, surfMain,props, slipData, $ pressure, tempAvg, fieldAvg) c include 'aba_param.inc' c dimension fCoef(nBlock,2), * fCoefDeriv(nBlock,20,2), * props(nProps), * slipData(nBlock,*), * pressure(nBlock), * tempAvg(nBlock), * fieldAvg(nBlock,nFields) c integer*4 iData(*) real*8 rData(*) c c c Offset parameters to various integer quantities in iData(*) c parameter( i_ifc_KStep = 1, * i_ifc_KInc = 2, * i_ifc_Kit = 3, * i_ifc_Node = 4, * i_ifc_nStateV = 5, * i_ifc_nFDir = 6) c c Offset parameters to various real quantities in rData(*) c parameter( i_rfc_TimStep = 1, * i_rfc_TimGlb = 2, * i_rfc_DTimCur = 3, * i_rfc_Drot = 4, * i_rfc_StateV = 8) c c Offset parameters of slipData c parameter( i_SD_SlipRateMag = 1, * i_SD_SlipRate1 = 2, * i_SD_SlipRate2 = 3, * i_SD_SlipEq = 4, * i_SD_Slip1 = 5, * i_SD_Slip2 = 6, $ n_SD_Length = 6) c c Offset parameters of friction derivatives c parameter( i_fDer_SlipRateMag = 1, * i_fDer_Pressure = 2, * i_fDer_Temperature = 3, * i_fDer_SlipRate1 = 4, * i_fDer_SlipRate2 = 5, * i_fDer_SlipEq = 6, * i_fDer_Slip1 = 7, * i_fDer_Slip2 = 8) c character*80 surfInt, surfSec, surfMain ! real*8 cslip1, cslip_lat real*8 fax, sax, flat, slay parameter (afrac=0.05d0) ! nFDir = iData(i_ifc_nFDir) cslip1 = slipData(1,i_SD_Slip1) cslip2 = slipData(1,i_SD_Slip2) c fax = props(1) sax = props(2) flat = props(3) slay = props(4) c ****** Friction in the 1-Direction IF (abs(cslip1).LE.sax) THEN fCoef(1,1) = fax * abs(cslip1/sax) if (cslip1 .lt. -afrac*sax) then fCoefDeriv(1,i_fDer_Slip1,1) = -fax/sax else if (cslip1 .gt. afrac*sax) then fCoefDeriv(1,i_fDer_Slip1,1) = fax/sax else fCoefDeriv(1,i_fDer_Slip1,1) = cslip1*fax/(afrac*sax*sax) end if ELSE fCoef(1,1) = fax END IF c ****** Friction in the 2-Direction IF (abs(cslip2).LE.slay) THEN fCoef(1,2) = flat * abs(cslip2/slay) if (cslip2 .lt. -afrac*slay) then fCoefDeriv(1,i_fDer_Slip2,2) = -flat/slay else if (cslip2 .gt. afrac*slay) then fCoefDeriv(1,i_fDer_Slip2,2) = flat/slay else fCoefDeriv(1,i_fDer_Slip2,2) = cslip2*flat/(afrac*slay*slay) end if ELSE fCoef(1,2) = flat END IF ! if (iData(i_ifc_Node) .eq. 21) then c write(7,*) 'nfdir',nFDir c write(7,*) 'slip1',slipData(1,i_SD_Slip1) c write(7,*) 'slip2',slipData(1,i_SD_Slip2) c write(7,*) 'props',props(1),props(2),props(3),props(4) c write(7,*) 'f1',fCoef(1,1) c write(7,*) 'f2',fCoef(1,2) c write(7,100) iData(i_ifc_Node),cslip1,cslip2,fCoef(1,1),fCoef(1,2) end if 100 format ('SL Node:',i7,' Cslip:',2(1x,e14.6),' mu_1,mu_2:',2(1x,e14.6)) return end