Skip to content

Latest commit

 

History

History
55 lines (37 loc) · 1.99 KB

README.md

File metadata and controls

55 lines (37 loc) · 1.99 KB

RayTracing

Build Status

The partial integro-differential neutron transport equation can be casted to an ordinary differential equation over tracks that emulate neutron trajectories across a problem domain by means of the Method of Characteristics. This library addresses the cyclic ray tracing of those paths over any 2D rectangular mesh and computes quantities used to solve the transport equation in NeutronTransport.jl.

Cyclic Ray Tracing

Installation

The package can be installed using the Julia package manager. From the Julia REPL, type ] to enter the Pkg REPL mode and run:

pkg> add RayTracing

Or, equivalently, via the Pkg API:

julia> import Pkg; Pkg.add("RayTracing")

Example

Create a gmsh mesh using any available tool of your choice (checkout GridapGmsh.jl for convenience). For example, this file shows the definition of a simple pin-cell geometry. Then, the ray tracing consists in two steps, namely, the track tracing and the segmentation of those tracks.

using RayTracing
using GridapGmsh: GmshDiscreteModel

# load mesh and define a model with it
mshfile = joinpath(@__DIR__, "demo", "pincell.msh")
model = GmshDiscreteModel(mshfile; renumber=true)

# number of azimuthal angles= 8

# azimuthal spacing
δ = 2e-2

# initialize track generator
tg = TrackGenerator(model, nφ, δ)

# perform ray or track tracing
trace!(tg)

# proceed to segmentation
segmentize!(tg)
Geometry / Mesh Tracks Segments