STUDENT: Materials are often classified as crystalline,
semi-crystalline, or amorphous.
Most polymers are semi-crystalline.
This means a fraction of the material
is amorphous and lacks order in arrangements of polymer chains,
while the remainder of the material
exhibits parallel, well-ordered chains that
define crystalline regions.
There are several methods for determining the degree
of crystallinity in a polymer.
X-ray diffraction can be used to determine degree
of crystallinity, because intensity of X-ray diffraction
reflection is proportional to the material density.
An X-ray diffraction pattern displays
both sharp Bragg's peaks, arising
from the crystalline portion, and a broad diffraction peak
caused by scattering from the amorphous portion
of the polymer.
The degree of crystallinity can be determined
using this formula, where the total integrated intensities,
all of the sharp peaks, are divided by the integrated
intensities of all peaks, including
that of the amorphous peak.
Many laboratories have access to XRD peak fitting software that
can be used to calculate degree of crystallinity.
But this software can often be expensive.
I set out to create a peak fitting software
to calculate degree of crystallinity
for semi-crystalline polymers using Mathematica.
The basic idea for this program is
that the user will define a series of Gaussian peaks
using this equation.
The width, the height, and the exposition of these peaks
can be manipulated.
This code allows the user to adjust the appearance
and position of multiple peaks, and match it
to an existing XRD pattern.
First, the code allows the user to adjust
the position and the scale of the XRD pattern.
The user is then able to adjust the positions
of both the crystalline peaks and amorphous peaks.
Once the user obtains a fit that they're happy with,
they can calculate the degree of crystallinity
by determining the integrated area
under the crystalline peaks, divided by the integrated
area under all of the peaks.
In this particular polymer, the determined degree
of crystallinity was 41%.
To test the accuracy of my code, I
fit XRD patterns for polyethylene varieties
with known values for degree of crystallinity.
The polymers for which I chose to match XRD patterns
were low density polyethylene, high density polyethylene,
and ultra high molecular weight polyethylene.
The expected value for degree of crystallinity for low density
polyethylene is 44% to 51% crystallinity.
The value obtained using Mathematica peak fitting
was 46% crystallinity, so this is within the accepted range.
Similarly, the expected value for degree
of crystallinity for high density polyethylene
is 48% to 69% crystallinity.
And Mathematica peak fitting obtained a value of 56%
crystallinity.
Finally, ultra high molecular weight polyethylene
has an expected value of 75% to 77% crystallinity.
Mathematica peak fitting showed a value of 76% crystallinity.
In all three polymer case studies,
this code obtained a degree of crystallinity value
within the acceptable range, indicating manual Mathematica
peak fitting of XRD plots is a reasonable way
to determine a material's degree of crystallinity.
The code I just described showed a way
to import an XRD pattern as an image
and manually fit the peaks to calculate
degree of crystallinity.
However, I can do a better job of determining degree
of crystallinity if I let the user's peak selections be
a starting guess, and let Mathematica
find the best set of Gaussian curves to fit the data.
One of the challenges with this method
is I have to take data that's currently saved as a JPG image
and convert it into something Mathematica
can use to find a best fit.
So the way I do this is I import my JPG image here.
And then I use that, and I convert
it to be either black or white.
Then I'm able to determine the locations of the black pixels
and isolate them.
However, my lines really thick, which
means that at each x position, I have multiple y positions.
So then I'm able to use the following code
to choose whether I want to have the mean y
position at each x value, or one of the highest y
positions at each x value.
After my data is in this form, I'm
able to use it for future curve-fitting applications.
So after I have data, I'm able to write
code that allows the user to input guesses for where
they think the peaks should be located.
And then Mathematica uses a function
called Find Fit, that's going to find the best
approximation for my data given the guesses and the model I
give it to work with.
So this model is a model that includes
three different Gaussian peaks.
So the full code is available to you in my notebook.
But here's the final product.
Like in the previous curve-fitting program
I showed you, you're able to adjust the positions and shapes
of the crystalline peaks and the amorphous peaks as follows.
Once you think you have a fit that's fairly reasonable,
you can click Find Nearest Solution,
and Mathematica is going to help you find
the best fit for this data.
Then, using these Mathematica found values,
you can calculate degree of crystallinity for the curve.
So in conclusion, degree of crystallinity
can be determined from XRD patterns.
And today I demonstrated two possible ways
of doing this in Mathematica.
There's a fair amount of background code
that goes into the outputs you saw today.
And all this code is available to you in my Mathematica
notebook.
Hopefully you'll find it very easy
to modify to meet your unique application needs.