diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /854/CH4 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '854/CH4')
-rwxr-xr-x | 854/CH4/EX4.1/Example4_1.sce | 34 | ||||
-rwxr-xr-x | 854/CH4/EX4.2/Example4_2.sce | 31 | ||||
-rwxr-xr-x | 854/CH4/EX4.3/Example4_3.sce | 64 |
3 files changed, 129 insertions, 0 deletions
diff --git a/854/CH4/EX4.1/Example4_1.sce b/854/CH4/EX4.1/Example4_1.sce new file mode 100755 index 000000000..e4ebb0b4e --- /dev/null +++ b/854/CH4/EX4.1/Example4_1.sce @@ -0,0 +1,34 @@ +//clear//
+//Caption: Program to find the work involved 'W' in moving a charge 'Q' along shorter arc of a circle
+//Example4.1
+//page 84
+clc;
+x = sym('x');
+y = sym('y');
+z = sym('z');
+y1 = sym('y1');
+y = sqrt(1-x^2);
+Q = 2; //charge in coulombs
+Edot_dL1 = integ(y,x);
+disp(Edot_dL1,'E.dx*ax =')
+Edot_dL1 = limit(Edot_dL1,x,0.8)-limit(Edot_dL1,x,1);
+disp(Edot_dL1,'Value of E.dx*ax =')
+Edot_dL2 = 0;
+disp(Edot_dL2,'Value of E.dz*az=')
+x = sqrt(1-y1^2);
+Edot_dL3 = integ(x,y1)
+disp(Edot_dL3,'E.dy*ay=')
+Edot_dL3 = limit(Edot_dL3,y1,0.6)-limit(Edot_dL3,y1,0);
+disp(Edot_dL3,'Value of E.dy*ay =')
+W = -Q*(Edot_dL1+Edot_dL2+Edot_dL3);
+disp(W,'Work done in moving a point charge along shorter arc of circle in Joules, W=')
+//Result
+// E.dx*ax = asin(x)/2+x*sqrt(1-x^2)/2
+// Value of E.dx*ax = (25*asin(4/5)+12)/50-%pi/4
+// Value of E.dz*az = 0.
+// E.dy*ay = asin(y1)/2+y1*sqrt(1-y1^2)/2
+// Value of E.dy*ay = (25*asin(3/5)+12)/50
+//Work done in moving a point charge along shorter arc of circle in Joules, W =
+// -2*((25*asin(4/5)+12)/50+(25*asin(3/5)+12)/50-%pi/4)
+//Which is equivalent to
+// -2*((25*0.9272952+12)/50+(25*0.6435011+12)/50-%pi/4) = -0.96 Joules
diff --git a/854/CH4/EX4.2/Example4_2.sce b/854/CH4/EX4.2/Example4_2.sce new file mode 100755 index 000000000..4c60ee76b --- /dev/null +++ b/854/CH4/EX4.2/Example4_2.sce @@ -0,0 +1,31 @@ +//clear//
+//Caption: Program to find the work involved 'W' in moving a charge 'Q' along straight line
+//Example4.2
+//page 84
+clc;
+x = sym('x');
+y = sym('y');
+z = sym('z');
+y1 = sym('y1');
+y = -3*(x-1);
+Q = 2; //charge in coulombs
+Edot_dL1 = integ(y,x);
+disp(Edot_dL1,'E.dx*ax =')
+Edot_dL1 = limit(Edot_dL1,x,0.8)-limit(Edot_dL1,x,1);
+disp(Edot_dL1,'Value of E.dx*ax =')
+Edot_dL2 = 0;
+disp(Edot_dL2,'Value of E.dz*az=')
+x = (1-y1/3);
+Edot_dL3 = integ(x,y1)
+disp(Edot_dL3,'E.dy*ay=')
+Edot_dL3 = limit(Edot_dL3,y1,0.6)-limit(Edot_dL3,y1,0);
+disp(Edot_dL3,'Value of E.dy*ay =')
+W = -Q*(Edot_dL1+Edot_dL2+Edot_dL3);
+disp(W,'Work done in moving a point charge along shorter arc of circle in Joules, W=')
+//Result
+//E.dx*ax = -3*(x^2/2-x)
+//Value of E.dx*ax = -3/50
+//Value of E.dz*az = 0.
+//E.dy*ay = y1-y1^2/6
+//Value of E.dy*ay = 27/50
+//Work done in moving a point charge along shorter arc of circle in Joules, W = -24/25 = -0.96 Joules
diff --git a/854/CH4/EX4.3/Example4_3.sce b/854/CH4/EX4.3/Example4_3.sce new file mode 100755 index 000000000..708a22f75 --- /dev/null +++ b/854/CH4/EX4.3/Example4_3.sce @@ -0,0 +1,64 @@ +//clear//
+//Caption: Program to calculate E, D and volume charge density using divergence of D
+//Example4.3
+//page 100
+clc;
+x = -4;
+y = 3;
+z = 6;
+V = 2*(x^2)*y-5*z;
+disp(float(V),'Potential V at point P(-4,3,6)in volts is Vp =')
+x1 = sym('x1');
+y1 = sym('y1');
+z1 = sym('z1');
+ax = sym('ax');
+ay = sym('ay');
+az = sym('az');
+V1 = 2*(x1^2)*y1-5*z1;
+//Electric Field Intensity from gradient of V
+Ex = -diff(V1,x1);
+Ey = - diff(V1,y1);
+Ez = - diff(V1,z1);
+Ex1 = limit(Ex,x1,-4);
+Ex1 = limit(Ex1,y1,3);
+Ex1 = limit(Ex1,z1,6);
+Ey1 = limit(Ey,x1,-4);
+Ey1 = limit(Ey1,y1,3);
+Ey1 = limit(Ey1,z1,6);
+Ez1 = limit(Ez,x1,-4);
+Ez1 = limit(Ez1,y1,3);
+Ez1 = limit(Ez1,z1,6);
+E = Ex1*ax+Ey1*ay+Ez1*az;
+Ep = sqrt(float(Ex1^2+Ey1^2+Ez1^2));
+disp(Ep,'Electric Field Intensity E at point P(-4,3,6) in volts E =')
+aEp = float(E/Ep);
+disp(aEp,'Direction of Electric Field E at point P(-4,3,6) aEp=')
+Dx = float(8.854*Ex);
+Dy = float(8.854*Ey);
+Dz = float(8.854*Ez);
+D = Dx*ax+Dy*ay+Dz*az;
+disp(D,'Electric Flux Density in pico.C/square.metre D =')
+dDx = diff(Dx,x1);
+dDx = limit(dDx,x1,-4);
+dDx = limit(dDx,y1,3);
+dDx = limit(dDx,z1,6);
+dDy = diff(Dy,y1);
+dDy = limit(dDy,x1,-4);
+dDy = limit(dDy,y1,3);
+dDy = limit(dDy,z1,6);
+dDz = diff(Dz,z1);
+dDz = limit(dDz,x1,-4);
+dDz = limit(dDz,y1,3);
+dDz = limit(dDz,z1,6);
+rV = dDx+dDy+dDz;
+disp(rV,'Volume Charge density from divergence of D in pC/cubic.metre is rV=')
+//Result
+//Potential V at point P(-4,3,6)in volts is Vp = 66.
+//Electric Field Intensity E at point P(-4,3,6) in volts E = 57.9050947672137
+//Direction of Electric Field E at point P(-4,3,6) aEp=
+//0.01726963756851*(5*az-32*ay+48*ax)
+//equivalent to aEp= 0.0863482*az-0.5526284*ay+0.8289426*ax
+//Electric Flux Density in pico.C/square.metre D =
+// -35.416*ax*x1*y1-17.708*ay*x1^2+44.27*az
+//Volume Charge density from divergence of D in pC/cubic.metre is rV=
+// -106.248
|