Material
Structure
Radiant.Material — Type
MaterialStructure used to define a material and its properties.
Mandatory field(s)
name::String: name (or identifier) of the Material structure.density::Float64: density [in g/cm³].elements::Vector{String}: vector of the element in the composition of the material.weight_fractions::Vector{Float64}: vector of the weight fraction for each element in the composition of the material.
Optional field(s) - with default values
state_of_matter::String = "solid": state of the matter.
Constructors and Setters
Radiant.set_tag — Method
set_tag(this::Material,tag::String)Set the tag (string identifier) of the material.
Input Argument(s)
this::Material: material.tag::String: tag.
Examples
julia> mat = Material()
julia> mat.set_tag("water")Radiant.set_density — Method
set_density(this::Material,density::Real)To set the density of the material.
Input Argument(s)
this::Material: material.density::Real: density [in g/cm³].
Output Argument(s)
N/A
Examples
julia> mat.set_density(19.3)Radiant.set_state_of_matter — Method
set_state_of_matter(this::Material,state_of_matter::String)To set the state of the matter (solid or liquid or gaz).
Input Argument(s)
this::Material: material.state_of_matter::String: state of matter, which value is given by "solid", "liquid" or "gaz".
Output Argument(s)
N/A
Examples
julia> mat.set_state_of_matter("liquid")Radiant.add_element — Method
add_element(this::Material,symbol::String,weight_fraction::Real=1)To add an element which is part of the composition of the material.
Input Argument(s)
this::Material: material.symbol::String: element symbol, with value such as "H", "He", etc.weight_fraction::Real: weight fraction of the element in the material (between 0 and 1).
Output Argument(s)
N/A
Examples
julia> water.add_element("H",0.1111)
julia> water.add_element("O",0.8889)Getters
Radiant.get_tag — Method
get_tag(this::Material)Get the tag (string identifier) of the material.
Input Argument(s)
this::Material: material.
Output Argument(s)
tag::String: tag of the material.
Examples
julia> tag = mat.get_tag()Radiant.get_density — Method
get_density(this::Material)To get the density of the material.
Input Argument(s)
this::Material: material.
Output Argument(s)
density::Real: density [in g/cm³].
Examples
julia> density = mat.get_density()Radiant.get_state_of_matter — Method
get_state_of_matter(this::Material)To get the state of matter of the material.
Input Argument(s)
this::Material: material.
Output Argument(s)
state_of_matter::String: state of matter.
Examples
julia> state_of_matter = mat.get_state_of_matter()Radiant.get_number_of_elements — Method
get_number_of_elements(this::Material)To get the number of elements in the material composition.
Input Argument(s)
this::Material: material.
Output Argument(s)
number_of_elements::Int64: number of elements.
Examples
julia> N = mat.get_number_of_elements()Radiant.get_atomic_numbers — Method
get_atomic_numbers(this::Material)To get the atomic numbers of the elements in the material composition.
Input Argument(s)
this::Material: material.
Output Argument(s)
atomic_numbers::Vector{Int64}: atomic numbers.
Examples
julia> atomic_number = mat.get_atomic_numbers()Radiant.get_weight_fractions — Method
get_weight_fractions(this::Material)To get the weight fractions associated with the elements in the material composition.
Input Argument(s)
this::Material: material.
Output Argument(s)
weight_fractions::Vector{Float64}: weight fractions.
Examples
julia> weight_fractions = mat.weight_fractions()Printing
Base.println — Method
println(this::Material)To print the material properties.
Input Argument(s)
this::Material: material.
Output Argument(s)
N/A