/TITLE, Your name, ME 421 and date, electr1.a ! find volts and amps for ! two-loop electric circuit, 20-volt source /COLOR,PBAK,off ! black background /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,(SQRT(2)/3) ! diag length / 3 ohms R,4,(1/8) ! 8 ohms MP,KXX ! thermal cond required but not used MP,RSVX,1,1 ! electrical resistivity N,1,0,1 N,2,1,1 N,3,2,1 N,4,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 ! 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