Material

Structure

Radiant.MaterialType
Material

Structure 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.
source

Constructors and Setters

Radiant.set_tagMethod
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")
source
Radiant.set_densityMethod
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)
source
Radiant.set_state_of_matterMethod
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")
source
Radiant.add_elementMethod
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)
source

Getters

Radiant.get_tagMethod
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()
source
Radiant.get_densityMethod
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()
source
Radiant.get_state_of_matterMethod
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()
source
Radiant.get_number_of_elementsMethod
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()
source
Radiant.get_atomic_numbersMethod
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()
source
Radiant.get_weight_fractionsMethod
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()
source

Printing

Base.printlnMethod
println(this::Material)

To print the material properties.

Input Argument(s)

  • this::Material : material.

Output Argument(s)

N/A

source