HAL Id: hal-02546081
https://hal-mines-albi.archives-ouvertes.fr/hal-02546081v2
Submitted on 10 Jul 2020
HAL is a multi-disciplinary open access
archive for the deposit and dissemination of
sci-entific research documents, whether they are
pub-lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.
L’archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d’enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.
Convergence issues in derivatives of Monte Carlo
null-collision integral formulations: a solution
Jean-Marc Tregan, Stéphane Blanco, Jérémi Dauchet, Mouna El-Hafi,
Richard Fournier, L Ibarrart, P Lapeyre, Najda Villefranque
To cite this version:
Jean-Marc Tregan, Stéphane Blanco, Jérémi Dauchet, Mouna El-Hafi, Richard Fournier, et al..
Con-vergence issues in derivatives of Monte Carlo null-collision integral formulations: a solution. Journal
of Computational Physics, Elsevier, 2020, 413, pp.1-20/109463. �10.1016/j.jcp.2020.109463�.
�hal-02546081v2�
Convergence
issues
in
derivatives
of
Monte
Carlo
null-collision
integral
formulations:
A
solution
J.-M. Tregan
a,∗
,
S. Blanco
a,
J. Dauchet
c,
M. El Hafi
b,
R. Fournier
a,
L. Ibarrart
b,
P. Lapeyre
d,
N. Villefranque
e,faLAPLACE,UMR5213- UniversitéPaulSabatier,118,RoutedeNarbonne,31062ToulouseCedex,France bLaboratoireRAPSODEE- UMR5302,ENSTIMAC,CampusJarlard,81013AlbiCTCedex09,France cUniversitéClermontAuvergne,CNRS,SIGMAClermont,InstitutPascal,F-63000Clermont-Ferrand,France dPROMES- UPRCNRS8521,7,rueduFourSolaire,66120FontRomeuOdeillo,France
eCentreNationaldeRecherchesMétéorologiques(CNRM),UMR3589CNRS,MétéoFrance,Toulouse,France fLaboratoirePlasmaetConversiond’Énergie(LAPLACE),UMR5213CNRS,UniversitéToulouseIII,France
a
b
s
t
r
a
c
t
Keywords: MonteCarlomethod Directderivatives Null-collisionalgorithm Sensitivity
Integralformulation
WhenaMonteCarloalgorithmisusedtoevaluateaphysicalobservableA,itispossibleto slightlymodify the algorithmso that it evaluates simultaneously A and the derivatives ∂ςA of A with respect to each problem-parameter
ς
. The principle is the following: MonteCarloconsiders A astheexpectationofarandomvariable, thisexpectationisan integral,thisintegralcanbederivatedasfunctionoftheproblem-parametertogiveanew integral,andthisnewintegralcaninturnbeevaluatedusingMonteCarlo.ThetwoMonte Carlocomputations (of A and∂ςA)are simultaneouswhentheymake useofthesame randomsamples,i.e.whenthetwointegralshavetheexactsamestructure.Itwasproven theoretically thatthiswas alwayspossible, butnothingensuresthatthe twoestimators have the same convergence properties: even when alarge enough sample-size is used sothat A isevaluatedveryaccurately,theevaluationof∂ςA usingthesamesamplecan remaininaccurate.Wediscussheresuchapathologicalexample:null-collisionalgorithms areverysuccessfulwhendealingwithradiativetransferinheterogeneousmedia,butthey aresourcesofconvergencedifficultiesassoonassensitivity-evaluationsareconsidered.We analysetheoreticallytheseconvergencedifficultiesandproposeanalternativesolution.1. Introduction
Whennumericallysimulatinglinear-transportphysicsusingMonteCarloalgorithms,oneofthemostrecurrent difficul-tiesisthehandlingofhighlynon-homogenousorfast-variatingmedia.Thisdifficultywasencounteredsincethebeginning ofneutron-transportandplasma-physicsmodelling.Thefirststrategyconsidersthatthemediumishomogeneousbypieces inordertomake anefficientandsimpleresolution.However, tovalidate thisapproximation,wehaveto consideralarge numberofcellswhichinvolvesanincreaseincomputationtimes,asaconsequenceofthemesh-crossingprocedure.Several techniques havebeendeveloped to accelerate thismesh-crossing asin [1]. Buta quite elegant trick was soon identified asa waytobypass thisdifficulty withoutapproximation: virtual collisionnerscan be addedwherethe truecollisionners
*
Correspondingauthor.arescarcesothatthetotalcollisionner-densityishomogeneous.Ofcourse,inordertoensurethatthephysicalproblemis unchanged,whenaparticleinteractswithavirtualcollisionner,itsimplycontinuesitspathasifnocollisionhadoccurred [2–5].Thisisthemeaningofthedenominationnull-collisionalgorithm orfictitious-collisionalgorithm.1Thefirstpractical ben-efit isthatthenextcollisioneventcanbesampledasifthemediumwas homogenous.Thenthechoiceismadetoselect a true-collisionora virtual-collisionasfunctionoftheir localrespective-amounts andthisishow thespatial information isrecovered.Butseveralotherbenefitswererecentlyforeseenin[2] andpracticallytestedin[6–22],mainlyfor radiative-transfer applications.The mainidea isthat null-collisionalgorithms transformthe non-linearityofBeer-extinction intoa linear-recursiveproblemthatMonteCarlohandleswithoutapproximation[15].Thiswasforinstanceusedin[6] todealwith absorption-spectra ofmolecular gases combiningvery numeroustransitions: thesummation overall transitionscould be treatedbytheMonteCarloalgorithmitself,whichwaspreviously assumedimpossiblebecausethissummationwasinside theexponentialofBeer-extinction.Similarly,thevanishingoftheexponentialallowedtheextensionofimplicitMonteCarlo algorithms forinversionofabsorptionandscatteringcoefficientsfromintensitymeasurements[7].Outsideradiative trans-fer, averysimilarideawasusedtosolveElectromagneticMaxwellequationsforenergypropagationinparticle-ensembles ofstatistically-distributedshapesdespiteofthenonlinearityassociatedtothesquareoftheelectricfield[14].Againsimilar isthealgorithmproposed in[15] solvingBoltzmannequationformicro-fluidicsapplicationsdespiteofthenonlinearityof thecollisionoperator.
Back to radiative-transfer applications, the ideas suggested in [2] have motivated significant developments in the computer-graphicscommunityforthe cinemaindustry.Here thebenefitofusingnull-collisionsis thatit extendsto par-ticipating media(aerosolsorclouds)theorthogonalitybetweendata-descriptionanddata-treatmentthatwas attheheart ofthemostrecentuseofMonteCarloforrenderingcomplexscenes[8,10,9,11].Thealgorithmisindeedprocessedwithout anyknowledgeoftheexactspatial-information,anditisonlywhenacollisionoccursthataccesstothefield isrequired: the interactionbetweentheradiative-transfer algorithmandthefield-data isstrictly restrictedtothisvery moment.This allows the implementationof numerousaccelerationtechniques withlittlechanges by comparisonwiththose developed forhandlingcomplexsurfaces.Oneofthesetechniquesconsistsinthesettingofanaccelerationgrid,adjustingtheamount ofvirtualcollisionnerssothatthetotalcollisionner-densityisbothhomogeneousineachcellofthegridandcloseenough to therealdensity-field.Thisavoidsthesamplingoftoomanyuselessvirtual-collisions.Thisisoneofthestarting points ofthepresentpaper:null-collisionalgorithmsallowtheuseofanyamountofvirtual-collisionnersbutnumericalefficiency justifiesthatonetriestoreducethemtotheminimum.
However, weshow herethatreducing theamountofvirtual-collisionnerstoa minimumleads toconvergence difficul-tieswhenevaluatingsensitivities.SensitivityevaluationisaverygeneralfeatureofMonteCarlotechniques:whenaMonte Carlo algorithmis usedto evaluatea physicalobservable A, itis always possibleto modifythe algorithmin such away that itevaluatesboth A andthederivatives
∂
ς A of A withrespecttoeachproblem-parameterς
,andmostcommonlythe corresponding implementationisquitestraightforward[23–29].2 Butwe willshow thatevaluatingsensitivitiesusing null-collisionalgorithmsisrapidlypathological:thebetterweadjusttheaccelerationgrid,theworsethestatisticalconvergence rate. Thiswasexperiencedforinstancewithradiative transferincloudyatmospheres[30].InSec.2wewillillustratethis pathologicalbehaviour evaluatingthetransmissivityofabeamthroughanon-homogeneous column.Thenwe proposean alternativeapproachinSec.3wherethedesignofthesensitivity-evaluationalgorithmstartsfromthestandardintegral so-lutionoftheBoltzmannequation,i.e.withoutvirtual-collisionners.Theresultingsamplingrequirementsarethenaddressed withthenull-collisionapproach viewedasa simplerejection-samplingapproach.Thisintroduces thecostofsamplingan additionalrandomvariable,butatthiscosttheconvergencedifficultiesvanish.Weillustratethenumericalbehaviourofthis modifiedalgorithmisSec.4usingabenchmarkinspiredof[2].2. Convergencedifficultieswhenevaluatingsensitivities
In thissection we designaMonte-Carlo algorithmusingthestandard null-collisionapproachfortheevaluationofthe distributionfunction f ,i.e.thesolutionofBoltzmannequation,andapply thetechniqueof[25,23] forsimultaneous evalu-ationofasensitivity
∂
ς f withrespecttoς
,whereς
isaparameterappearingintheabsorptionandscatteringcoefficients. TheBoltzmannequationthatweuseislinearwithconstantspeedparticles.Itmatchesthemonochromaticradiative-transfer equationexactlyandallapplicationexampleswillberestrictedtoradiativetransfer.Wechoosetomakeuseofthenotation f instead ofthe moreradiative-transferorientednotation I=
hν
c f (thespecific intensity)inordertosimplifytheaccess forreadersoftheplasmaandneutronicscommunities.Themonochromaticradiative-transferequationbecomes⎧
⎪
⎪
⎪
⎨
⎪
⎪
⎪
⎩
∂
tf+
cω
.
∇
f= −(
ka+
ks)
c f+
kac feq+
4π ksc fpS(
−
ω
| −
ω
)
dω
,
∀
x∈ , ∀
ω
∈ S
2 f(
y,ω
+)
=
f∂(
y,ω
+),
∀
y∈ ∂, ∀
ω
+∈ S
2+ f(
x,ω
,
0,
ς
)
=
f0(
x,ω
),
∀
x∈ , ∀
ω
∈ S
2 (1)1 Similarkeywordsarepseudo-collision,null-events,fictitious-events,null-collisions,Woodcocktracking,deltatracking andmaximumcross-section. 2 Thisisnotatallstraightforwardfordomain-deformationsensitivities[25,26],butweheresticktopureparametricsensitivities.
where f
≡
f(
x,
ω
,
t,
ς
)
withx the location,ω
the propagationdirectionand t thetime. Forincoming scatteringin any directionω
oftheunitsphereS
2,wewrite f≡
f(
x
,
ω
,
t,
ς
)
andpS isthesinglescatteringphasefunction,i.e.pS
(
−
ω
|
−
ω
)
dω
is the probability densitythat the scatteringdirection isω
for thisincoming directionω
. Theconstant particle-speedisc andthecoefficientska≡
ka(
x,
t,
ς
)
,ks≡
ks(
x,
t,
ς
)
andke=
ka+
ks aretheabsorptioncoefficient,thescattering coefficient andthe extinctioncoefficient respectively. feq≡
feq(
x,
t)
isthe equilibriumdistribution (following thePlanck function).isthegeometricaldomainand
∂
itsboundaryatwhichthedistributionfunction f∂isknownforalllocations y andalldirectionsω
+ oftheincominghemisphereS
2+. f0 istheinitialcondition.
Introducingnull-collisions. Inordertodesignanullcollisionalgorithm(NCA)[2] we addafieldofvirtualcollisionnerssuch thatthetotalextinctioncoefficientispracticable,inthesensethatwecansamplethecorrespondingBeerextinction:
⎧
⎪
⎪
⎪
⎨
⎪
⎪
⎪
⎩
∂
tf+
cω
.
∇
f= −ˆ
kc f+
kac feq+
4π ksc fpS(
−
ω
| −
ω
)
dω
+
4π knc fδ(
ω
−
ω
)
dω
,
∀
x∈ , ∀
ω
∈ S
2 f(
y,ω
+)
=
f∂(
y,ω
+),
∀
y∈ ∂, ∀
ω
+∈ S
2+ f(
x,ω
,
0,
ς
)
=
f0(
x,ω
),
∀
x∈ , ∀
ω
∈ S
2 (2)wherekn
≡
kn(
x,
t,
ς
)
isthenull-collisioncoefficient,kˆ
=
ka+
ks+
kn isthetotalextinction-coefficient andδ
isthe Dirac distribution. Equation (2) is strictly equivalent to Eq. (1) because of the Dirac distribution that ensures 4π knc fδ(
ω
−
ω
)
dω
=
knc f .When numericallyaddressing thesolution f
(
x0,
ω
0)
ofthistransport equationat(
x0,
ω
0)
(alsosolutionofEq.(1)) using the MonteCarlomethod,one ofthe moststandard approachconsistsin asimple statisticalinterpretationthat allows to view f(
x0,
ω
0)
asanaverageoverradiativepaths thataretrackedbackwardfromtheobservationlocation(
x0,
ω
0)
tothe sources [2].Inthisreading,the puretransportterm∂
tf+
cω
.
∇
f correspondstothespatial andtemporalpropagationof f in directionω
atconstant-speed c.Thecollisionalterm−ˆ
kc f correspondsto eitheran absorptionorascatteringevent (including the null-collisionevents that are forward scatteringevents). When combining it withthe transport term this leadstocollisionlocationsthataredistributedexponentiallyalongthelineofsight(Beerlaw).Trackingthepathbackward, thismeansthattheprecedingcollisionatx1 isatadistanceλ
0 thatisarealisationofarandomvariable0 ofprobability density p0
(λ
0)
=
exp(
−ˆ
kλ
0)
(see Fig.D.1).Oncex1 issampled,thecollisiontype issampledinturntodecidewetheran absorption,atruescatteringoranullcollisionoccurs.Inthebackwardtrackingpicture,thiscorrespondsrespectivelytothe threeremainingterms•
withkac feq an absorption event is translated into thermalemission andthe algorithm stops with the Monte Carlo weight feq(
x1)
(thesourceatx1),•
with4π ksc fpS(
−
ω
|
−
ω
)
dω
ascatteringeventistranslatedintothesamplingofa“previous”directionω
1andthe algorithmcontinuesrecursivelyasifevaluating f(
x1,
ω
1)
,•
with4π knc fδ(
ω
−
ω
)
dω
andits Diracfunction,a nullcollision eventistranslatedinto apure forward scattering event,i.e.the“previous”directionω
1 isequaltoω
0.Ofcoursethestatisticaltranslationincludestheboundaryconditions:whenbackwardreaching theboundaryatalocation
xianddirection
ω
i,thealgorithmstopswiththeMonteCarloweight f(
xi,
ω
i)
(theincomingsourceattheboundary).The correspondingMonteCarloalgorithmisdetailedinAlgorithm1andillustratedinFig.D.1.Integralformulation. Thisnull-collisionalgorithmbelongstothefamilyofanalogMonteCarloalgorithms,i.e.algorithmsthat canbedesignedwithoutanyformaldevelopmentbecausetheyonlynumerically-implementthewellestablishedstatistical picturesofradiationphysics.However,inthepresentcontextitisverymuchusefultoalsochooseaviewpointunderwhich thesamealgorithmappearsasastatisticalestimateoftheintegralsolutionofEq.(2).Forsakeofclarityweonlywritethis integralsolutionatthestationarylimit:
f
(
x,ω
,
ς
)
=
exp⎛
⎝−
λ∂ 0ˆ
k˜
xd˜λ
⎞
⎠
f∂(
y,ω
)
+
λ∂ 0 exp⎛
⎝−
λ 0ˆ
k˜
x d˜λ
⎞
⎠
⎛
⎜
⎜
⎜
⎜
⎝
ka(
x,
ς
)
feq(
x)
+
ks(
x,
ς
)
4π pS(
−
ω
| −
ω
)
dω
f(
x,
ω
,
ς
)
+
kn(
x,
ς
)
f(
x,
ω
,
ς
)
⎞
⎟
⎟
⎟
⎟
⎠
dλ
(3)where
˜
x=
x− ˜λ
ω
,x=
x− λ
ω
, y=
x− λ
∂ω
,withλ
∂thedistancetothefirstboundary-intersectionstartingatx inthedirection
−
ω
,i.e.λ
∂=
min{
x−
z; z∈
Vect−(
x,
ω
)
∩∂}
whereVect−(
x,
ω
)
= {
x−λ
ω
;λ
∈ R
+}
.ThisstandardFredholm equation,typicaloftheformalsolutionoflinear-transportphysics,canbetransformedusingthefollowingpropertyexp
⎛
⎝−
λ∂ 0ˆ
k˜
x d˜λ
⎞
⎠ =
+∞ λ∂ˆ
k(
x)
exp⎛
⎝−
λ 0ˆ
k˜
x d˜λ
⎞
⎠
dλ
togive f(
x,ω
,
ς
)
=
+∞ λ∂ˆ
k(
x)
exp⎛
⎝−
λ 0ˆ
k˜
x d˜λ
⎞
⎠
f∂(
y,ω
)
dλ
+
λ∂ 0ˆ
k(
x)
exp⎛
⎝−
λ 0ˆ
k˜
xd˜λ
⎞
⎠
⎛
⎜
⎜
⎜
⎜
⎜
⎜
⎝
ka(x,ς) ˆ k(x) f eq(
x
)
+
ks(x,ς) ˆ k(x) 4π pS(
−
ω
| −
ω
)
dω
f(
x,
ω
,
ς
)
+
kn(x,ς) ˆ k(x) f(
x,
ω
,
ς
)
⎞
⎟
⎟
⎟
⎟
⎟
⎟
⎠
dλ
(4) Then•
pˆ(λ)
= ˆ
k(
x)
exp−
0λkˆ
˜
xd˜λ
canbe viewedasthe probability densityfunctionof thefree pathˆ
(the distance untilnextcollision),•
PA=
kˆa k, PS=
ks ˆ k andPN=
kn ˆk canbeviewedastheprobabilitiesthatthecollisionisan absorption,ascatteringevent oranull-collisionrespectively,
•
and the two integrals over[
0,
λ
∂[
and[λ
∂,
+∞[
can be gathered into a single integral over[
0,
+∞[
using theHeavisidefunction
H
togive f(
x,ω
,
ς
)
=
+∞ 0 pˆ(λ)
dλ
⎛
⎜
⎜
⎜
⎜
⎜
⎜
⎝
H
(λ
− λ
∂)
w∂+
H
(λ
∂− λ)
⎛
⎜
⎜
⎜
⎜
⎝
PA(
x,
ς
)
wA+
PS(
x,
ς
)
4π pS(
−
ω
| −
ω
)
dω
f(
x,
ω
,
ς
)
+
PN(
x,
ς
)
f(
x,
ω
,
ς
)
⎞
⎟
⎟
⎟
⎟
⎠
⎞
⎟
⎟
⎟
⎟
⎟
⎟
⎠
(5)with w∂
=
f∂(
y,
ω
)
and wA=
feq(
x)
. Thislast equation is theintegral formulationthat we neededin orderto con-structAlgorithm1atthestationarylimit:Algorithm1isindeednothingmorethanthealgorithmic-readingofEq. (5) (and reciprocallyEq. (5) isnothingmorethantheintegraltranslationofAlgorithm1,[24]):•
0+∞pˆ(λ)
dλ
standsforthesamplingofthedistanceofthecollision(accordingtothek-field),ˆ
•
H(λ
− λ
∂)
stands forthecasewherethe sampledcollision isoutsidetheboundary,thenthe algorithmstopsattheboundarywiththeMonteCarloweightw∂(thevalueof f correspondingtotheincomingradiation),
•
H(λ
∂− λ)
stands for the case where the sampled collision is at a location x inside the volume, andthen threecollisiontypesarepossible:
– PA
(
x,
ς
)
standsforthecasewherethecollisionisanabsorption,thenthealgorithmstopsattheboundarywiththe MonteCarloweightwA(thevalueof feq atthecollisionlocation),– PS
(
x,
ς
)
stands for the case where the collision is a scattering event, then4π pS
(
−
ω
|
−
ω
)
dω
stands for the sampling ofa newdirectionω
accordingto the phase function andthealgorithm continues recursively withthe estimationof f atx indirectionω
,– PN
(
x,
ς
)
standsforthecasewherethecollisionisnull,thenthealgorithmcontinuesrecursivelywiththeestimation of f atxintheunchangeddirectionω
Straightforwardapplicationofsensitivity-evaluationtechniques. Nowthat wehaveconstructed theintegralformulationof Al-gorithm 1wecanapply thesensitivity-evaluation techniqueintroducedin[23,25,26].ItconsistsinderivatingEq. (5) with respectto
ς
andmultiplyinganddividingbyeachoftheprobabilitiesandprobabilitydensityfunctionsthatdependonς
. ThisleadstoanintegralformulationofthesensitivitythathastheverysamestructureasthatofEq. (5):∂
ςf(
x,ω
,
ς
)
=
+∞ 0 pˆ(λ)
dλ
⎛
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎝
H
(λ
− λ
∂)
wς∂+
H
(λ
∂− λ)
⎛
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎝
PA(
x,
ς
)
wςA+
PS(
x,
ς
)
4π pS(
−
ω
| −
ω
)
dω
⎛
⎝
∂ς ks(x ,ς) ks(x,ς) f(
x,
ω
,
ς
)
+ ∂
ςf(
x,
ω
,
ς
)
⎞
⎠
+
PN(
x,
ς
)
⎛
⎝
∂ς kn(x ,ς) kn(x,ς) f(
x,
ω
,
ς
)
+ ∂
ςf(
x,
ω
,
ς
)
⎞
⎠
⎞
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎠
⎞
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎠
(6) withwς∂=
0 and wςA=
∂ςka(x,ς) ka(x,ς) feq
(
x)
becausek isˆ
independentofς
.Becauseoftheiridenticalstructure,wecangather Eq. (5) and(6) intooneusingthevectorialnotationw;
wς: f(
x,ω
,
ς
)
; ∂
ςf(
x,ω
,
ς
)
=
+∞ 0 pˆ(λ)
dλ
⎛
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎝
H
(λ
− λ
∂)
w∂;
wς∂+
H
(λ
∂− λ)
⎛
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎝
PA(
x,
ς
)
wA;
wςA+
PS(
x,
ς
)
4π pS(
−
ω
| −
ω
)
dω
⎧
⎨
⎩
f(
x,
ω
,
ς
)
;
⎛
⎝
∂ς ks(x ,ς) ks(x,ς) f(
x,
ω
,
ς
)
+ ∂
ςf(
x,
ω
,
ς
)
⎞
⎠
⎫
⎬
⎭
+
PN(
x,
ς
)
⎧
⎨
⎩
f(
x,
ω
,
ς
)
;
⎛
⎝
∂ς kn(x ,ς) kn(x,ς) f(
x,
ω
,
ς
)
+ ∂
ςf(
x,
ω
,
ς
)
⎞
⎠
⎫
⎬
⎭
⎞
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎠
⎞
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎠
(7)Thealgorithmic-readingof(7) leadstoAlgorithm2thatevaluates simultaneously f and
∂
ς f . Therecursivenatureofthis algorithmcomes fromthe factthat thefinalbracketsin thescatteringandnull-collisiontermscontain f and∂
ς f atthe samelocationinthesamedirection.Thefactthattheirsensitivitypartincludesasummationistranslatedintoanalgorithm incrementingtheMonteCarloweightasexplainedinAppendixA.Simulationexamples. Atthisstage,we designeda null-collisionalgorithm,constructedthecorresponding integral formula-tionandappliedthepropositionof[23,25,26] inastraightforwardmannersothatthealgorithmalsoevaluatessensitivities. We now test thissimulation strategy by evaluating thetransmissivity ofa non-diffusive heterogeneous columnandalso evaluating the sensitivityofthistransmissivity w.r.t.
ς
, a parameterinfluencing the absorptioncoefficient. Hereafter this configurationis calledheterogeneous-slab (see Fig.D.2):is acolumnoflength L withex the normalincomingat
loca-tion y
=
0.The equilibriumdistribution isnull (coldmedium, feq≡
0). Theboundary conditionsare f∂(
0,
ex
)
=
0 andf∂
(
L,
−
ex)
=
finc.Theabsorptionandscatteringcoefficientsare ka(
x,
ς
)
= (
ς
−
γ
)
−atan(α(x−β))+π
2
π/2
+
γ
andks≡
0. Algo-rithm2isusedtoevaluateboth f(
0,
ex,
ς
)
and∂
ς f(
0,
ex,
ς
)
thatcorrespondtothetransmissivityT anditsderivative∂
ς T respectively:T=
f(
0,
ex,
ς
)/
finc and∂
ς T= ∂
ς f(
0,
ex,
ς
)/
finc.Wechosethisparticularprofileofka,becauseitispossible tocalculateT and∂
ς T analytically(seethecaptionofFig.D.2).ExampleMonteCarloresults,usingN=
10000 samples,are comparedtotheanalyticalsolutioninTablesD.5a andD.5b.Thestatisticaluncertaintyisnotedσ
(the standarddeviation oftheMonteCarloestimator).InTableD.5bwealsoprovidethenumberofsamplesN1%requiredtoachievea1% accuracy. Thesimulationswere madeusingfivedifferentk-profilesˆ
(eachoverestimatingka atalllocations),withacceleration-grids,ˆ
k beinguniformwithineachmesh(seeFig.D.2):
•
fork20%ˆ
nogridisused:theprofileofk isˆ
uniform,equalto1.
2 timethemaximumka-value.•
fork1ˆ
nogridisused:theprofileofk isˆ
againuniform,exactlyequaltothemaximumka-value.•
forkˆ
10 thegrid is constructed insuch a way that acrosseach meshthe variations ofka are 1/
10 of the maximum ka-value,andtheprofileofk isˆ
uniformwithineachmesh,exactlyequaltothemaximumka-valueinsidethemesh.•
fork100ˆ
andk1000ˆ
thegridisconstructedthesamewaywith1/
100 and1/
1000 variationrespectively.The transmissivity results ofTable D.5a confirm that the estimation of T is insensitive to the adjustment of thek-field
ˆ
(only thecomputation timeis affected).Butthe sensitivityresultsofTableD.5bclearly showtheopposite:the statistical convergence isworse whenk isˆ
closeto k and thenumber of samplesrequired to reach a givenaccuracy level can berisen up toinfinity whenmatchingk to
ˆ
k exactly. Thisisthe pathologicalbehaviour thatwe announcedin introduction: sensitivitiescannotbeevaluatedaccuratelywhenusingaccelerationgridsreducingthenumberofvirtualcollisions. Thevarianceofthesensitivityestimate. Forabetterunderstandingofthisbehaviour,westudiedahomogeneous-slab forwhich the variance oftheMonte Carloestimatecan be calculatedanalytically. Thiscaseisidentical tothe previous one (trans-missivityofa purelyabsorbingcolumn) butnowk=
ka isuniform:ka(
ς
)
≡
ς
,T=
exp(
−ς
L)
and∂
ς T= −
LT .Ofcourse, there isno needtomake useofa null-collisionalgorithmassoonask is uniform. Weonly doitfortheoretical reasons (with kˆ
>
k uniform).Thisallowsusto fullyidentifythereasonswhythe varianceof thesensitivityestimate riseswhen reducingkn= ˆ
k−
k.Thismaysoundtrivialassoonaswhenencounteringanull-collisionevent,theMonteCarloweightof the sensitivityalgorithmincludes afactor ∂ςkn(x,ς)kn(x,ς)
=
1/
kn (see Eq. (7)),butreducingkn alsoreducesthenumberofsuchnull-collisionoccurrences.Thismayleadtoacompensation,maintainingthevarianceatafinitevalue.Thedevelopmentsof AppendixB.1showtheopposite:thestatisticaluncertaintyisindeed
σ
∂ς T=
L2e−kaL kn+1/L kn−
L2e−2kaL√
N (8)Fig.D.3illustrates themeaningofthisdependenceof
σ
∂ςT withtheproblemparameters.Inthisidealisedcase,lookingat the behaviour of such an algorithm applyingsensitivity-evaluation techniquesin a straightforward manner,the difficulty is well identified: when knˆ
k approacheszero,the number ofsamples requiredfor a 1% accurateevaluation ofthe sensi-tivitytends toinfinity(seeFig.D.3c).Thisfigurealsodisplaysthebehaviour ofan algorithmimplementingtheverysame sensitivity-evaluationtechnique,butwithouttheuseofnull-collisions(whichispossiblehereinthisidealiseduniformcase). Withoutnull-collisions,therelativevalueofthestandarddeviationofthesensitivity-estimate(Fig.D.3b)isidenticaltothat ofthemainquantity(thetransmissivity-estimate,Fig.D.3a).Thisisanidealbehaviour:thesensitivityisestimatedwiththe samerelativeaccuracyasthatofthemainquantity.Altogetherinthissimpleexample,weseethatevaluatingsensitivities canbeperfectlycostlessbefore usingnull-collisionsandmaybecomepathologicalwhennull-collisionsareintroduced.
Notethat inthegeneralcase, evenwithoutnull-collisions,evaluatingsensitivities canbe truly difficult.Understanding the relativevariance ofsensitivityestimatesandcomparing themtotherelative varianceofthe algorithmestimatingthe mainquantitywasindeedoneofthemainconcernsoftheinitialworkofDe Lataillade[23].Essentially,seriousdifficulties arise assoon as thescattering optical-thickness ishigh. The objectiveof the presentpaper is not at all to address this specificissue:attheendofthefollowingsection,whenanalternativesolutionwillbeproposedforevaluatingsensitivities innullcollisionsalgorithms,theproblemsassociatedtohighlyscatteringmediawillremainunsolved.
3. Analternativeapproach
The precedingsection identifiesconvergencedifficultieswhenevaluating sensitivitiesusingnull-collisions.Theses diffi-cultiesarenotassociatedtothestandardsensitivity-evaluationalgorithmitself:consideringslabtransmission,wehaveseen that when wedo notmake useofnull-collisions, thesensitivity-evaluationalgorithm convergesaswell asthealgorithm evaluating themainquantity.Sotheobserveddifficultiesareonlytheconsequencesofintroducingvirtual-collisionners.At thisstage,null-collisionalgorithmsappearthereforeasperfecttoolsforhandlingheterogeneousfields,butareincompatible withthesimultaneousevaluationofsensitivities.
We haveseen thatthisproblemisrelatedtotheterm k1
n appearingintheMonteCarloweightofthesensitivity algo-rithm.Atwhichstagedidthistermappearandcanwebypassthisstep?Clearly, k1
n appearedwhenderivatingwith
ς
the null-collisionprobability PN(
ς
)
=
1−
PA(
ς
)
−
PS(
ς
)
,withPA(
ς
)
=
ka(
ς
)/ˆ
k andPS=
ks(
ς
)/ˆ
k.Afirstwaytosuppressthis1
kn termconsistsinmakingk dependent
ˆ
onς
.Thisisalwayspossiblebecausek isˆ
afree parameterandwecantherefore adjustit tothevariationofka(
ς
)
+
ks(
ς
)
sothat PN doesnotdependonς
anymore.We firsttestedthissolutionandit proved itselfalreadyquitepractical:thecorrespondingdetailsareprovidedinAppendixC.Butwefinallyretainedanother algorithm more efficientin all thecases that were studied,starting from theintegral solution ofthe original Boltzmann Eq. (1),i.e.priortotheintroductionofvirtual-collisionners.Theideaconsistsinfirstdesigningan algorithmevaluating si-multaneously f and∂
ς f asiftheheterogeneityofthefieldcouldbehandledwithoutdifficulty andonlyintroducenull-collisions inasecondstage.Forthis,wecansimplyrewriteEq. (5) withkn=
0 (novirtualcollisionners):f
(
x,ω
,
ς
)
=
+∞ 0 p(λ)
dλ
⎛
⎜
⎜
⎜
⎝
H
(λ
− λ
∂)
w∂+
H
(λ
∂− λ)
⎛
⎜
⎝
PA(
x,
ς
)
wA+
PS(
x,
ς
)
4π pS(
−
ω
| −
ω
)
dω
f(
x,
ω
,
ς
)
⎞
⎟
⎠
⎞
⎟
⎟
⎟
⎠
(9)TheonlydifferenceswithEq. (5) arethat
•
PN=
0,•
therandomvariableˆ
ofprobabilitydensitypˆ(λ)
= ˆ
k(
x)
exp−
λ 0 kˆ
˜
x d˜λ
(thefreepathinthek-field)
ˆ
isreplaced withtherandomvariableofprobabilitydensityp
(λ)
=
ke(
x,
ς
)
exp−
λ0ke
(
x˜
,
ς
)
d˜λ
(thefreepathintheoriginal ke-field).
Thisequationcan thenbederivatedwithrespectto
ς
andmultiplied/dividedby eachoftheprobabilitiesandprobability densityfunctionsthatdependonς
(exactlythesamewayEq. (7) wasconstructedfromEq. (5))togive∂
ςf(
x,ω
,
ς
)
=
+∞ 0 p(λ)
dλ
⎛
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎝
H
(λ
− λ
∂)
⎛
⎝−
w∂ λ∂ 0∂
ςke(x
l,
ς
)
dl+
wς∂⎞
⎠
+
H
(λ
∂− λ)
⎛
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎝
PA(
x,
ς
)
⎛
⎝−
wA λ 0∂
ςke(x
l,
ς
)
dl+
wςA⎞
⎠
+
PS(
x,
ς
)
4π pS(
−
ω
| −
ω
)
dω
⎛
⎜
⎜
⎜
⎜
⎜
⎜
⎝
−
λ 0∂
ςke(x
l,
ς
)
dlf(
x,
ω
,
ς
)
+
∂ς ks(x,ς) ks(x,ς) f(
x,
ω
,
ς
)
+ ∂
ςf(
x,
ω
,
ς
)
⎞
⎟
⎟
⎟
⎟
⎟
⎟
⎠
⎞
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎠
⎞
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎠
(10)Amainpoint ofthe presentpaperisthat thisintegral equation,althoughit wasderived thesamewayasEq. (7),cannot be interpretedinalgorithmic terms: theintegral pattern
∂
ς kedl isnotyettransformed intoa statisticalexpectation. An additionalrandomgenerationwillberequired.Atthisstageletusintroducean arbitraryrandomvariableL
ofprobability densityfunction pL andwrite∂
ς kedl=
pL
(
l)
dl∂ςkepL(l).ReportingthisintoEq. (10) andusing
pL(
l)
dl=
1 leadsto∂
ςf(
x,ω
,
ς
)
=
+∞ 0 p(λ)
dλ
⎛
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎝
H
(λ
− λ
∂)
λ∂ 0 pL(
l|λ
∂)
dl−
w∂∂
ςke(x
l,
ς
)
pL(
l|λ
∂)
+
wς∂+
H
(λ
∂− λ)
λ 0 pL(
l|λ)
dl⎛
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎝
PA(
x,
ς
)
−
wA∂ς kpLe((lx|λ)l,ς)+
wςA+
PS(
x,
ς
)
4π pS(
−
ω
| −
ω
)
dω
⎛
⎜
⎜
⎜
⎝
−
∂ς ke(xl,ς) pL(l|λ) f(
x,
ω
,
ς
)
+
∂ς ks(x,ς) ks(x,ς) f(
x,
ω
,
ς
)
+ ∂
ςf(
x,
ω
,
ς
)
⎞
⎟
⎟
⎟
⎠
⎞
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎠
⎞
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎠
(11)Atthisstage,null-collisionshavenotbeenintroduced.Therefore,thealgorithmicreadingofEq. (11) wouldnotbepractical assoonastheke-field isheterogeneous:the difficultywouldcome fromthe samplingof
.The objectiveofintroducing null collisions will therefore be to replace
with another path-length
ˆ
, shorter in average but easy to sample, and compensatethetoomanycollisionsbythefactthatsomeofthemarenull.However,thisnotastrivialasinthealgorithm forthemainquantitybecauseofthenewrandomvariableL
thatweneededtointroducewhentransformingEq. (10) intoEq. (11) (transformingitintoanexpectation).Indeed
∂
ς ke needstobeintegratedalongthewholepath,nowincludingnull collisions. Instatisticalterms,thismeansthat therecursivityofthepath-sampling algorithmisonlyinsurediftheMonte Carloweightassociatedtonullcollisionsincludestheterm−∂
ς ke(
xl,
ς
)/
pL(
l|λ)
f(
x,
ω
,
ς
)
,exactlylikefortruescatteringevents:
∂
ςf(
x,ω
,
ς
)
=
+∞ 0 pˆ(λ)
dλ
⎛
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎝
H
(λ
− λ
∂)
λ∂ 0 pL(
l|λ
∂)
dl−
w∂∂
ςke(x
l,
ς
)
pL(
l|λ
∂)
+
wς∂+
H
(λ
∂− λ)
λ 0 pL(
l|λ)
dl⎛
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎝
PA(
x,
ς
)
−
wA∂ς kpLe((xl|λ)l,ς)+
wςA+
PS(
x,
ς
)
4π pS(
−
ω
| −
ω
)
dω
⎛
⎜
⎜
⎜
⎝
−
∂ς ke(xl,ς) pL(l|λ) f(
x,
ω
,
ς
)
+
∂ς ks(x,ς) ks(x,ς) f(
x,
ω
,
ς
)
+ ∂
ςf(
x,
ω
,
ς
)
⎞
⎟
⎟
⎟
⎠
+
PN(
x,
ς
)
−
∂ς ke(xl,ς) pL(l|λ) f(
x,
ω
,
ς
)
+ ∂
ςf(
x,
ω
,
ς
)
⎞
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎠
⎞
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎠
(12)Equations (5) and(12) havenowasimilarstructure:allthesamplesusedtoevaluate f canalsobeusedfortheevaluation of
∂
ς f .Butinordertocompletetheevaluationofsensitivity,we mustaddonesample (ofL
)percollision.Thankstothis similar structure,we cangather them intoasingle vectorialwriting (exactly thesamewayEq. (7) was constructedfrom Eq. (5) and(6)): f(
x,ω
,
ς
)
; ∂
ςf(
x,ω
,
ς
)
=
+∞ 0 pˆ(λ)
dλ
⎛
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎝
H
(λ
− λ
∂)
λ∂ 0 pL(
l|λ
∂)
dl w∂; −
w∂∂
ςke(x
l,
ς
)
pL(
l|λ
∂)
+
wς∂+
H
(λ
∂− λ)
λ 0 pL(
l|λ)
dl⎛
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎜
⎝
PA(
x,
ς
)
wA; −
wA∂ς kpe(xl,ς) L(l|λ)+
wςA+
PS(
x,
ς
)
4π pS(
−
ω
| −
ω
)
dω
⎧
⎪
⎪
⎪
⎨
⎪
⎪
⎪
⎩
f(
x,
ω
,
ς
)
;
⎛
⎜
⎜
⎜
⎝
−
∂ς ke(xl,ς) pL(l|λ) f(
x,
ω
,
ς
)
+
∂ς ks(x,ς) ks(x,ς) f(
x,
ω
,
ς
)
+ ∂
ςf(
x,
ω
,
ς
)
⎞
⎟
⎟
⎟
⎠
⎫
⎪
⎪
⎪
⎬
⎪
⎪
⎪
⎭
+
PN(
x,
ς
)
f(
x,
ω
,
ς
)
;
−
∂ς ke(xl,ς) pL(l|λ) f(
x,
ω
,
ς
)
+ ∂
ςf(
x,
ω
,
ς
)
⎞
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎠
⎞
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎟
⎠
(13)The algorithmic-readingof(13) leadstoAlgorithm3that isanalternativetoAlgorithm2forevaluatingsimultaneously f and
∂
ς f .AsexplainedinthealgorithmicreadingofEq. (7),therecursivenatureofthisalgorithmcomesfromthefactthat thefinal bracketsinthescatteringandnull-collisiontermscontain f and∂
ς f atthesamelocationinthesamedirection. The fact that their sensitivitypart includes a summation is translated into an algorithm incrementing the Monte Carlo weightasexplainedinAppendixA.ItisinterestingtonotethattheintegralpL(
l)
dl∂
ς ke(
xl,
ς
)/
pL(
l)
canbemoreorlessdifficultto evaluatedependingontheprofileof
∂
ς ke.Butthiscanbe easilyhandledusingimportancesamplingbasedon thek-adjustmentˆ
grid,asexplainedinAppendixD.4. Simulationsusingthealternativeapproach 4.1. Transmissivityofapurelyabsorbingcolumn
ApplyingthealternativeapproachofSec.3totheevaluationofcolumn-transmissivitiesleadstothecontentofFig.D.3d andTableD.5c.Forthe homogeneous-slab configuration,Fig. D.3showsthat notonly thepathologicalbehaviour ofSec.2
isremoved, butthesensitivityisestimatedwithastatisticaluncertaintythatisperfectforasimultaneous evaluation:its dependenceontheparametersoftheproblemisidenticaltothatofthemainquantity.Asabove,inthisverysimplecase, thisuncertaintycanbeexpressedanalytically(seeAppendixB.2)andindeed
σ
∂ς T∂
ςT=
σ
T T=
!
1−
e−kaL√
NFortheheterogeneous-slab configuration,theuncertaintycannotbepredictedtheoretically,buttheconclusionsofFig.D.5are identicaltothoseofFig.D.3:intermsofrelativeaccuracy,theconvergencerateisequaltothatofthealgorithmevaluating themainquantity.Itisthereforestrictlyindependentoftheadjustmentofk to
ˆ
k.Theuseofanaccelerationgriddoesonly whatweexpect:itreducesthenumberofnull-collisionsbutdoesnotimpactthevarianceanymore.4.2. Fullradiativetransferina3Dconfiguration
In[2],a cubicbenchmark configurationwas usedtotest null-collisionalgorithms whendealing withthree-dimension highly-heterogeneous fields for all ranges of optical thickness and single-scattering albedo. We here make use of the sameconfiguration, namedheterogeneous-cube hereafter, in orderto test ouralternative approach with3D radiation(see Fig.D.4):
•
radiationismonochromatic;•
thecubeisofside2L,with0K blackfaces;•
theinside-temperaturefieldissuchthat feq variesfrom feq=
fmaxeq (atthecentre ofthefaceatx= −
L)to feq=
0 (at x=
L and(
y= ±
L,
z= ±
L)
)andmimicstheshapeofflame: feq(
x,
y,
z)
=
η
(
x,
y,
z)
fmaxeq (seetheη
profileinFig.D.4);•
thefieldsofabsorptionandscatteringcoefficientsfollowsthesamespatialdependence:ka(
x,
y,
z)
=
η
(
x,
y,
z)
ka,maxandka
(
x,
y,
z)
=
η
(
x,
y,
z)
ks,max;•
Thesingle-scatteringphasefunctionisthatofHenyey-Greensteinwithauniformvalueoftheasymmetryparameterg;• ˆ
k isadjustedtok usingaregular cubic-grid(k uniformˆ
within eachmesh):theonly parameterfork isˆ
thereforethe numberofmeshperdirection.Theevaluated quantity A
(
x,
y,
z)
isthestationarynet-powerdensityandthefreephysicalparameters areka,maxL,ks,maxL and g. In TableD.7 we reproducethe computations ofTable 1 in[2], i.e.testingwide ranges of optical thicknesses but fixing g=
0 (isotropicscattering).Inthesametablewealsoprovidetwosensitivities,∂
ka,max and∂
ks,max,that weevaluated simultaneously with A.As in[2], althoughthey are notdisplayed, we checkedthat simulationresultswithnon-isotropic scatteringleadtotheexactsameconclusions.Theseconclusions arevery similartothose reachedon theslab-transmissivityexample:TableD.8 highlightsthesame featuresasFig.D.5,thestandarddeviationofAlgorithm3beingindependentofk,
ˆ
whereasitincreaseswhenk getsˆ
close toke forAlgorithm2.5. Conclusion
The simulation examplesof the precedingsection show that the solutionproposed inSec. 3 ispractical. Sensitivities can be accurately evaluated even when using null-collision algorithms. We still face convergence difficulties for highly-scatteringmedia, butthisisan open question identifiedinall linear-transport physics,independentlyof theuseof null-collisions.
Thewaywebypassedtheconvergencedifficultiesspecifictonull-collisionsisinrupturewiththeprincipleofevaluating sensitivities