diff options
Diffstat (limited to '3845/CH30')
-rw-r--r-- | 3845/CH30/EX30.1/Ex30_1.sce | 13 | ||||
-rw-r--r-- | 3845/CH30/EX30.2/Ex30_2.sce | 11 | ||||
-rw-r--r-- | 3845/CH30/EX30.3/Ex30_3.sce | 12 | ||||
-rw-r--r-- | 3845/CH30/EX30.4/Ex30_4.sce | 73 | ||||
-rw-r--r-- | 3845/CH30/EX30.5/Ex30_5.sce | 36 |
5 files changed, 145 insertions, 0 deletions
diff --git a/3845/CH30/EX30.1/Ex30_1.sce b/3845/CH30/EX30.1/Ex30_1.sce new file mode 100644 index 000000000..0c3e66c6e --- /dev/null +++ b/3845/CH30/EX30.1/Ex30_1.sce @@ -0,0 +1,13 @@ +//Example 30.1
+n_f=2;//For Balmer series
+n_i=4;//For second line of Balmer series
+R=1.097*10^7;//Rydberg constant (m^-1)
+lambda=1/[R*(1/n_f^2-1/n_i^2)];//Wavelength equation (m)
+printf('a.Wavelength corresponding to second line of Balmer series = %0.1f nm',lambda*10^9)
+m=1;//Order of interference
+theta=15;//Angle from the original beam direction (deg)
+d=m*lambda/sind(theta);
+printf('\nb.Distance between slits = %0.2e m',d)
+//Answer varies due to round off error
+//Openstax - College Physics
+//Download for free at http://cnx.org/content/col11406/latest
diff --git a/3845/CH30/EX30.2/Ex30_2.sce b/3845/CH30/EX30.2/Ex30_2.sce new file mode 100644 index 000000000..89deb4c5a --- /dev/null +++ b/3845/CH30/EX30.2/Ex30_2.sce @@ -0,0 +1,11 @@ +//Example 30.2
+Z=74-1;//Effective charge for tungsten
+E_0=13.6;//Ground-state energy (eV)
+n1=1;//n=1 shell
+E_1=-Z^2/n1^2*E_0;//Energy level for n=1 shell (eV)
+n2=2;//n=2 shell
+E_2=-Z^2/n2^2*E_0;//Energy level for n=2 shell (eV)
+E_K_alpha=E_2-E_1;//K_alpha x-ray energy (eV)
+printf('Approximate energy of the K_alpha x-ray = %0.1f keV',E_K_alpha/1000)
+//Openstax - College Physics
+//Download for free at http://cnx.org/content/col11406/latest
diff --git a/3845/CH30/EX30.3/Ex30_3.sce b/3845/CH30/EX30.3/Ex30_3.sce new file mode 100644 index 000000000..742216caf --- /dev/null +++ b/3845/CH30/EX30.3/Ex30_3.sce @@ -0,0 +1,12 @@ +//Example 30.3
+l=1;//Angular momentum quantum number
+h=6.63*10^-34;//Planck's constant (kg.m^2/s)
+L=sqrt(l*(l+1))*h/(2*%pi);//Angular momentum vector (kg.m^2/s)
+printf('Angles that L can make with the z-axis:\n')
+for ml=1:-1:-1//ml is the angular momentum projection quantum number (for l=1, ml can be +1,0 or -1)
+ L_Z=ml*h/(2*%pi);//Component of angular momentum vector along z-axis (kg.m^2/s)
+ theta=acosd(L_Z/L);//Angles that L can make with the z-axis (deg)
+ printf('%0.1f deg\n',theta)
+end
+//Openstax - College Physics
+//Download for free at http://cnx.org/content/col11406/latest
diff --git a/3845/CH30/EX30.4/Ex30_4.sce b/3845/CH30/EX30.4/Ex30_4.sce new file mode 100644 index 000000000..1e2e882c0 --- /dev/null +++ b/3845/CH30/EX30.4/Ex30_4.sce @@ -0,0 +1,73 @@ +//Example 30.4
+n=2;//Shell
+number_subshell=0;//To store value of number of subshells
+for i=0:1:n-1
+ number_subshell=number_subshell+1;
+end
+
+
+//To calculate number of rows required for the table
+rows=0;
+for l=0:1:number_subshell-1
+ rows=rows+2*(2*l+1)
+end
+
+
+
+//Defining string matrices
+A=repmat(' ',[rows 4]);//To list n, l, m_l and m_s
+B=repmat(' ',[rows 3]);//To list subshell, number of electrons in each subshell and total number of electrons
+C=['n' 'l' 'm_l' 'm_s' 'Subshell' 'Total in subshell' 'Total in shell'];//Header row
+
+
+
+//Function to return subshell character
+function [s]=subshell(l)
+if l==0
+ s='s';
+elseif l==1
+ s='p';
+elseif l==2
+ s='d';
+elseif l==3
+ s='f';
+elseif l==4
+ s='g';
+elseif l==5
+ s='h';
+elseif l==6
+ s='i';
+end
+endfunction
+//Function defined for upto l=6
+
+
+
+r=1;//Row number
+total=0;//To store total number of electrons in the shell
+for l=0:1:number_subshell-1
+ m_l=l;
+ B(r,1)=string(n)+subshell(l);//Subshell
+ B(r,2)=string(2*(2*l+1));//Number of electrons in subshell
+ total=total+(2*(2*l+1));
+ for i=1:1:(2*(2*l+1))
+ A(r,1)=string(n);//n
+ A(r,2)=string(l);//l
+
+ A(r,3)=string(m_l)//m_l
+ if modulo(i,2)==0
+ m_l=m_l-1;
+ end//m_l (decreases by 1 after every two rows)
+
+ if modulo(r,2)==0
+ A(r,4)='-1/2';
+ else
+ A(r,4)='+1/2';
+ end//m_s (positive and negative sign alternates with every row)
+ r=r+1;
+ end
+end
+B(1,3)=string(total);//Total number of electrons in shell
+disp([C;A B])//Combining the matrices
+//Openstax - College Physics
+//Download for free at http://cnx.org/content/col11406/latest
diff --git a/3845/CH30/EX30.5/Ex30_5.sce b/3845/CH30/EX30.5/Ex30_5.sce new file mode 100644 index 000000000..0e70bef0f --- /dev/null +++ b/3845/CH30/EX30.5/Ex30_5.sce @@ -0,0 +1,36 @@ +//Example 30.5
+n=3;//Shell
+number_subshell=0;//To store value of number of subshells
+for i=0:1:n-1
+ number_subshell=number_subshell+1;
+end
+printf('Number of subshells in the nth shell = %d\n\n',number_subshell)
+Max=0;//To store value of Maximum number of electrons in a shell
+for l=0:1:2
+ electrons_in_subshell=2*(2*l+1)
+ if l==0
+ s='s';
+ elseif l==1
+ s='p';
+ elseif l==2
+ s='d';
+ elseif l==3
+ s='f';
+ elseif l==4
+ s='g';
+ elseif l==5
+ s='h';
+ elseif l==6
+ s='i';
+ end
+ printf('%d%s subshell can have a maximum of %d electrons\n',n,s,electrons_in_subshell)
+ Max=Max+electrons_in_subshell;
+end
+printf('Maximum number of electrons that can be in the shell = %d',Max)
+if Max==(2*n^2)
+ printf('\n\nThis is the same as calculated by the formula: \nMaximum number of electrons that can be in the nth shell = (2*n^2)')
+end
+//The code is programmed for upto l=6. Beyond this, the subshell notation may be carried on in alphabetical order
+//Openstax - College Physics
+//Download for free at http://cnx.org/content/col11406/latest
+
|