/TITLE, Your name, ME 421 and date, electr3.a ! Three-loop electric circuit /PREP7 ! preprocessor section volt1 = 20 volt5 = 5 volt6 = 0 ET,1,Link68 ! thermal-electrical line element R,1,(1/2) ! length / resistance (area), 2 ohms R,2,(1/3) R,3,(1/1) R,4,(2/7) ! double length / 7 ohms R,5,(1/8) MP,KXX ! thermal cond not used but is required MP,RSVX,1,1 ! electrical resistivity N,1,0,0 N,2,0,1 N,3,1,1 N,4,2,1 N,5,2,0 N,6,1,0 /PNUM,node,1 ! plot the nodes APLOT,all ! plot all areas /PLOPTS,INFO,OFF ! Removes entire legend column /PLOPTS,FRAME,OFF ! Removes frame TYPE,1 ! element type (ET) 68 MAT,1 ! material property MP 1 REAL,1 E,1,2 REAL,2 E,2,3 REAL,3 E,3,4 E,4,5 REAL,4 E,2,4 REAL,5 E,3,6 FINISH ! preprocessor section /SOLUTION ! solution section antype,static outpr,basic,1 outpr,nload,1 KRF,1 ! print nodal forces KBC,1 ! step boundary conditions D,1,VOLT,volt1 ! nodal voltage, left D,5,VOLT,volt5 ! nodal voltage, right D,6,VOLT,volt6 ! nodal voltage, bottom /output,D:\Ansys\Volts.txt ! volts, node currents ! /output,U:\win\Ansys\Volts.txt ! volts, node currents solve FINISH ! solution section /POST1 ! post processor etable,cur,nmisc,5,4 pldisp,1 ! plot displacements /output,D:\Ansys\Curr.txt ! branch currents ! /output,U:\win\Ansys\Curr.txt ! branch currents pretab ! FINISH ! post processor ! NODE VOLT AMPS ! 1 20.0000 3.00000 ! 2 14.0000 ! 3 8.00000 ! 4 7.00000 ! 5 5.00000 -2.00000 ! 6 0. -1.00000 ! ELEM CUR ! 1 3.0000 ! 2 2.0000 ! 3 1.0000 ! 4 2.0000 ! 5 1.0000 ! 6 1.0000