quiz2_solution - IntroductiontoComputationalPhysics...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: IntroductiontoComputationalPhysics Phy265Quiz2a(InClass) February7,2011 Writeanduploadthescriptdescribedbelowtotheclasswebsite.Inordertoreceive fullcredit,yourscriptmusthaveproperformatting,run,andgivethecorrectoutput. Thephotoelectriceffectprovidesstrong(althoughnotbyitselfconclusive)evidenceforthe existenceofphotons.Inthisexperiment,photons(lightquanta)strikingametalina phototubereleaseelectronswithamaximumkineticenergythatdependsonthefrequency ofthephotons. hv KE In1905,AlbertEinsteinprovidedaquantuminterpretationforthephotoelectriceffectthat wouldearnhimtheNobelPrizeinphysicsin1922.Inhisinterpretation,alltheenergyofa photonofenergyE=h,wherehisPlanck'sconstant(6.63x1034Joulesec)andisthe frequencyofthephotons(Hz),goesintoseparatingtheelectronfromthemetal,W,and kineticenergyoftheelectron,KE.Byconservationofenergy,thekineticenergyofthe separatedelectronisrelatedtothefrequencyoftheincomingphotonby KE = h - W . In1916,RobertMillikanmadethefirstdefinitivestudyofthephotoelectriceffect. Specifically,heaccuratelymeasuredthemaximumkineticenergyoftheelectronsasa functionofincidentphotonfrequency.FromhisanalysishewasabletodeterminePlanck's constant. Thetablebelowgivesdataforaphotoelectriceffectexperiment.Row1givesthe wavelengthoftheincidentphotonsinnanometersandrow2givesthemaximumkinetic energyofthephotoelectronsinelectronvolts(eV). WriteaMATLABscriptthatwillplotthemaximumkineticenergyinjoulesvs.thefrequency ofthephotonsinHz.Besuretoscalethefrequencyvectorby1x1014atthestartofyour script.Inotherwords,thexaxisofyourgraphshouldhaveamaximumvalueof~12,not 12x1014.Yourscriptshouldfitastraightlinetothescaleddatawithpolyfitanddisplaythe fitwithpolyvalonthesamegraphasthedatavalues.Finally,yourscriptshouldoutputa valueforPlank'sconstanttothecommandwindow.Inotherwords,besuretocorrectyour slopeforthescalingfactor,i.e.displayyourvalueforh,nottheslope.Remember1eV= 1.602x1019J,=c/,c=3.0x108msec1,and1nm=109m.Yourvalueforhshouldbe closetotheacceptedvalue.Besuretolabeltheaxesandincludeatitle. (nm) KE(eV) 545 0.50 422 1.10 385 1.50 361 1.70 300 2.40 252 3.20 %PHOTOELEC - A script to plot maximum electron kinetic energy and photon %frequency data from a photoelectric effect experiment,fit a straight line %to the data, and determine Planck's constant from the slope %File written by S.C. Tegler. Last modified 2/3/2011 % --------------------------------------------------------------------lam = [545,422,385,361,300,252]; %wavelength data vector (nm) ke = [0.50,1.10,1.50,1.70,2.40,3.20]; %kinetic energy data vector (eV) ke = ke*1.602e-19; nu = 3.0e+8*(lam*1.0e-9).^-1; nu = nu*1.0e-14; plot(nu,ke,'ok') p = polyfit(nu,ke,1); kefit = polyval(p,nu); hold on; plot(nu,kefit,'-k'); h = p(1)/1.0e14 xlabel('Frequency x 10^{14} (Hz)'); ylabel('Kinetic Energy (J)'); title('Photoelectric Effect'); %convert kinetic energy to joules %convert wavelength to frequency %scale frequency by 10e+14 %plot frequency and kinetic energy %coefficients of best linear fit %best fit kinetic energy values (J) %overplot following plots %plot best fit line over data %remove scale from slope, display %Planck constant in command window %begin labels for graph IntroductiontoComputationalPhysics Phy265Quiz2b(InClass) February9,2011 Writeanduploadthefunctiondescribedbelowtotheclasswebsite.Inorderto receivefullcredit,yourfunctionmusthaveproperformatting,run,andgivethe correctoutput. Planetaryscientistsmakeuseofthedecayofunstableisotopestomeasuretheages ofmeteorites.Inparticular,theystudy40Knucleispontaneouslydecayinginto40Ar nuclei.40Khasahalflifeof1.250billionyears,i.e.asampleinitiallycomposedof pure40Knucleiwillconsistofhalf40Knucleiandhalf40Arnucleiafter1.250billion years.Furthermore,theratioofthenumberof40Knucleiinasampleattimet,N(t), tothenumberof40Kinthesampleattimet=0,N(0),isgivenby N(t) = e -kt N(0) wherekistherateconstantfordecay. WriteaMATLABfunctionthatwillcalculatetheageofameteoritewhenyouinput theunstableisotopehalflife,thepercentageofunstableisotopeinitiallyinthe meteoriteatthetimeofitsformation,andthecurrentpercentageofunstable isotopeinthemeteorite.Runyourfunctionforameteoritethatcurrentlyconsistsof 0.85unitsof40Kand9.15unitsof40Ar.Theactualunitsareunimportantbecause onlytherelativeamountofparentanddaughtermaterialmatters.Assumethere wasno40Arinthesampleatthetimeofthemeteorite'sformation.Inaddition,your functionshouldgraphtheaboveequationforN(t)/N(0)asafunctionoftime,and markthepositionoftheabovemeteoritesampleonthecurvewitha+.Besureto labeltheaxesofyourplot.Provideatitle. Hints:First,solveforkintermsofthehalflife,thensolvefortheageintermsofk, theinitialamountof40K(100%),andthecurrentp function [age] = isotope(thalf,init,current) %ISOTOPE - computes the age of a sample using radioactive decay %Call syntax - on command line [age] = isotope(1.25e+9,100,8.5) %Input - provide half-life of isotope in yrs, initial composition of %unstable isotope in percent, current composition of unstable isotope in %percent %Output - age of meteorite in years prints to command window, plot of %N(t)/N(0) vs. t with sample marked with a + %----------------------------------------------------------------------%format short e k = log(2)/thalf; age = (1/k)*log(init/current); %rate constant in terms of half-life %age of meteorite in years t = linspace(0,5.0e+9,50); %time vector for plot ratio = exp(-k*t); %N(t)/N(0) for plot plot(t,ratio); %Plot N(t)/N(0) vs t hold on; %Overplot the following on above graph plot(age,exp(-k*age),'+k'); %Plot sample on N(t)/N(0) graph xlabel('Years'); %Begin labeling plot ylabel('N/No'); title('Fraction of Ar^{40} Remaining'); end ...
View Full Document

This note was uploaded on 02/23/2012 for the course PHYSICS 265 taught by Professor Tegler during the Spring '11 term at N. Arizona.

Ask a homework question - tutors are online