FDTD-Solutions-高级培训

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

AdvancedTraining版权所有,请勿外传FDTDSolutions©2009LumericalSolutions,Inc.OutlineIntroductionAdvancedFeatures:Scriptinglanguage:Structuregroupsandanalysisgroups:Farfieldanalysiswithscripting:Advancedboundaryconditions:Dispersiveandanisotropicmaterials:InteroperabilitywithASAPanduser-definedsources:CoherenceandpolarizationinFDTDParallelComputationCMOSImageSensordetailedapplicationexample:ReviewtheprinciplesofCMOSImageSensorModelingwithFDTD•Modelingmethodsthatcanbeused•CoherenceandpolarizationWorkshopexamplesandPracticeGoalsLearntheadvancedfeaturesofFDTDSolutions::::::::ScriptingParameterizationofstructuresanddefiningfiguresofmerit(FOM)FarfieldanalysisSymmetric/Anti-SymmetricandBlochboundariesDispersivematerialsInteroperabilitywithASAPDrawcomplexstructureswithscriptingUnderstandhowtoobtainincoherent,unpolarizedresultswithFDTDUnderstandthecapabilitiesofparallelFDTDSolutionsLearnhowtosetupaparallelsimulationStudyaCMOSimagesensordesign©2009LumericalSolutions,Inc.©2009LumericalSolutions,Inc.ScriptingTOPICSThescriptwindowMathematicsInteractingwiththeLayoutEditorAnalyzingsimulationdataScriptfilesandexample©2009LumericalSolutions,Inc.Scripting:EditorandpromptRightclickonmenubar(oruseViewmenu)ScriptfileeditorScriptprompt©2009LumericalSolutions,Inc.Scripting:MathematicsSimpleMathematics:plotsomesimplefunctionsx=linspace(-10,10,500);y=sin(x);plot(x,y,”x”,”y”,”sin(x)”);y=exp(-x^2/9)*sin(10*x);plot(x,y,”x”,”y”,”exp(-x^2/9)*sin(10*x)”);?size(x);©2009LumericalSolutions,Inc.Scripting:MathematicsSimpleMathematics(plota2Dgaussian)x=linspace(-10,10,500);y=linspace(-10,10,500);X=meshgridx(x,y);Y=meshgridy(x,y);?size(x);?size(X);E=exp(-X^2/9–Y^2/4);image(x,y,E,”x”,”y”,”test2Dimage”);x1,ymx2,ymx3ym…xn,ym……………x1,y3x2,y3x3y3…xn,y3x1,y2x2,y2x3y2…xn,y2x1,y1x2,y1x3,y1…xn,y1ymymym…ym……………y3y3y3…y3y2y2y2…y2y1y1y1…y1x1x2x3…xnx1x2x3…xnx1x2x3…xn……………x1x2x3…xnxhaslengthnXhassizenbym©2009LumericalSolutions,Inc.Scripting:MathematicsY=meshgridy(x,y);yhaslengthmYhassizenbymyxyxX=meshgridx(x,y);E=exp(-X^2/9–Y^2/4);Ehassizenbymyx©2009LumericalSolutions,Inc.Scripting:InteractingwiththeLayoutEditorSomeusefulcommandstosetandgetobjectpropertiessetnamed:setnamed(“Source1”,”x”,1e-6);getnamed:x=getnamed(“Source1”,”x”);22Scripting:AnalyzingsimulationdataSomeusefuldatamanipulationcommandsgetdata:retrievesdatafromanymonitorafterthesimulation:Bydefaultitautomaticallyunfoldsdatawiththecorrectsymmetrieswhensymmetric/anti-symmetricboundariesareusedshowdata:Showswhatmonitorsarecurrentlyavailablewithdatashowdata(“monitorname”);:Showstheavailabledatainthemonitor/sourcecalled“monitorname”:Eg:?showdata(source1)showsvariablesin“source1”settingstransmission:calculatesnormalizedtransmissiongetelectric(andgetmagnetic):retrieves:Bydefaultitautomaticallyunfoldsdatawiththecorrectsymmetries©2009LumericalSolutions,Inc.|E|or|H|Scripting:AnalyzingsimulationdataMostelectromagneticfielddatafromthesimulationsisa3or4dimensionalmatrixExampleEx=getdata(“Monitor1”,”Ex”);Ex(i,j,k,m):::::irepresentsthexdimensionjrepresentstheydimensionkrepresentsthezdimension(3Donly)mrepresentsfrequencyortimeThisisafieldquantity,notintensity©2009LumericalSolutions,Inc.©2009LumericalSolutions,Inc.Scripting:AnalyzingsimulationdataThepinchfunction:E=matrix(12,4,1,6);?size(E);?size(pinch(E));#removedimension3?size(pinch(E,2,3));#2nddimension,3rdelementpinchremovesallsingletondimensionspinchwith2arguments,selectsasub-matrix©2009LumericalSolutions,Inc.Scripting:AnalyzingsimulationdataAccessingandmanipulatingmatrixelementsx=1:5;?x;x(2:3)=5:6;?x;©2009LumericalSolutions,Inc.Scripting:ScriptfilesandexampleCopythefilescripting1.fspandscripting1.lsftoyourmachineOpenscripting1.fspandeditscripting1.lsfWe’llcalculatetransmissionandreflectionasafunctionoftheradiusofadielectricrod©2009LumericalSolutions,Inc.Scripting:Scriptfilesandexample##########################################file:scripting1.lsf#Thisfileshowshowtorunmultiplesimulationsusingscripting.#Youshouldopenscripting1.fspbeforerunningthisscript##########################################define10rodradiitouserad=linspace(0.5e-6,3e-6,10);#reserve3matrices,1forTransmission,1forreflection#oneforpoweratsidesT=matrix(length(rad));R=matrix(length(rad));side_power=matrix(length(rad));©2009LumericalSolutions,Inc.Scripting:Scriptfilesandexample#startaloopovereachdesiredradiusfor(i=1:length(rad)){#switchtolayoutmodesothatyoucanedittheobjectsswitchtolayout;#switchtothestructurestabtoeditthescatteringrodstructures;#settheradiusoftheobjectnamedrodtothedesiredvaluesetnamed(rod,radius,rad(i));#outputwhichsimulationisrunning?runningsimulation+num2str(i)+of+num2str(length(rad));#runthesimulationrun;#gettransmissionandreflectionT(i)=transmission(transmission);R(i)=abs(transmission(reflection));side_power(i)=transmission(y2)-transmission(y1);#getthefrequencyatwhichthedatawasrecordedf=getdata(transmission,“f“);#thequotescannotbeuseddirectlyinscript.changeitafterpaste!}#endofthemainloopovertheradius©2009LumericalSolutions,Inc.Scrip

1 / 153
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功