diff options
Diffstat (limited to 'The_Field_of_Electronics_by_R_Morrison/1-Electric_field.ipynb')
-rw-r--r-- | The_Field_of_Electronics_by_R_Morrison/1-Electric_field.ipynb | 630 |
1 files changed, 630 insertions, 0 deletions
diff --git a/The_Field_of_Electronics_by_R_Morrison/1-Electric_field.ipynb b/The_Field_of_Electronics_by_R_Morrison/1-Electric_field.ipynb new file mode 100644 index 0000000..14902df --- /dev/null +++ b/The_Field_of_Electronics_by_R_Morrison/1-Electric_field.ipynb @@ -0,0 +1,630 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: Electric field" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.10: calculating_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"a=20; //amplitude in cm\n", +"n=6; //frequency per second\n", +"w=2*(%pi)*n; //omega in radians/sec\n", +"disp(w,'Omega in radians/sec = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.11: calculating_power_dissipated.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"a=6; //amplitude in cm\n", +"n=9; //frequency in Hz.\n", +"vmax=2*(%pi)*n*6; //calculating velocity in cm/sec\n", +"acc=-((18*(%pi))^2)*6; //calculating acc. in m/sec square\n", +"disp(vmax,'Maximum velocity in cm/sec = '); //displaying result\n", +"disp('Velocity at extreme position = 0'); //displaying result\n", +"disp('Accelaration at mean position = 0'); //displaying result\n", +"disp(acc,'Accelaration at extreme position in m/sec square = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.12: calculating_power_dissipated.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"g=9.8; //gravitational constant\n", +"m=50; //mass in kg\n", +"l=0.2; //length in m\n", +"T=0.6; //time period\n", +"k=(m*g)/l; //calculating constant\n", +"m=2450*((T/(2*(%pi)))^2); //calcualting mass using given time period\n", +"disp(m,'Mass of body in kg = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.13: calculating_the_power_level.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=4; //volts\n", +"t=8; //time in sec\n", +"ch=4; //charge in Coloumb\n", +"c=ch/t; //current\n", +"p=c*v; //power\n", +"e=p*t; //energy\n", +"disp(c,'Current in Ampere = '); //displaying current\n", +"disp(p,'Power in Watt = '); //displaying power\n", +"disp(e,'Energy in Joule = '); //displaying energy" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14: finding_configuration.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"disp('In a)parallel b)series c)Two pairs of parallel and then in series'); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15: no_of_resistances.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"p=1/8; //power disipation per resistor\n", +"v=sqrt(100/8); //voltage across each resistor\n", +"disp(14.14,'a)Voltage in Series in Ohm = '); //displaying result\n", +"disp(v,'b)Voltage in Parallel in Ohm ='); //displaying result\n", +"disp(7.07,'c)Voltage in Series-Parallel in Ohm = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.16: calculating_wattage_rating.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=10; //voltage in volt\n", +"t=2; //time in sec\n", +"r=40; //resistance in ohm\n", +"p=(v^2)/r; //power\n", +"e=5/5; //energy in Watt\n", +"disp(p,'Power in Watt = '); //displaying power\n", +"disp('2 W resistor is adequate.'); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.17: calculating_power_dissipation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=24; //voltage in volt\n", +"t=2; //time in sec\n", +"r=48; //resistance in ohm\n", +"p=(v^2)/r; //calculating power\n", +"disp(p,'Power in Watt = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.18: calculating_joules.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"i=60; //current in ampere\n", +"v=12; //voltage in volt\n", +"t=3600; //time in sec\n", +"p=i*v*t; //calculating power\n", +"disp(p,'Number of joules = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.19: calculating_wattage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=12; //voltage in volt\n", +"ah=720; //ampere-hours\n", +"am=ah/24; //calculating amperage\n", +"r=v/am; //calculating resistance\n", +"disp(r,'Load in Ohm = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.1: calculating_Electric_field_intensity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"n=512; //frequency in Hz\n", +"l=67; //wavelength in cm\n", +"v=n*l; //calculating velocity\n", +"disp(v,'Velocity in cm/sec = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.20: calculating_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"p=200; //power in Watt\n", +"v=12; //voltage in volt\n", +"i=p/v; //calculating current in Ampere\n", +"I=p/6; //calculating\n", +"disp(i,'Current in Ampere = '); //displaying\n", +"disp(I,'Current in Ampere if voltage were 6V = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.21: calculating_energy.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"E=10^6; //in volt/m\n", +"e=8.85*10^-12; //constant in F/m\n", +"v=10^-5; //volume in m cube\n", +"en=(1/2)*e*E*E*v; //calculating energy\n", +"disp(en,'Energy in Joule = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.22: calculating_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"en=4.42*10^-5; //energy in Joule\n", +"v=10^6;\n", +"q=(2*en)/v; //calculating q\n", +"disp(q,'Charge in Coloumb = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.23: calculating_force.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"e=4.42*10^-5; //energy in Joule\n", +"v=1.1*10^-5; //volume in m cube\n", +"dv=(10/100)*e; //calculating change in energy\n", +"dd=10^-4; //change in dimension in metre\n", +"f=dv/dd; //calculating force\n", +"disp(f,'Force in kg = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.24: calculating_average_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"disp('a)1A for 1 sec = 10J/sec '); //displaying\n", +"disp('b)10A for 0.1 sec = 100 J/sec'); //displaying\n", +"disp('c)100A for 0.01 sec = 1000 J/sec'); //displaying" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.25: calculating_peak_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"disp('Peak power is when 100 A flows for 0.01 sec = 1000J/sec'); //displaying" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2: calculating_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=340; //velocity in m/sec\n", +"l=0.68; //wavelength in m\n", +"n=v/l; //calculating frequency\n", +"disp(n,'Frequency in Hz = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3: calculating_resistance_and_conductance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=3*10^8; //velocity in m/sec\n", +"n=500*10^3; //frequency in Hz\n", +"l=v/n; //calculating wavelength\n", +"disp(l,'Wavelength in m = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4: calculating_current.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"v=330; //velocity in m/sec\n", +"n=560; //frequency in Hz\n", +"l=v/n; //calculating wavelength\n", +"disp(l*30,'Distance travelled in 30 vibrations in m = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5: calculating_work.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"s=90; //distance in m\n", +"u=0; //initial velocity in m/sec\n", +"t=sqrt(90/4.9); //calculating time using kinematical equation\n", +"t1=4.56-t; //calculating time taken by sound to travel\n", +"v=s/t1; //calculating velocity\n", +"disp(v,'Velocity in m/sec = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6: calculating_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"l1=1.5; //wavelength in m\n", +"l2=2; //wavelength in m\n", +"v1=120; //velocity in m/sec\n", +"n=v1/l1; //calculating frequency\n", +"v2=n*l2; //calculating velocity\n", +"disp(v2,'Velocity in m/sec = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.7: calculating_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"l=5641*10^-10; //wavelength in m\n", +"c=3*10^8; //velocity in m/sec\n", +"n=c/l; //calculating frequency\n", +"u=1.58; //refractive index of glass\n", +"cg=c/u; //calculating velocity of light in glass\n", +"l1=cg/n; //calculating wavelegth in glass\n", +"disp(l1*10^10,'Wavelength in glass in Angstrom ='); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.8: calculating_voltage.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"n=12*10^6; //frequency in Hz\n", +"v=3*10^8; //velocity in m/sec\n", +"l=v/n; //calculating wavelength\n", +"disp(l,'Wavelength in m = '); //displaying result" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.9: calculating_internal_resistance.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc;\n", +"n=400; //frequency in Hz\n", +"v=300; //velocity in m/sec\n", +"l=v/n; //calculating wavelength\n", +"disp(l,'Wavelength in m = '); //displaying result" + ] + } +], +"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 +} |