ANSYS DC electric analysis. Calculate Resistance,Power, and export results to file
Описание
This tutorial guides you how to do electric analysis, calculate electric parameters such as resistance, power, and finally show you how export(save) those results to file.
APDL code 1:
nsel, all
nsel, r,loc,x,-4.1108e-002
cp,2,volt,all
n_electrode=ndnext(0)
d, n_electrode,volt,5
nsel,all
APDL code #2:
/post26
RFORCE,2, n_electrode,AMPS !get reaction data of current
!in order to get reaction data, you need to define array to save the data
*GET,size,VARI,,NSETS
*dim,CurrArr,array,size
VGET,CurrArr(1),2 ! current data is saved in the array
I0=CurrArr(1) !save to variable
P0=I0*5 !power
Z0=5/I0 !calculate resistance
!write to file
*CFOPEN, results,txt !text file to save data
!output DC resistance data
*VWRITE,Z0
DC resistance=%6.3f ohm
!output power data
*VWRITE,P0
Power(W)=%6.2f
Рекомендуемые видео



















