/TITLE, Your name, ME 421 and date here, electr1a.a ! Ansys program to find volts and amps for ! two-loop electric circuit, 20-volt source /PREP7 ! preprocessor section volt1 = 20 volt4 = 0 ET,1,Link68 ! thermal-electrical line element R,1,(1/4) ! length / resistance (area), 4 ohms R,2,(1/1) ! 1 ohm R,3,(1/3) ! 3 ohms R,4,(SQRT(2)/8) ! diag length / 8 ohms MP,KXX ! Thermal cond not used but is required MP,RSVX,1,1 ! electrical resistivity N,1,0,1 N,2,1,1 N,3,2,1 N,4,2,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 ! BRANCH 1-2, 4 OHM E,1,2 REAL,2 ! BRANCH 2-3, 1 OHM E,2,3 REAL,3 ! BRANCH 3-4, 9 OHM E,3,4 REAL,4 ! BRANCH 2-4, 8 OHM E,2,4 FINISH ! preprocessor section /SOLUTION ! solution section antype,static ! analysis type is static outpr,basic,1 outpr,nload,1 KRF,1 ! PRINT NODAL FORCES KBC,1 ! STEP BOUNDARY CONDITIONS D,1,VOLT,volt1 ! voltage 20 for node 1 D,4,VOLT,volt4 ! voltage 0 for node 4 /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 ! 1 20.0000 ! 2 8.00000 ! 3 6.00000 ! 4 0. ! ! NODE AMPS ! 1 3.00000 ! 4 -3.00000 ! ELEM CUR ! 1 3.0000 ! 2 2.0000 ! 3 2.0000 ! 4 1.0000