Een 330 Homework 4 Part1 Solution: Problem 4.4

You might also like

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

[EEN 

330‐HOMEWORK 4‐PART1 SOLUTION] Dr. M. Bou Sanayeh 
 
Problem 4.4 

Problem 4.7 

Page 1 of 14 
 
[EEN 330‐HOMEWORK 4‐PART1 SOLUTION] Dr. M. Bou Sanayeh 
 
Problem 4.9 

 
%P4-9
%Plot Hf/Hi vs h/a. As h/a increases, the line will appear more
%infinite to an observation point (0,a,0)

h_over_a=0.01:0.01:100;
Hf_over_Hi=h_over_a./sqrt(1+h_over_a.^2);

semilogx(h_over_a,Hf_over_Hi)
xlabel('h/a'),ylabel('Hf/Hi'),grid

Page 2 of 14 
 
[EEN 330‐HOMEWORK 4‐PART1 SOLUTION] Dr. M. Bou Sanayeh 
 
Problem 4.11 

Problem 4.14 

Page 3 of 14 
 
[EEN 330‐HOMEWORK 4‐PART1 SOLUTION] Dr. M. Bou Sanayeh 
 
Problem 4.17 

clear
%inital variables
a=3e-3; %m
I=2; %A

R=[0:1e-5:9e-3];

for k=1:length(R)
if R(k)<=a %GS1
H(k)=(I/(2*pi*a^2))*R(k);
else %GS2
H(k)=I/(2*pi*R(k));
end
end
plot(R,H)
ylabel('H (A/m)')
xlabel('Radial distance(m)')
grid

Page 4 of 14 
 
[EEN 330‐HOMEWORK 4‐PART1 SOLUTION] Dr. M. Bou Sanayeh 
 
Problem 4.20 

For ρ>b Ienc = I Æ H=(I/2πρ)aφ

clear
%inital variables
a=0.04; %m
b=0.05; %m
I=3; %A

R=[0:1e-3:0.1];

for k=1:length(R)
if R(k)<=a %GS1
H(k)=0;
elseif R(k)<=b %GS2
H(k)=(I*(R(k)^2-a^2))/(2*pi*(b^2-a^2)*R(k));
else %GS3
H(k)=I/(2*pi*R(k));
end
end
plot(R,H)
ylabel('H (A/m)')
xlabel('Radial distance(m)')
grid

Page 5 of 14 
 
[EEN 330‐HOMEWORK 4‐PART1 SOLUTION] Dr. M. Bou Sanayeh 
 
Problem 4.21 

clear
%inital variables
a=0.02; %m
I=1; %A

R=[0.001:1e-4:0.04];

for k=1:length(R)
if R(k)<=a %GS1
H(k)=I/(2*pi*R(k));

else %GS2
H(k)=0;
end
end
plot(R,H)
ylabel('H (A/m)')
xlabel('Radial distance(m)')
grid

Page 6 of 14 
 
[EEN 330‐HOMEWORK 4‐PART1 SOLUTION] Dr. M. Bou Sanayeh 
 
Problem 4.22 

clear
%inital variables
a=0.02; %m
b=0.04;%m
I=4; %A

R=[0:1e-3:0.08];

for k=1:length(R)
if R(k)<=a %GS1
H(k)=0;
elseif R(k)<=b
H(k)=I/(2*pi*R(k));
else %GS3
H(k)=0;
end
end
plot(R,H)
ylabel('H (A/m)')
xlabel('Radial distance(m)')
grid

Page 7 of 14 
 
[EEN 330‐HOMEWORK 4‐PART1 SOLUTION] Dr. M. Bou Sanayeh 
 
Problem 4.27 

Page 8 of 14 
 
[EEN 330‐HOMEWORK 4‐PART1 SOLUTION] Dr. M. Bou Sanayeh 
 
Problem 4.31 

Problem 4.34 

Page 9 of 14 
 
[EEN 330‐HOMEWORK 4‐PART1 SOLUTION] Dr. M. Bou Sanayeh 
 
Problem 4.39 

Problem 4.44 

Page 10 of 14 
 
[EEN 330‐HOMEWORK 4‐PART1 SOLUTION] Dr. M. Bou Sanayeh 
 
Problem 4.46 

Problem 4.48 

Page 11 of 14 
 
[EEN 330‐HOMEWORK 4‐PART1 SOLUTION] Dr. M. Bou Sanayeh 
 

Problem 4.49 

%Check out the DOT and CROSS commands in MATLAB Help


clc
clear
%user inputs varibales
ur1=input('enter relative permeability medium 1:');
ur2=input('enter relative permeability medium 2:');
a12=input('enter unit vector from medium 1 to medium 2:');
F=input('material where field is known (1 or 2):');
Ha=input('known magnetic field intensity vector:');

%choosing directions
if F==1
ura=ur1;
urb=ur2;
a=a12;
else
ura=ur2;
urb=ur1;
a=-a12;
end

% calculations
Hna=dot(Ha,a)*a;
Hta=Ha-Hna;
Htb=Hta;
Bna=ura*Hna; %u0 ignored since it will factor out
Bnb=Bna;
Hnb=Bnb/urb;
disp('The magnetic field in the other medium is: ')
Hb=Htb+Hnb
 

Output in Command Window 
enter relative permeability medium 1:6000
enter relative permeability medium 2:3000
enter unit vector from medium 1 to medium 2:[0 0 1]
material where field is known (1 or 2):1
known magnetic field intensity vector:[ 6 2 3]
The magnetic field in the other medium is:

Hb =

6 2 6

Page 12 of 14 
 
[EEN 330‐HOMEWORK 4‐PART1 SOLUTION] Dr. M. Bou Sanayeh 
 

Problem 4.50 

Page 13 of 14 
 
[EEN 330‐HOMEWORK 4‐PART1 SOLUTION] Dr. M. Bou Sanayeh 
 
Problem 4.51 

Page 14 of 14 
 

You might also like