diff options
Diffstat (limited to 'Oscillations_and_Waves_by_S_Prakesh')
15 files changed, 4813 insertions, 0 deletions
diff --git a/Oscillations_and_Waves_by_S_Prakesh/1-Free_Oscillations_in_One_Dimension_Simle_Harmonic_Oscillator.ipynb b/Oscillations_and_Waves_by_S_Prakesh/1-Free_Oscillations_in_One_Dimension_Simle_Harmonic_Oscillator.ipynb new file mode 100644 index 0000000..63d74c8 --- /dev/null +++ b/Oscillations_and_Waves_by_S_Prakesh/1-Free_Oscillations_in_One_Dimension_Simle_Harmonic_Oscillator.ipynb @@ -0,0 +1,707 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: Free Oscillations in One Dimension Simle Harmonic Oscillator" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.10: velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 10 // ENERGY\n", +"clc;\n", +"clear;\n", +"close;\n", +"t=8/3;//seconds\n", +"v=-10*%pi*sin((35*%pi)/6)//cm\n", +"disp(v,'velocity is,(cm)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.11: frequency_energy_and_velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 11 // \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"K1=3;// in N/m\n", +"K2=2;// in N/m\n", +"m=0.050;// in kg\n", +"w=sqrt((K1+K2)/m);\n", +"n=w/(2*%pi);\n", +"disp(n,'(i). The frequency,n(oscillations/sec) = ')\n", +"A=0.004;// in m\n", +"E=(1/2)*A^2*(K1+K2);\n", +"disp(E,'(ii). The energy,E(J) = ')\n", +"v=sqrt(2*E/m);\n", +"disp(v,'(iii). The velocity,v(m/s) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.12: rotational_inertia.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 12 // Rotational inertia\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"M=0.1;// in m\n", +"l=0.1;// in m\n", +"I1=M*l^2/12;// in kg-m^2\n", +"T1=2;// in s\n", +"T2=6;// in s\n", +"I2=(I1*T2^2)/T1^2;\n", +"disp(I2,'Rotational inertia,I2(kg.m^2) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.13: period.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 13 // Time period\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"M=4;// in kg\n", +"R=0.10;// in m\n", +"I=(2/5)*M*R^2;// in kg.m^2\n", +"C=4*10^-3;// in Nm/radian\n", +"T=2*%pi*sqrt(I/C);\n", +"disp(T,'Time period,T(s) = ')\n", +"// answer is wrong in textbook" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15: frequency_and_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 15 // Energy\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"L=10*10^-3;// in H\n", +"C=20*10^-6;// in F\n", +"n=1/(2*%pi*sqrt(L*C));\n", +"V=10;//in V\n", +"U=(1/2)*C*V^2;\n", +"disp(n,'Frequency,n(cycles/s) = ')\n", +"disp(U,'Energy of oscillations,U(J) = ')\n", +"//answer of frequency is calculated wrong in textbook" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.16: distance_binding_energy_and_force_constant.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 16 // distance,binding energy and force constant\n", +"clc;\n", +"clear;\n", +"close;\n", +"disp('equilibrium inter-nuclear distance correspondes to lowest potential enegy is ro= 2*Å')\n", +"pet=0;//eV\n", +"peb=-4;//eV\n", +"be=pet-peb;//eV\n", +"x1=-2;//eV\n", +"x2=-4;//eV\n", +"V=x1-x2;//eV\n", +"e=1.6*10^-19;//electronic charge\n", +"x=0.5;//armstrong\n", +"K=((2*V)/x^2);//eV/Å^2\n", +"k1=(K*e)/(10^-10)^2;//joule/m^2\n", +"disp(be,'binding energy is ,(eV)=')\n", +"disp(k1,'force constant is ,(newton/metre)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.17: possible_values_of_r_and_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 17 // possible values and energy\n", +"clc;\n", +"clear;\n", +"close;\n", +"r1=2;//from graph\n", +"r2=4.5;//units from graph\n", +"disp('possible values of r are '+string(r1)+' units and '+string(r2)+' units')\n", +"osc=1-(-2.5);//units\n", +"disp('maximum energy of oscillations for r=2 units is '+string(osc)+' units ')\n", +"osc1=0.5-(-1);//units\n", +"disp('maximum energy of oscillations for r=4.5 units is '+string(osc1)+' units ')\n", +"t=1;//from graph\n", +"v=0;//from graph\n", +"e=t+v;//\n", +"disp(e,'total energy is,(unit)=')\n", +"disp('at infinity V = '+string(v)+' therefore T = '+string(t)+' unit ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.19: frequency_and_moment_of_inertia.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 19 // Frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"m1=10;// in g\n", +"m2=90;// in g\n", +"K=10^3;// in N/m\n", +"mu=m1*m2*10^-3/(m1+m2);\n", +"n=round(sqrt(K/mu)/(2*%pi));\n", +"disp(n,' The frequency,n(oscillations/sec) = ')\n", +"x1=0;//\n", +"x2=10;//cm\n", +"xb=((m1*x1+m2*x2)/(m1+m2));//cm\n", +"mo=(m1*10^-3)*(xb*10^-2)^2+(m2*10^-3)*(1*10^-2)^2;//\n", +"disp(mo,'moment of inertia is ,(kg-m^2)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.1: frequency_and_time_period.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 1 // FREQUENCY AND TIME PERIOD\n", +"clc;\n", +"clear;\n", +"close;\n", +"format('v',6)\n", +"//ph=50*x^2+100 in joule/kg\n", +"m=10;//mass in kg\n", +"f=10^3/m;//joule/kg\n", +"w=sqrt(f);//oscillations\n", +"fr=w/(2*%pi);//oscillations/sec\n", +"tp=1/fr;//seconds\n", +"disp(fr,'frequency of oscillation is ,(oscillations/seconds)=')\n", +"disp(tp,'time period is,(seconds)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.20: frequency_and_amlitude.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 20 // frequency and amplitude\n", +"clc;\n", +"clear;\n", +"close;\n", +"c=10^-4;//N-m\n", +"m1=9;//gm\n", +"m2=1;//gm\n", +"mu=((m1*m2)/(m1+m2))*10^-3;//kg\n", +"r=20;//cm\n", +"I=mu*(r*10^-2)^2;//kg-m^2\n", +"fr=((1/(2*%pi))*sqrt(c/I));//vibrations/sec\n", +"disp(fr,'frequency of vibration is ,(vibrations/s)=')\n", +"e=10^-2;//joule\n", +"thmax=sqrt((2*e)/c);//radians\n", +"disp(thmax,'amplitude is,(radians)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.21: frequency_energy_and_velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 21 // frequency ,energy and maximum velocity\n", +"clc;\n", +"clear;\n", +"close;\n", +"c=1;//N-m \n", +"m1=6;//gm\n", +"m2=2;//gm\n", +"mu=((m1*m2)/(m1+m2))*10^-3;//kg\n", +"fr=((1/(2*%pi))*sqrt(c/mu));//vibrations/sec\n", +"disp(fr,'frequency of oscillations is ,(vibrations/s)=')\n", +"td= 1+(1/3);//cm\n", +"e=((1/2)*c*(td*10^-2)^2);//joule\n", +"disp(e,'energy is,(joule)=')\n", +"y=((1/2)*m2*10^-3)+((1/2)*(1/3)^2*m1*10^-3);//\n", +"v1=sqrt((e/y));//m/sec\n", +"disp(v1,'maximum velocity of smaller mass is,(m/seconds)=')\n", +"//velocity is calculated wrong in the book" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.22: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 22 // frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"k=100;//N/m\n", +"m=100;//gm\n", +"n1=((1/(2*%pi))*sqrt(k/(m*10^-3)));//sec^-1\n", +"m1=100;//gm\n", +"m2=200;//gm\n", +"mu=((m1*m2)/(m1+m2))*10^-3;//kg\n", +"fr=((1/(2*%pi))*sqrt(k/mu));//sec^-1\n", +"disp(n1,'in first case frequency is,(sec^-1)=')\n", +"disp(fr,'in second case frequency is,(sec^-1)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.23: force_constant_and_work_done.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 23 // force constant and work done\n", +"clc;\n", +"clear;\n", +"close;\n", +"m1=1;//assume\n", +"m2=19;//assume\n", +"mh=1.66*10^-27;//kg\n", +"mu=((m1*m2)/(m1+m2))*mh;//kg\n", +"w=7.55*10^14;//radians/sec\n", +"k=mu*(w)^2;//N/m\n", +"disp(k,'force constant is,(N/m)=')\n", +"x=0.5;//arngstrom\n", +"wh=((1/2)*k*(x*10^-10)^2);//joule\n", +"disp(wh,'work done is ,(joule)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.24: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 24 // frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"m1=1;//a.m.u\n", +"m2=35;//a.m.u\n", +"mu1=((m1*m2)/(m1+m2));//a.m.u\n", +"m3=2;//\n", +"mu2=((m3*m2)/(m3+m2));//a.m.u\n", +"n1=8.99*10^13;//cycle/sec\n", +"n2=(sqrt(mu1/mu2))*n1;//c/s\n", +"disp(n2,'frequecy of vibrations is ,(c/s)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3: total_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 3 // ENERGY\n", +"clc;\n", +"clear;\n", +"close;\n", +"ke=5;//joule\n", +"pe=5;//joule\n", +"rep=10;//joule\n", +"eo=rep+ke+pe;//joule\n", +"disp(eo,'energy of the oscillator is,(joule)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4: velocity_and_acceleration.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4 // peroid ,maximum velocity and acceleration\n", +"clc;\n", +"clear;\n", +"close;\n", +"a=3;//cm\n", +"b=4;//cm\n", +"A=sqrt(a^2+b^2);//cm\n", +"w=2;//sec^-1\n", +"T=(2*%pi)/w;//seconds\n", +"um=w*A;//cm/s\n", +"am=w^2*A;//cm/s^2\n", +"disp(T,'time period is ,(seconds)=')\n", +"disp(um,'maximum velocity is,(cm/s)=')\n", +"disp(am,'maximum acceleration is,(cm/s^2)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5: velocity_and_acceleration.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 5 // maximum velocity and acceleration\n", +"clc;\n", +"clear;\n", +"close;\n", +"A=5;//cm\n", +"T=31.4//seconds\n", +"w=(2*%pi)/T;//sec^-1\n", +"um=w*A;//cm/s\n", +"am=w^2*A;//cm/s^2\n", +"disp(um,'maximum velocity is,(cm/s)=')\n", +"disp(am,'maximum acceleration is,(cm/s^2)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6: period.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 6 // Period \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"g=9.8;// constant\n", +"l=1;// in m\n", +"theta_m1=60;// in degree\n", +"theta_m=%pi/3;// in radians\n", +"T0=round(2*%pi*sqrt(l/g));\n", +"disp(T0,'(a). Time period for small displacement,T0(seconds) = ')\n", +"T=T0*(1+(theta_m^2/16));\n", +"disp(T,'(b).Time period,T(seconds) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.7: energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 7 // ENERGY\n", +"clc;\n", +"clear;\n", +"close;\n", +"es=1;//joule\n", +"l=2;//metre\n", +"am=3;//cm\n", +"am1=5;//cm\n", +"e1=(am1^2/am^2)*es;//joules\n", +"l2=1;//meter\n", +"e2=(l/l2)*es;//joules\n", +"disp(e1,'energy in first case is,(joules)=')\n", +"disp(e2,'energy in second case is,(joules)= ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.8: period_of_motio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 8 // Period of motion\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"x=0.16;// in m\n", +"m1=4;// in kg\n", +"g=9.8;\n", +"K=m1*g/x;\n", +"m=0.50;// in kg\n", +"T=2*%pi*sqrt(m/K);// \n", +"disp(T,'The period of motion ,T(seconds) = ')\n", +"// answer is wrong in textbook" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.9: force_constant_period_of_oscillation_amlitude_and_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 9 //foce constant,displacement , acceleration and energy\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"x1=.10;// in m\n", +"F1=4;// in N\n", +"K=F1/x1;\n", +"x2=0.12;// in m\n", +"disp(K,'(a). The force constant,K(N/m) = ')\n", +"F=-K*x2;\n", +"disp(F,'(b). The force,F(N) = ')\n", +"m=1.6;// in kg\n", +"T=2*%pi*sqrt(m/K);\n", +"disp(T,'(c). Period of pscillation,T(s) = ')\n", +"A=x2;\n", +"disp(A,'(d). Amplitude of motion,A(m) = ')\n", +"alfa=A*K/m;\n", +"disp(alfa,'(e). Maximum acceleration,alfa(m/s^2) = ')\n", +"x=A/2;// in m\n", +"w=sqrt(K/m);\n", +"v=w*sqrt(A^2-x^2);\n", +"a=w^2*x;// in m/s^2\n", +"KE=(1/2)*m*v^2;// in J\n", +"PE=(1/2)*K*x^2;// in J\n", +"TE=KE+PE;\n", +"disp(v,'(f) velocity is,(m/s) ')\n", +"disp(a,'(f). acceleration,(m/s^2) = ')\n", +"disp(KE,'(f) Kinetic energy is ,(J)=')\n", +"disp(PE,'(f) Potential energy is ,(J)=')\n", +"disp(TE,'(g). Total energy of the oscillating system,TE(J) = ')\n", +"// in textbook part f is inculded in the part e so their is the numbeing error in parts" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Oscillations_and_Waves_by_S_Prakesh/10-Waves_in_SolidsWaves_in_Solids.ipynb b/Oscillations_and_Waves_by_S_Prakesh/10-Waves_in_SolidsWaves_in_Solids.ipynb new file mode 100644 index 0000000..1c5c0c0 --- /dev/null +++ b/Oscillations_and_Waves_by_S_Prakesh/10-Waves_in_SolidsWaves_in_Solids.ipynb @@ -0,0 +1,359 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10: Waves in SolidsWaves in Solids" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.10: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 10 // Frequencies\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"l=2;// in m\n", +"v=3560;// in m/s\n", +"r=0.004;// in m\n", +"k=r/2;\n", +"v1=%pi*v*k*3.011^2/(8*l^2);\n", +"disp(v1,'The frequency,v1(Hz) = ')\n", +"v2=%pi*v*k*5^2/(8*l^2);\n", +"disp(v2,'The frequency of first overtone,v2(Hz) = ')\n", +"v3=%pi*v*k*7^2/(8*l^2);\n", +"disp(v3,'The frequency of second overtone,v3(Hz) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.11: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 11 // Frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"Y=7.1*10^10;// in N/m^2\n", +"p=2.7*10^3;// in kg/m^3\n", +"r=0.005;// in m\n", +"vu=sqrt(Y/p);\n", +"k=r/2;\n", +"v=vu/(2*%pi*k);\n", +"disp(v,' The frequency,v(Hz) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.1: youngs_modulus.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 1 // Young's modulus of steel\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"p=7.8*10^3;// in kg/m^3\n", +"v=5200;// m/s\n", +"Y=p*v^2;\n", +"disp(Y,'Young modulus of steel,Y(N/m^2) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.2: wavelength_and_velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 2 // Velocity and wavelength\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"Y=8*10^10;// in N/m^2\n", +"p=5000;// in kg/m^3\n", +"v=sqrt(Y/p);\n", +"disp(v,'(1). The velocity,v(m/s) = ')\n", +"f=400;// in vibration/sec\n", +"lamda=v/f;\n", +"disp(lamda,'(2). The wavelength,(m) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.3: velocity_and_wavelength.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 3 // Velocity and wavelength\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"Y=7*10^10;// in N/m^2\n", +"p=2.8*10^3;// in kg/m^3\n", +"v=sqrt(Y/p);\n", +"disp(v,'(1). The velocity,v(m/s) = ')\n", +"f=500;// in vibration/sec\n", +"lamda=v/f;\n", +"disp(lamda,'(2). The wavelength,(m/s) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.4: youngs_modulus.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4 // Young's modulus\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"l=3;// in m\n", +"n=600;// in Hz\n", +"p=8.3*10^3;// in kg/m^3\n", +"Y=p*n^2*(2*l)^2;\n", +"disp(Y,'Youngs modulus,Y(N/m^2) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.5: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 5 // Frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"Y=2*10^11;// in N/m^2\n", +"p=8*10^3;// in kg/m^3\n", +"l=0.25;// in m\n", +"n=sqrt(Y/p)/(2*l);\n", +"disp(n,'The frequency,n(vibrations/s) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.6: AREA.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 6 // Area of cross section\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"n1BYn2=20;\n", +"T=20*9.8;// in N\n", +"Y=19.6*10^10;// in N/m^2\n", +"alfa=n1BYn2^2*T/Y;\n", +"disp(alfa,'Area of cross section,alfa(m^2) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.7: velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 7 // Velocity and Young modulus\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"n=2600;// in Hz\n", +"l=1;// in m\n", +"p=7.8*10^3;// kg/m^3\n", +"v=2*n*l;\n", +"disp(v,'The velocity,v(m/s) = ')\n", +"Y=v^2*p;\n", +"disp(Y,'Youngs modulus,Y(N/m^2) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.8: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 8 // Frequencies\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"Y=7.1*10^10;// in N/m^2\n", +"p=2700;//in kg/m^3\n", +"l=1.5;// in m\n", +"r1=1;\n", +"r2=3;\n", +"r3=5;\n", +"n1=(r1/(4*l))*sqrt(Y/p);\n", +"n2=(r2/(4*l))*sqrt(Y/p);\n", +"n3=(r3/(4*l))*sqrt(Y/p);\n", +"disp(n1,'frequency of first harmonic,n1(Hz) = ')\n", +"disp(n2,'frequency of first harmonic,n1(Hz) = ')\n", +"disp(n3,'frequency of first harmonic,n1(Hz) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10.9: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 9 // Frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"l=1.2;// in m\n", +"v=5150;// in m/s\n", +"d=0.006;// in m\n", +"k=d/sqrt(12);\n", +"v1=%pi*v*k*3.011^2/(8*l^2);\n", +"disp(v1,'The frequency,v1(Hz) = ')" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Oscillations_and_Waves_by_S_Prakesh/11-Lissajous_Figures.ipynb b/Oscillations_and_Waves_by_S_Prakesh/11-Lissajous_Figures.ipynb new file mode 100644 index 0000000..aa29ce7 --- /dev/null +++ b/Oscillations_and_Waves_by_S_Prakesh/11-Lissajous_Figures.ipynb @@ -0,0 +1,128 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11: Lissajous Figures" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.1: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 1// Frequencies\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"t=2;// in sec\n", +"n1=100;// in vibrations/sec\n", +"n2a=n1+(1/t);\n", +"n2b=n1-(1/t);\n", +"disp(n2a,'frequency,n2a= ')\n", +"disp(n2b,'frequency,n2b = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.2: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 2// Frequencies\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"t1=15;// in sec\n", +"t2=10;// in sec\n", +"n2=400;// in vibrations/sec\n", +"n1a=n2+(1/t1);\n", +"n1b=n2-(1/t1);\n", +"disp(n1a,'frequency,n1a(Hz) = ')\n", +"disp(n1b,'frequency,n1b(Hz) = ')\n", +"n_1a=n2+(1/t2);\n", +"n_1b=n2-(1/t2);\n", +"disp(n_1a,'frequency,n_1a(Hz) = ')\n", +"disp(n_1b,'frequency,n_1b(Hz) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11.3: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 3// Frequencies\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"t1=15;// in sec\n", +"t2=10;// in sec\n", +"n2=256;// in vibrations/sec\n", +"n1a=(2*n2)+(1/t1);\n", +"n1b=(2*n2)-(1/t1);\n", +"disp(n1a,'frequency,n1a(Hz) = ')\n", +"disp(n1b,'frequency,n1b(Hz) = ')\n", +"n_1a=(2*n2)+(1/t2);\n", +"n_1b=(2*n2)-(1/t2);\n", +"disp(n_1a,'frequency,n_1a(Hz) = ')\n", +"disp(n_1b,'frequency,n_1b(Hz) = ')" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Oscillations_and_Waves_by_S_Prakesh/12-Dopplers_Effect.ipynb b/Oscillations_and_Waves_by_S_Prakesh/12-Dopplers_Effect.ipynb new file mode 100644 index 0000000..602d0d4 --- /dev/null +++ b/Oscillations_and_Waves_by_S_Prakesh/12-Dopplers_Effect.ipynb @@ -0,0 +1,448 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12: Dopplers Effect" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.10: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 10//frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"sa=1.5;//km\n", +"oa=1;//km\n", +"so=sqrt(oa^2+sa^2);//km\n", +"csd=sa/so;//\n", +"v=0.33;//km/s\n", +"n=400;//Hz\n", +"vlov=120*(1000/3600);//m/s\n", +"vs1=(1/30)*csd;//km/s\n", +"nd=((v)/(v-vs1))*n;//vibrations/sec\n", +"disp(round(nd),'apparent frequency is,(vibrations/second)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.11: frequency_and_distance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 11//frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"v=1200;//km/h\n", +"w=40;//km/h\n", +"vs=40;//km/h\n", +"n=580;//Hz\n", +"nd=((v+vs)/((v+vs)-vs))*n;//Hz\n", +"disp(nd,'frequency of the whistle as heared by an observer on the hill is ,(Hz)=')\n", +"x=29/30;//km\n", +"disp(x*1000,'distance is ,(m)=')\n", +"ndd=((v-w)+vs)/((v-w))*nd;//Hz\n", +"disp(ndd,'frequency heared by driver is,(Hz)=')\n", +"//distance is calculated wrong in the textbook" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.12: Doppler_shift_and_velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 12//doppler shift and velocity\n", +"clc;\n", +"clear;\n", +"close;\n", +"h1=6010;//Å\n", +"h2=6000;//Å\n", +"ds=h1-h2;//Å\n", +"disp(ds,'doppler shift is ,(Å)=')\n", +"c=3*10^8;//m/s\n", +"v=((ds/h2)*c);//m/s\n", +"disp(v,'speed is ,(m/s)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.13: velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 13//doppler shift and velocity\n", +"clc;\n", +"clear;\n", +"close;\n", +"h1=3737;//Å\n", +"h2=3700;//Å\n", +"ds=h1-h2;//Å\n", +"disp(ds,'doppler shift is ,(Å)=')\n", +"c=3*10^8;//m/s\n", +"v=((ds/h2)*c);//m/s\n", +"disp(v,'speed is ,(m/s)=')\n", +"//speed is calculated wrong in the textbook" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.14: speed.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 14//speed\n", +"clc;\n", +"clear;\n", +"close;\n", +"dv=10^3;//Hz\n", +"v=5*10^9;//Hz\n", +"c=3*10^8;//m/s\n", +"v=((dv)/(2*v))*c;//m/s\n", +"disp(v,'velocity is ,(m/s)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.1: speed.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 1// Speed\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"vl=166;//m/s\n", +"v=(2*vl);//m/s\n", +"disp(v,'speed is,(m/s)')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.2: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 2// frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"f1=90;//vibrations/second\n", +"f2=(1+(1/10))*f1;//vibrations/s\n", +"disp(f2,'frequency is,(vibrations/s)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.3: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 3// frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"N=400;//hZ\n", +"V=340;//M/S\n", +"VS=60;//M/S\n", +"N2=((V/(V-VS))*N);//Hz\n", +"disp(round(N2),'frequency when engine is approaching to the listner is,(Hz)=')\n", +"N3=((V/(V+VS))*N);//Hz\n", +"disp(N3,'frequency when engine is moving away from the listner is,(Hz)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.4: wavelength.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4//WAVELENGTH\n", +"clc;\n", +"clear;\n", +"close;\n", +"x=1/5;//\n", +"h=60;//cm\n", +"h1=((1-x)*h);//cm\n", +"h2=((1+x)*h);//cm\n", +"disp(h1,'wavelength of waves in north-direction is,(cm)=')\n", +"disp(h2,'wavelength of waves in south-direction is,(cm)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.5: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 5//frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"v=340;//m/s\n", +"n=600;//Hz\n", +"vs=36;//km h^-1\n", +"vs1=vs*(1000/3600);//m/s\n", +"apf=((v)/(v-vs1))*n;//Hz\n", +"vs2=54;//km h^-1\n", +"vs3=vs2*(1000/3600);//m/s\n", +"apf1=((v)/(v+vs3))*n;//Hz\n", +"disp('two apparent frequencies are '+string(apf)+' Hz and '+string(apf1)+' Hz')\n", +"df=apf-apf1;//Hz\n", +"disp(df,'difference in frequencies is ,(Hz)=')\n", +"//second apparent frequency and difference is calculated wrong in the textbook" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.6: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 6//frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"v=330;//m/s\n", +"n=500;//Hz\n", +"vs=30;//km h^-1\n", +"vs1=vs*(1000/3600);//m/s\n", +"n3=((v+vs1)/(v-vs1))*n;//Hz\n", +"disp(round(n3),'frequency when cars are approaching is ,(Hz)=')\n", +"n1=((v-vs1)/(v+vs1))*n;//Hz\n", +"disp(round(n1),'frequency when cars have crossed is ,(Hz)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.7: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 7//frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"v=330;//m/s\n", +"n=600;//Hz\n", +"vs=20;//m/s\n", +"apf=((v)/(v+vs))*n;//Hz\n", +"disp(round(apf),'frequency when source is moving away from the observer is ,(Hz)=')\n", +"apf1=((v)/(v-vs))*n;//Hz\n", +"disp(round(apf1),'frequency when siren reaching at the cliff is ,(Hz)=')\n", +"bf=apf1-apf;//Hz\n", +"disp(round(bf),'beat frequency is ,(Hz)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.8: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 8//frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"r=3;//m\n", +"w=10;//s^-1\n", +"vs=r*w;//m/s\n", +"A=6;//m\n", +"fd=5/%pi;//s^-1\n", +"vmax=A*2*%pi*fd;//m/s\n", +"v=330;//m/s\n", +"n=340;//Hz\n", +"nmax=((v+vmax)/(v-vs))*n;//Hz\n", +"nmin=((v-vmax)/(v+vs))*n;//Hz\n", +"disp(nmax,'maximum frequency is,(Hz)=')\n", +"disp(nmin,'minimum frequency is ,(Hz)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12.9: speed.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 9//speed\n", +"clc;\n", +"clear;\n", +"close;\n", +"n12=3;//\n", +"n=340;//Hz\n", +"v=340;//m/s\n", +"vs=((n12*v)/(2*n));//m/s\n", +"disp(vs,'speed is ,(m/s)=')" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Oscillations_and_Waves_by_S_Prakesh/13-Elementary_Theory_of_Filters.ipynb b/Oscillations_and_Waves_by_S_Prakesh/13-Elementary_Theory_of_Filters.ipynb new file mode 100644 index 0000000..1948073 --- /dev/null +++ b/Oscillations_and_Waves_by_S_Prakesh/13-Elementary_Theory_of_Filters.ipynb @@ -0,0 +1,95 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13: Elementary Theory of Filters" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.1: inductance_and_capacitance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 1 // design loss pass constant K-filter\n", +"clc;\n", +"clear;\n", +"close;\n", +"k=600;//ohms\n", +"fc=2500;//Hz\n", +"l=(k/(%pi*fc));//H\n", +"c=((1/(%pi*fc*k)));//farad\n", +"disp(l*10^3,'inductance is ,(mH)=')\n", +"disp(c*10^6,'capacitance is ,(micro-F)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13.2: inductance_and_capacitance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 2 // T-type band pass filter\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"K=500;// in ohm\n", +"f1=4;// in kHz\n", +"f2=1;// in kHz\n", +"L1=K/(%pi*(f1-f2));\n", +"Ls=L1/2;\n", +"disp(Ls,'Inductance in each series arm,Ls(mH) = ')\n", +"C1=(f1-f2)*10^3/(4*%pi*K*f1*f2);\n", +"Cs=2*C1;\n", +"disp(Cs,'Capacity in each series arm,Cs(micro-F) = ')\n", +"L2=((f1-f2)*K)/(4*%pi*f1*f2);\n", +"disp(L2,'Shunt arm inductance,L2(mH) = ')\n", +"Csh=1*10^6/(%pi*(f1-f2)*10^3*K);\n", +"disp(Csh,'Capacity in shunt arm,Csh(micro-F) = ')" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Oscillations_and_Waves_by_S_Prakesh/14-Ultrasonics.ipynb b/Oscillations_and_Waves_by_S_Prakesh/14-Ultrasonics.ipynb new file mode 100644 index 0000000..9dcd377 --- /dev/null +++ b/Oscillations_and_Waves_by_S_Prakesh/14-Ultrasonics.ipynb @@ -0,0 +1,141 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14: Ultrasonics" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.1: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 1 // Fundamental frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"t=1.6*10^-3;// in m\n", +"lamda=2*t;// in m\n", +"v=5760;// in m/s\n", +"n1=v*10^-6/lamda;\n", +"disp(n1,'Fundamental frequency,n1(MHz) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.2: Length.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 2 // distance\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"th=40;//cm\n", +"t1=30;//micro-seconds\n", +"t2=80;//micro seconds\n", +"x=((2*th*10^-2*t1*10^-6)/(2*t2*10^-6))*100;//cm\n", +"disp(x,'distance is ,(cm)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.3: thickness.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 3 // Thickness\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"v=5000;// in m/s\n", +"N=50000;// in Hz\n", +"t=v/(2*N);\n", +"disp(t,'Thickness of steel plate,t(m) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14.4: capacitance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4 // Capacitance\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"L=1;// in H\n", +"n=10^6;// in Hz\n", +"C=1*10^12/(4*%pi^2*n^2*L);\n", +"disp(C,'The capacitance,C(micro-F) = ')" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Oscillations_and_Waves_by_S_Prakesh/15-Musical_Sound_and_Acoustic_of_Bulidings.ipynb b/Oscillations_and_Waves_by_S_Prakesh/15-Musical_Sound_and_Acoustic_of_Bulidings.ipynb new file mode 100644 index 0000000..421aeb1 --- /dev/null +++ b/Oscillations_and_Waves_by_S_Prakesh/15-Musical_Sound_and_Acoustic_of_Bulidings.ipynb @@ -0,0 +1,115 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 15: Musical Sound and Acoustic of Bulidings" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.1: levels_by_which_intensity_will_decrease.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 1 // decibles\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"i1=4;//assume\n", +"i2=4*i1;//\n", +"dl=10*log10(i2/i1);//db\n", +"disp(dl,'decibles by which intensity level will decrease is,(db)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.2: ratio_of_amplitudes.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 2 // ratio of amlitudes\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"l1=10;//db\n", +"l2=40;//db\n", +"dl=l2-l1;//db\n", +"x=(10^(dl/10));//\n", +"x1=sqrt(x);//\n", +"disp(x1,'ratio of amplitudes is ,=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 15.3: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 3 // frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"x=264;//key note\n", +"g=x*(3/2);//\n", +"disp(g,'frequency of note G is ,=')\n", +"cd1=x*2;//\n", +"disp(cd1,'frequency of note C is ,=')" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Oscillations_and_Waves_by_S_Prakesh/17-Electromagnetic_Waves.ipynb b/Oscillations_and_Waves_by_S_Prakesh/17-Electromagnetic_Waves.ipynb new file mode 100644 index 0000000..34ccc68 --- /dev/null +++ b/Oscillations_and_Waves_by_S_Prakesh/17-Electromagnetic_Waves.ipynb @@ -0,0 +1,213 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 17: Electromagnetic Waves" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.1: poynting_vector.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 1 // magnitude\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"R=7*10^8;// in m\n", +"P=3.8*10^26;// in Watt\n", +"S=P/(4*%pi*R^2);\n", +"disp(S,'Magnitude of poynting vector,S(W/m^2) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.2: poynting_vector.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 2 // Poynting vector\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"R=1.5*10^11;// in m\n", +"P=3.8*10^26;// in Watt\n", +"S=P/(4*%pi*R^2);// in W/m^2\n", +"Se=round(S*60/(4.2*10^4));\n", +"disp(Se,'Poynting vector,Se(cal/cm^2 -min) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.3: amplitudes_of_electric_and_magnetic_field_radiation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 3 // Amplitude and magnetic field\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"S=2;// in cal/cm^2- min\n", +"EH=S*4.2*10^4/60;// joule/m^2 sec\n", +"mu0=4*%pi*10^-7;\n", +"epsilon0=8.85*10^-12;\n", +"EbyH=sqrt(mu0/epsilon0);\n", +"E=sqrt(EH*EbyH);\n", +"H=EH/E;\n", +"E0=E*sqrt(2);\n", +"H0=H*sqrt(2);\n", +"disp(E,'E is ,(V/m)=')\n", +"disp(H,'H is ,(Amp-turn/m)=')\n", +"disp(E0,'Amplitude of electric fields of radiation,E0(V/m) = ')\n", +"disp(H0,'Magnetice field of radition ,H0(Amp-turn/m) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.4: amplitudes_of_electric_and_magnetic_field_radiation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4 // electric and magnetic field\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"r=2;// in m\n", +"mu0=4*%pi*10^-7;\n", +"epsilon0=8.85*10^-12;\n", +"EbyH=sqrt(mu0/epsilon0);\n", +"EH=1000/(4*r^2*%pi^2);// in W/m^2\n", +"E=sqrt(EH*EbyH);\n", +"H=(EH/E);\n", +"disp(E,'Intensities of electric,E(V/m) = ')\n", +"disp(H,'Magnetic field of radiation,H(Amp-turn/m) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.5: polarisation_degree.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 5 // Degree of polarization\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"thetai=45;// in degree\n", +"n=1.5;/// index\n", +"thetar=asind(sind(thetai)/n);\n", +"Rl=sind(thetai-thetar)^2/sind(thetai+thetar)^2;\n", +"Rp=tand(thetai-thetar)^2/tand(thetai+thetar)^2;\n", +"D=((Rl-Rp)/(Rl+Rp))*100;\n", +"disp(D,'Degree of polarization,D(%) = ')\n", +"// answer is wrong in the textbook" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 17.6: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 6 // Frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"del=1;// in m\n", +"mu=4*%pi*10^-7;// in H/m\n", +"sigma=4;// in siemen/m\n", +"v=1*10^-3/(%pi*del^2*mu*sigma);\n", +"disp(v,'Frequency,v(kHz) = ')" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Oscillations_and_Waves_by_S_Prakesh/2-Damped_Harmonic_Oscillator.ipynb b/Oscillations_and_Waves_by_S_Prakesh/2-Damped_Harmonic_Oscillator.ipynb new file mode 100644 index 0000000..77c7450 --- /dev/null +++ b/Oscillations_and_Waves_by_S_Prakesh/2-Damped_Harmonic_Oscillator.ipynb @@ -0,0 +1,376 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: Damped Harmonic Oscillator" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.10: logarithmic_decrement.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 10 // Logarithmic decrement\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"a=100;\n", +"l1=20;// in cm\n", +"l2=2;// in cm\n", +"l=l1/l2;\n", +"lamda=(1/100)*log(l);\n", +"disp(lamda,' Logarithmic decrement, = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.12: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 12 // Frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"C=10^-6;// in F\n", +"L=0.2;// in H\n", +"R=800;// in ohm\n", +"Rm=2*sqrt(L/C);\n", +"n=sqrt((1/(L*C))-(R^2/(4*L^2)))/(2*%pi);\n", +"disp(n,'The frequency,n(cycles/s) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.13: resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 13 // Resistance\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"C=0.0012*10^-6;// in F\n", +"L=0.2;// in H\n", +"Rm=2*sqrt(L/C);\n", +"disp(Rm,'The maximum value of resistance,Rm(ohms) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.14: frequency_and_quality_factor.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 14 // Q factor\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"C=5*10^-6;// in F\n", +"L=2*10^-3;// in H\n", +"R=0.2;// in ohm\n", +"w=round(sqrt((1/(L*C))-(R^2/(4*L^2))));\n", +"f=w/(2*%pi);\n", +"Q=w*L/R;\n", +"disp(f,'frequency is ,(Hz)=')\n", +"disp(Q,'Quality factor,Q = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3: time_damping_force_total_distance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 3 // relaxation time ,damping force ,time and total distance\n", +"clc;\n", +"clear;\n", +"close;\n", +"v=10;//cm/s\n", +"vo=100;//cm/s\n", +"t=23;//sec\n", +"x=-(log(v/vo))/t;//\n", +"t=(1/x)*1;//seconds\n", +"disp(round(t),'relaxation time is,(seconds)=')\n", +"m=40;//gm\n", +"vx=50;//cm/sec\n", +"fd=((-x*m*10^-3*vx*10^-2));//newton\n", +"disp(fd,'damping force is ,(newton)=')\n", +"tx=5*(log(10));//\n", +"disp(tx,'time in which kinetic energy will reduce to 1/10th of its value is ,(seconds)=')\n", +"xx=v*1;//\n", +"disp(xx,'distance travelled is,(m)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4: period.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4 // period\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"m=2;// in g\n", +"k=30;// in dynes/cm\n", +"b=5;// in dynes/cm-sec^-1\n", +"r=b/(2*m);\n", +"w0=sqrt(k/m);\n", +"T=2*%pi/sqrt(w0^2-r^2);\n", +"disp(T,'The time period,T(s) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5: time_period.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 5 // time\n", +"clc;\n", +"clear;\n", +"close;\n", +"tr=50;//seconds\n", +"r=(1/(2*tr));//s^-1\n", +"t=1/r;//seconds\n", +"disp(t,'time in which amplitude falls to 1/e times the initial value is ,(seconds)=')\n", +"t2=tr;//\n", +"disp(t2,'time in which system falls to 1/e times the initial value is ,(seconds)=')\n", +"t3=2*(1/r);//\n", +"disp(t3,'time in which energy falls to 1/e^4 of the initial value is,(seconds)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.6: relaxation_time_frequency_energy_and_rate_of_loss.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 6 // relaxation time ,frequency ,energy ,time ,rate and number of vibrations\n", +"clc;\n", +"clear;\n", +"close;\n", +"k=20;//N/m\n", +"m=5//N-s/m\n", +"wo=sqrt(k/m);//\n", +"v1=2;//m/s\n", +"to=m/v1;//seconds\n", +"disp(to,'relaxation time is,(seconds)=')\n", +"w=wo*(1-(1/(2*wo*to))^2);//\n", +"lf=w/(2*%pi);//vibration/s\n", +"disp(lf,'linear frequency is,(vibration/s)=')\n", +"a=1;//\n", +"e=((1/2)*m*a^2*wo^2);//joule\n", +"disp(e,'energy is ,(joule)=')\n", +"tm=v1*to;//seconds\n", +"disp(tm,'time taken in fall of amlitude to 1/e value is ,(seconds)=')\n", +"disp(tm,'time taken in fall of velocity amplitude to 1/2 value is,(seconds)=')\n", +"tr=to;//\n", +"disp(tr,'time taken in fall of energy to 1/e value is,(seconds)=')\n", +"eng=(1/2)*m*a*v1^2*(2/tm);//\n", +"disp('rate of loss of energy at t=0 seconds is '+string(eng)+' J/s and at any time is '+string(eng)+'e^-2*t/'+string(tm)+' J/s ')\n", +"rel=((eng*2*%pi)/wo);//J/s\n", +"disp('rate of loss of energy per cycle at t=0 seconds is '+string(rel)+' J/s and at any time is '+string(rel)+'e^-2*t/'+string(tm)+' J/s ')\n", +"nv=tm/((2*%pi)/wo);//\n", +"disp(nv,'number of vibratios made are,=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.7: time_and_distance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 7 // time and distance\n", +"clc;\n", +"clear;\n", +"close;\n", +"b=5;//N-s/m\n", +"v=10;//m/s\n", +"to=b/v;//second\n", +"disp(to,'time in which velocity falls to 1/e times the initial value is ,(second)=')\n", +"t2=b*to;//\n", +"disp(t2,'time in which velocit falls to half the initial value is,(second)=')\n", +"disp('diatnce traversed by the particle before the velocity falls to half the initial value is '+string(b)+'*(1-e^-(log)'+string((2*to)/to)+')')\n", +"x=b;//m\n", +"disp(x,'distance traversed by the particle it comes to rest is,(m)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.8: time_interval.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 8// time interval\n", +"clc;\n", +"clear;\n", +"close;\n", +"q=5*10^4;//quality factor\n", +"x=1/10;//\n", +"fr=300;//second^-1\n", +"to=q/(2*%pi*fr);//second\n", +"xm=((to*log(10)));//seconds\n", +"disp(xm,'time interval is,(seconds)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.9: time.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 9 // Time\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"n=240;// in sec^-1\n", +"w=2*%pi*n;\n", +"Q=2*10^3;\n", +"tau=Q/w;\n", +"t=4*tau;\n", +"disp(t,'Time,t(s) = ')" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Oscillations_and_Waves_by_S_Prakesh/3-Forced_Harmonic_Oscillator_and_Resonance.ipynb b/Oscillations_and_Waves_by_S_Prakesh/3-Forced_Harmonic_Oscillator_and_Resonance.ipynb new file mode 100644 index 0000000..80c6a4e --- /dev/null +++ b/Oscillations_and_Waves_by_S_Prakesh/3-Forced_Harmonic_Oscillator_and_Resonance.ipynb @@ -0,0 +1,196 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Forced Harmonic Oscillator and Resonance" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.1: amlitude_and_phase_displacement.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 1 // Phase shift\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"F0=25;// in N\n", +"m=1;\n", +"f0=F0/m;\n", +"K=1*10^3;// in N/m\n", +"w0=sqrt(K/m);\n", +"b=0.05;// in N-s/m\n", +"r=b/(2*m);// in s^-1\n", +"A=f0*10^3/sqrt(9*w0^4+(16*r^2*(w0)^2));\n", +"disp(A,'The amplitude,A(mm) = ')\n", +"p=2*w0;\n", +"fi=atand(2*r*p/(w0^2-p^2));\n", +"disp('phase shift is '+string(fi)+' degree or '+string(fi*(%pi/180))+' radian')\n", +"//phase shift is converted wrong into radians" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2: cosntant.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 2 // A/Amax\n", +"clc;\n", +"clear;\n", +"close;\n", +"x1=[0.99;0.98;0.97];//\n", +"wt=50;//\n", +"wo=1;//assume\n", +"fo=1;//assume\n", +"for i=1:3\n", +" a(i)=((fo/((wo^2)*((1-x1(i)^2)^2+((1/wt^2)*x1(i)^2))^(1/2))));//\n", +" am(i)=fo/((wo^2)*(1/wt^2)^(1/2));//\n", +" z(i)=a(i)/am(i);//\n", +" disp('for p/wo '+string(x1(i))+' value of A/Amax is '+string(z(i))+'')\n", +"end" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3: reactance_and_impedance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 3 // Reactance and impedence\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"n=50;// in cycles\n", +"w=2*%pi*n;// in rad/sec\n", +"L=1/%pi;// in H\n", +"XL=w*L;\n", +"disp(XL,'The reactance,XL(ohm) = ')\n", +"R=100;// in ohm\n", +"Z=sqrt(R^2+XL^2);\n", +"disp(Z,'The impedence,Z(ohm) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4: current_and_capacitance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4 // Current and Capacity\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"E=110;// in V\n", +"R=10;// in ohm\n", +"L=1*10^-3;// in H\n", +"C=1*10^-6;// in F\n", +"n=10000;// in Hz\n", +"w=2*%pi*n;\n", +"I=E/sqrt(R^2+((w*L)-(1/(w*C)))^2);\n", +"disp(I,'The current ,I(A) = ')\n", +"L1=1/(w^2*C);\n", +"disp(L1,'The value of capacity,L1(F) = ')\n", +"//Capacitance is calculated wrong in the textbook" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.5: resonant_frequency_separation_and_sharpness.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 5 // Resonent frequency and Separation\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"L=1*10^-3;// in H\n", +"C=0.1*10^-6;// in F\n", +"w0=1/sqrt(L*C);\n", +"disp(w0,'Resonant frequency,w0(rad/s) = ')\n", +"R=10;// in ohm\n", +"w2_w1=R/L;\n", +"disp(w2_w1,'the separation,(rad/s) = ')\n", +"S=w0/w2_w1;\n", +"disp(S,'The sharpness is = ')" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Oscillations_and_Waves_by_S_Prakesh/4-Coupled_Oscillator.ipynb b/Oscillations_and_Waves_by_S_Prakesh/4-Coupled_Oscillator.ipynb new file mode 100644 index 0000000..0bc7d98 --- /dev/null +++ b/Oscillations_and_Waves_by_S_Prakesh/4-Coupled_Oscillator.ipynb @@ -0,0 +1,59 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Coupled Oscillator" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2: ratio_of_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 2 // ratio of Frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"k=1;//assume\n", +"m1=16;//a.m.u\n", +"m2=12;//a.m.u\n", +"m3=m1;//\n", +"rt=((m2+2*m1)/m2)^(1/2);//\n", +"disp(rt,'ratio of frequency is,=')" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Oscillations_and_Waves_by_S_Prakesh/5-Wave_Motion_and_Speed_of_Waves_in_Gaes.ipynb b/Oscillations_and_Waves_by_S_Prakesh/5-Wave_Motion_and_Speed_of_Waves_in_Gaes.ipynb new file mode 100644 index 0000000..b1f65c9 --- /dev/null +++ b/Oscillations_and_Waves_by_S_Prakesh/5-Wave_Motion_and_Speed_of_Waves_in_Gaes.ipynb @@ -0,0 +1,556 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Wave Motion and Speed of Waves in Gaes" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.10: wave_intensity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 10 //wave intensity\n", +"clc;\n", +"clear;\n", +"close;\n", +"nt=1;//watt source\n", +"r=1;//n\n", +"is=(nt/(4*%pi*r^2));// joule/sec-m^2\n", +"disp(is,'intensity on the surface is ,(joule/sec-m^2)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.14: energy_flux.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 14 // Energy flux \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"A=.10;// in m\n", +"w=4;// in per sec\n", +"k=0.1;// in per cm\n", +"p=1.25*10^3;// in kg/m^3\n", +"v=w*10^-2/k;// in m/s\n", +"n=w/(2*%pi);\n", +"Ef=2*%pi^2*n^2*A^2*p*v;\n", +"disp(Ef,'Energy flux of the wave,Ef(W/m^2) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.15: energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 15 // Energy radiated and energy current\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"p=1.29;// in kg/m^3\n", +"a=.15*10^-2;// in m/s\n", +"n=76;// in Hz\n", +"E=2*%pi^2*n^2*a^2*p;\n", +"disp(E,'(a). Energy radiated,E(J/m^3) = ')\n", +"v=332;// in m/s\n", +"Ev=E*v;\n", +"disp(Ev,'(b). The energy current,Ev(W/s) = ')\n", +"// energy current is calculated wrong in the textbook" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.16: pressure_amplitude_energy_density_and_energy_flux.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 16 // Pressure amplitude, Energy density and energy flux\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"a=10^-5;// in m\n", +"n=500;// in per sec\n", +"p=1.29;// in kg/m^3\n", +"v=340;// in m/s\n", +"Pa=2*%pi*a*n*v*p;\n", +"disp(Pa,'(i).Pressure amplitude,Pa(N/m^2) = ')\n", +"Ed=2*%pi^2*a^2*n^2*p;\n", +"disp(Ed,'(ii). Energy density,Ed(J/m^3) = ')\n", +"Ef=2*%pi^2*a^2*n^2*p*v;\n", +"disp(Ef,'(iii). The energy flux,Ef(J/m^2-s) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.17: pressure.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 17 // Pressure \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"gama=1.4;\n", +"u=10^-3;// in m/s\n", +"v=340;// in m/s\n", +"P=10^5;// in N/m^2\n", +"p=gama*P*u/v;\n", +"disp(p,'The pressure,p(N/m^2) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.18: speed_of_sound.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 18 //speed\n", +"clc;\n", +"clear;\n", +"close;\n", +"sa=332;//m/s\n", +"pa=16;//density of air\n", +"ph=1;//density of hydrogen\n", +"vn=sa*sqrt(pa/ph);//m/s\n", +"t1=0;//degree celsius\n", +"t2=546;//degree celsius\n", +"t1k=0+273;//kelvin\n", +"t2k=t2+273;//kelvin\n", +"v2=vn*sqrt(t2k/t1k);//m/s\n", +"disp(vn,'speed of sound in first case is ,(m/s)=')\n", +"disp(v2,'speed of sound in second case is,(m/s)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.19: temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 19 //temperature\n", +"clc;\n", +"clear;\n", +"close;\n", +"t1=0;//degree celsius\n", +"t1k=t1+273;//kelvin\n", +"rt=2;//\n", +"tk=rt^2*t1k;//Kelvin\n", +"t=tk-273;//degree celsius\n", +"disp(t,'temperature is ,(degree-celsius)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1: wavelength.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 1 // wavelength\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"v=960;// in m/s\n", +"n=3600/60;// in per sec\n", +"lamda=v/n;\n", +"disp(lamda,'The wavelength,lamda(m) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.20: temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 20 //temperature\n", +"clc;\n", +"clear;\n", +"close;\n", +"rtd=16/14;//ratio of densities\n", +"tk=15+273;//degree celsius\n", +"x=(tk*rtd)-273;//degree celsius\n", +"disp(x,'temperature is ,(degree-celsius)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.21: speed_of_sound_in_nitrogen.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 21 //speed\n", +"clc;\n", +"clear;\n", +"close;\n", +"rt=4/1;//\n", +"ss=332;//m/s\n", +"rd=32/28;//ratio of densities\n", +"rt1=((1+(1/rt)*rd)/(1+(1/rt)));//\n", +"v1=ss*sqrt(rt1);//m/s\n", +"disp(v1,'speed of sound in nitrogen is,(m/s)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.22: RMS_velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 22 //speed\n", +"clc;\n", +"clear;\n", +"close;\n", +"gm=1.41;//\n", +"vs=330;//m/s\n", +"vrms=sqrt(3/gm)*vs;//m/s\n", +"disp(vrms,'root mean square velocity of molecules of a gas is ,(m/s)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 2 // Frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"c=3*10^8;// in m/s\n", +"lamda=300;// in m\n", +"n=c*10^-6/lamda;\n", +"disp(n,'The frequency,n(MHz) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3: velocity_and_direction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 3 // velocity and direction\n", +"clc;\n", +"clear;\n", +"close;\n", +"//y=1.2*sin(3.5*t+0.5*x);//equation\n", +"w=3.5;//from equation\n", +"k=0.5;//from equation\n", +"v=w/k;//m/s\n", +"disp('wave velocity is '+string(v)+' m/s and direction of the wave is along negative X-axis')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4: wave_equatio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4 //equation of wave propogation\n", +"clc;\n", +"clear;\n", +"close;\n", +"amp=0.02;//m\n", +"fr=110;//Hz\n", +"v=330;//m/s\n", +"w=2*%pi*fr;//s^-1\n", +"k=w/v;//constant\n", +"//y=a*sin(w*t-k*x);//refrence equation\n", +"disp('equation of wave is '+string(amp)+'*sin('+string(w)+'*t-'+string(k)+'*x)')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5: path_difference.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 5 //path difference\n", +"clc;\n", +"clear;\n", +"close;\n", +"v=360;//m/s\n", +"fr=500;//Hz\n", +"h=v/fr;//wavelength in metre\n", +"ang=60;//degree\n", +"angr=ang*(%pi/180);//radian\n", +"pth=(h)/(2*%pi);//metre\n", +"disp(pth,'path difference is ,(m)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6: wavelength.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 6 //path difference\n", +"clc;\n", +"clear;\n", +"close;\n", +"pth=15;//cm\n", +"pd=(2*%pi)/3;//radians\n", +"h=(pth*2*%pi)/pd;//cm\n", +"disp(h,'wavelength is,(cm)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.8: displacement_velocity_and_acceleration.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 8 //displacement ,particle velocity and acceleration\n", +"clc;\n", +"clear;\n", +"close;\n", +"//y=a*sin*((2*%pi)/h)*(vt-x);//\n", +"v=1000;//cm/s\n", +"n=25;//vibrations\n", +"h=v/n;//cm\n", +"a=3;//cm\n", +"t=2;//seconds\n", +"x1=200;//cm\n", +"y=3*sind(((2*360)/h)*(v*t-x1));//\n", +"vl=2*%pi*a*n;//cm/s\n", +"acc=0;//\n", +"disp(y,'displacement is,(cm)=')\n", +"disp(vl,'velocity is,(cm/s)=')\n", +"disp(acc,'acceleration is,(cm/s^2)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.9: amplitude_frequency_velocity_and_wavelength.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 9 //amplitude,frequency,velocity ,wavelength and speed\n", +"clc;\n", +"clear;\n", +"close;\n", +"//y=5*sin*(4t-0.02x);//given\n", +"a=5;//cm \n", +"h=(2*%pi)/0.02;//\n", +"v=0.02*10000;//cm/s\n", +"n=v/h;//cycles/seconds\n", +"disp(a,'amplitude is,(cm)=')\n", +"disp(n,'frequency is,(cycles/s)=')\n", +"disp(v,'velocity is,(cm/s)=')\n", +"disp(h,'wavelength is,(cm)=')\n", +"ma1x=a*4;//cm/s\n", +"disp(ma1x,'maximum speed is,(cm/s)=')" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Oscillations_and_Waves_by_S_Prakesh/7-Superposition_of_Harmonic_Waves_Interference_Beats_Stationary_Waves_Phase_and_Group_Velocities.ipynb b/Oscillations_and_Waves_by_S_Prakesh/7-Superposition_of_Harmonic_Waves_Interference_Beats_Stationary_Waves_Phase_and_Group_Velocities.ipynb new file mode 100644 index 0000000..2682395 --- /dev/null +++ b/Oscillations_and_Waves_by_S_Prakesh/7-Superposition_of_Harmonic_Waves_Interference_Beats_Stationary_Waves_Phase_and_Group_Velocities.ipynb @@ -0,0 +1,492 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7: Superposition of Harmonic Waves Interference Beats Stationary Waves Phase and Group Velocities" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 10 // Frequency\n", +"clc;\n", +"clear;\n", +"close\n", +"b1=10;//beats per second\n", +"f1=300;//Hz\n", +"b2=15;//beats per second\n", +"f2=325;//Hz\n", +"n1=f1-b1;//Hz\n", +"n2=f1+b1;//Hz\n", +"n3=f2-b2;//Hz\n", +"n4=f2+b2;//Hz\n", +"disp(n2,'frequency is,(Hz)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.11: velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 11 // Velocity of sound\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"lamda1=5;// in m\n", +"lamda2=5.5;// in m\n", +"a=6;// beats/sec\n", +"v=a/((lamda2-lamda1)/(lamda1*lamda2));\n", +"disp(v,'The velocity of sound,v(m/s) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.12: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 12 // Frequency\n", +"clc;\n", +"clear;\n", +"close\n", +"b1=5;//beats per second\n", +"fr=384;//Hz\n", +"fo=fr-b1;//Hz\n", +"disp(fo,'frequency is,(Hz)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.13: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 13 // Frequency\n", +"clc;\n", +"clear;\n", +"close\n", +"b1=4;//beats per second\n", +"fr=256;//Hz\n", +"fo=fr+b1;//Hz\n", +"disp(fo,'frequency is,(Hz)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.18: frequency_wavelength_velocity_and_amlitude.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 18 //Frequency,wavelength, velocity and amplitude\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"a=6;// in cm\n", +"lamda=10;// in cm\n", +"T=1/10;// in sec\n", +"disp(lamda,'Wavelength of progressive wave,(cm) = ')\n", +"n=1/T;\n", +"disp(n,'Frequency of progressive wave,n(per sec)')\n", +"v=n*lamda;\n", +"disp(v,'The velocity,v(cm/s) = ')\n", +"disp(a,'The amplitude,a(cm) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1: ratio.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 1 // ratio\n", +"clc;\n", +"clear;\n", +"close;\n", +"ri=9/16;//ratio of intensities\n", +"ra=sqrt(ri);//ratio of amplitude\n", +"a1=1;//assume\n", +"a2=ra*a1;//\n", +"rim=(a1+a2)^2/(a1-a2)^2;//\n", +"disp('ratio of maximum intensity and minimum intensity in fringe system is '+string(rim)+':'+string(a1)+'')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.24: group_velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 24 //Velocity\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"c=3*10^8;// in m/s\n", +"lamda1=4000;// in Angustrom\n", +"lamda2=5000;// in Aungustrom\n", +"mu1=1.540;\n", +"mu2=1.530;\n", +"vg=c*((mu1*lamda1)-(mu2*lamda2))/(mu1*mu2*(lamda1-lamda2));\n", +"disp(vg,'The velocity,vg(m/s) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.25: group_velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 25 //Velocity\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"v=1.8*10^8;// in m/s\n", +"lamda=3.6*10^-7;// in m\n", +"dv_dlamda=3.8*10^13;// in per sec\n", +"vg=v-(lamda*dv_dlamda);\n", +"disp(vg,'The group velocity,vg(m/s) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2: intensity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 2 // intensity\n", +"clc;\n", +"clear;\n", +"close;\n", +"I=1;//assume\n", +"a1=1*I;//\n", +"a2=4*I;//\n", +"ph1=0;//degree\n", +"i1=(a1+a2)+a2*cosd(ph1);//\n", +"disp('intensity where phase difference is zero is '+string(i1)+'*I')\n", +"ph2=90;//degree\n", +"i2=(a1+a2)+a2*cosd(ph2);//\n", +"disp('intensity where phase difference is pi/2 is '+string(i2)+'*I')\n", +"ph3=180;//degree\n", +"i3=(a1+a2)+a2*cosd(ph3);//\n", +"disp('intensity where phase difference is pi is '+string(i3)+'*I')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3: wavelength_and_frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 3 // Wavelength and frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"d=30;// in cm\n", +"lamda=2*d*10^-2;\n", +"v=330;// in m/s\n", +"disp(lamda,'The wavelength,(m) = ')\n", +"n=v/lamda;\n", +"disp(n,'The frequency,n(vibrations/s) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4: time_interval.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4 // number of beats and time interval\n", +"clc;\n", +"clear;\n", +"close;\n", +"n1=300;//Hz\n", +"n2=303;//Hz\n", +"bfs=n2-n1;//\n", +"disp(bfs,'beat frequency per second is,=')\n", +"ti=1/bfs;//second\n", +"disp(ti,'time interval is,(second)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.5: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 5 // Frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"n1=256;// in Hz\n", +"x=4;// in beats per sec\n", +"n2a=n1+x;\n", +"n2b=n1-x;\n", +"disp(n2a,'The frequency,n2a(Hz) = ')\n", +"disp(n2b,'The frequency,n2b(Hz) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 6 // Frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"nA=256;// in Hz\n", +"x=5;// in beats per sec\n", +"nB=nA+x;\n", +"disp(nB,'The frequency,nB(Hz) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 7 // Frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"nB=512;// in Hz\n", +"x=5;// in beats per sec\n", +"nA=nB+x;\n", +"disp(nA,'The frequency of A,nA(Hz) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8: velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 8 // Velocity of sound\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"lamda1=1;// in m\n", +"lamda2=1.01;// in m\n", +"a=10/3;// in beats/sec\n", +"v=a/((lamda2-lamda1)/(lamda1*lamda2));\n", +"disp(v,'The velocity of sound,v(m/s) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 9 // Frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"n=273;//\n", +"b1=4;//beats per second\n", +"b2=b1-1;//\n", +"t1=15;//degree celsius\n", +"t2=10;//degree celsius\n", +"v1510=sqrt((n+t1)/(n+t2));//\n", +"n=((b2*v1510-b1)/(1-v1510));//\n", +"disp(n,'frequency is,(Hz)=')" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Oscillations_and_Waves_by_S_Prakesh/8-Vibrations_of_Strings_and_Membranes.ipynb b/Oscillations_and_Waves_by_S_Prakesh/8-Vibrations_of_Strings_and_Membranes.ipynb new file mode 100644 index 0000000..0d31642 --- /dev/null +++ b/Oscillations_and_Waves_by_S_Prakesh/8-Vibrations_of_Strings_and_Membranes.ipynb @@ -0,0 +1,506 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8: Vibrations of Strings and Membranes" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.10: velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 10// velocity\n", +"clc;\n", +"clear;\n", +"close;\n", +"l1=20;//cm\n", +"v1=600;//cm^-1\n", +"n1=v1/4;//\n", +"v1=2*n1*l1*10^-2;//m/sec\n", +"v2=sqrt(2)*v1;//m/s\n", +"disp(v1,'velocity of the waves is,(m/s)=')\n", +"disp(round(v2),'velocity of waves when tension of the string is doubled is,(m/s)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.11: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 11// frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"nb=6;//beats\n", +"l1=20;//cm\n", +"l2=21;//cm\n", +"x=l2/l1;//\n", +"n=(x*nb+nb)/(x-1);//\n", +"disp(n,'frequency is,(Hz)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.12: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 12// frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"nb=4;//beats\n", +"l1=70;//cm\n", +"l2=70-1;//cm\n", +"x=l2/l1;//\n", +"n=(x*nb)/(1-x);//\n", +"disp(n,'frequency is,(Hz)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.13: length.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 13// length\n", +"clc;\n", +"clear;\n", +"close;\n", +"n123=1/3/15;//\n", +"tl=105;//cm\n", +"l123=15/5/1;//\n", +"k=tl/21;//\n", +"l1=15*k;//cm\n", +"l2=5*k;//cm\n", +"l3=k;//cm\n", +"disp(l1,'l1 length is,(cm)=')\n", +"disp(l2,'l2 length is,(cm)=')\n", +"disp(l3,'l3 length is,(cm)=')\n", +"//length l2 is calculated wrong in the textbook" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.14: wavelength.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 14// wave-length\n", +"clc;\n", +"clear;\n", +"close;\n", +"//y=ym*sin*2*%pi(nt-(x/h));//given\n", +"disp('wavelength is (%pi*ym)/2')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.15: FREQUENCY.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 15// frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"l=2.5;//m\n", +"m1=0.001;//kg\n", +"tn=4;//N\n", +"m=m1/l;//kg/m\n", +"n=((1/(2*l))*sqrt(tn/m));//Hz\n", +"disp(n,'frequency is ,(Hz)=')\n", +"disp('frequencies stopped are '+string(5*n)+' Hz,'+string(10*n)+' Hz,'+string(15*n)+' Hz')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.16: frequency_and_relative_amplitude.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 16// frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"l=1;//m\n", +"m1=0.5;//kg\n", +"tn=200;//N\n", +"m=m1/l;//kg/m\n", +"n=((1/(2*l))*sqrt(tn/m));//Hz\n", +"disp(n,'frequency is ,(Hz)=')\n", +"w=2*%pi*n;//\n", +"disp('ratio of three frequencies is '+string(w)+' : '+string(2*w)+' : '+string(3*w)+'')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1: speed.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 1 // Speed\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"m1=0.1;// in kg\n", +"g=9.81;// in m/s^2\n", +"T=m1*g;// N\n", +"A=10^-6;// in m^2\n", +"p=9.81*10^3;// in kg/m^3\n", +"m=A*p;// in kg/m\n", +"v=sqrt(T/m);\n", +"disp(v,'The speed of transverse waves,v(m/s) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.2: tensile_stress.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 2 // tensile stress\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"p=8000;// in kg/m^3\n", +"v=340;// in m/s\n", +"TbyA=v^2*p*10^-2;\n", +"disp(TbyA,'Tensile stress,(N/m^2) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3: tension.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 3 // Tension\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"M=2*10^-3;// in kg\n", +"l=35*10^-2;// in m\n", +"n=500;// in Hz\n", +"m=M/l;// in kg/m\n", +"T=4*n^2*l^2*m;\n", +"disp(T,'Tension,T(N) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.4: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4 // Frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"T=625;// in N\n", +"T1=100;// in N\n", +"l=1/2;\n", +"n=240;// in Hz\n", +"n1=1/l*(sqrt(T1/T))*n;\n", +"disp(n1,'The frequency,n1(Hz) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5: initial_tension.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 5 // initial tension\n", +"clc;\n", +"clear;\n", +"close;\n", +"rt=2/3;//ratio\n", +"mi=5;//kg wt\n", +"M=((1/rt)^2)-1;//\n", +"mo=mi/M;//kg wt\n", +"disp(mo,'initial tension in string is ,(kg-wt)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6: speed_stress_and_percentage_change.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 6// speed,stress and change in frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"n=175;//Hz\n", +"l=1.5;//m\n", +"v=2*n*l;//m/s\n", +"d=7.8*10^3;//kg/m^3\n", +"st=v^2*d;//N/m^2\n", +"per=3;//% increament\n", +"T=1;//assume\n", +"td=(1+per/100)*T;//\n", +"x=(((1/2)*(per/100)));//\n", +"td=x*100;//\n", +"disp(v,'velocity is,(m/s)=')\n", +"disp(st,'stress is,(N/m^2)=')\n", +"disp(td,'percentage change in frequency is,(%)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 7 // Frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"l=.50;// in m\n", +"m1=25;// in kg\n", +"m2=1.44*10^-3;// in kg\n", +"g=9.81;// in m/s^2\n", +"T=m1*g;\n", +"m=m2/l;\n", +"p=2;\n", +"n=(p/(2*l))*sqrt(T/m);\n", +"disp(n,'The frequency,n = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.8: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 8// frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"l1=90;//cm\n", +"d1=0.05;//cm\n", +"d2=0.0625;//cm\n", +"l2=60;//cm\n", +"n1=200;//Hz\n", +"n2=((l1*d1*n1)/(l2*d2));//Hz\n", +"disp(n2,'frequency is,(Hz)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.9: tension.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 9// tension\n", +"clc;\n", +"clear;\n", +"close;\n", +"n21=3/2;//\n", +"r21=3/4;//\n", +"t1=2.048;//kg. wt\n", +"t2=(n21*r21)^2*t1;//kg weight\n", +"n31=9/4;//\n", +"r31=2/4;//\n", +"t3=(n31*r31)^2*t1;//kg-weight\n", +"n41=27/8;//\n", +"r41=1/4;//\n", +"t4=(n41*r41)^2*t1;//kg-weight\n", +"disp(t2,'tension (T2) is ,(kg weight)=')\n", +"disp(t3,'tension (T3) is ,(kg weight)=')\n", +"disp(t4,'tension (T4) is ,(kg weight)=')" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Oscillations_and_Waves_by_S_Prakesh/9-Longitudinal_Acoustic_Waves_in_Air.ipynb b/Oscillations_and_Waves_by_S_Prakesh/9-Longitudinal_Acoustic_Waves_in_Air.ipynb new file mode 100644 index 0000000..edfaf37 --- /dev/null +++ b/Oscillations_and_Waves_by_S_Prakesh/9-Longitudinal_Acoustic_Waves_in_Air.ipynb @@ -0,0 +1,422 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9: Longitudinal Acoustic Waves in Air" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.10: length.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 10// length\n", +"clc;\n", +"clear;\n", +"close;\n", +"l1=66;//cm\n", +"v=330;//m/s\n", +"nbs=5;//beats/sec\n", +"x=(2*(v-(nbs*2*l1*10^-2))/(v*2*l1*10^-2));//\n", +"l2=1/x;//cm\n", +"disp(l2*100,'length is,(cm)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.11: fundamental_frequency_and_length.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 11// length\n", +"clc;\n", +"clear;\n", +"close;\n", +"f=110;//Hz\n", +"v=330;//m/s\n", +"l=v/(2*f);//m\n", +"disp(f,'fundamental frequency is,(Hz)=')\n", +"disp(l,'length is ,(m)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.12: wave_equation_frequency_amplitude_wavelength_and_distance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 12// equation,frequency,amplitude ,wavelength and distance\n", +"clc;\n", +"clear;\n", +"close;\n", +"//y=6*(sin(2*%pi*x)/6)*cos(160*%pi*t);//given equation\n", +"a=3;//cm\n", +"T=(2*%pi)/(160*%pi);//sec\n", +"h=((2*%pi*6)/(2*%pi));//cm\n", +"disp('wave equation is 3*sin((160*%pi*t)+(2*%pi*x)/6)')\n", +"disp(a,'amplitude is ,(cm)=')\n", +"disp(1/T,'frequency is ,(Hz)=')\n", +"disp(h,'wavelength is,(cm)=')\n", +"db=h/2;//\n", +"disp(db,'distance between consecutive antinodes is,(cm)=')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.13: length_pressure_amplitude.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 13// length,amlitude,pressure\n", +"clc;\n", +"clear;\n", +"close;\n", +"f=440;//Hz\n", +"v=330;//m/s\n", +"l=((5*v)/(4*f))*100;//cm\n", +"disp(l,'length (L) is ,(cm)=')\n", +"ang=cos((2*%pi)/8);//\n", +"disp('maximum pressure variation is at node = ΔPo*'+string(ang)+' and minimum at antinode =0')\n", +"pmax=0;//\n", +"pmin=0;//\n", +"disp('at antinode pressure variation is Pmax= '+string(pmax)+' and Pmin= '+string(pmin)+'')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1: pressure_amplitude_energy_density_and_energy_lux.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 1 // Pressure amplitude, Energy density and Energy flux\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"A=1*10^-5;// in m\n", +"n=500;// in per sec\n", +"v=340;// in m/s\n", +"p=1.29;// in kg/m^3\n", +"Pa=2*%pi*n*v*p*A;\n", +"disp(Pa,'Pressure amplitude,Pa(N/m^2) = ')\n", +"Ed=2*%pi^2*n^2*p*A^2;\n", +"disp(Ed,'Energy density,Ed(J/m^3) = ')\n", +"Ev=Ed*v;\n", +"disp(Ev,'Energy flux,Ev(J/m^2-s) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2: pressure.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 2// Pressure \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"gama=1.4;\n", +"u=10^-3;// in m/s\n", +"v=340;// in m/s\n", +"P=10^5;// in N/m^2\n", +"p=gama*P*u/v;\n", +"disp(p,'The pressure,p(N/m^2) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3: amplitude.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 3// The amplitude \n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"n=350;// in Hz\n", +"v=330;// in m/s\n", +"p=1.293;// in kg/m^3\n", +"I=1*10^-6;// in W/m^2\n", +"A=sqrt(I/(2*%pi*n^2*p*v));\n", +"disp(A,'The amplitude of wave,A(m) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4: velocity_wavelength_and_amplitude.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 4// Velocity, Amplitude of pressure and particle velocity amplitude\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"gama=1.4;\n", +"P=1.013*10^5;\n", +"p1=1.29;// in kg/m^3\n", +"A=2.5*10^-7;// in m\n", +"v=sqrt(gama*P/p1);\n", +"disp(v,'The velocity,v(m/s) = ')\n", +"n=1000;// in Hz\n", +"lamda=v/n;\n", +"disp(lamda,'Wavelength,lamda(m) = ')\n", +"p=p1*v*2*%pi*n*A;\n", +"disp(p,'Amplitude of pressure,p(N/m^2) = ')\n", +"u=2*%pi*n*A;\n", +"disp(u,'Particle velocity amplitude,u(m/s) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.5: BULK_MODULUS_AMPLITUDE_AND_PRESSURE_VARIATION.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 5// Amplitude\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"v=(1/3)*10^3;// in m/s\n", +"p=1.25;// in kg/m^3\n", +"E=v^2*p;\n", +"n=10^4;// in rad/sec\n", +"disp(E,'Bulk modulus of medium,E(N/m^2) = ')\n", +"I=10^-12;// in W/m^2\n", +"A=sqrt(I/(2*%pi^2*n^2*p*v));\n", +"disp(A,'Amplitude of wave,A(m ) = ')\n", +"P=sqrt(2*I*p*v);\n", +"disp(P,'Pressure amplitude,P(N/m^2) = ')\n", +"// answer A and E is wrong in textbook" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.6: velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 6// Root mean squre velocity\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"vs=330;// in m/s\n", +"gama=1.41;\n", +"c=round(sqrt(3/gama)*vs);\n", +"disp(c,'The root mean square velocity of modulus,c(m/s) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.7: power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 7// Acoustic power entering\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"A=1*2;// in m^2\n", +"a=80;// in dB\n", +"I0=10^-12;// in W/m^2\n", +"IbyI0=10^(80/10);\n", +"I=I0*IbyI0;\n", +"Ape=I*A;\n", +"disp(Ape,'Acoustic power entering the room,(Watt) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.8: intensity_level.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 8// Acoustic intensity level\n", +"clc;\n", +"clear;\n", +"close;\n", +"//given data :\n", +"Pr=3;// in W\n", +"r=15;// in m\n", +"I=Pr/(4*%pi*r^2);// in W/m^2\n", +"I0=10^-12;// in W/m^2\n", +"L=round(10*log10(I/I0));\n", +"disp(L,'Acoustic intensity level,L(dB) = ')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.9: frequency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"//Example 9// frequency\n", +"clc;\n", +"clear;\n", +"close;\n", +"n2=200;//second^-1\n", +"l21=2;//\n", +"f=l21*n2;//\n", +"disp(f,'frequency is,(second^-1)=')" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |