/TITLE, Electric circuit cube, eleccube.a ! R cube, Newnan EIT, 1 and 2 ohm /PREP7 ! preprocessor section volt1 = 10 volt7 = 0 ET,1,Link68 ! thermal-electrical line element R,1,(1/1) ! length / resistance R,2,(1/2) ! MP,KXX ! thermal cond required but not used MP,RSVX,1,1 ! electrical resistivity N,1,0,0,1 ! make bottom nodes N,2,1,0,1 N,3,1,0,0 N,4,0,0,0 NGEN,2,4,1,4,1,0,1,0 ! make top nodes /PNUM,node,1 ! plot the nodes APLOT,all ! plot all areas /PLOPTS,INFO,OFF ! Removes entire legend column /PLOPTS,FRAME,OFF ! Removes frame REAL,1 ! 1 ohm E,1,2 ! bottom 4 elements E,2,3 E,3,4 E,4,1 EGEN,2,4,-4 ! top 4 elements REAL,2 ! 2 ohm E,1,5 ! vertical elements EGEN,4,1,-1 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, top D,7,VOLT,volt7 ! nodal voltage, bottom /output,Volts,txt,D:\Ansys\ ! volts, node currents ! /output,Volts,txt,U:\win\Ansys\ ! volts, node currents solve FINISH ! solution section /POST1 ! post processor etable,cur,nmisc,5,4 pldisp,1 ! plot displacements /output,Curr,txt,D:\Ansys\ ! branch currents ! /output,Curr,txt,U:\win\Ansys\ ! branch currents pretab ! FINISH ! post processor ! NODE VOLT ELEM CUR ! 1 10.0000 1 3.1818182 ! 2 6.81818 2 1.3636364 ! 3 5.45455 3 -1.3636364 ! 4 6.81818 4 -3.1818182 ! 5 4.54545 5 1.3636364 ! 6 3.18182 6 3.1818182 ! 7 0. 7 -3.1818182 ! 8 3.18182 8 -1.3636364 ! 9 2.7272727 ! NODE AMPS 10 1.8181818 ! 1 9.09091 11 2.7272727 ! 7 -9.09091 12 1.8181818