summaryrefslogtreecommitdiff
path: root/sample_notebooks/NityaL/Sample-Chapter_26.ipynb
diff options
context:
space:
mode:
authorTrupti Kini2016-08-03 23:30:24 +0600
committerTrupti Kini2016-08-03 23:30:24 +0600
commitf64be8c36d433bcb9e1e056f5ecf34093f03e935 (patch)
treeae0f8c23ed1868b8ee6d017b66dcfc53fe1561bd /sample_notebooks/NityaL/Sample-Chapter_26.ipynb
parentda0939454d10f0b844331734667e8faa146da8a0 (diff)
downloadPython-Textbook-Companions-f64be8c36d433bcb9e1e056f5ecf34093f03e935.tar.gz
Python-Textbook-Companions-f64be8c36d433bcb9e1e056f5ecf34093f03e935.tar.bz2
Python-Textbook-Companions-f64be8c36d433bcb9e1e056f5ecf34093f03e935.zip
Added(A)/Deleted(D) following books
A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/README.txt A Fundamentals_Of_Aerodynamics_by_J._D._Anderson_Jr./README.txt A Introductory_Methods_Of_Numerical_Analysis__by_S._S._Sastry/README.txt A SURVYNG_AND_LEVELLING__by_N.N.BASAK/README.txt A sample_notebooks/Harshitgarg/Chapter_1-INTRODUCTION_TO_MECHANICS_OF_SOLIDS__2.ipynb A "sample_notebooks/KARTHIKEYAN S/CHAPTER_1.ipynb" A sample_notebooks/NityaL/Sample-Chapter_26.ipynb
Diffstat (limited to 'sample_notebooks/NityaL/Sample-Chapter_26.ipynb')
-rw-r--r--sample_notebooks/NityaL/Sample-Chapter_26.ipynb226
1 files changed, 226 insertions, 0 deletions
diff --git a/sample_notebooks/NityaL/Sample-Chapter_26.ipynb b/sample_notebooks/NityaL/Sample-Chapter_26.ipynb
new file mode 100644
index 00000000..4ae1c760
--- /dev/null
+++ b/sample_notebooks/NityaL/Sample-Chapter_26.ipynb
@@ -0,0 +1,226 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 26:CHARGE AND MATTER"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 26.1 Magnitude of total charges in a copper penny"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " Magnitude of the charges in coulombs is 133687.50000000003\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 1.1\n",
+ "\n",
+ "m =3.1 #mass of copper penny in grams\n",
+ "e =4.6*10** -18 #charge in coulombs\n",
+ "N0 =6*10**23 #avogadro’s number atoms / mole\n",
+ "M =64 #molecular weight of copper in gm/ mole\n",
+ "\n",
+ "#Calculation\n",
+ "N =( N0 * m ) / M #No. of copper atoms in penny\n",
+ "q = N * e # magnitude of the charges in coulombs\n",
+ "print (\" Magnitude of the charges in coulomb is \",q )"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 26.2 Separation between total positive and negative charges"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " Separation between total positive and negative charges in meters is 5813776741.499454\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 2\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "F =4.5 #Force of attraction in nt\n",
+ "q =1.3*10**5 #total charge in coulomb\n",
+ "r = q * math.sqrt ((9*10**9) / F ) ;\n",
+ "print(\" Separation between total positive and negative charges in meters is \",r )"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 26.3 Force acting on charge q1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "X component of resultant force acting on q1 in nt is 2.0999999999999996\n",
+ "Y component of resultant force acting on q1 in nt is -1.5588457268119893\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 3\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#given three charges q1,q2,q3\n",
+ "q1=-1.0*10**-6 #charge in coul\n",
+ "q2=+3.0*10**-6 #charge in coul\n",
+ "q3=-2.0*10**-6 #charge in coul\n",
+ "r12=15*10**-2 #separation between q1 and q2 in m\n",
+ "r13=10*10**-2 # separation between q1 and q3 in m\n",
+ "angle=math.pi/6 #in degrees\n",
+ "F12=(9.0*10**9)*q1*q2/(r12**2) #in nt\n",
+ "F13=(9.0*10**9)*q1*q3/(r13**2) #in nt\n",
+ "F12x=-F12 #ignoring signs of charges\n",
+ "F13x=F13*math.sin(angle);\n",
+ "F1x=F12x+F13x\n",
+ "F12y=0 #from fig.263\n",
+ "F13y=-F13*math.cos(angle);\n",
+ "F1y=F12y+F13y #in nt\n",
+ "print(\"X component of resultant force acting on q1 in nt is\",F1x)\n",
+ "print(\"Y component of resultant force acting on q1 in nt is\",F1y)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 26.4 Electrical and Gravitational force between two particles"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Coulomb force in nt is 8.202207191171238e-08\n",
+ "Gravitational force in nt is 3.689889640441438e-47\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 4\n",
+ "\n",
+ "r=5.3*10**-11 #distance between electron and proton in the hydrogen atom in meter\n",
+ "e=1.6*10**-19 #charge in coul\n",
+ "G=6.7*10**-11 #gravitatinal constant in nt-m2/kg2\n",
+ "m1=9.1*10**-31 #mass of electron in kg\n",
+ "m2=1.7*10**-27 #mass of proton in kg\n",
+ "F1=(9*10**9)*e*e/(r**2) #coulomb's law\n",
+ "F2=G*m1*m2/(r**2) #gravitational force\n",
+ "print(\"Coulomb force in nt is\",F1)\n",
+ "print(\"Gravitational force in nt is\",F2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "# Example 26.5 Repulsive force between two protons in a nucleus of iron"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Repulsive coulomb force F 14.4 nt\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Example 5\n",
+ "\n",
+ "r=4*10**-15 #separation between proton annd nucleus in iron in meters\n",
+ "q=1.6*10**-19 #charge in coul\n",
+ "F=(9*10**9)*(q**2)/(r**2) #coulomb's law\n",
+ "print(\"Repulsive coulomb force F \",F,'nt')"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python [Root]",
+ "language": "python",
+ "name": "Python [Root]"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.12"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}