!Ejemplo Complex impedance of a Circuit element
program Circuit
implicit none
!INTRINSIC COMPLEX, COS() ,SIN() ,REAL
REAL, parameter :: omega=98.7E6
COMPLEX,PARAMETER::JW=(0.0,Omega)
REAL :: VA,VP,R,L,Average_Power
COMPLEX :: Vo, Current, Voltage, Impedance
!start program circuit
PRINT *, "Ingrese, voltaje, amplitud y fase."
read *,VA,VP
Vo =VA*COS(VP), VA=SIN(VP)
PRINT *, "Ingrese los valores de las resistencias y las inductancias"
read *,R,L
Current=Vo/(R+JW*L)
Average_Power =0.5 *REAL(Current*Conj(Vo))
PRINT *,Current,Average_Power
PRINT*,"Ingrese las amplitudes y fase de voltaje sobre el elemento"
READ*,VA,VP
Voltage=COMPLEX(VA*COS(VP),VA*SIN(VP))
Impedance=Voltage/Current
PRINT*,Impedance
end program
No hay comentarios:
Publicar un comentario