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

Methods

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