计算方法Matlab 课后习题
1
Math6111-Numericalmethods
Coursework2
Due:14December2011
Youmustsubmitelectronically(viaBlackboard)acopyoftheMatlabm- lesrequiredbythetasksbelow.Thedeadlineis12:00Wednesday,December14th2011.
Penaltiesforlatesubmission:10%ofthetotalmarksfortheassignmentperworkingdayaftertheassignmentisdue(whereaworkingdayisa24hourperiodstartingformoriginalhandindeadline,skippingdaysonwhichtheUniversityisclosed),forupto5workingdays.Nomarkswillbeobtainedforsubmissionsthatarelaterthan5workingdays.
AssessmentCriteria:Assessmentwillprimarilybebasedonthesuccessfulsolutionoftheproblemsandyourmethodofsolution,whichshouldbejusti ed.Youwillalsobeassessedontheclarityofyourcode.PleaseensurethatallofitiswritteningoodMatlabstyle,isproperlycommentedandisrobust;e.g.,allinputargumentsshouldbeexplainedandchecked.Figuresproducedshouldbeclearlypresentedwithlabels,titles,etc.
Plagiarism:Yourareencouragedtodiscussyourworkwithyourcolleaguesingeneralterms,butyoursubmittedworkMUSTbeyourown.
1Photorefractiveliquidcrystalcells
Aphotorefractiveliquidcrystalcellis
formedbytheinteractionofaphotoconductinglayerwithastandardliquidcrystalcell,asshownbyFigure1.Thetransmissionofopticalbeamsthroughthecellwillinduceanexchangeofenergy,observedasachangeinamplitudes,fromtheincidentbeamsintoadiscretesetofNoutputbeamswhereNisde nedbytheseparationintheinputbeams.Thisprocessisknownasopticalcoupling.FurtherdetailsaregiveninapaperbyDalyetal,AppliedPhysicsB.95:3589–596(2009).Figure1:Photorefractiveliquidcrystalcell,aliquidcrystallayerissandwichedbetweentwoalignmentlayersPI,apolymer,andPVK,aphotoconductor.Theinteractionofthephotoconductorwiththeliquidcrystalcellcausesenergyfromtheincidentbeamstobecoupledintoadiscretesetofoutputbeams.
Yourtaskisto ndtheamplitudesofthedifferentwavesastheypropagatethroughthephotorefractiveliquidcrystalcell.YoumayuseanyinbuiltMatlabtool,butmustjustifyyourchoiceofalgorithmindetail,andcheckthatitworks.
2Opticalcouplingequations
Wewritetheopticalamplitudesy(z)asavector eldofsizeN(i.e.,foreverylocationz,y(z)isavectorofsizeN).Wewillonlyconsideracoordinaterangeof0≤z≤5.Foreachcomponentofy(z),the
1
variationintheamplitudeasthewavepassesthroughtheliquidcrystalcellisgivenby
dy1(z)=ik1y1(z)+if(z)[y2(z)],dz
dyn(z)=iknyn(z)+if(z)[yn 1(z)+yn+1(z)],dz
dyN(z)=ikNyN(z)+if(z)[yN 1(z)],dz
√n=2,...,N 1,wherei=andthevectorkwithcomponentsknisde nedas
nπkn=10sin.N+1(2)
Iff(z)=C,aconstant,thenequation(1)canbesolvedasaneigenvalueproblem.WewritethesolutionasalinearcombinationofNvector eldsy(k)(z),tobedetermined,as
y(z)=A(k)y(k)(z)(3)
k
andthenusethesubstitution
y(k)=v(k)eiλ(k)z(4)
toobtainequationsfortheconstantvectorsv(k).Thebehaviourofthewavesdescribedbyequation(1)nowbecomestheeigenvalueproblem
λ(k)v(k)=Mv(k),(5)
wherethematrixMistridiagonalwiththediagonalentriesbeingthevectorkandthe rstoff-diagonalentriesbeingC.Forexample,whenN=2wehave
π (k) (k)v10sinC v1λ(k)1=(6)2π(k)(k).C10sinv2v2
Henceλ(k)aretheeigenvaluesandv(k)theeigenvectorsofthematrixM.
ToreconstructthesolutionyweneedtheweightingA(k)ofeachterminthesplitgivenbyequation(3),whichisrelatedtothechoiceofinitialdatay(0)≡y0.Iftheeigenvectorsv(k)formthecolumnsofthematrixVthentheweightsA(k)canbefoundasthecomponentsofthevectorAsatisfyingthelinearsystem
VA=y0.
√(7)ForthesimplecasewhereN=2theeigenvaluesareλ(k)=10±Cwitheigenvectorsv=(1,±1)T.
TWiththeinitialconditionsy1(0)=Randy2(0)=StheweightingsareA=1
((R+S),(R S)),
whichgivestheanalyticsolution
√1y1(z)1(10√2+C)iz11e+(R S)e(102 C)iz.(8)=(R+S)1 1y2(z)22
Inarealphotorefractiveliquidcrystalcellf(z)=C.Ifthisisthecasethenequation(1)mustbesolvedasaninitialvalueproblem.Inparticularwewillalwaysusetheinitialconditiongivenbythesincfunction,
yn(0)=sinc(n nin),(9)
whereninisgivenbytheMATLABcommand:floor(N/2).
1
3Tasks
1.Solveequation(1)usingMATLAB’seigfunctionforN=2andcomparewiththeanalyticso-lution,equation(8),forR=1,S=0andC=1.Yourcodeshouldproduceasingle g-ureoutputpidedintothreesubplots,oneshowingtheanalyticsolutionfortheopticalintensityIn(z)=|yn(z)|2,onethesolutioncalculatedusingMATLAB’seigfunctionandthe naloneshowingtheabsolutedifferencebetweenthetwoasafunctionofthecoordinatez.
2.Solveequation(1)forN=4,10,20andf(z)=1usingbothaneigenvaluemethodandyourchoiceofIVPsolvingmethod.ForeachvalueofNplottheopticalintensityIn(z)asafunctionofthecoordinatezforn=nincomputedusingboththeeigenvaluemethodandtheIVPsolution,andthedifferencebetweenthetwo.YoushouldinadditionshowhowthedifferenceconvergesastheaccuracyofyourIVPsolutionisimprovedinanappropriateway.
http://inganappropriatemethodsolveequation(1)forf(z)=1+αsin(2πz/5)exp( (z 5/2)2)withN=4andαintherange[0,1/2].Comparetheresultsagainstusingtheaveragevalue,f(z)=1.Youshouldproduceasingle gurewithtwosubplots,oneshowingthemaximumdifferencebetweentheamplitudesy(z)computedbythetwomethodsfordifferentvaluesofα,theothershowingthemaximumdifferenceoftheintensityI(5)http://mentontheaccuracyofthef(z)=1approximation;inwhatsense,ifatall,isitaccurate?
3.1Summaryandassessmentcriteria
YoushouldsubmittheMatlabcodeelectronicallyasnotedabove.
Theprimaryassessmentcriteriawillbethechoiceandjusti cationofthealgorithmimplemented.Thecorrectnessofthealgorithmsmustbeclear,andmustbedemonstratedbythoroughtestingwhichshouldbecarefullyexplained.Thejusti cationsofyouralgorithmsmaybemanygrounds-exampleswouldincludeef ciency,conceptualorcomputationalsimplicity,ortheeaseofimplementationinMatlab-butmustbedetailedforeachstageofyourchosenmethod.Thejusti cationshouldbegivenincommentswithintheMatlabcode,preferablyatthestartofthemasterscript.
Theclarityandrobustnessofyourcodeandtheclarityofyouroutputwillalsobeassessed,asincoursework1.Thecommentswillbeexaminedcloselyforjusti cationsofth …… 此处隐藏:3743字,全部文档内容请下载后查看。喜欢就下载吧 ……
- 基于PLC控制的航空电镀生产线自动输送
- 中考预测课内外文言文对比阅读2
- 2018-2023年中国商业智能(BI)产业市场
- 中国金融体制改革研究2011new
- 外窗淋水试验方案
- 精益生产(Lean Production)
- 学校安全事故处置和信息报送制度
- Chapter 5 Human Resources Management
- 【小学数学】人教版小学六年级上册数学
- 初中数学解题方法与技巧
- 山东省创伤中心建设与管理指导原则(试
- 函数与数列的极限的强化练习题答案
- 10分钟淋巴按摩消脂
- 网络应急演练预案
- 服装设计入门基础知识
- 初二数学分式计算题练习
- (人教新课标)高二数学必修5第二章 数列
- 最新自主创业项目
- 北京大学 无机化学课件 4第4章 配合物
- 贸易公司业务管理制度




