summaryrefslogtreecommitdiff
path: root/569/CH4
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /569/CH4
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 '569/CH4')
-rwxr-xr-x569/CH4/EX4.1/4_1.sci7
-rwxr-xr-x569/CH4/EX4.10/4_10.sci6
-rwxr-xr-x569/CH4/EX4.11/4_11.sci29
-rwxr-xr-x569/CH4/EX4.12/4_12.sci11
-rwxr-xr-x569/CH4/EX4.13/4_13.sci20
-rwxr-xr-x569/CH4/EX4.14/4_14.sci14
-rwxr-xr-x569/CH4/EX4.15/4_15.sci9
-rwxr-xr-x569/CH4/EX4.16/4_16.sci16
-rwxr-xr-x569/CH4/EX4.17/4_17.sci12
-rwxr-xr-x569/CH4/EX4.18/4_18.sci12
-rwxr-xr-x569/CH4/EX4.19/4_19.sci8
-rwxr-xr-x569/CH4/EX4.2/4_2.sci7
-rwxr-xr-x569/CH4/EX4.20/4_20.sci16
-rwxr-xr-x569/CH4/EX4.21/4_21.sci10
-rwxr-xr-x569/CH4/EX4.22/4_22.sci16
-rwxr-xr-x569/CH4/EX4.23/4_23.sci9
-rwxr-xr-x569/CH4/EX4.4/4_4.sci8
-rwxr-xr-x569/CH4/EX4.5/4_5.sci8
-rwxr-xr-x569/CH4/EX4.6/4_6.sci13
-rwxr-xr-x569/CH4/EX4.8/4_8.sci15
-rwxr-xr-x569/CH4/EX4.9/4_9.sci5
21 files changed, 251 insertions, 0 deletions
diff --git a/569/CH4/EX4.1/4_1.sci b/569/CH4/EX4.1/4_1.sci
new file mode 100755
index 000000000..b208e33ab
--- /dev/null
+++ b/569/CH4/EX4.1/4_1.sci
@@ -0,0 +1,7 @@
+// calculating the temperature after 1.5 s
+clc;
+th0=100;
+t=1.5;
+tc=3.5;
+th=th0*[1-exp(-t/tc)];
+disp(th,'temperature after 1.5 s (degree C)') \ No newline at end of file
diff --git a/569/CH4/EX4.10/4_10.sci b/569/CH4/EX4.10/4_10.sci
new file mode 100755
index 000000000..7b03051fc
--- /dev/null
+++ b/569/CH4/EX4.10/4_10.sci
@@ -0,0 +1,6 @@
+// Calculate the temperature at a depth of 1000 m
+clc;
+th0=20;
+t=2000;
+thr=th0-0.005*(t-50)-0.25*exp(-t/50);
+disp(thr,'temperature at a depth of 1000 m (degree C)') \ No newline at end of file
diff --git a/569/CH4/EX4.11/4_11.sci b/569/CH4/EX4.11/4_11.sci
new file mode 100755
index 000000000..06b666f5d
--- /dev/null
+++ b/569/CH4/EX4.11/4_11.sci
@@ -0,0 +1,29 @@
+// Calculate the value of resistance at different values of time
+clc;
+Gain=0.3925;
+T=75;
+p_duration=Gain*T;
+tc=5.5;
+Rin=100;
+t=1;
+Rt=p_duration*(1-exp(-t/tc))+Rin;
+disp(Rt,'Value of resistance after 1s(ohm)=')
+t=2;
+Rt=p_duration*(1-exp(-t/tc))+Rin;
+disp(Rt,'Value of resistance after 2s(ohm)=')
+t=3;
+Rt=p_duration*(1-exp(-t/tc))+Rin;
+disp(Rt,'Value of resistance after 3s(ohm)=')
+R_inc=Rt-Rin;
+t=5;
+Rt=(R_inc)*[exp(-(t-3)/(5.5))]+Rin;
+disp(Rt,'Value of resistance after 5s(ohm)=')
+t=10;
+Rt=(R_inc)*[exp(-(t-3)/(5.5))]+Rin;
+disp(Rt,'Value of resistance after 10s(ohm)=')
+t=20;
+Rt=(R_inc)*[exp(-(t-3)/(5.5))]+Rin;
+disp(Rt,'Value of resistance after 20s(ohm)=')
+t=30;
+Rt=(R_inc)*[exp(-(t-3)/(5.5))]+Rin;
+disp(Rt,'Value of resistance after 30s(ohm)=') \ No newline at end of file
diff --git a/569/CH4/EX4.12/4_12.sci b/569/CH4/EX4.12/4_12.sci
new file mode 100755
index 000000000..20ab68789
--- /dev/null
+++ b/569/CH4/EX4.12/4_12.sci
@@ -0,0 +1,11 @@
+// calculate the value of damping constant and frequency of damped oscillations
+clc;
+M=8*10^-3;
+K=1000;
+wn=(K/M)^0.5;
+disp('for critically damped system eta=1')
+B=2*(K*M);
+disp(B,'Damping constant for critically damped system (N/ms-1)=')
+eta=0.6;
+wd=wn*(1-eta^2)^0.5;
+disp(wd,'frequency of damped oscillations (rad/s)=') \ No newline at end of file
diff --git a/569/CH4/EX4.13/4_13.sci b/569/CH4/EX4.13/4_13.sci
new file mode 100755
index 000000000..ebfa04133
--- /dev/null
+++ b/569/CH4/EX4.13/4_13.sci
@@ -0,0 +1,20 @@
+// Calculate damping ratio, natural frequency, frequency of damped oscillations, time constant
+// and steady state error for ramp signal of 5V/s
+clc;
+K=(40*10^-6)/(%pi/2);
+J=0.5*10^-6;
+B=5*10^-6;
+eta=B/(2*(K*J)^0.5);
+disp(eta,'damping ratio=')
+wn=(K/J)^0.5;
+disp(wn,'natural frequency (rad/sec)')
+wd=wn*(1-(eta)^2)^0.5;
+disp(wd,'frequency of damped oscillations (rad/s)')
+tc=1/wn;
+disp(tc,'time constant (s)')
+ess=2*eta/wn;
+disp('for a ramp input of 5V, steady state error (V) =')
+ess=5*2*eta/wn;
+disp(ess,'')
+T_lag=2*eta*tc;
+disp(T_lag,'Time lag (s)') \ No newline at end of file
diff --git a/569/CH4/EX4.14/4_14.sci b/569/CH4/EX4.14/4_14.sci
new file mode 100755
index 000000000..5e9c3a143
--- /dev/null
+++ b/569/CH4/EX4.14/4_14.sci
@@ -0,0 +1,14 @@
+// Calculate the natural frequency
+clc;
+wn=2*%pi*30;
+disp( 'for a frequency of 30 Hz wn=(K/M+5*10^-3)^0.5.........(i)');
+disp('But wn=(K/M)^0.5.........(ii)');
+disp('for a frequency of 25 Hz wn=(K/M+5*10^-3+5*10^-3)^0.5.........(iii) ')
+disp('on solving (i), (ii) and (iii)')
+M=6.36*10^-3;
+K=403.6;
+disp(M,'M=')
+disp(K,'K=')
+wn=(K/M)^0.5;
+f=wn/(2*%pi);
+disp(f,'natural frequency (Hz)')
diff --git a/569/CH4/EX4.15/4_15.sci b/569/CH4/EX4.15/4_15.sci
new file mode 100755
index 000000000..0b9208a63
--- /dev/null
+++ b/569/CH4/EX4.15/4_15.sci
@@ -0,0 +1,9 @@
+// Calculate natural frequency and setteling time
+clc;
+K=60*10^3;
+M=30;
+wn=(K/M)^0.5;
+disp(wn,'natural frequency (rad/sec)')
+eta=0.7;
+ts=4/(eta*wn);
+disp(ts,'setteling time (s)') \ No newline at end of file
diff --git a/569/CH4/EX4.16/4_16.sci b/569/CH4/EX4.16/4_16.sci
new file mode 100755
index 000000000..62bdf5e89
--- /dev/null
+++ b/569/CH4/EX4.16/4_16.sci
@@ -0,0 +1,16 @@
+// Calculate time lag and ratio of output and input
+clc;
+disp('when time period is 600s')
+w=2*%pi/600;
+tc=60;
+T_lag=(1/w)*atan(w*tc);
+disp(T_lag,'time lag (s)=')
+M=1/((1+(w*tc)^2)^0.5);
+disp(M,'ratio of output and input=')
+disp('when time period is 120s')
+w=2*%pi/120;
+tc=60;
+T_lag=(1/w)*atan(w*tc);
+disp(T_lag,'time lag (s)=')
+M=1/((1+(w*tc)^2)^0.5);
+disp(M,'ratio of output and input=') \ No newline at end of file
diff --git a/569/CH4/EX4.17/4_17.sci b/569/CH4/EX4.17/4_17.sci
new file mode 100755
index 000000000..dda4a31af
--- /dev/null
+++ b/569/CH4/EX4.17/4_17.sci
@@ -0,0 +1,12 @@
+// Calculate the maximum allowable time constant and phase shift
+clc;
+M=1-0.05;
+w=2*%pi*100;
+tc={[(1/M^2)-1]/(w^2)}^0.5;
+disp(tc,'maximum allowable time constant (s)')
+disp('phase shift at 50 Hz (degree)=')
+ph=[-atan(2*%pi*50*tc)]*(180/%pi);
+disp(ph,'')
+disp('phase shift at 100 Hz (degree)=')
+ph=[-atan(2*%pi*100*tc)]*(180/%pi);
+disp(ph,) \ No newline at end of file
diff --git a/569/CH4/EX4.18/4_18.sci b/569/CH4/EX4.18/4_18.sci
new file mode 100755
index 000000000..a84877b5f
--- /dev/null
+++ b/569/CH4/EX4.18/4_18.sci
@@ -0,0 +1,12 @@
+// Calculate maximum value of indicated temperature and delay time
+clc;
+T=120;
+w=2*%pi/T;
+tc1=40;
+tc2=20;
+M=[1/((1+(w*tc1)^2)^0.5)]*[1/((1+(w*tc2)^2)^0.5)];
+M_temp=M*10;
+disp(M_temp,'maximum value of indicated temperature (degree C)')
+ph=[{atan(w*tc1)+atan(w*tc2)}];
+T_lag=ph/w;
+disp(T_lag,'Time lag (s)') \ No newline at end of file
diff --git a/569/CH4/EX4.19/4_19.sci b/569/CH4/EX4.19/4_19.sci
new file mode 100755
index 000000000..287737839
--- /dev/null
+++ b/569/CH4/EX4.19/4_19.sci
@@ -0,0 +1,8 @@
+// Find the output
+clc;
+disp('when tc=0.2);
+disp('output=1/(1+(2*0.2)^2)^0.5]sin[2t-atan(2*0.2)]+3/(1+(2*0.2)^2)^0.5]sin[20t-atan(20*0.2)]')
+disp('on solving output=0.93 sin(2t-21.8)+0.073 sin(20t-76)')
+disp('when tc=0.002);
+disp('output=1/(1+(2*0.002)^2)^0.5]sin[2t-atan(2*0.002)]+3/(1+(2*0.002)^2)^0.5]sin[20t-atan(20*0.002)]')
+disp('on solving output= 1sin(2t-0.23)+0.3 sin(20t-2.3)') \ No newline at end of file
diff --git a/569/CH4/EX4.2/4_2.sci b/569/CH4/EX4.2/4_2.sci
new file mode 100755
index 000000000..6619099e5
--- /dev/null
+++ b/569/CH4/EX4.2/4_2.sci
@@ -0,0 +1,7 @@
+// calculate time to read half of the temperature difference
+clc;
+tc=10/5;
+th=1;
+th0=2;
+t=-tc*log(1-(th/th0));
+disp(t,'Time to read half of the temperature difference (s)') \ No newline at end of file
diff --git a/569/CH4/EX4.20/4_20.sci b/569/CH4/EX4.20/4_20.sci
new file mode 100755
index 000000000..f8e59d00e
--- /dev/null
+++ b/569/CH4/EX4.20/4_20.sci
@@ -0,0 +1,16 @@
+//Calculate maximum and minimum value of indicated temperature, phase shift, time lag
+clc;
+T_max=640;
+T_min=600;
+T_mean=(T_max+T_min)/2;
+Ai=T_mean-T_min;
+w=2*%pi/80;
+tc=10;
+Ao=Ai/{(1+(w*tc)^2)}^0.5;
+T_max_indicated=T_mean+Ao;
+disp(T_max_indicated,'Maximum value of indicated temperature(degree C)=')
+T_min_indicated=T_mean-Ao;
+disp(T_min_indicated,'Minimum value of indicated temperature(degree C)=')
+ph=-atan(w*tc);
+Time_lag=-ph/w;
+disp(Time_lag,'Time lag (s)') \ No newline at end of file
diff --git a/569/CH4/EX4.21/4_21.sci b/569/CH4/EX4.21/4_21.sci
new file mode 100755
index 000000000..5c235f7dd
--- /dev/null
+++ b/569/CH4/EX4.21/4_21.sci
@@ -0,0 +1,10 @@
+// determine damping ratio
+clc;
+w=2;
+K=1.5;
+J=200*10^-3;
+wn=(K/J)^0.5;
+u=w/wn;
+M=1.1;
+eta=[{[1/(M^2)]-[(1-u^2)^2]}/(2*u)^2]^0.5;
+disp(eta,'damping ratio=') \ No newline at end of file
diff --git a/569/CH4/EX4.22/4_22.sci b/569/CH4/EX4.22/4_22.sci
new file mode 100755
index 000000000..a3d09e398
--- /dev/null
+++ b/569/CH4/EX4.22/4_22.sci
@@ -0,0 +1,16 @@
+// Calculate the frequency range
+clc;
+eta=0.6;
+fn=1000;
+M=1.1;
+disp('M=1/[[(1-u^2)^2]+(2*u*eta)^2]^0.5; ..........(i)')
+disp('on solving u^4-0.5u^2+0.173=0')
+disp('the above equation gives imaginary values for frequency so for eta=0.6 the output is not 1.1')
+disp('Now let M=0.9, on solving equation (i) we have')
+disp('u^4-0.56u^2-0.234=0')
+disp('on solving u=0.916')
+u=0.916;
+f=u*fn;
+disp(f,'maximum value of range (Hz)=')
+disp('So, the range of the frequency is from 0 to 916 Hz')
+
diff --git a/569/CH4/EX4.23/4_23.sci b/569/CH4/EX4.23/4_23.sci
new file mode 100755
index 000000000..60043a9bf
--- /dev/null
+++ b/569/CH4/EX4.23/4_23.sci
@@ -0,0 +1,9 @@
+// determine the error
+clc;
+w=6;
+wn=4;
+u=w/wn;
+eta=0.66;
+M=1/{[(1-u^2)^2]+(2*eta*u)^2}^0.5;
+Error=(M-1)*100;
+disp(Error,'error (%)=') \ No newline at end of file
diff --git a/569/CH4/EX4.4/4_4.sci b/569/CH4/EX4.4/4_4.sci
new file mode 100755
index 000000000..aa5c5ff4d
--- /dev/null
+++ b/569/CH4/EX4.4/4_4.sci
@@ -0,0 +1,8 @@
+// Calculate the temperature after 10s
+clc;
+th0=25;
+thi=150;
+t=10;
+tc=6;
+th=th0+(thi-th0)*[exp(-t/tc)];
+disp(th,'the temperature after 10s (degree C)') \ No newline at end of file
diff --git a/569/CH4/EX4.5/4_5.sci b/569/CH4/EX4.5/4_5.sci
new file mode 100755
index 000000000..ec3685f0d
--- /dev/null
+++ b/569/CH4/EX4.5/4_5.sci
@@ -0,0 +1,8 @@
+// Calculate the value of resistance after 15s
+clc;
+R0=29.44;
+Rs=100;
+t=15;
+tc=5.5;
+R_15=Rs+R0*[1-exp(-t/tc)];
+disp(R_15,'value of resistance after 15s(ohm)') \ No newline at end of file
diff --git a/569/CH4/EX4.6/4_6.sci b/569/CH4/EX4.6/4_6.sci
new file mode 100755
index 000000000..6ca3938b7
--- /dev/null
+++ b/569/CH4/EX4.6/4_6.sci
@@ -0,0 +1,13 @@
+// Calculate the depth after one hour
+clc;
+Qm=0.16*10^-3;
+Hin=1.2;
+K1=Qm/(Hin)^0.5;
+Qo=0.2*10^-3;
+Ho=(Qo/K1)^2;
+R=Hin/Qm;
+C=0.1;
+tc=R*C;
+t=3600;
+H=Ho+(Hin-Ho)*exp(-t/tc);
+disp(H,'the depth after one hour(m)') \ No newline at end of file
diff --git a/569/CH4/EX4.8/4_8.sci b/569/CH4/EX4.8/4_8.sci
new file mode 100755
index 000000000..69b35ed21
--- /dev/null
+++ b/569/CH4/EX4.8/4_8.sci
@@ -0,0 +1,15 @@
+//Calculate time constant
+clc;
+S=3.5;
+Ac=(%pi/4)*(0.25)^2;
+alpha=0.18*10^-3;
+Vb=S*Ac/alpha;
+disp(Vb,'volume of bulb(mm2)')
+
+Rb=[(Vb/%pi)*(3/4)]^(1/3);
+Ab=4*%pi*Rb^2;
+D=13.56*10^3;
+s=139;
+H=12;
+tc=(D*s*Vb*10^-9)/(H*Ab*10^-6);
+disp(tc,'time constant (s)') \ No newline at end of file
diff --git a/569/CH4/EX4.9/4_9.sci b/569/CH4/EX4.9/4_9.sci
new file mode 100755
index 000000000..aabf42e4e
--- /dev/null
+++ b/569/CH4/EX4.9/4_9.sci
@@ -0,0 +1,5 @@
+// Calculate the time constant
+ess=5;
+A=0.1;
+tc=ess/A;
+disp(tc,'time constant(s)') \ No newline at end of file