-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoving9.py
54 lines (40 loc) · 993 Bytes
/
oving9.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
from jonas import printOppg, fromPolar, printPolar, plotPolar, parallell
#
# Oppg 1
#
printOppg(1)
Vrs = fromPolar(100, 10)
Vtr = Vrs * fromPolar(1, 120)
Vst = Vtr * fromPolar(1, 120)
Zdelta = 8 + 4j
Irs = Vrs / Zdelta
Itr = Vtr / Zdelta
Ist = Vst / Zdelta
Ir = Irs * fromPolar(3**0.5, -30)
Is = Ir * fromPolar(1,-120)
It = Is * fromPolar(1,-120)
printPolar(Vrs, Vtr, Vst, Irs, Itr, Ist, Ir, Is, It)
plotPolar(Vrs, Vtr, Vst)
plotPolar(Irs, Itr, Ist, Ir, Is, It)
#
# Oppg 2
#
printOppg(2)
Vrs = fromPolar(250,0)
Vr = Vrs / fromPolar(3**0.5, 30)
Z = 30 + 15j
Zl = 5 + 10j
Zxc = -10j
Za = parallell(Zxc, Z/3)
Zb = Zl
Ztot = parallell(Zxc, Za+Zb)
printPolar(Za, Zb, Ztot)
Irs = Vrs/Ztot
Ir = Vr/Ztot
Irc1 = Ir * ((Za + Zb)/(-10j+Za+Zb))
Irzl = Ir * ((-10j)/(-10j+Za+Zb))
Irc2 = Irzl * ((Z/3)/(-10j+(Z/3)))
Irz = Irzl * ((-10j)/(-10j+(Z/3)))
Irzdelta = Irz / (fromPolar(3**0.5,-30))
printPolar(Ir, Irc1, Irzl, Irc2, Irz, Irzdelta)
plotPolar(Irs, Ir, Irc1, Irzl, Irc2, Irz, Irzdelta)