!****************************************************
!****************************************************
! 复数法求解RCL电路
!****************************************************
! SINOMACH
!
! FORTRAN95,2013&18 version
!
! 运用复数法(Complex)求解RCL电路,电流, 电压,阻抗等
!
!
! 周勇 20221125
!****************************************************
!c$$$ Run, Output:
!****************************************************
!****************************************************
Complex u, i, z0, z1, u1
u=(220.0,0.)
z0=(50.0,0.)
z1=(0.0,314.15926E-3)
i=u/(z0+z1)
absi=abs(i)
Print*,'I=',i
Print*,'ABSI=',absi
Print*,'PHASEUI=',phasei
u1=i*z1
phasei=57.29578*atan2(aimag(i),real(i))
Print*,'U1=',u1
Print*,'ABSU1=',absu1
Print *,'phaseu1=',PHASEU
End Program
!********************************
!c$Input: Output:
!********************************
$main
I=(4.39982653,-2.764492668E-02)
ABSI=4.39991331
PHASEUI=0.00000000E+00 U1=(8.684909903E-03,1.38224626)
ABSU1=2.44279250E-12 phaseu1=0.00000000E+00
更多回帖