summaryrefslogtreecommitdiff
path: root/887/CH3
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /887/CH3
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '887/CH3')
-rwxr-xr-x887/CH3/EX3.1/3_1.sce28
-rwxr-xr-x887/CH3/EX3.2/3_2.sce19
-rwxr-xr-x887/CH3/EX3.3/3_3.sce35
-rwxr-xr-x887/CH3/EX3.4/3_4.sce19
-rwxr-xr-x887/CH3/EX3.5/3_5.sce23
-rwxr-xr-x887/CH3/EX3.6/3_6.sce35
6 files changed, 159 insertions, 0 deletions
diff --git a/887/CH3/EX3.1/3_1.sce b/887/CH3/EX3.1/3_1.sce
new file mode 100755
index 000000000..7e7e655a5
--- /dev/null
+++ b/887/CH3/EX3.1/3_1.sce
@@ -0,0 +1,28 @@
+clc
+//ex3.1
+C=1*10^-6;
+//t in micro seconds
+t_1=[0:0.001:2];
+t_2=[2.001:0.001:4];
+t_3=[4.001:0.001:5];
+t=[t_1,t_2,t_3];
+//corresponding voltage variations
+V_1=5*t_1;
+V_2=0*t_2+10;
+V_3=-10*t_3+50;
+//charge q=C*V
+q_1=C*V_1;
+q_2=C*V_2;
+q_3=C*V_3;
+q=[q_1,q_2,q_3];
+subplot(121)
+plot(t,q*10^6)
+xtitle('charge vs time','time in Ms','charge in Mc') //M-micro(10^-6)
+//current i=C*dV/dt*10^6, for above equations we get
+i_1=10^6*(0*t_1+C*(5));
+i_2=10^6*0*t_2;
+i_3=10^6*(0*t_3+C*(-10));
+i=[i_1,i_2,i_3];
+subplot(122)
+plot(t,i)
+xtitle('current vs time','time in Ms','current in amperes') //M-micro(10^-6)
diff --git a/887/CH3/EX3.2/3_2.sce b/887/CH3/EX3.2/3_2.sce
new file mode 100755
index 000000000..91f1a7b23
--- /dev/null
+++ b/887/CH3/EX3.2/3_2.sce
@@ -0,0 +1,19 @@
+clc
+//ex3.2
+C=0.1*10^-6;
+//symbolic integration cannot be done in scilab
+t=[0:0.001*10^-3:3*%pi*10^-4];
+i=0.5*sin((10^4)*t);
+//on integrating 'i' w.r.t t
+q=0.5*10^-4*(1-cos(10^4*t));
+C=10^-7;
+V=q/C;
+subplot(221)
+plot(t,q*10^6)
+xtitle('charge vs time','time in seconds','charge in Mc') //Mc=micro coulombs(10^-6)
+subplot(222)
+plot(t,i)
+xtitle('current vs time','time in seconds','current in amperes') //Mc=micro coulombs(10^-6)
+subplot(223)
+xtitle('voltage vs time','time in seconds','voltage in volts')
+plot(t,V)
diff --git a/887/CH3/EX3.3/3_3.sce b/887/CH3/EX3.3/3_3.sce
new file mode 100755
index 000000000..f5772db08
--- /dev/null
+++ b/887/CH3/EX3.3/3_3.sce
@@ -0,0 +1,35 @@
+clc
+//ex3.3
+C=10*10^-6;
+t_1=[0:0.001:1];
+t_2=[1.001:0.001:3];
+t_3=[3.001:0.001:5];
+t=[t_1,t_2,t_3];
+//voltage variations
+V_1=1000*t_1;
+V_2=0*t_2+1000;
+V_3=500*(5-t_3);
+//current i=C*dv/dt, for above equations we get
+i_1=C*(0*t_1+1000);
+i_2=C*(0*t_2);
+i_3=C*(0*t_3-500);
+i=[i_1,i_2,i_3];
+//power delivered, P=V*i
+P_1=C*(10^6*t_1);
+P_2=C*(0*t_2+1000);
+P_3=C*(-25*10^4*(5-t_3));
+P=[P_1,P_2,P_3];
+//energy stored, W=(1/2)*C*V^2
+W_1=(1/2)*C*V_1^2;
+W_2=(1/2)*C*V_2^2;
+W_3=(1/2)*C*V_3^2;
+W=[W_1,W_2,W_3];
+subplot(221)
+plot(t,i*10^3)
+xtitle('current vs time','time in seconds','current in mA') //mA-milli amperes(10^-3)
+subplot(222)
+plot(t,P)
+xtitle('power delivered vs time','time in seconds','power in watts')
+subplot(223)
+plot(t,W)
+xtitle('energy stored vs time','time in seconds','work in joules')
diff --git a/887/CH3/EX3.4/3_4.sce b/887/CH3/EX3.4/3_4.sce
new file mode 100755
index 000000000..5d823f37e
--- /dev/null
+++ b/887/CH3/EX3.4/3_4.sce
@@ -0,0 +1,19 @@
+clc
+//ex3.4
+L=10*10^-2; //length
+W=20*10^-2; //width
+d=0.1*10^-3; //distance between plates
+A=L*W; //area
+E_o=8.85*10^-12; //dielectric constant of vacuum
+//dielectric is air
+E_r=1; //relative dielectric constant of air
+E=E_r*E_o; //dielectric constant
+C=E*A/d; //capacitance
+disp('When the dielectric is air, capacitance in pF is') //pF-pico Farad(10^-12)
+disp(C*10^12)
+//dielectric is mica
+E_r=7; //relative dielectric constant of mica
+E=E_r*E_o; //dielectric constant
+C=E*A/d; //capacitance
+disp('When the dielectric is mica, capacitance in pF is') //pF-pico Farad(10^-12)
+disp(C*10^12)
diff --git a/887/CH3/EX3.5/3_5.sce b/887/CH3/EX3.5/3_5.sce
new file mode 100755
index 000000000..4e4a3c588
--- /dev/null
+++ b/887/CH3/EX3.5/3_5.sce
@@ -0,0 +1,23 @@
+clc
+//ex3.5
+C_1=1*10^-6;
+C_2=1*10^-6;
+//Before the switch is closed
+V_1=100;
+V_2=0;
+W_1=(1/2)*C_1*V_1^2;
+W_2=0; //V_2=0
+W_t_1=W_1+W_2; //total energy stored by both the capacitors before switch is closed
+q_1=C_1*V_1;
+q_2=0;
+//After the switch is closed
+q_eq=q_1+q_2; //charge on equivalent capacitance
+C_eq=C_1+C_2; //C_1 and C_2 in parallel
+V_eq=q_eq/C_eq;
+V_1=V_eq; //parallel combination
+V_2=V_eq; //parallel combination
+W_1=(1/2)*C_1*V_eq^2;
+W_2=(1/2)*C_2*V_eq^2;
+W_t_2=W_1+W_2; //total energy stored by both the capacitors after switch is closed
+disp(W_t_1*10^3,'Total energy stored by both the capacitors before switch is closed in mJ') //mJ-milli Joules(10^-3)
+disp(W_t_2*10^3,'Total energy stored by both the capacitors after switch is closed in mJ') //mJ-milli Joules(10^-3)
diff --git a/887/CH3/EX3.6/3_6.sce b/887/CH3/EX3.6/3_6.sce
new file mode 100755
index 000000000..523556f5c
--- /dev/null
+++ b/887/CH3/EX3.6/3_6.sce
@@ -0,0 +1,35 @@
+clc
+//ex3.6
+L=5; //inductance
+t_1=[0:0.001:2];
+t_2=[2.001:0.001:4];
+t_3=[4.001:0.001:5];
+t=[t_1,t_2,t_3];
+//corresponding current variations
+i_1=(1.5)*t_1;
+i_2=0*t_2+3;
+i_3=(-3*t_3)+15;
+//voltage V=L*(di/dt)
+V_1=L*(0*t_1+(1.5));
+V_2=L*(0*t_2);
+V_3=L*(0*t_3-3);
+V=[V_1,V_2,V_3];
+//stored energy W=1/2*L*i^2
+W_1=(1/2)*L*i_1^2;
+W_2=(1/2)*L*i_2^2;
+W_3=(1/2)*L*i_3^2;
+W=[W_1,W_2,W_3];
+//power P=V*i
+P_1=L*t_1*(1.5^2);
+P_2=0*t_2;
+P_3=-3*L*(-3*t_3+15);
+P=[P_1,P_2,P_3];
+subplot(221)
+plot(t,V)
+xtitle('voltage vs time','time in seconds','voltage in volts')
+subplot(222)
+plot(t,W)
+xtitle('energy vs time','time in seconds','energy in joules')
+subplot(223)
+plot(t,P)
+xtitle('power vs time','time in seconds','power in watts')