VM129 Input Listing


/COM,ANSYS MEDIA REL. 2024R2 (05/10/2024) REF. VERIF. MANUAL: REL. 2024R2
/VERIFY,VM129
/TITLE, VM129, NUMERICAL DIFFERENTIATION AND INTEGRATION USING APDL COMMAND
C***    REFERENCE - ANY BASIC CALCULUS BOOK
*DIM,A,,145                ! DEFINE ARRAYS WITH DIMENSION    
*DIM,B,,145
*DIM,C,,145
*DIM,D,,145
*DIM,E,,145
*DIM,F,,145
*DIM,G,,145
*DIM,H,,145
*VFILL,A(1),RAMP,0,1       ! ARRAY A(N) : TIME IN SECOND
*VFACT,0.043633            ! MULTIPLYING FACTOR : FREQUENCY = (PI/72)
*VFUN,B(1),COPY,A(1)       ! RESULT ARRAY B(N)=FREQUENCY*A(N)  
*VFUN,C(1),SIN,B(1)        ! ARRAY C(N) : SIN(B(N)) 
*VFACT,1.2732              ! MULTIPLYING FACTOR : AMPLITUDE A
*VFUN,D(1),COPY,C(1)       ! ARRAY D(N) : A*C(N) 
*VOPER,E(1),D(1),DER1,A(1) ! ARRAY E(N) : FIRST DERIVATIVE OF D WRT TIME  
*VOPER,F(1),D(1),INT1,A(1) ! ARRAY F(N) : SINGLE INTEGRAL (I1) OF D WRT TIME
*VOPER,G(1),D(1),DER2,A(1) ! ARRAY G(N) : SECOND DERIVATIVE OF D WRT TIME   
*VOPER,H(1),D(1),INT2,A(1) ! ARRAY H(N) : DOUBLE INTEGRAL (I2) OF D WRT TIME
*VSCFUN,DERIV1,MAX,E(1)    ! MAXIMUM VALUE OF FIRST DERIVATIVE   
*VSCFUN,DERIV2,MAX,G(1)    ! MAXIMUM VALUE OF SECOND DERIVATIVE
*status,parm                    ! LIST SCALAR PARAMETERS
*STATUS,F,37,37            ! LIST VALUE OF F(N) AT UPPER LIMIT (INTEGRAL I1)
*STATUS,H,37,37            ! LIST VALUE OF H(N) AT UPPER LIMIT (INTEGRAL I2)
*SET,INTER1,F(37,1,1)
*SET,INTER2,H(37,1,1)
*DIM,LABEL,CHAR,4,2
*DIM,VALUE,,4,3
LABEL(1,1) = '1ST DER ','2ND DER','1ST INT','2ND INT'
LABEL(1,2) = 'MAX','MAX','T(0-36)','T(0-36)'
*VFILL,VALUE(1,1),DATA,5.555E-2,2.424E-3,29.18,381.7
*VFILL,VALUE(1,2),DATA,DERIV1,DERIV2,INTER1,INTER2
DRV1=ABS(DERIV1/5.555E-2)
DRV2=ABS(DERIV2/2.424E-3)
INT1=ABS(INTER1/29.18)
INT2=ABS(INTER2/381.7)
*VFILL,VALUE(1,3),DATA,DRV1,DRV2,INT1,INT2
/COM
/OUT,vm129,vrt
/COM,------------------- VM129 RESULTS COMPARISON -------------
/COM,
/COM,                 |   TARGET   |   Mechanical APDL   |   RATIO
/COM,
*VWRITE,LABEL(1,1),LABEL(1,2),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,A8,'   ',F10.6,'  ',F15.6,'   ',1F15.3)
/COM,----------------------------------------------------------
/OUT
FINISH
*LIST,vm129,vrt