0% found this document useful (0 votes)
4 views2 pages

Pseudo-Concentric Shell Analysis

This document contains MATLAB code to analyze the percentage of atoms on the surface and in the bulk of pseudo-concentric shells of different diameters. It creates a dialog box to input the number of shells and atom diameter. Variables are assigned the input values. Calculations are done in loops to determine the number of atoms, surface atoms, percentage of surface atoms, and diameter for each shell. A second loop finds the first shell where the percentage difference between consecutive shells is less than 1. Finally, plots are made and text is added to show the results.

Uploaded by

Shivpreet Sharma
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)
4 views2 pages

Pseudo-Concentric Shell Analysis

This document contains MATLAB code to analyze the percentage of atoms on the surface and in the bulk of pseudo-concentric shells of different diameters. It creates a dialog box to input the number of shells and atom diameter. Variables are assigned the input values. Calculations are done in loops to determine the number of atoms, surface atoms, percentage of surface atoms, and diameter for each shell. A second loop finds the first shell where the percentage difference between consecutive shells is less than 1. Finally, plots are made and text is added to show the results.

Uploaded by

Shivpreet Sharma
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

23/11/18 11:55 AM C:\Users\shivp\OneDrive\D...\Project.

m 1 of 2

clc;
clear all;

%% Creation of Dialog Box for taking inputs from user


prompt= {'\fontsize{10} Enter number of Pseudo-Concentric shell(n):' ,'\fontsize{10}
Enter Diameter of atom (in Angstrom):' };
title = 'Input';
definput={'30',' 5'};
[Link] = 'tex';
answer = inputdlg(prompt,title,[3 100],definput,opts);

%% Assigning values to variables n & d

n = str2num(answer{1});
d = str2num(answer{2});

%%

for k=1:n
M(k)=(1/3)*((10*((k)^3))+15*((k)^2)+11*k+3); % Total number of atoms
N(k)=10*((k)^2)+2; % Total number of atoms on surface
sur(k)=N(k)*100/M(k); % Percentage surface
d(k)=2*k+1; % Calculation of Diameter
end

for i=2:n
if(sur(i-1)-sur(i)<=1)
shell=i;
break
else
shell=0;
end

end

%%Plot
plot(d,100-sur,'r-o');
hold on
plot(d,sur,'-o');
hold off

xlabel('Particle size (in Angstrom)' );


ylabel('% of atom in Bulk/on surface' );
legend('Bulk Atoms','Surface Atoms','Location','southeast');
23/11/18 11:55 AM C:\Users\shivp\OneDrive\D...\Project.m 2 of 2

if(shell>0)
str=sprintf('The number of shell after which percentage of atom in Bulk/on surface \n
between two consecutive shell is less than 1 = %d' , shell);
text(5,95,str, 'FontSize', 10);

end

You might also like