Geometry
Structure
Radiant.Geometry — Type
GeometryStructure used to define the geometry properties of the medium for transport calculations.
Mandatory field(s)
name::String: name (or identifier) of the Geometry structure.dimension::Int64: dimension of the geometry.material_per_region::Array{Material}: multidimensional array of the material per regions.boundary_conditions::Dict{String,Int64}: boundary conditions along each axis.number_of_regions::Dict{String,Int64}: number of regions along each axis.voxels_per_region::Dict{String,Vector{Int64}}: number of voxels inside each regions along each axis.region_boundaries::Dict{String,Vector{Float64}}: boundaries of each regions along each axis.
Optional field(s) - with default values
type::String="cartesian": type of geometry.
Build
Radiant.build — Method
build(this::Geometry,cs::Cross_Sections)To build the geometry structure.
Input Argument(s)
this::Geometry: geometry.cs::Cross_Sections: geometry.
Output Argument(s)
N/A
Examples
julia> cs = Cross_Sections()
julia> ... # Defining the cross-sections library properties
julia> cs.build()
julia> geo = Geometry()
julia> ... # Defining the geometry properties
julia> geo.build(cs)Setters
Radiant.set_type — Method
set_type(this::Geometry,type::String)To set the type of geometry.
Input Argument(s)
this::Geometry: geometry.type::String: type of geometry, which can takes the following value: -type = "cartesian": Cartesian geometry.
Output Argument(s)
N/A
Examples
julia> geo = Geometry()
julia> geo.set_type("cartesian")Radiant.set_dimension — Method
set_dimension(this::Geometry,dimension::Int64)To set the dimension of geometry.
Input Argument(s)
this::Geometry: geometry.dimension::Int64: dimension of the geometry, which can be either 1, 2 or 3.
Output Argument(s)
N/A
Examples
julia> geo = Geometry()
julia> geo.set_dimension(2) # For 2D geometryRadiant.set_boundary_conditions — Method
set_boundary_conditions(this::Geometry,boundary::String,boundary_condition::String)To set the boundary conditions at the specified boundary.
Input Argument(s)
this::Geometry: geometry.boundary::String: boundary for which the boundary condition is applied, which can takes the following value:boundary = "x-": the lower bound along x-axisboundary = "x+": the upper bound along x-axisboundary = "y-": the lower bound along y-axisboundary = "y+": the upper bound along y-axisboundary = "z-": the lower bound along z-axisboundary = "z+": the upper bound along z-axis
boundary_condition::String: boundary conditions, which can takes the following value: -boundary = "void": void boundary conditions. -boundary = "reflective": reflective boundary conditions. -boundary = "periodic": periodic boundary conditions.
Output Argument(s)
N/A
Examples
julia> geo = Geometry()
julia> geo.set_boundary_conditions("x-","void")Radiant.set_number_of_regions — Method
set_number_of_regions(this::Geometry,axis::String,number_of_regions::Int64)To set the number of regions along a specified axis.
Input Argument(s)
this::Geometry: geometry.axis::String: axis along which the number of regions is specified, which can takes the following values:boundary = "x": along x-axisboundary = "y": along y-axisboundary = "z": along z-axis
number_of_regions::Int64: number of regions.
Output Argument(s)
N/A
Examples
julia> geo = Geometry()
julia> geo.set_number_of_regions("x",3)Radiant.set_voxels_per_region — Method
set_voxels_per_region(this::Geometry,axis::String,voxels_per_region::Vector{Int64})To set the number of voxels for each regions along a specified axis.
Input Argument(s)
this::Geometry: geometry.axis::String: axis along which the number of regions is specified, which can takes the following values:boundary = "x": along x-axisboundary = "y": along y-axisboundary = "z": along z-axis
voxels_per_region::Vector{Int64}: vector with the number of voxels for each regions along the specified axis.
Output Argument(s)
N/A
Examples
julia> geo = Geometry()
julia> geo.set_number_of_regions("x",3)
julia> geo.set_voxels_per_region("x",[10,5,2])Radiant.set_region_boundaries — Method
set_region_boundaries(this::Geometry,axis::String,region_boundaries::Vector{Float64})To set the boundaries of each regions along a specified axis.
Input Argument(s)
this::Geometry: geometry.axis::String: axis along which the number of regions is specified, which can takes the following values:boundary = "x": along x-axisboundary = "y": along y-axisboundary = "z": along z-axis
region_boundaries::Vector{Float64}: vector with the regions boundaries along the specified axis in ascending order.
Output Argument(s)
N/A
Examples
julia> geo = Geometry()
julia> geo.set_number_of_regions("x",3)
julia> geo.set_voxels_per_region("x",[10,5,2])
julia> geo.set_voxels_per_region("x",[0.0 0.3 0.5 1.0])Radiant.set_material_per_region — Method
set_material_per_region(this::Geometry,material_per_region::Array{Material})To set the material in each regions of the geometry.
Input Argument(s)
this::Geometry: geometry.material_per_region::Array{Material}: array containing the material for each regions. Its size should fit the number of regions per axis.
Output Argument(s)
N/A
Examples
# Define material
julia> mat1 = Material(); mat2 = Material()
julia> ... # Define the material properties
# 1D geometry case
julia> geo1D = Geometry()
julia> geo1D.set_type("cartesian")
julia> geo1D.set_dimension(1)
julia> geo1D.set_number_of_regions("x",3)
julia> geo1D.set_material_per_region([mat1 mat2 mat1])
# 2D geometry case
julia> geo1D = Geometry()
julia> geo1D.set_type("cartesian")
julia> geo1D.set_dimension(2)
julia> geo1D.set_number_of_regions("x",2)
julia> geo1D.set_number_of_regions("y",3)
julia> geo1D.set_material_per_region([mat1 mat2 mat1 ; mat2 mat1 mat2])
Getters
Radiant.get_type — Method
get_type(this::Geometry)Get the type of geometry.
Input Argument(s)
this::Geometry: geometry.
Output Argument(s)
type::String: type of geometry.
Radiant.get_dimension — Method
get_dimension(this::Geometry)Get the dimension of geometry.
Input Argument(s)
this::Geometry: geometry.
Output Argument(s)
dimension::Int64: dimension of geometry.
Radiant.get_axis — Method
get_axis(this::Geometry)Get the axis associated with the geometry.
Input Argument(s)
this::Geometry: geometry.
Output Argument(s)
axis::Vector{String}: axis associated with the geometry.
Radiant.get_number_of_voxels — Method
get_number_of_voxels(this::Geometry)Get the number of voxels along each axis.
Input Argument(s)
this::Geometry: geometry.
Output Argument(s)
number_of_voxels::Vector{Int64}: number of voxels along each axis.
Radiant.get_voxels_width — Method
get_voxels_width(this::Geometry)Get the voxels width along each axis.
Input Argument(s)
this::Geometry: geometry.
Output Argument(s)
voxels_width::Vector{Vector{Float64}}: voxels width along each axis.
Radiant.get_voxels_position — Method
get_voxels_position(this::Geometry,axis::String)Get the voxel position along a specified axis.
Input Argument(s)
this::Geometry: geometry.axis::String: axis.
Output Argument(s)
voxels_position::Vector{Float64}: voxels positions along the axis.
Radiant.get_voxels_position — Method
get_voxels_position(this::Geometry)Get the voxel position along each axis.
Input Argument(s)
this::Geometry: geometry.
Output Argument(s)
voxels_position::Vector{Vector{Float64}}: voxels position along each axis.
Radiant.get_voxels_boundaries — Method
get_voxels_boundaries(this::Geometry,axis::String)Get the voxel boundaries along a specified axis.
Input Argument(s)
this::Geometry: geometry.axis::String: axis.
Output Argument(s)
voxels_boundaries::Vector{Float64}: voxel boundaries along the axis.
Radiant.get_voxels_boundaries — Method
get_voxels_boundaries(this::Geometry)Get the voxel boundaries along each axis.
Input Argument(s)
this::Geometry: geometry.
Output Argument(s)
voxels_boundaries::Vector{Vector{Float64}}: voxels boundaries along each axis.
Radiant.get_material_per_voxel — Method
get_material_per_voxel(this::Geometry)Get the material in each voxel.
Input Argument(s)
this::Geometry: geometry.
Output Argument(s)
material_per_voxel::Array{Float64}: material in each voxel.
Radiant.get_boundary_conditions — Method
get_boundary_conditions(this::Geometry,boundary::String)To get the boundary conditions at the specified boundary.
Input Argument(s)
this::Geometry: geometry.boundary::String: boundary for which the boundary condition is applied, which can takes the following value:boundary = "x-": the lower bound along x-axisboundary = "x+": the upper bound along x-axisboundary = "y-": the lower bound along y-axisboundary = "y+": the upper bound along y-axisboundary = "z-": the lower bound along z-axisboundary = "z+": the upper bound along z-axis
Output Argument(s)
boundary_condition::String: boundary condition at the specified boundary.
Examples
julia> boundary_condition = geo.get_boundary_conditions("x-")Radiant.get_boundary_conditions — Method
get_boundary_conditions(this::Geometry)To get the boundary conditions.
Input Argument(s)
this::Geometry: geometry.
Output Argument(s)
boundary_conditions::Dict{String,String}: boundary conditions.
Examples
julia> boundary_conditions = geo.get_boundary_conditions()