OverviewUser subroutine UAMP:∙allows you to define the current value of an amplitude definition as a function of time;∙can be used to model control engineering aspects of your system when sensors are used (sensor values are from the beginning of theincrement);∙can use a predefined number of state variables in their definition; and ∙can optionally compute the derivatives and integrals of the amplitude function.Explicit solution dependenceThe solution dependence introduced in this user subroutine is explicit: all data passed in the subroutine for information or to be updated are values at the beginning of that increment.User subroutine interfaceSUBROUTINE UAMP(* ampName, time, ampValueOld, dt, nProps, props, nSvars,* svars, lFlagsInfo,* nSensor, sensorValues, sensorNames, jSensorLookUpTable,* AmpValueNew,* lFlagsDefine,* AmpDerivative, AmpSecDerivative, AmpIncIntegral, * AmpDoubleIntegral)CINCLUDE 'ABA_PARAM.INC'C time indicesparameter (iStepTime = 1,* iTotalTime = 2,* nTime = 2)C flags passed in for informationparameter (iInitialization = 1,* iRegularInc = 2,* iCuts = 3* ikStep = 4* nFlagsInfo = 4)C optional flags to be definedparameter (iComputeDeriv = 1,* iComputeSecDeriv = 2,* iComputeInteg = 3,* iComputeDoubleInteg = 4,* iStopAnalysis = 5,* iConcludeStep = 6,* nFlagsDefine = 6)dimension time(nTime), lFlagsInfo(nFlagsInfo),* lFlagsDefine(nFlagsDefine)dimension jSensorLookUpTable(*)dimension sensorValues(nSensor), svars(nSvars),props(nProps)character*80 sensorNames(nSensor)character*80 ampNameuser coding to define AmpValueNew, andoptionally lFlagsDefine, AmpDerivative, AmpSecDerivative,AmpIncIntegral, AmpDoubleIntegralRETURNENDVariable to be definedAmpValueNewCurrent value of the amplitude.Variables that can be updatedlFlagsDefineInteger flag array to determine whether the computation of additional quantities is necessary or to set step continuation requirements.lFlagsDefine(iComputeDeriv)If set to 1, you must provide thecomputation of the amplitude derivative.The default is 0, which means thatAbaqus computes the derivativeautomatically.lFlagsDefine(iComputeSecDeriv)If set to 1, you must provide thecomputation of the amplitude secondderivative. The default is 0, whichmeans that Abaqus computes thesecond derivative automatically. lFlagsDefine(iComputeInteg)If set to 1, you must provide thecomputation of the amplitudeincremental integral. The default is 0,which means that Abaqus computes theincremental integral automatically.lFlagsDefine(iComputeDoubleInteg)If set to 1, you must provide the computation of the amplitude incremental double integral. The default is 0, which means that Abaqus computes the incremental integral automatically.lFlagsDefine(iStopAnalysis)If set to 1, the analysis will be stoppedand an error message will be issued.The default is 0, which means thatAbaqus will not stop the analysis. lFlagsDefine(iConcludeStep)If set to 1, Abaqus will conclude the stepexecution and advance to the next step(if a next step exists). The default is 0. svarsAn array containing the values of the solution-dependent state variables associated with this amplitude definition. The number of such variablesis nsvars (see above). You define the meaning of these variables.This array is passed into UAMP containing the values of these variables at the start of the current increment. In most cases they should be updated to be the values at the end of the increment.AmpDerivativeCurrent value of the amplitude derivative.AmpSecDerivativeCurrent value of the amplitude second derivative.AmpIncIntegralCurrent value of the amplitude incremental integral.AmpDoubleIntegralCurrent value of the amplitude incremental double integral.Variables passed in for informationampNameUser-specified amplitude name, left justified.time(iStepTime)Current value of step time or frequency.time(iTotalTime)Current value of total time.ampValueOldOld value of the amplitude from the previous increment.dtTime increment.propsUser-specified array of material constants associated with this amplitude definition.nPropsUser-defined number of material constants associated with this amplitude definition.nSvarsUser-defined number of solution-dependent state variables associated with this amplitude definition.lFlagsInfoInteger flag array with information regrading the current call to UAMP.lFlagsInfo(iInitialization) This flag is equal to 1 if UAMP is called from theinitialization phase of the first analysis step andis set to 0 otherwise.lFlagsInfo(iRegularInc)This flag is equal to 1 if UAMP is called from aregular increment and is set to 0 if called fromthe initialization phase of the first analysis step. lFlagsInfo(iCuts)Number of cutbacks in this increment. lFlagsInfo(ikStep)Step number.nSensorTotal number of sensors in the model.sensorValuesArray with sensor values at the end of the previous increment. Each sensor value corresponds to a history output variable associated with the output database request defining the sensor.sensorNamesArray with user-defined sensor names in the entire model, left justified. Each sensor name corresponds to a sensor value provided with the output database request. All names will be converted to uppercase characters if lowercase or mixed-case characters were used in their definition.jSensorLookUpTableVariable that must be passed into the utilityfunctions IGETSENSORID and GETSENSORVALUE.Example: Amplitude definition using sensor and state variablesc user amplitude subroutineSubroutine UAMP(C passed in for information and state variables* ampName, time, ampValueOld, dt, nProps, props, nSvars,* svars, lFlagsInfo,* nSensor, sensorValues, sensorNames,* jSensorLookUpTable,C to be defined* ampValueNew,* lFlagsDefine,* AmpDerivative, AmpSecDerivative, AmpIncIntegral, * AmpDoubleIntegral)include 'aba_param.inc'C svars - additional state variables, similar to (V)UEL dimension sensorValues(nSensor), svars(nSvars),* props(nProps)character*80 sensorNames(nSensor)character*80 ampNameC time indicesparameter( iStepTime = 1,* iTotalTime = 2,* nTime = 2)C flags passed in for informationparameter( iInitialization = 1,* iRegularInc = 2,* iCuts = 3,* ikStep = 4,* nFlagsInfo = 4)C optional flags to be definedparameter( iComputeDeriv = 1,* iComputeSecDeriv = 2,* iComputeInteg = 3,* iComputeDoubleInteg = 4,* iStopAnalysis = 5,* iConcludeStep = 6,* nFlagsDefine = 6)parameter( tStep=0.18d0, tAccelerateMotor = .00375d0, * omegaFinal=23.26d0,* zero=0.0d0, one=1.0d0, two=2.0d0, four=4.0d0)dimension time(nTime), lFlagsInfo(nFlagsInfo),* lFlagsDefine(nFlagsDefine)dimension jSensorLookUpTable(*)lFlagsDefine(iComputeDeriv) = 1lFlagsDefine(iComputeSecDeriv) = 1lFlagsDefine(iComputeInteg) = 1lFlagsDefine(iComputeDoubleInteg) = 1c get sensor valuevTrans_CU1 = GetSensorValue('HORIZ_TRANSL_MOTION',* jSensorLookUpTable,* sensorValues)if (ampName(1:22) .eq. 'MOTOR_WITH_STOP_SENSOR' ) then if (lFlagsInfo(iInitialization).eq.1) thenAmpSecDerivative = zeroAmpDerivative = omegaFinal/tAccelerateMotor ampValueNew = zeroAmpIncIntegral = zeroAmpDoubleIntegral = zerosvars(1) = zerosvars(2) = zeroelsetim = time(iStepTime)c ramp up the angular rot velocity of thec electric motorc after which hold constantif (tim .le. tAccelerateMotor) thenAmpSecDerivative = zeroAmpDerivative =omegaFinal/tAccelerateMotorampValueNew =omegaFinal*tim/tAccelerateMotorAmpIncIntegral =dt*(ampValueOld+ampValueNew)/twoAmpDoubleIntegral =dt**2*(ampValueOld+ampValueNew)/fourelseAmpSecDerivative = zeroAmpDerivative = zeroampValueNew = omegaFinalAmpIncIntegral =dt*(ampValueOld+ampValueNew)/twoAmpDoubleIntegral =dt**2*(ampValueOld+ampValueNew)/fourend ifc retrieve old sensor valuevTrans_CU1_old = svars(1)c detect a zero crossing and count the number of crossings if (vTrans_CU1_old*vTrans_CU1 .le. zero .and.* tim .gt. tAccelerateMotor ) thensvars(2) = svars(2) + oneend ifnrCrossings = int(svars(2))c stop the motor if sensor crosses zero the second time if (nrCrossings.eq.2) thenampValueNew = zerolFlagsDefine(iConcludeStep)=1end ifc store sensor valuesvars(1) = vTrans_CU1end ifend ifreturnend。