Cross_Sections
Structure
Radiant.Cross_Sections — Type
Cross_Sections
Structure used to define the parameters to extract or build a multigroup cross-sections library.
Mandatory field(s)
source::String: source of the cross-sections.materials::Vector{Material}: material list.- if
source = "fmac-m"file::String: file containing cross-sections data.
- if
source = "physics-models"particles::Vector{String}: particle list.energy::Float64: midpoint energy of the highest energy group [in MeV].number_of_groups::Int64: number of energy groups.group_structure::String="log": type of group discretization.legendre_order::Int64: maximum order of the angular Legendre moments of the differential cross-sections.interactions::Vector{Interaction}: list of interaction.
- ** if
source = "custom"**particles::Vector{String}: particle list.
Optional field(s) - with default values
- if
source = "physics-models"cutoff::Float64 = 0.001: lower energy bound of the lowest energy group (cutoff energy) [in MeV].
- ** if
source = "custom"**custom_absorption::Vector{Real}: absorption cross-sections per material.custom_scattering::Vector{Real}: scattering (isotropic) cross-sections per material.
Build and File I/O
Radiant.build — Method
build(this::Cross_Sections)To build the cross-section library.
Input Argument(s)
this::Cross_Sections: cross-sections library.
Output Argument(s)
N/A
Examples
julia> cs = Cross_Sections()
julia> ... # Defining the cross-sections library properties
julia> cs.build()Radiant.write — Method
write(this::Cross_Sections,file::String,format::String="fmac-m",binary::Bool=false)To write a file containing the cross-sections library in the requested format.
Input Argument(s)
this::Cross_Sections: cross-sections library.file::String: file name and directory.format::String: output format, either"fmac-m"(default) or"matxs".binary::Bool: write the binary encoding (MATXS only, not yet implemented).
Output Argument(s)
N/A
Examples
julia> cs = Cross_Sections()
julia> ... # Defining the cross-sections library properties
julia> cs.write("fmac_m.txt")
julia> cs.write("library.matxs","matxs")Setters
Radiant.set_source — Method
set_source(this::Cross_Sections,source::String)To define the source of the cross-sections library.
Input Argument(s)
this::Cross_Sections: cross-sections library.source::String: source of the cross-sections library which is either:source = "physics-models": multigroup cross-sections are produced by Radiantsource = "FMAC-M": multigroup cross-sections are extracted from FMAC-M file.
Output Argument(s)
N/A
Examples
julia> cs = Cross_Sections()
julia> cs.set_source("FMAC-M")Radiant.set_file — Method
set_file(this::Cross_Sections,file::String)To read a FMAC-M formatted file containing the cross-sections library.
Input Argument(s)
this::Cross_Sections: cross-sections library.file::String: file name and directory.
Output Argument(s)
N/A
Examples
julia> cs = Cross_Sections()
julia> cs.set_file("fmac_m.txt")Radiant.set_materials — Method
set_materials(this::Cross_Sections,materials::Vector{Material})To set the list of material, either contained in FMAC-M file in order, or to produce in Radiant.
Input Argument(s)
this::Cross_Sections: cross-sections library.materials::Vector{Material}: material list.
Output Argument(s)
N/A
Examples
julia> mat1 = Material(); mat2 = Material()
julia> ... # Defining the material properties
julia> cs = Cross_Sections()
julia> cs.set_materials([mat1,mat2])Radiant.set_particles — Method
set_particles(this::Cross_Sections,particles::Union{Vector{Particle},Particle})To set the list of particles for which to produce coupled library of cross-sections.
Input Argument(s)
this::Cross_Sections: cross-sections library.particles::Vector{Particle}: particles list.
Output Argument(s)
N/A
Examples
julia> cs = Cross_Sections()
julia> cs.set_particles([electron,photon,positron])Radiant.set_energy — Method
set_energy(this::Cross_Sections,energy::Vector{Float64})To set the midpoint energy of the highest energy group per particle.
Input Argument(s)
this::Cross_Sections: cross-sections library.energy::Vector{Float64}: midpoint energy of the highest energy group.
Output Argument(s)
N/A
Examples
julia> cs = Cross_Sections()
julia> cs.set_energy([3.0,3.0,3.0])Radiant.set_cutoff — Method
set_cutoff(this::Cross_Sections,cutoff::Vector{Float64})To set the cutoff energy (lower bound of the lowest energy group) per particle.
Input Argument(s)
this::Cross_Sections: cross-sections library.cutoff::Vector{Float64}: cutoff energy (lower bound of the lowest energy group)
Output Argument(s)
N/A
Examples
julia> cs = Cross_Sections()
julia> cs.set_cutoff([0.05,0.1,0.05])Radiant.set_number_of_groups — Method
set_number_of_groups(this::Cross_Sections,number_of_groups::Vector{Int64})To set the number of energy groups per particle.
Input Argument(s)
this::Cross_Sections: cross-sections library.number_of_groups::Vector{Int64}: number of energy groups per particle in order with the particle list.
Output Argument(s)
N/A
Examples
julia> cs = Cross_Sections()
julia> cs.set_particles([electron,photon,positron])
julia> cs.set_number_of_groups([80,20,80]) # 80 groups with electrons and positrons, 20 with photonsRadiant.set_group_structure — Method
set_group_structure(this::Cross_Sections,group_structure::Vector{Real})To set the energy group discretization structure (default).
Input Argument(s)
this::Cross_Sections: cross-sections library.group_structure::Vector{Real}: energy group boundaries.
Output Argument(s)
N/A
Examples
julia> cs = Cross_Sections()
julia> cs.set_group_structure([1.0,0.5,0.1]) # 2 energy groups, cutoff of 0.1
julia> cs.set_group_structure([0.1,0.5,1.0]) # EquivalentRadiant.set_group_structure — Method
set_group_structure(this::Cross_Sections,particle::Particle,
group_structure::Vector{Real})To set the energy group discretization structure for a given particle.
Input Argument(s)
this::Cross_Sections: cross-sections library.particle::Particle: particle associated with the discretization (overwrite default).group_structure::Vector{Real}: energy group boundaries.
Output Argument(s)
N/A
Examples
julia> electron = Electron()
julia> cs = Cross_Sections()
julia> cs.set_group_structure(electron,[1.0,0.5,0.1]) # 2 energy groups, cutoff of 0.1
julia> cs.set_group_structure(electron,[0.1,0.5,1.0]) # EquivalentRadiant.set_group_structure — Method
set_group_structure(this::Cross_Sections,type::String,Ng::Int64,E::Real,Ec::Real)To set the energy group discretization structure (default).
Input Argument(s)
this::Cross_Sections: cross-sections library.type::String: type of discretization, which can takes the following values:linear: linear discretization.log: logarithmic discretization.
Ng::Int64: number of energy groups.E::Real: midpoint energy of the highest energy group.Ec::Real: cutoff energy.
Output Argument(s)
N/A
Examples
julia> cs = Cross_Sections()
julia> cs.set_group_structure("log",10,10.0,0.001)Radiant.set_group_structure — Method
set_group_structure(this::Cross_Sections,particle::Particle,type::String,Ng::Int64,
E::Real,Ec::Real)To set the energy group discretization structure for a given particle.
Input Argument(s)
this::Cross_Sections: cross-sections library.'particle::Particle: particle associated with the discretization (overwrite default).type::String: type of discretization, which can takes the following values:linear: linear discretization.log: logarithmic discretization.
Ng::Int64: number of energy groups.E::Real: midpoint energy of the highest energy group.Ec::Real: cutoff energy.
Output Argument(s)
N/A
Examples
julia> electron = Electron()
julia> cs = Cross_Sections()
julia> cs.set_group_structure(electron,"log",10,10.0,0.001)Radiant.set_interactions — Method
set_interactions(this::Cross_Sections,interactions::Vector{Interaction})To set the interaction to take into account in the library of cross-sections.
Input Argument(s)
this::Cross_Sections: cross-sections library.interactions::Vector{Interaction}: list of interactions to use in the production of the cross-sections library.
Output Argument(s)
N/A
Examples
julia> cs = Cross_Sections()
julia> cs.set_particles([electron])
julia> cs.set_interactions([Elastic_Collision(),Inelastic_Collision(),Bremsstrahlung(), Auger()])Radiant.set_legendre_order — Method
set_legendre_order(this::Cross_Sections,legendre_order::Int64)To set the maximum order of the Legendre expansion of the differential cross-sections.
Input Argument(s)
this::Cross_Sections: cross-sections library.legendre_order::Int64: maximum order of the Legendre expansion of the differential cross-sections.
Output Argument(s)
N/A
Examples
julia> cs = Cross_Sections()
julia> cs.set_legendre_order(7)Radiant.set_absorption — Method
set_absorption(this::Cross_Sections,Σa::Vector{Float64})To set absorption cross-sections.
Input Argument(s)
this::Cross_Sections: cross-sections library.Σa::Vector{Float64}: absorption cross-sections.
Output Argument(s)
N/A
Radiant.set_scattering — Method
set_scattering(this::Cross_Sections,Σs::Vector{Float64})To set isotropic scattering cross-sections.
Input Argument(s)
this::Cross_Sections: cross-sections library.Σs::Vector{Float64}: scattering cross-sections.
Output Argument(s)
N/A
Library Metadata Getters
Radiant.get_file — Method
get_file(this::Cross_Sections)Get the file directory and name.
Input Argument(s)
this::Cross_Sections: cross-sections library.
Output Argument(s)
file::String: file directory and name.
Radiant.get_number_of_materials — Method
get_number_of_materials(this::Cross_Sections)Get the number of material.
Input Argument(s)
this::Cross_Sections: cross-sections library.
Output Argument(s)
number_of_materials::Int64: number of material.
Radiant.get_materials — Method
get_materials(this::Cross_Sections)Get the material list.
Input Argument(s)
this::Cross_Sections: cross-sections library.
Output Argument(s)
materials::Vector{Material}: material list.
Radiant.get_number_of_particles — Method
get_number_of_particles(this::Cross_Sections)Get the number of particles.
Input Argument(s)
this::Cross_Sections: cross-sections library.
Output Argument(s)
number_of_particles::Int64: number of particles.
Radiant.get_particles — Method
get_particles(this::Cross_Sections)Get the particle list.
Input Argument(s)
this::Cross_Sections: cross-sections library.
Output Argument(s)
particles::Vector{Particle}: particle list.
Radiant.get_particle — Method
get_particle(this::Cross_Sections,tag::String)
get_particle(this::Cross_Sections,type::Type)Get a stored particle from the cross-sections library by tag (e.g. "electron") or by abstract type (e.g. Electron). Useful after loading a Cross_Sections from disk to retrieve particles instead of recreating them in a new session.
Input Argument(s)
this::Cross_Sections: cross-sections library.tag::Stringortype::Type: particle tag or particle type.
Output Argument(s)
particle::Particle: matching particle stored in the library.
Radiant.get_material — Method
get_material(this::Cross_Sections,tag::String)Get a stored material from the cross-sections library by tag.
Input Argument(s)
this::Cross_Sections: cross-sections library.tag::String: material tag.
Output Argument(s)
material::Material: matching material stored in the library.
Radiant.get_densities — Method
get_densities(this::Cross_Sections)Get the material densities.
Input Argument(s)
this::Cross_Sections: cross-sections library.
Output Argument(s)
ρ::Vector{Float64}: densities.
Radiant.get_energy — Method
get_energy(this::Cross_Sections)Get the midpoint energy of the highest energy group.
Input Argument(s)
this::Cross_Sections: cross-sections library.
Output Argument(s)
energy::Float64: midpoint energy of the highest energy group.
Radiant.get_cutoff — Method
get_cutoff(this::Cross_Sections)Get the cutoff energy.
Input Argument(s)
this::Cross_Sections: cross-sections library.
Output Argument(s)
cutoff::Float64: cutoff energy.
Radiant.get_legendre_order — Method
get_legendre_order(this::Cross_Sections)Get the Legendre truncation order.
Input Argument(s)
this::Cross_Sections: cross-sections library.
Output Argument(s)
legendre_order::Int64: Legendre truncation order.
Radiant.get_group_structure — Method
get_group_structure(this::Cross_Sections)Get the type of group structure.
Input Argument(s)
this::Cross_Sections: cross-sections library.
Output Argument(s)
group_structure::String: type of group structure.
Radiant.get_interactions — Method
get_interactions(this::Cross_Sections)Get the interaction list.
Input Argument(s)
this::Cross_Sections: cross-sections library.
Output Argument(s)
interactions::Vector{Interation}: interaction list.
Per-Particle Energy Structure
Radiant.get_number_of_groups — Method
get_number_of_groups(this::Cross_Sections)Get the number of groups for each particle.
Input Argument(s)
this::Cross_Sections: cross-sections library.
Output Argument(s)
number_of_groups::Vector{Int64}: number of groups for each particle.
Radiant.get_number_of_groups — Method
get_number_of_groups(this::Cross_Sections,particle::Particle)Get the number of groups for a specified particle.
Input Argument(s)
this::Cross_Sections: cross-sections library.particle::Particle: particle.
Output Argument(s)
number_of_groups::Int64: number of groups.
Radiant.get_energy_boundaries — Method
get_energy_boundaries(this::Cross_Sections,particle::Particle)Get the energy boundaries for a specified particle.
Input Argument(s)
this::Cross_Sections: cross-sections library.particle::Particle: particle.
Output Argument(s)
energy_boundaries::Vector{Float64}: energy boundaries.
Radiant.get_energies — Method
get_energies(this::Cross_Sections,particle::Particle)Get the group midpoint energies for a specified particle.
Input Argument(s)
this::Cross_Sections: cross-sections library.particle::Particle: particle.
Output Argument(s)
energies::Vector{Float64}: group midpoint energies.
Radiant.get_energy_width — Method
get_energy_width(this::Cross_Sections,particle::Particle)Get the energy group width for a specified particle.
Input Argument(s)
this::Cross_Sections: cross-sections library.particle::Particle: particle.
Output Argument(s)
width::Vector{Float64}: energy group width.
Multigroup Data Getters
Radiant.get_absorption — Method
get_absorption(this::Cross_Sections,particle::Particle)Get the absorption cross-sections for a specified particle.
Input Argument(s)
this::Cross_Sections: cross-sections library.particle::Particle: particle.
Output Argument(s)
Σa::Array{Float64}: absorption cross-sections.
Radiant.get_total — Method
get_total(this::Cross_Sections,particle::Particle)Get the total cross-sections for a specified particle.
Input Argument(s)
this::Cross_Sections: cross-sections library.particle::Particle: particle.
Output Argument(s)
Σt::Array{Float64}: total cross-sections.
Radiant.get_scattering — Method
get_scattering(this::Cross_Sections,particle_in::Particle,particle_out::Particle,
legendre_order::Int64)Get the Legendre moments of the scattering cross-sections for a specified incoming and outgoing particle.
Input Argument(s)
this::Cross_Sections: cross-sections library.particle_in::Particle: incoming particle.particle_out::Particle: outgoing particle.L::Int64: Legendre truncation order.
Output Argument(s)
Σs::Array{Float64}: Legendre moments of the scattering cross-sections.
Radiant.get_stopping_powers — Method
get_stopping_powers(this::Cross_Sections,particle::Particle)Get the stopping powers for a specified particle.
Input Argument(s)
this::Cross_Sections: cross-sections library.particle::Particle: particle.
Output Argument(s)
S::Array{Float64}: stopping powers.
Radiant.get_boundary_stopping_powers — Method
get_boundary_stopping_powers(this::Cross_Sections,particle::Particle)Get the stopping powers at group boundaries for a specified particle.
Input Argument(s)
this::Cross_Sections: cross-sections library.particle::Particle: particle.
Output Argument(s)
S::Array{Float64}: stopping powers at group boundaries.
Radiant.get_momentum_transfer — Method
get_momentum_transfer(this::Cross_Sections,particle::Particle)Get the momentum transfers for a specified particle.
Input Argument(s)
this::Cross_Sections: cross-sections library.particle::Particle: particle.
Output Argument(s)
T::Array{Float64}: momentum transfers.
Radiant.get_energy_deposition — Method
get_energy_deposition(this::Cross_Sections,particle::Particle)Get the energy deposition cross-sections for a specified particle.
Input Argument(s)
this::Cross_Sections: cross-sections library.particle::Particle: particle.
Output Argument(s)
Σe::Array{Float64}: energy deposition cross-sections.
Radiant.get_charge_deposition — Method
get_charge_deposition(this::Cross_Sections,particle::Particle)Get the charge deposition cross-sections for a specified particle.
Input Argument(s)
this::Cross_Sections: cross-sections library.particle::Particle: particle.
Output Argument(s)
Σe::Array{Float64}: charge deposition cross-sections.