Advertisement
Rujeerat

Untitled

Nov 4th, 2019
1,187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. subroutine Pre_xt1(x12, x1,x2,x3) ! x12 = xt1(x1,x2,x3)
  2.  
  3.     complex, intent(in)     :: x1,x2,x3
  4.     complex, intent(out)    :: x12
  5.  
  6.     x12 = x1+(x2*x3)/(x2+x3)
  7.  
  8. end subroutine Pre_xt1
  9. subroutine Pre_vc(V,current,v1,v2,P,xt1) ! V,current = vc(v1,v2,P,xt1)
  10.     real, intent(in)     ::  v1,v2,P
  11.     complex, intent(in)     :: xt1
  12.     complex, intent(out)    :: V,current
  13.     real :: delR,delD,a,b
  14.     delR = asin(P*ABS(xt1)/ABS(v1)*ABS(v2))
  15.     delD = delR*180/ 3.1415927
  16.     a = v1*cos(DelR)
  17.     b = v1*sin(DelR)
  18.     V = CMPLX(a,b)
  19.     current = (V-v2)/xt1
  20.  
  21. end subroutine Pre_vc
  22. subroutine Pre_PM(Pemax,Eg,V,v2,xg,xt1,current) ! Pemax,Eg = PM(V,v2,xg,xt1,current)
  23.     real, intent(in)     :: v2
  24.     complex, intent(in)     :: xg,xt1,current,V
  25.     complex, intent(out)     :: Eg
  26.     real, intent(out)     :: Pemax
  27.  
  28.     Eg = (current*xg)+V
  29.     Pemax = (ABS(Eg)*v2)/(abs(xg)+abs(xt1))
  30.  
  31. end subroutine Pre_PM
  32. subroutine duringpost(Pd,Pp,x1,x2,x3,xg,E1,E2) ! Pd,Pp = duringpost(x1,x2,x3,xg,E1,E2)
  33.     implicit none
  34.     complex, intent(in) :: x1,x2,x3,xg
  35.     complex, intent(in) :: E1,E2
  36.     complex, intent(out)     :: Pd,Pp
  37.     real :: y12,y13,y32,y33
  38.     y13 = abs(1/(xg+x1))
  39.     y32 = abs(1/x2)
  40.     y33 = -abs((1/(x1+xg))+(1/x2)+(1/(x3/2)))
  41.     y12 = -(y13*y32)/y33
  42.  
  43.     Pd = abs(E1)*abs(E2)*y12
  44.     Pp = abs(E1)*abs(E2)/(abs(xg+x1+x2))
  45.  
  46. end subroutine duringpost
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement