Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

31/3/23, 19:12 MT_LAB01 (2).

ipynb - Colaboratory

LABORATORY 01
WRITE HERE STUDENT'S NAME AND CODE

Exercise 3.
The loop shown in Figure is inside a uniform magnetic field B = 50 a mWb/m . If side DC of the loop cuts the flux lines at the frequency of
x
2

50 Hz and the loop lies in the yz − plane at time t = 0 , find:

(a) The induced emf at t = 1 ms


(b) The induced current at t = 3 ms

Answer: (a) Vemf = 5.825 mV, (b) i = 0.1525 A

(a)

import sympy as sp
import math
from sympy.physics.vector import ReferenceFrame
sp.init_printing()

x,y,z,t,phi=sp.symbols('x,y,z,t,phi')
a = ReferenceFrame('a',indices=('\\rho','\\phi','z'))
a.rho = a.x
a.phi = a.y

https://colab.research.google.com/drive/18PdWd3DR_i9Hp44RTwRDo-oo4HpLuh25#scrollTo=_LnCl4-8Vnc5&printMode=true 1/3
31/3/23, 19:12 MT_LAB01 (2).ipynb - Colaboratory
B = (50*(10**-3))*(sp.cos(phi)*a.rho-sp.sin(phi)*a.phi)
B

^ρ − 0.05 sin (ϕ)a


0.05 cos (ϕ)a ​ ^ϕ ​

u = (0.04*(100*math.pi))*a.phi
u

12.5663706143592^
aϕ ​

V = u.cross(B)
V

^z
−0.628318530717959 cos (ϕ)a ​

dl = a.z
dl

^
az ​

product = V.dot(dl)
product

−0.628318530717959 cos (ϕ)

Vemf = sp.Integral(product,(z,0,0.03))
Vemf

0.03

∫ (−0.628318530717959 cos (ϕ)) dz


Vemf2 = Vemf.doit()
Vemf2

−0.0188495559215388 cos (ϕ)

Vx = Vemf2.subs(phi,2*50*math.pi*0.001+(math.pi/2))
Vx

0.0058248331161764

https://colab.research.google.com/drive/18PdWd3DR_i9Hp44RTwRDo-oo4HpLuh25#scrollTo=_LnCl4-8Vnc5&printMode=true 2/3
31/3/23, 19:12 MT_LAB01 (2).ipynb - Colaboratory

(b)

I = Vemf2/0.1 
I

−0.188495559215388 cos (ϕ)

Ix = I.subs(phi,2*50*math.pi*0.003+(math.pi/2))
Ix
Ia = round (Ix,4)
Ia

0.1525

error 0 s completado a las 18:46

https://colab.research.google.com/drive/18PdWd3DR_i9Hp44RTwRDo-oo4HpLuh25#scrollTo=_LnCl4-8Vnc5&printMode=true 3/3
31/3/23, 19:10 Untitled1.ipynb - Colaboratory

Exercise 4.
Rework Exercise 3 with everything the same except that the B field is changed to:

(a) B a mWb/m — that is, the magnetic field is oriented along the y − direction.
= 50 y
2

(b) B = 0.02ta Wb/m — that is, the magnetic field is time varying.
x
2

Answer: (a) −17.93 mV, −0.1108 A, (b) 20.5μ V, −41.92 mA

(a)

import sympy as sp
#libreria para realizar operaciones matematicas basicas
import math
from sympy.physics.vector import ReferenceFrame
sp.init_printing()

#asignacion de variables a utilizar
x,y,z,t,phi,rho=sp.symbols('x,y,z,t,phi,rho')
#asignacion de indices a utilizar
a = ReferenceFrame('a',indices=('\\rho','\\phi','z'))
a.rho = a.x
a.phi = a.y
#definicion de la densidad de campo magnetico
B = (50*(10**-3))*(sp.sin(phi)*a.rho+sp.cos(phi)*a.phi)
B
No se ha podido completar el guardado automático. Este archivo se ha actualizado de forma remota o en otra pestaña. Mostrar diferencias
^ρ + 0.05 cos (ϕ)a
0.05 sin (ϕ)a ​ ^ϕ ​

#definicion de la velocidad
u = (0.04*(100*math.pi))*a.phi
u

12.5663706143592^
aϕ ​

#desarrollo del producto cruz uxb
V = u.cross(B)
V

^z
−0.628318530717959 sin (ϕ)a ​

#asignacion del dl
dl = a.z

https://colab.research.google.com/drive/1YHwrSusYkcwkMhwyMOm9h_QqU30wfGL7#scrollTo=q6b_5mq3HqmU&printMode=true 1/5
31/3/23, 19:10 Untitled1.ipynb - Colaboratory
dl

^
az ​

#desarrollo del producto cruz
product = V.dot(dl)
product

−0.628318530717959 sin (ϕ)

#desarrollo de la integlras para calcular Vemf
Vemf = sp.Integral(product,(z,0,0.03))
Vemf

0.03

∫ (−0.628318530717959 sin (ϕ)) dz


#calculando el voltaje inducido Vemf
Vemf = Vemf.doit()
Vemf

−0.0188495559215388 sin (ϕ)

#dando el valor del voltaje para un tiempo t=1ms
Vx = Vemf.subs(phi,2*50*math.pi*0.001+(math.pi/2))
Vx
No se ha podido completar el guardado automático. Este archivo se ha actualizado de forma remota o en otra pestaña.
Va = round (Vx,5) Mostrar diferencias
Va

−0.01793

#calculando el valor de la corriente
I = Vemf/0.1
I

−0.188495559215388 sin (ϕ)

#dando el valor de la corriente para un tiempo t=3ms
Ix = I.subs(phi,2*50*math.pi*0.003+(math.pi/2))
Ix
Ia = round (Ix,4)
Ia

https://colab.research.google.com/drive/1YHwrSusYkcwkMhwyMOm9h_QqU30wfGL7#scrollTo=q6b_5mq3HqmU&printMode=true 2/5
31/3/23, 19:10 Untitled1.ipynb - Colaboratory

−0.1108

(b)

B2 = 0.02*t
B3 = (-sp.diff(B2.doit(),t))
B3a = B3*(sp.cos(phi)*a.rho-sp.sin(phi)*a.phi)
B3a

^ρ + 0.02 sin (ϕ)a


−0.02 cos (ϕ)a ​ ^ϕ ​

ds1 = (rho)*a.rho 
ds2 = a.phi 
vemf_rho = sp.Integral(B3a.dot(ds1),(rho,0,0.04),(phi,0,math.pi))
vemf_rho

3.14159265358979 0.04

∫ ​ ∫ (−0.02ρ cos (ϕ)) dρ dϕ


0 0

vemf_rho1 = vemf_rho.doit() 
vemf_rho1

−1.95943487863577 ⋅ 10−21

vemf_phi = sp.Integral(B3a.dot(ds2),(rho,0,0.04),(z,0,0.03))
vemf_phi
No se ha podido completar el guardado automático. Este archivo se ha actualizado de forma remota o en otra pestaña. Mostrar diferencias

0.03 0.04

∫ ​ ∫ 0.02 sin (ϕ) dρ dz


0 0

vemf_phi1 = vemf_phi.doit()
vemf_phi1

2.4 ⋅ 10−5 sin (ϕ)

B4 = B3*(sp.cos(phi)*a.rho-sp.sin(phi)*a.phi)
B4

^ρ + 0.02 sin (ϕ)a


−0.02 cos (ϕ)a ​ ^ϕ ​

https://colab.research.google.com/drive/1YHwrSusYkcwkMhwyMOm9h_QqU30wfGL7#scrollTo=q6b_5mq3HqmU&printMode=true 3/5
31/3/23, 19:10 Untitled1.ipynb - Colaboratory
v3 = u.cross(B4)
v3

^z
0.251327412287183 cos (ϕ)a ​

dl1 = a.z
v_1 = v3.dot(dl1)
vemf3 = sp.Integral(v_1,(z,0,0.03))
vemf3

0.03

∫ 0.251327412287183 cos (ϕ) dz


vemf4a = vemf3.doit()
vemf4a

0.0075398223686155 cos (ϕ)

vemf4b = vemf4a.subs(t,0.001)#
vemf4b

0.0075398223686155 cos (ϕ)

vx4 = vemf4b.subs(phi,2*50*math.pi*0.001+(math.pi)/2)
vx5 = vemfphi1.subs(phi,2*50*math.pi*0.001+(math.pi)/2)
No se ha podido completar el guardado automático. Este archivo se ha actualizado de forma remota o en otra pestaña.
Vx1 = vx4+vx5 Mostrar diferencias
Vx1

−0.00230710789007948

vemf4c=vemf4a.subs(t,0.003)
vemf4c

0.0075398223686155 cos (ϕ)

vx4=vemf4c.subs(phi,2*50*math.pi*0.003+(math.pi)/2)
vx5=vemfphi1.subs(phi,2*50*math.pi*0.003+(math.pi)/2)
Vx2=vx4+vx5
Ix1=Vx2/0.1
Ix1

−0.0608573758472329

https://colab.research.google.com/drive/1YHwrSusYkcwkMhwyMOm9h_QqU30wfGL7#scrollTo=q6b_5mq3HqmU&printMode=true 4/5
31/3/23, 19:10 Untitled1.ipynb - Colaboratory

check 0 s completado a las 19:10

No se ha podido completar el guardado automático. Este archivo se ha actualizado de forma remota o en otra pestaña. Mostrar diferencias

https://colab.research.google.com/drive/1YHwrSusYkcwkMhwyMOm9h_QqU30wfGL7#scrollTo=q6b_5mq3HqmU&printMode=true 5/5

You might also like