summaryrefslogtreecommitdiff
path: root/3768/CH8/EX8.8/Ex8_8.sce
blob: 6850d331ec32a75dad963276c3c9fd6cb43aa494 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//Example number 8.8, Page number 172

clc;clear;
close;

//Variable declaration
r=0.04;    //radius(m)
i=1000*10**-3;    //current(mA)
B=10**-3;   //magnetic flux density(wb/m**2)
theta=45;   //angle(degrees)
//Calculation
A=%pi*r**2;     //area(m**2)
mew=i*A;        //magnetic dipole moment(amp m**2)
theta=theta*%pi/180;
tow=i*B*cos(theta);    //torque(Nm)
//Result
printf("magnetic dipole moment is %.4e Amp-m^2",mew)
printf("\n torque is %.4e Nm",tow)

//answer in the book varies due to rounding off errors