monte-carlo modeling used to simulate propagation of...
TRANSCRIPT
![Page 1: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/1.jpg)
Monte-Carlomodelingusedtosimulatepropagationof
photonsinamediumNilsHaëntjens– OceanOpticsClass2017
basedonlecturesfromEmmanuelBoss andEdouardLeymarie
![Page 2: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/2.jpg)
WhatisMonteCarloModeling?
• MonteCarlomodelingconsistinrepeatedrandomsamplingtoobtainnumericalresults.• Usedtobuildasolutiontotheradiativetransferequationbysimulatingpropagationofphotonsinamedium.• Increasingcomplexitycanbeaddedasthemodelisdeveloped.
![Page 3: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/3.jpg)
ImplementingStepbyStepStepsandconceptsneededtoimplementaMonte-Carlomodelusedtosimulatethepropagationofphotonsinamedium:• Randomnumbergenerator• Absorption• Scattering• VariableWeightofPhotons• Indexofrefraction
![Page 4: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/4.jpg)
RandomNumberGeneration• FirststeprequiredforaMonteCarlomodelistohaveamethodtogeneraterandomnumbers• Randomnumbergeneratorsproduce”pseudo”randomnumbers• Essentialpropertiesofarandomnumbergenerator:• repeatability:usingseeds• randomness:produceindependentuniformlydistributedrandomnumbers• longperiod:sequenceusedtoproducetherandomnumberuseafiniteperiod• insensitivetoseeds:periodandrandomnesspropertiesarenotaffectedbytheinitialseeds
![Page 5: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/5.jpg)
Exercise1:RandomNumberGenerator
• Generate10000randomnumbersX in[0 1]• Matlab:rand.m
• CheckthattheX areuniformlydistributed• dividethe[0 1] axisinto20equalintervals• frequencyoccurrenceofX is500ideally• standarddeviation< 36
• Howsensitiveistherandomnumbergeneratortochangeinseeds?
![Page 6: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/6.jpg)
Exercise1:ResultsMatlab2017a:rand.m; seed=1;n=10000;
![Page 7: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/7.jpg)
Attenuationofacollimatedbeam
• Howphotonsareabsorbedinthemedium?• AbsorptionobeysBeer’sLaw:
𝐸 = 𝐸#𝑒%&'withz thedepthwithinthemedium(m)
a Absorptioncoefficient(m-1)
ØTheprobabilityofabsorptioninthemediumwithin[z z+δz] isa δz with δz << 1/a
![Page 8: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/8.jpg)
Exercise2:Attenuationofacollimatedbeam
• Assumephotoncanbe:• absorbed• transmitted• NOTscatteredØc = a = 1 m-1
• Noboundaries• norefraction
• FixedstepΔz = 20 cm• absorptioncanonlyoccurattheendofastep
New photon
Move photon Dz
New Position z=z+ Dz
Absorb?Increase
absorptionevents
Yes
n=10,000Yes
No
Stop
![Page 9: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/9.jpg)
Exercise2:Results
![Page 10: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/10.jpg)
Exercice 2b:Improvedalgorithm
• Asinglecalculationperphoton(faster)
• Removeassumptionoffixedstep
• Assumehomogeneouswater
New photon
Random number
Increase absorptionevents
N=10,000 ? Yes Stop
Absorption depth
𝑧 = 𝑙𝑐 =
−ln(𝑋)𝑎
𝑝 𝑙 = 𝑒%4, 𝑙 ≥ 0
P 𝑙 = 9𝑒%4:
#
𝑑𝑙 = 1 − 𝑒%4
𝑙 = − ln 1 − 𝑋 = − ln 𝑋 , 0 ≤ 𝑋 ≤ 1
Fromthedefinitionoftheopticaldistanceltheprobabilitydensityfunctionforattenuationoflightis
Thecumulativedistributionfunctionis
Todeterminel inMCSimulations,𝑃 𝑙 = 𝑋
Thegeometricpathlengthz (inmeters)canbecomputedwith
assumenoscattering
![Page 11: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/11.jpg)
Absorption
Reflection
AddingScattering
• Keeptrackofeachphoton:• position,direction,andterminationpoint
Ørequiredforscattering
• Terminationofphoton:• absorbedbymedium• reflected(z <0)
• Assumeboundarieshavesameindexofrefraction• Variablesteplength
𝑧 =−ln(𝑋)𝑐
![Page 12: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/12.jpg)
ScatteringProbabilities
Theprobabilitythataphoton,whenscattered,willscatteratpolarangle𝜓andazimuthalangleΦ awayfromtheincidentdirectionisgivenbythescatteringphasefunction𝛽B(𝜓,Φ) ofthemedium
𝑝(Ψ)and𝑝(Φ) areindependentofoneanotherForseawaterandforair,theazimuthalangleΦ withrespecttotheincidentdirectionisuniformlydistributedover[0 2π].
The polarangle𝜓 cumulativedistributionfunctionisΦ = 2πX
2𝜋9 𝛽B 𝜓 sin 𝜓 𝑑𝜓J
#
= 𝑋
![Page 13: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/13.jpg)
Exercise3:AddingScattering
initialize array
new photon
move photonincrement reflected count
absorbed? calculate new direction
yes
yes
no
noIn medium
![Page 14: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/14.jpg)
VariableWeightPhotons
• Increasecomputationalspeed• Biasingthedistributionfunction• tracemorephotonsthatarelikelytofindtheirwaytotheareaofinterestwithoutchangingthefinalcomputedresult
• Decreasephotons’weightalongtheirpath• Athresholdissettodeterminewhenthephoton’sweightisnotsignificantanymore.
![Page 15: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/15.jpg)
SpecularReflection
Fromtheairsidewhenaphotonreachesanair-waterinterfaceIncident,reflectedandtransmittedangles
Fractionofreflectedlight
Air
Water
1n
2n
θi
θt
θr
![Page 16: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/16.jpg)
DiffuseReflection
Onthewaterside,travelingfromwatertoair,thereisacriticalincidentangle𝜃𝑐 abovewhichthereisa100%reflection
Fractionofreflectedlight
),,( zyx
),,( zyx µµµ
),,( zyx -
),,( zyx µµµ -1n
2n
iq
![Page 17: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/17.jpg)
Exercise4:SurfaceinteractionsStart
Initializing Photon
Update Reflectance and Photon Weight
Move Photon at a Variable Step
Update Photon Weight Due to Absorption
Photon in Water?
Weight Too Small?
Change Photon Direction
Last Photon?
No
Yes
Yes
Yes
No
No
NoYes
Internally Reflected?
Get Photon Position and Direction
Update Reflection
![Page 18: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/18.jpg)
Keepaddingfeatures
• Keeptrackofphotons• Adddetectors• Addsourcesoflight• Seafloorinteractions• Non-homogenousmedium• Polarization• ....
![Page 19: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/19.jpg)
SimulO – “SimulationOptique”• “Userfriendly”3DMonteCarlo
• photonsarefollowedfromthesourcetothepointwheretheyareabsorbed• Buildanydeviceassemblingandsizingelementaryobjects• SetOpticalproperties
• HomogenousVolumesproperties• refractiveindexofthematerial• absorptionandscatteringcoefficients• scatteringphasefunction
• uploadyours• built-in:purewater,isotropic,Henvey-Greenstein,Fournier-Forand
• HomogenousSurfaceproperties• transparent,specularorLambertian reflection
• Photonemissionlightsource• Photoncountingtools
• numberofcollisionsontheelementaryobjects• averageofphotonpathlength,averagenumberofscatteringeventsper
photons,numberofphotonsabsorbed
byEdouardLeymarie (Laboratoire d’Océanographie deVillefranche)
![Page 20: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/20.jpg)
SimulO Applications• Self-ShadingsimulationsforBoussole
• 1billionphotons/wavelength/IOP• Doxaran D.,Leymarie E.,Nechad B.Dogliotti A.,RuddickK.,Gernez P.andE.Knaeps (2016).Improvedcorrectionmethodsforfieldmeasurementsofparticulatelightbackscatteringinturbidwaters.OpticsExpress,24(4),3615-3637.
• Song,G.,Xie,H.,Bélanger,S.,Leymarie,E.andM.Babin (2013).Spectrallyresolvedefficienciesofcarbonmonoxide(CO)photoproduction inthewesternCanadianArctic:particlesversussolutes.Biogeosciences,10,3731–3748
• Babin,M.,D.Stramski,R.A.Reynolds,V.M.Wright,andE.Leymarie (2012)Inpress.Determinationofthevolumescatteringfunctionofnaturalwatersamples.AppliedOptics,51,17,3853-3873
• Leymarie,E.,D.Doxaran,andM.Babin (2010).Uncertaintiesassociatedtomeasurementsofinherentopticalpropertiesinnaturalwaters,AppliedOptics,49,5415-5436
Surface
![Page 21: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/21.jpg)
LimitationsofSimulO
• Ramanscatteringisnotimplemented• Nopolarization• Assumeperfectlyflatsurface(nowind)• Assumeblacksky(correctionwillbesubmitted)
![Page 22: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/22.jpg)
ReflectiveTubeAbsorptionMeter(RTAM)Ratiobetweenmeasuredandthetrueabsorptioncoefficientsasafunctionofthereflectivityofthetube.
Kirk1992
![Page 23: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/23.jpg)
Self-ShadingestimatedbybackwardMC
Sea surface
Lu Sensor
Forward representation
Sea surface
Lu Sensor
![Page 24: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/24.jpg)
Self-ShadingestimatedbybackwardMC
Simulation1:Luinfinitely
smallNotshaded
LutrueNij
Simulation2:Lusensor+structureShaded
LumeasuredMij
30*120 hemisphere matrixAtm : a=0, b=0, n=1
water : a, b, bb/b, λ, n=1.34
Lu Sensor
Shading =𝑀𝑖𝑗
𝑁𝑖𝑗
LuShadingMatrix
notshaded→1shaded→0
• Assumptions• homogeneouswater• atmosphereisnotsimulated• flatseasurface(nowaves)• blacksky
![Page 25: Monte-Carlo modeling used to simulate propagation of ...misclab.umeoce.maine.edu/OceanOpticsClass2017/wp... · Exercise 1: Random Number Generator •Generate 10 000 random numbers](https://reader035.vdocuments.us/reader035/viewer/2022070803/5f02fc1d7e708231d406f8c9/html5/thumbnails/25.jpg)
Self-shadingwithablackskyHyperNav onfloat