SUBROUTINE fric_coef (fCoef, fCoefDeriv, nBlock, nProps,nTemp, $ nFields, iData, rData, surfInt, surfSlv, surfMst,props, slipData, $ pressure, tempAvg, fieldAvg) c include 'aba_param.inc' c parameter(NDATASIZE = 10, $ nFlags = 2, $ nData = 3 ) 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 c character*80 surfInt, surfSlv, surfMst ! dimension ARRAY(NDATASIZE), JARRAY(NDATASIZE) real*8 cslip1, cslip2 real*8 fax, slipTol1, flat, slipTol2 CHARACTER*3 FLGRAY(NDATASIZE) parameter (afrac=0.05d0) ! nFDir = iData(i_ifc_nFDir) jrcd = 0 call GETVRC('CDISP',ARRAY, JARRAY, FLGRAY, 10, JRCD) cslip1 = ARRAY(2) cslip2 = ARRAY(3) c fax = props(1) slipTol1 = props(2) flat = props(3) slipTol2 = props(4) c c ****** 1-DIRECTION FRICTION IF (abs(cslip1).LE.slipTol1) THEN fCoef(1,1) = fax * abs(cslip1/slipTol1) ELSE fCoef(1,1) = fax END IF c write(7,*) 'f',fCoef(1,1) ! ! ****** 2-DIRECTION FRICTION IF (abs(cslip2).LE.slipTol2) THEN fCoef(1,2) = flat * abs(cslip2/slipTol2) ELSE fCoef(1,2) = flat END IF ! if (iData(i_ifc_Node) .eq. 21) then 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