From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 854/CH8/EX8.1/Example8_1.sce | 27 +++++++++++++++++++++++++++ 854/CH8/EX8.2/Example8_2.sce | 23 +++++++++++++++++++++++ 854/CH8/EX8.3/Example8_3.sce | 28 ++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100755 854/CH8/EX8.1/Example8_1.sce create mode 100755 854/CH8/EX8.2/Example8_2.sce create mode 100755 854/CH8/EX8.3/Example8_3.sce (limited to '854/CH8') diff --git a/854/CH8/EX8.1/Example8_1.sce b/854/CH8/EX8.1/Example8_1.sce new file mode 100755 index 000000000..98dc442f7 --- /dev/null +++ b/854/CH8/EX8.1/Example8_1.sce @@ -0,0 +1,27 @@ +//clear// +//Caption: Program to find the magnetic field intensity of a current carrying filament +//Example8.1 +//page 217 +clc; +I = 8; //current in amps +alpha1x = -90/57.3; // phase angle along with x-axis +x = 0.4; +y = 0.3; +z =0; +alpha2x = atan(x/y); +aphi = sym('aphi'); +az = sym('az'); +rx = y; // distance in metres in cynlindrical coordiante system +H2x = float((I/(4*%pi*rx))*(sin(alpha2x)-sin(alpha1x)))*-az; +disp(H2x,'H2x = ') +alpha1y = -atan(y/x); +alpha2y = 90/57.3; +ry = 0.4; +H2y = float((I/(4*%pi*ry))*(sin(alpha2y)-sin(alpha1y)))*-az; +disp(H2y,'H2y =') +H2 = H2x+H2y; +disp(H2,'H2 =') +//Result +//H2x = -3.819718617079289*az +//H2y = -2.546479080730701*az +//H2 = -6.36619769780999*az diff --git a/854/CH8/EX8.2/Example8_2.sce b/854/CH8/EX8.2/Example8_2.sce new file mode 100755 index 000000000..4dd4d362d --- /dev/null +++ b/854/CH8/EX8.2/Example8_2.sce @@ -0,0 +1,23 @@ +//clear// +//Caption: Program to find the curlH of a square path of side 'd' +//Example8.2 +//page 230 +clc; +ax = sym('ax'); +az = sym('az'); +ay = sym('ay'); +z = sym('z'); +y = sym('y'); +d = sym('d'); +H = 0.2*z^2*ax; +Hx = float(H/ax); +HdL = float(0.4*z*d^2); +//curlH evaluated from the definition of curl +curlH = (HdL/(d^2))*ay; +//curlH evaluated from the determinant +del_cross_H = -ay*(-diff(Hx,z))+az*(-diff(Hx,y)); +disp(curlH,'curlH = ') +disp(del_cross_H,'del_cross_H = ') +//Result +//curlH = 0.4*ay*z +//del_cross_H = 0.4*ay*z diff --git a/854/CH8/EX8.3/Example8_3.sce b/854/CH8/EX8.3/Example8_3.sce new file mode 100755 index 000000000..e82ccbe93 --- /dev/null +++ b/854/CH8/EX8.3/Example8_3.sce @@ -0,0 +1,28 @@ +//clear// +//Caption: Program to verify Stokes theorem +//Example8.3 +//page 233 +clc; +teta = sym('teta'); +phi = sym('phi'); +ar = sym('ar'); +aphi = sym('aphi'); +az = sym('az'); +r = sym('r'); +curlH = float(36*cos(teta)*cos(phi)*r^2*sin(teta)); +curlH_S = integ(curlH,teta); +curlH_S = float(limit(curlH_S,r,4)); +curlH_S = float(limit(curlH_S,teta,0.1*%pi))-float(limit(curlH_S,teta,0)); +curlH_S = integ(curlH_S,phi); +curlH_S = float(limit(curlH_S,phi,0.3*%pi))-float(limit(curlH_S,phi,0)); +disp(curlH_S,'Surface Integral of curlH in Amps =') +Hr = 6*r*sin(phi); +Hphi = 18*r*sin(teta)*cos(phi); +HdL = float(limit(Hphi*r*sin(teta),r,4)); +HdL = float(limit(HdL,teta,0.1*%pi)); +HdL = float(integ(HdL,phi)) +HdL = float(limit(HdL,phi,0.3*%pi)); +disp(HdL,'Closed Line Integral of H in Amps =') +//Result +//Surface Integral of curlH in Amps = 22.24922359441324 +// Closed Line Integral of H in Amps = 22.24922359441324 -- cgit