summaryrefslogtreecommitdiff
path: root/Concise_Physics_by_H_Matyaka/7-Electricity.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Concise_Physics_by_H_Matyaka/7-Electricity.ipynb')
-rw-r--r--Concise_Physics_by_H_Matyaka/7-Electricity.ipynb272
1 files changed, 272 insertions, 0 deletions
diff --git a/Concise_Physics_by_H_Matyaka/7-Electricity.ipynb b/Concise_Physics_by_H_Matyaka/7-Electricity.ipynb
new file mode 100644
index 0000000..7542c66
--- /dev/null
+++ b/Concise_Physics_by_H_Matyaka/7-Electricity.ipynb
@@ -0,0 +1,272 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7: Electricity"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.1: Electric_potential_strength.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"clear\n",
+"//input\n",
+"e=1.6*10^-19 //charge of electron\n",
+"r=0.075*10^-3 // radius of electron\n",
+"ep=8.85*10^-12 //permittivity of free space\n",
+"//calculation\n",
+"v=-e/(4*%pi*ep*r)//electric potential\n",
+"e=-e/(4*%pi*ep*r*r)//electric field strength\n",
+"//output\n",
+"printf('resultant potential is %3.3e V',v)\n",
+"printf('\n resultant electric field strength %3.3f V/m',e)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.2: ratio_of_force.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"clear\n",
+"//input\n",
+"q=2.4*10^-19 //charge1\n",
+"Q=3.8*10^-19//charge2\n",
+"ep=8.85*10^-12//permittivity of free space\n",
+"G=6.7*10^-11\n",
+"m=8.9*10^-31//mass 1\n",
+"M=1.5*10^-30//mass 2\n",
+"//calculation\n",
+"x=q*Q/(4*%pi*ep*m*M*G)//coulumbs law\n",
+"//output\n",
+"printf('the ratio of electrostatic force between charges %3.3e',x)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.3: emf_and_internal_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"clear\n",
+"//input\n",
+"i=0.5 //current in circuit\n",
+"R=6 //resistance of circuit\n",
+"i1=0.3//dropped current\n",
+"//calculation\n",
+"r=1.2/0.2\n",
+"e=i*(r+R)//ohms law\n",
+"//output\n",
+"printf('the battery emf is %3.3f V',e)\n",
+"printf('\n the internal resistence is %3.3f ohm',r)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.4: power_output.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"clear\n",
+"//input\n",
+"d=8.2*10^-7 //resistivity of coil\n",
+"l=15 //length of wire\n",
+"r=0.3*10^-3 //radius of wires\n",
+"v=160 //power output\n",
+"//calculations\n",
+"R=d*l/(%pi*r*r)\n",
+"p=v*v/R //for one coil\n",
+"p1=v*v/(R+R) //for two coils in series\n",
+"rp=(R*R)/(R+R)//total resistence \n",
+"pp=(v*v)/rp//total power\n",
+"//output\n",
+"printf('the power when one coil is %3.3f W',p)\n",
+"printf('\nthe power when two coils in series is %3.3f W',p1)\n",
+"printf('\n the power when coils in parallel is %3.3f W',pp)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.5: percent_of_pd.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"clear\n",
+"//input\n",
+"r1=40//resistance 1\n",
+"r2=20//resistamce 2\n",
+"r3=10//resistance 3\n",
+"v=1.6//voltage\n",
+"//calculation\n",
+"R=r1+r2+r3//total resistance in series\n",
+"x=((v*r1)*70)/((2*50)*(1.6*40))//fraction of pd\n",
+"x=x*100//percentage pd\n",
+"//output\n",
+"printf('the percentage of pd is %3.0f percent',x)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.6: final_resistance_calculation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"clear\n",
+"//input\n",
+"a=4.3*10^-3//temperature co-efficient of resistance\n",
+"//calculation\n",
+"r2=((60*a+1)/(20*a+1))*10//resistance \n",
+"//output\n",
+"printf('the final resistence is %3.3f ohm',r2)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.7: internal_resistance_calculation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"clear\n",
+"//input\n",
+"l1=82.3//balance length with switch open\n",
+"l2=75.8//balance length with switch closed\n",
+"R=9//resistance\n",
+"//calculation\n",
+"r=(R*l1/l2)-R//internal resistance\n",
+"//output\n",
+"printf('the internal resistence is %3.3f ohm',r)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.8: calculation_of_resistance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc\n",
+"clear\n",
+"//input\n",
+"p=2*10^-6//pd across wire\n",
+"v=1.5//voltage \n",
+"l=1.5*10^3//length of potentiometer\n",
+"R=7//resistance\n",
+"//calculation\n",
+"vw=p*l//pd across the wire\n",
+"x=(7*v/vw)-R//resistace of x\n",
+"//output\n",
+"printf('the resistance of x is %3.0f ohm',x)"
+ ]
+ }
+],
+"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
+}