0% found this document useful (0 votes)
87 views16 pages

Aksha Bajpai

This document summarizes a physics student's Python project on nuclear physics topics. The project uses Python modules like NumPy and Matplotlib to: (1) Plot the radioactivity curve using Euler's method of solving differential equations. (2) Calculate the total number of alpha particles that underwent reflection in Rutherford's gold foil experiment. (3) Generate an image of deuterium and tritium nuclear fusion. The project also provides background information on radioactive decay, Rutherford's experiment, and the modules used.

Uploaded by

Aksha Bajpai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views16 pages

Aksha Bajpai

This document summarizes a physics student's Python project on nuclear physics topics. The project uses Python modules like NumPy and Matplotlib to: (1) Plot the radioactivity curve using Euler's method of solving differential equations. (2) Calculate the total number of alpha particles that underwent reflection in Rutherford's gold foil experiment. (3) Generate an image of deuterium and tritium nuclear fusion. The project also provides background information on radioactive decay, Rutherford's experiment, and the modules used.

Uploaded by

Aksha Bajpai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

SRI SATHYA SAI INSTITUTE OF HIGHER LEARNING

ANANTAPUR CAMPUS

Department of Physics
Python Project Work
6th Semester
Paper Title: Software Laboratory
Paper Code: UPHY-608
Submitted by:
Aksha Bajpai
Reg. no: 172208
OBJECTIVE:

Python is an interpreter, object-oriented, high-level programming language with


dynamic semantics. Its high-level built in data structures, combined with
dynamic typing and dynamic binding; make it very attractive for rapid
application development, as well as for use as a scripting or glue language to
connect existing components together. Python's simple, easy to learn syntax
emphasizes readability and therefore reduces the cost of program maintenance.
Python supports modules and packages, which encourages program modularity
and code reuse. The Python interpreter and the extensive standard library are
available in source or binary form without charge for all major platforms, and
can be freely distributed.
Thus, Python can be used extensively in the field of science. This project
focuses on some Nuclear Physics topics of Physics.
The Aim of this project is to:
(1)To plot the radioactivity curve using the Euler’s Method of solving differential
equations.
(2) To find the total number of alpha particles,which underwent reflection in
Rutherford’s Gold Foil experiment.
(3)To print an image of deuterium and tritium nuclear fusion.
To do these programs the main modules which I used are as follows:
(a) NumPy

NumPy is the fundamental package for scientific computing in Python. It is a


Python library that provides a multidimensional array object, various derived
objects (such as masked arrays and matrices), and an assortment of routines
for fast operations on arrays, including mathematical, logical, shape
manipulation, sorting, selecting, I/O, discrete Fourier transforms, basic linear
algebra, basic statistical operations, random simulation and much more.

At the core of the NumPy package, is the ndarray object. This encapsulates n-
dimensional arrays of homogeneous data types, with many operations being
performed in compiled code for performance. There are several important
differences between NumPy arrays and the standard Python sequences:

 NumPy arrays have a fixed size at creation, unlike Python lists (which can
grow dynamically). Changing the size of an ndarray will create a new
array and delete the original.
 The elements in a NumPy array are all required to be of the same data
type, and thus will be the same size in memory. The exception: one can
have arrays of (Python, including NumPy) objects, thereby allowing for
arrays of different sized elements.
 NumPy arrays facilitate advanced mathematical and other types of
operations on large numbers of data. Typically, such operations are
executed more efficiently and with less code than is possible using
Python’s built-in sequences.
 A growing plethora of scientific and mathematical Python-based packages
are using NumPy arrays; though these typically support Python-sequence
input, they convert such input to NumPy arrays prior to processing, and
they often output NumPy arrays. In other words, in order to efficiently use
much (perhaps even most) of today’s scientific/mathematical Python-
based software, just knowing how to use Python’s built-in sequence types
is insufficient - one also needs to know how to use NumPy arrays.

Matplotlib is an amazing visualization library in Python for 2D plots of arrays.


Matplotlib is a multi-platform data visualization library built on NumPy arrays
and designed to work with the broader SciPy stack. It was introduced by John
Hunter in the year 2002.

One of the greatest benefits of visualization is that it allows us visual access to


huge amounts of data in easily digestible visuals. Matplotlib consists of several
plots like line, bar, scatter, histogram etc.

(b) Matplotlib:

Matplotlib is a plottinglibrary for the Python programming language and its


numerical mathematics extension NumPy. It provides an object-orientedAPI for
embedding plots into applications using general-purpose GUI toolkits like
Tkinter, wxPython, Qt, or GTK+. There is also a procedural "pylab" interface
based on a state machine (like OpenGL), designed to closely resemble that of
MATLAB, though its use is discouraged.[3]SciPy makes use of Matplotlib.

Matplotlib was originally written by John D. Hunter, has an active development


community,[4] and is distributed under a BSD-style license. Michael Droettboom
was nominated as matplotlib's lead developer shortly before John Hunter's
death in August 2012, and further joined by Thomas Caswell.

Matplotlib 2.0.x supports Python versions 2.7 through 3.6. Python 3 support
started with Matplotlib 1.2. Matplotlib 1.4 is the last version to support Python
2.6.] Matplotlib has pledged to not support Python 2 past 2020 by signing the
Python 3 Statement.
THEORY:

Radioactive Decay

Radioactivity is the phenomenon exhibited by the nuclei of an atom as a result


of nuclear instability. Henry Becquerel discovered this phenomenon. It is a
process by which the nucleus of an unstable atom loses energy by emitting
radiation. In a drawer which was having photographic plates, a small amount
Uranium compound was wrapped in a black paper and was kept in it.
Examination of these plates later resulted that there has been an exposure. This
phenomenon came to be known as Radioactive Decay. Radioactive elements
are the elements or isotopes which emit radiation and undergo the process of
radioactivity.

The atom particles cannot be bounded because there is no energy due to the
presence of an unstable nucleus in the element’s radioisotope. There is a
constant decay in the isotopes in order to stabilize itself with a release of a lot
of energy in the form of radiations.

Types of Radioactive Decay


There are three types, namely:

1. Alpha
2. Beta
3. Gamma.

1. Alpha decay:

When an alpha particle emits from a nucleus, the process is called alpha decay.
The energy of alpha decay is given as:

E=(m −mf−mp)c2
i

Where,

 mi is the initial mass of the nucleus


 mf is the mass of the nucleus after particles emission
 mp is the mass of the emitted particle

The nucleus of helium is taken as the alpha particle which is very stable. It has a
group of two protons and two neutrons. For example, alpha decay of uranium-
238 is shown below

92
U238→9oTh234+2He4

Transmutation is referred to this process of isotope transforming into an


element of a stable nucleus.

2. Beta Decay:

A beta particle is often referred to an electron, but it can also be a positron. If


the reaction involves electrons, nucleus shed out neutrons one by one. Even,
the proton number increases accordingly. A beta decay process is shown below:

Th234→91Pa234+e0−1
90

3. Gamma Decay:

The nucleus has orbiting electrons which indeed have some energy, and when
an electron jumps from a level of high energy to a level of low energy, there is
an emission of a photon. The same thing happens in the nucleus: whenever it
rearranges into a lower energy level, a high-energy photon is shot out which is
known as a gamma ray.
Radioactive Decay Law

Consider a system of particles, N0 in number at time, t = 0. Each of these


particles has an independent, but equal probability of decay per unit time, λ.
How many particles are observed at a later time? The traditional way of
answering this question is to assume that N is large enough, that we may use
calculus.
When a radioactive material undergoes α, β or γ-decay, the number of nuclei
undergoing the decay, per unit time, is proportional to the total number of
nuclei in the sample material. So,
If N = total number of nuclei in the sample and ΔN = number of nuclei that
undergo decay in time Δt then,
ΔN/ Δt∝ N
Or, ΔN/ Δt = λN … (1)
Where, λ = radioactive decay constant or disintegration constant.
Now, the change in the number of nuclei in the sample is, dN = – ΔN in time Δt.
Hence, the rate of change of N (in the limit Δt→ 0) is,
dN/dt = – λN
Or, dN/N = – λdt
Now, integrating both sides of the above equation, we get,
N0
∫NdN/N = λto ∫tdt … (2)
Or, ln N – ln N0 = – λ (t – t0) … (3)
Where, N0 is the number of radioactive nuclei in the sample at some arbitrary
time t0and N is the number of radioactive nuclei at any subsequent time t.
Next, we set t0 = 0 and rearrange the above equation (3) to get,
ln (N/N0) = – λt

Thus, N(t) = N0e– λt

Rutherford’s Alpha Scattering Experiment

Rutherford’s conducted an experiment by bombarding a thin sheet of gold with


α-particles and then studied the trajectory of these particles after their
interaction with the gold foil.

Rutherford, in his experiment, directed high energy streams of α-particles from


a radioactive source at a thin sheet (100 nm thickness) of gold. In order to
study the deflection caused by the α-particles, he placed a fluorescent zinc
sulphide screen around the thin gold foil. Rutherford made certain observations
that contradicted Thomson’s atomic model.

Observations of Rutherford’s Alpha Scattering Experiment


The observations made by Rutherford led him to conclude that:

1. A major fraction of the α-particles bombarded towards the gold sheet


passed through it without any deflection, and hence most of the space
in an atom is empty.
2. Some of the α-particles were deflected by the gold sheet by very small
angles, and hence the positive charge in an atom is not uniformly
distributed. The positive charge in an atom is concentrated in a very
small volume.
3. Very few of the α-particles were deflected back, that is only a few α-
particles had nearly 180o angle of deflection. So the volume occupied by
the positively charged particles in an atom is very small as compared
to the total volume of an atom.

Rutherford scattering and estimation of the nuclear size

Suppose the gold nucleus in the scattering experiment has a radius R. An alpha
particle trajectory can be specified by its impact parameter b.

Clearly b>R, due to less coulomb repulsion, the deflection of alpha particles is
also less.

When b<R, the alpha particle goes through the nuclear positive charge
distribution and so the nuclear charge above the trajectory and one below the
trajectory work in opposite directions and hence again the deflection produced
is very small. When the alpha particles just graze the nucleus, the Coulumb
repulsion becomes the maximum and for b~R the deflection of alpha particle is
maximum.

Now consider a trajectory corresponding to a small deflection. The Coulumb


repulsion in the region close to the scattering gold nucleus is given by:

F=(1/4πέo)*(2Ze2/b2)
If the particle has velocity v,The time during which the force operates is

Δt=b/v

This force produces momentum:

F=Δp/ Δt

Δp=FΔt=(1/4πεo)*(2Ze2/b2)*( b/v)

But, θ=Δp/ p==(1/4πεo) *(2Ze2/bv)/mv

Where m is the mass of alpha particle

Thus,

b=(1/4πεo)*(2Ze2/mv2)/ θ

PuttingΘ=1 and B=r

R =(1/4πεo)*(2Ze2/mv2)

For Z=79, m=6 x 10-27kg for mass of alpha particle, v~107m/s,

e=1.6 x 10-19C Thus, R=10-14 m.

This is an extremely small distance. When compared with the atomic radius,
which is 10-10, we see that it is smaller by a factor of 104.

Nuclear Fusion

What is Nuclear Fusion?

Nuclear fusion is a reaction through which two or more light nuclei collide with
each other to form a heavier nucleus. This reaction takes place with elements
which have a low atomic number, such as Hydrogen. It is the opposite of
nuclear fission reaction in which heavy elements diffuse and form lighter
elements. Both nuclear fusion and fission produce a massive amount of
energy.

Nuclear Fusion in the Universe

Every star in the universe, including the Sun, is alive due to nuclear fusion. It is
through this process that they produce such a mind-boggling amount of heat
and energy. The pressure at the core of any star is tremendously high and that
is where the nuclear fusion reaction takes place.

For example, the temperature at the core of the sun is around 15 million
degrees Celsius. At this temperature,Coupled with very high pressure, two
isotopes of Hydrogen, Deuterium and Tritium, fuse to form Helium and releases
the massive amount of energy in the form of heat. Around 600 million tons of
hydrogen is converted into Helium every second in the Sun.

Difference between Nuclear Fission and Nuclear Fusion

These two are the major nuclear reactions that take place. The basic differences
between Nuclear Fission and Nuclear Fusion are:

Nuclear Fission Nuclear Fusion


Breaks a heavy atom into two or more Brings two or more small atoms
smaller ones. together to form one large atom.
The universe is full of instances of
Does not happen naturally. nuclear fusion reactions. Every star
uses it to produce energy.
Produces a great deal more energy
Produces many times more amount of
than chemical reactions but still not
energy than fission.
as much as fusion.
Does not require a lot of energy to Requires a lot of heat and pressure
split an atom into two. for the process to happen.

Applications of Nuclear Fusion


We are still at an experimental stage as far as nuclear fusion reactions are
concerned.

 Clean: No combustion occurs in nuclear power (fission or fusion), so


there is no air pollution.
 Less nuclear waste: The fusion reactors will not produce high-level
nuclear wastes like their fission counterparts, so disposal will be less of a
problem. In addition, the wastes will not be of weapons-grade nuclear
materials as is the case in fission reactors.

If utilized properly, nuclear fusion is the answer to the world’s power crisis
problem. It is clean and produces a minimal amount of nuclear waste as
compared to fission reactions. The fuel for fusion, Deuterium, and Tritium, are
also readily available in nature. Scientists are hopeful that in the coming
centuries, fusion will be a viable alternative power source

PROGRAMS

1) Radioactive Decay Law

Aim: To plot the radioactivity curve using the Euler’s Method of solving
differential equations.

Requirements:

(a)Software: Enthought Canopy

(b) Python 2 or Python 3 with necessary modules

(b)Required Module: pylab, numpy

Algorithm:

Step 1: Import the desired modules i.e. pylab.

Step 2: Write a program for the outline of the plot that comprises of heading,
background, face colours, font weight, font styles and annotations.

To accomplish these requirements, follow the following steps:

1)Define the variables ‘fig’ and ‘ax’ in order to set the outlines with respect to
these two functions.

2)For setting up all types of outlines, write the colours, font styles, font weight
etc. accordingly with the conventional codes assigned to each of them.
3) To write the equation in a box and to annotate, define the coordinates and
other necessary outlines i.e. font weight, font style, face colour, shrink etc. and
type the contents.

Step3: Main Program:

1) Define the magnitude of the constants taking account of signs as well.

2) Initialize a while loop for a specific range and write the equations under it
considering all the data points for that particular range using append.

3)Plot the graph N/No vs t by using conventional keywords

Input:

Output:
(2) Rutherford’s scattering

Aim: To find the total number of alpha particles which underwent reflection in
Rutherford’s Gold Foil experiment.

Requirements:

(a)Software: Enthought Canopy

(b) Python 2 or Python 3 with necessary modules

(b)Required Modules:

Random and math (under math: square root, cos, sin and pi)

Algorithm:

Step 1: Import the necessary modules i.e. square root, cos, sin, pi and random.

Step 2: Define the magnitude of the constants taking account of signs as well.

Step 3: Set a large value for the total number of alpha particles falling on the
Gold foil.

Step 4: Define a function to generate a random number which can be used to


find impact parameter. This function has to be a Gaussian.
Step 5: Main Program Loop -

(a)Assign a zero value to the initial count of the total number of alpha particles
that are getting reflected.

(b) Set up a FOR Loop in the range of N (i.e. total number of alpha particles
bombarded on the gold foil)

(c) Get the value of impact parameter ‘b’ from the random number function
loop.

(d) Put the given ‘IF’ condition:

 If b is less than Ze2/2πεoE then 1 is added to the initial count. If this


condition is not satisfied no addition takes place.
 This Loop runs for ‘N’ times.

(e) At the end of the loop, print the count (i.e. the total number of alpha
particles which underwent reflection)

Result: The total number of alpha particles which underwent reflection in


Rutherford’s Gold Foil experiment were found.

Input:

The code for the above is given below:

Output:
Nuclear Fusion

Aim: To print an image of deuterium and tritium nuclear fusion.

Requirements:

(a)Software: Enthought Canopy

(b) Python 2 or Python 3 with necessary modules

(c)Required Modules: pylab, random, matplotlib.mlab, matplotlib.pyplot, numpy

Algorithm:

Step 1: Import the necessary modules i.e. square root, cos, sin, pi and random.

Step 2: Define a variable ‘fig’ and give the syntax for giving a subtitle.

Step 3: Initialize the seed as 0 from the module random and specify the number
of points required.

Step 4: Give x,y as an array using linspace and z as griddata from grid data
module.

Step 5: For getting a circular shape (i.e. the atom), define a variable to plot the
contour mentioning the three axes x.y and z with the desired linewidth and
colour.

Step 6: To show the arrow marks, to indicate deuterium and tritium define a
variable ‘ax’ with subplot (111) by using appropriate syntax.

Step 7: To write and annotate use the variable ‘ax’ by writing ax.text and
ax.annotate to write on the image of the nuclei.

Step 8: Plot the data by using the usual syntax.

Result:

The image of the nuclear fusion of deuterium and tritium is obtained.


Input:

Output:
References:

 Nuclear physics by S.B. Patel


https://www.google.com/search?safe=strict&source=hp&ei=BgGSXIiwBcLb9Q
OTqIywBw&q=what+is+the+matplot+library+in+python&oq=WHAT+IS+THE+
MATPLOT+LIBRARY
 https://www.geeksforgeeks.org/python-language-advantages-applications/
 https://en.wikipedia.org/wiki/Radioactive_decay
 https://www.nuclear-power.net/nuclear-power/reactor-physics/atomic-
nuclear-physics/radioactive-decay/radioactive-decay-law/
 https://www.toppr.com/guides/physics/nuclei/radioactivity-types-of-
radioactive-decay/

You might also like