VM208 Input Listing


/COM,ANSYS MEDIA REL. 2024R2 (05/10/2024) REF. VERIF. MANUAL: REL. 2024R2
/VERIFY,VM208
/PREP7
/TITLE, VM208, TEST CIRCUIT COMPONENT CCCS IN HARMONIC ANALYSIS
/COM  REV.5.2  SDS-98
/COM,   SEE SCHAUMS OUTLINE "BASIC CIRCUIT ANALYSIS", 2ND ED, 1992,
/COM,   PROBLEM 14.23, FIGURE 14-25.
/OUT,vm208_SCRATCH
ET,1,CIRCU124,4    ! VOLTAGE SOURCE
ET,2,CIRCU124,3    ! CURRENT SOURCE
ET,3,CIRCU124,0    ! RESISTOR 
ET,4,CIRCU124,1    ! INDUCTOR
ET,5,CIRCU124,12   ! CURRENT CONTROLLED CURRENT SOURCE

R,1,15,30          ! VOLTAGE SOURCE
R,2,5,-45          ! CURRENT SOURCE
R,3,3              ! R1
R,4,2              ! R2
R,5,4              ! L1
R,6,-3              ! CCCS GAIN

N,1
NGEN,10,1,1,1,1

TYPE,1
REAL,1
E,2,1,7            ! V1
TYPE,3
REAL,3
E,2,3              ! R1
TYPE,4
REAL,5
E,3,1              ! L1
TYPE,3
REAL,4
E,3,4              ! R2
TYPE,5
REAL,6   
E,3,4,5,2,1,7      ! CCCS
TYPE,2
REAL,2
E,1,4              ! C1

FINISH
/SOLU
ANTYP,HARM
D,1,VOLT,0
PI=4*ATAN(1)
HARFRQ,1/(2*PI)
OUTPR,ALL,ALL
HROUT,OFF
SOLVE
FINISH

/POST1
SET,1,1                 ! READ IN REAL SOLUTION
PRESOL,ELEM             ! PRINT CIRCUIT SOLUTION PER ELEMENT
SET,1,1,,1              ! READ IN IMAGINARY SOLUTION
PRESOL,ELEM             ! PRINT CIRCUIT SOLUTION PER ELEMENT
FINISH
/POST26
NSOL,2,4,VOLT
PRVAR,2
*GET,REAL,VARI,2,RTIME,15915
*GET,IMAG,VARI,2,ITIME,15915
FINISH
*DIM,LABEL,CHAR,2,2
*DIM,VALUE,,2,3
LABEL(1,1) = 'REAL VOL','IMAG VOL'
LABEL(1,2) = 'TAGE, V ','TAGE, V '
*VFILL,VALUE(1,1),DATA,16.44,-1.41
*VFILL,VALUE(1,2),DATA,REAL,IMAG
*VFILL,VALUE(1,3),DATA,ABS(REAL/16.44),ABS(IMAG/1.41)
/COM
/OUT,vm208,vrt
/COM,------------------- VM208 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.5,'  ',F14.5,'   ',1F15.3)
/COM,----------------------------------------------------------
/OUT
FINISH
*LIST,vm208,vrt