Adaptive Ray Tracing Jeong-Gyu Kim (Princeton) Mar 18, 2019 - - PowerPoint PPT Presentation

adaptive ray tracing
SMART_READER_LITE
LIVE PREVIEW

Adaptive Ray Tracing Jeong-Gyu Kim (Princeton) Mar 18, 2019 - - PowerPoint PPT Presentation

Las Vegas Athena++ Developers Meeting Adaptive Ray Tracing Jeong-Gyu Kim (Princeton) Mar 18, 2019 Characteristics Method for Point Source Radiative Transfer Solves RT equation along selected rays and computes radiation 4-force vector


slide-1
SLIDE 1

Adaptive Ray Tracing

Jeong-Gyu Kim (Princeton)

Mar 18, 2019 Las Vegas Athena++ Developers Meeting

slide-2
SLIDE 2
  • Solves RT equation along selected rays and computes

radiation 4-force vector directly

Long characteristics Short characteristics

Rijkhorst+06

Characteristics Method for 
 Point Source Radiative Transfer

slide-3
SLIDE 3

Adaptive Ray Tracing

Abel+02 Gorski 05

  • Spatially adaptive long characteristics
  • Split rays to match the angular resolution to that of grid cell
  • Angular discretization using HEALPix
slide-4
SLIDE 4

Pros and Cons

  • Conservative of photon energy and momentum
  • Retains full information about the directionality of radiation flux
  • Best suited for UV radiation from a small number of massive stars
  • Photoionization/direct radiation pressure, coupling with

chemistry

  • Ill-suited to handling diffuse sources/scattering
  • Computational cost scales as Nsrc x Ncell x Nfreq x mray.
  • In practice, cost depends on problem geometry, domain

decomposition, and parallel algorithm

  • Difficult to parallelize
slide-5
SLIDE 5

Science Applications

  • Massive star formation with radiation feedback (Rosen+16, 19)
  • Destruction of molecular clouds (Kim, J-.G.+17, 18, 19)
  • Post-processing kpc-scale galactic disk simulations 


TIGRESS (Kim, C-.G.+17,18)

  • Diffuse ionized gas (Kado Fong+19, in prep)
  • H2 and XCO (Gong+19, in prep)
  • TIGRESS with ART (see also Peters+17)
  • Escape of radiation (e.g., Wise+09, Kim, J-.h.+13)

Rosen+16 Kim, J.-G.+18 Kado Fong+19

slide-6
SLIDE 6

Ray-cell Interaction

  • Photon Packets (PPs) are transported radially outward

from the source and attenuated by gas and dust.

∆L = Lin(1 − e−∆τ)

n · rI = χI

∂Lray ∂r = −χLray

cell meshblock

  • pacity per length

Lin ∆⌧ = ∆`

<latexit sha1_base64="SuB+vOaqwXoikfeJzku4R2aL1yI=">ACBXicbVA9SwNBEN3zM8avU0stFoNgFe5U0EYIamEZwXxA7gh7m7lkyd4Hu3NCGls/Cs2ForY+h/s/Ddukis08cHA470ZuYFqRQaHefbWlhcWl5ZLawV1zc2t7btnd26TjLFocYTmahmwDRIEUMNBUpopgpYFEhoBP3rsd94AKVFEt/jIAU/Yt1YhIzNFLbPvBuQCLzkGX0knq8J2iugJRtu+SUnQnoPHFzUiI5qm37y+skPIsgRi6Z1i3XSdEfMoWCSxgVvUxDynifdaFlaMwi0P5w8sWIHhmlQ8NEmYqRTtTfE0MWaT2IAtMZMezpW8s/ue1Mgwv/KGI0wh5tNFYSYpJnQcCe0IBRzlwBDGlTC3Ut5jinE0wRVNCO7sy/OkflJ2T8vO3VmpcpXHUSD75JAcE5eckwq5JVSI5w8kmfySt6sJ+vFerc+pq0LVj6zR/7A+vwBMsCXvQ=</latexit>

∆`

<latexit sha1_base64="bHRimhil2umH7WEB2m7vA85BPY=">AB8nicbVBNS8NAEN3Ur1q/qh69LBbBU0lU0GNRDx4rWFtIQtlsJ+3SzSbsToRS+jO8eFDEq7/Gm/GbZuDtj4YeLw3w8y8KJPCoOt+O6WV1bX1jfJmZWt7Z3evun/waNJc2jxVKa6EzEDUihoUAJnUwDSyIJ7Wh4M/XbT6CNSNUDjIE9ZXIhacoZX84BYkMhqAlN1qza27M9Bl4hWkRgo0u9WvoJfyPAGFXDJjfM/NMBwzjYJLmFSC3EDG+JD1wbdUsQRMOJ6dPKEnVunRONW2FNKZ+ntizBJjRklkOxOGA7PoTcX/PD/H+CocC5XlCIrPF8W5pJjS6f+0JzRwlCNLGNfC3kr5gGnG0aZUsSF4iy8vk8ezunded+8vao3rIo4yOSLH5JR45JI0yB1pkhbhJCXP5JW8Oei8O/Ox7y15BQzh+QPnM8fx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xsihJzwAaZXflcspWJDkP6LlQ4gfn7wMzvZ78cde9POgc/RlEcae8e2WZfF7JAdse/slPWZNfsXxAEYfAn+B+uhKu31jBY9LxlDyrcvAHv37LY</latexit>
slide-7
SLIDE 7

Flow Chart

inject rays and compute Ndest,max Nexit=0 call advance_ray() until my_PP_list is empty or Nexit > Nexit,max for each neighbor: if exit_PP_list is not empty: MPI_Isend PPs to neighbors

  • 1. check for incoming PPs

(MPI_Iprobe and MPI_Recv)

  • 2. check for pending MPI_Isend request

(MPI_Testsome)

  • 1. if my_Ndest≠0:

add my_Ndest to Ndest,tot of root
 (MPI_Fetch_and_op), my_Ndest=0

  • 2. If Ndest,tot of root eq Ndest,max:

update Ndest,tot of other processors

ray_tracing

Ndest,tot=Ndest,max?

exit

yes no

traverse a cell calculating Δr, 
 ΔL=Lin(1-e-Δτ), 𝓕, and F

need to split?

create children

exit this meshblock?

τν> τν,max? for all ν?

update my_Ndest or copy to exit_PP_list
 with Nexit=Nexit+1

update my_Ndest

advance_ray

exit

yes yes yes no no no

Inject rays Ray tracing Send to Neighbors Receive from Neighbors Check if all rays are destroyed

  • r exits the

domain

Kim, J-.G.+17, Rosen+17

slide-8
SLIDE 8

Radiation in Vacuum

mray = 4

<latexit sha1_base64="hlkU2Llhek1T7IhNWf2GNwQU=">AB+HicbVBNS8NAEJ3Ur1o/GvXoZbEInkqiBb0IRS8eK9gPaEPYbDft0t0k7G6EGPpLvHhQxKs/xZv/xm2bg7Y+GHi8N8PMvCDhTGnH+bZKa+sbm1vl7crO7t5+1T47Kg4lYS2Scxj2QuwopxFtK2Z5rSXSIpFwGk3mNzO/O4jlYrF0YPOEuoJPIpYyAjWRvLtqvDzgRI4myKrlHDt2tO3ZkDrRK3IDUo0PLtr8EwJqmgkSYcK9V3nUR7OZaEU6nlUGqaILJBI9o39AIC6q8fH74FJ0aZYjCWJqKNJqrvydyLJTKRGA6BdZjtezNxP+8fqrDKy9nUZJqGpHFojDlSMdolgIaMkmJ5pkhmEhmbkVkjCUm2mRVMSG4y+vks53b2oO/eNWvOmiKMx3ACZ+DCJThDlrQBgIpPMrvFlP1ov1bn0sWktWMXMEf2B9/gCVZJf</latexit>

mray = 20

<latexit sha1_base64="obm3n4oG19RFXQWwc07GXcN+hko=">AB+XicbVBNS8NAEJ34WetX1KOXxSJ4KkV9CIUvXisYD+gDWGz3bZLdzdhd1MIof/EiwdFvPpPvPlv3LY5aOuDgcd7M8zMixLOtPG8b2dtfWNza7u0U97d2z84dI+OWzpOFaFNEvNYdSKsKWeSNg0znHYSRbGIOG1H4/uZ35QpVksn0yW0EDgoWQDRrCxUui6Isx7SiCFsym6RTUvdCte1ZsDrRK/IBUo0Ajdr14/Jqmg0hCOte76XmKCHCvDCKfTci/VNMFkjIe0a6nEguogn18+RedW6aNBrGxJg+bq74kcC60zEdlOgc1IL3sz8T+vm5rBTZAzmaSGSrJYNEg5MjGaxYD6TFieGYJorZWxEZYWJsWGVbQj+8surpFWr+pdV7/GqUr8r4ijBKZzBfhwDXV4gAY0gcAEnuEV3pzceXHenY9F65pTzJzAHzifPwVlkpc=</latexit>

Kim, J-.G.+17

slide-9
SLIDE 9

Strong Scaling

  • Constant amount of work per process

(323 cells/proc)

1pc

  • Fixed problem size (2563, 5123 cells)

Weak Scaling

Kim, J-.G.+17

slide-10
SLIDE 10

Thoughts

  • Need to minimize the overhead associated with finding

neighboring meshblocks when multiple meshblocks are assigned to a single processor

  • Control flow with chemistry module
  • Update species abundances based on radiation field
  • Is operator split method with substepping best approach?
  • Hybrid RT
  • Aborption of UV radiation calculated by ART
  • Moment method to follow diffuse IR emission from dust
  • ART as an on-the-fly integration tool?
  • Synthetic observation, column density maps, etc.