Explore Angle

Material data specification

The structure of material files ( “.matx” extension) differs depending on in which form the material was specified.

In case when the material is specified as the mixture of elements, the material files contain a set of “element” elements (one for each element used in the material), enclosed by a single “elements” element, inside the single “ material” element:

<material name=str density=float>
  <elements>
    <element symbol=str massFraction=float />
    ...
    <element symbol=str massFraction=float />
  </elements>
</material>

Attribute “density” should have the value of the material density in g/cm3.

Attribute “massFraction” represents the mass fraction for the element defined with the “symbol” attribute (in percentages). The sum of all specified mass fractions must be equal to 100.

Example

This example illustrates the specification of a material named “Polypropylene” with a density of 0.855 g/cm3. It consists of two elements: Carbon (symbol “C”, mass share 85.629%) and Hydrogen (symbol “H”, mass share 14.371%).

<?xml version="1.0" encoding="utf-8"?>
<angle generator="ANGLE" version="4.0" build="5.0.0.274" units="mm">
  <material name="Polypropylene" density="0.855">
  <elements>
    <element symbol="C" massFraction="85.629" />
    <element symbol="H" massFraction="14.371" />
  </elements>
  </material>
</angle>

When material is specified as the compound, the material files also contain a set of “element” elements (one for each element used in the material), enclosed by a single “compound” element, inside the single “material” element:

<material name=str density=float>
  <compound chemicalFormula=str>
    <element symbol=str atoms=int />
    ...
    <element symbol=str atoms=int />
  </compound>
</material>

Attribute “density” should have the value of the material density in g/cm3.

Attribute “chemicalFormula” is optional and it contains the chemical formula.

Attribute “atoms” represents the number of atoms of the element defined with the “symbol” attribute.

Example

This example illustrates the specification of a material named “Calcium carbonate” with a density of 2.71 g/cm3, whose chemical formula is CaCO3.

<?xml version="1.0" encoding="utf-8"?>
<angle generator="ANGLE" version="5.0" build="5.0.0.274" units="mm">
  <material name="Calcium carbonate" density="2.71">
  <compound chemicalFormula="CaCO3">
    <element symbol="Ca" atoms="1" />
    <element symbol="C" atoms="1" />
    <element symbol="O" atoms="3" />
  </compound>
  </material>
</angle>

Finally, if the material is specified as the mixture of compounds, the material files will contain a set of “compounds” elements, enclosed by a single “compound”:

<material name=str density=float>
  <compounds>
    <compound massFraction=float chemicalFormula=str>
      <element symbol=str atoms=int />
      ...
      <element symbol=str atoms=int />
    </compound>
    ...
  </compounds>
</material>

Attribute “massFraction” represents the mass fraction of each compound (in percentages). The sum of all specified mass fractions must be equal to 100.

Example

This example illustrates the specification of a 4% mixture of salt (sodium chloride) dissolved in water.

<?xml version="1.0" encoding="utf-8"?>
<angle generator="ANGLE" version="5.0" build="5.0.0.274" units="mm">
  <material name="4% NaCl" density="1.047">
    <compounds>
      <compound massFraction="96" chemicalFormula="H4O">
        <element symbol="H" atoms="2" />
        <element symbol="O" atoms="1" />
      </compound>
      <compound massFraction="4" chemicalFormula="NaCl">
        <element symbol="Na" atoms="1" />
        <element symbol="Cl" atoms="1" />
      </compound>
    </compounds>
  </material>
</angle>

Predefined materials

Angle comes with a set of 19 predefined materials:

  • Air
  • Aluminium
  • Aluminium oxide
  • Beryllium
  • Brass
  • Calcium carbonate
  • Carbon fiber
  • Copper
  • Germanium
  • Glass
  • Gold
  • Magnesium
  • Magnesium oxide
  • Mylar/PET
  • NaI
  • Nickel
  • Plastic
  • Silicone
  • Water

You can select any of these materials simply by specifying only their name, as in this example:

<material name="Water" />

Since XML is case sensitive, you need to specify the name of a built-in material name exactly as given. For example, “Water” will be interpreted correctly, but “water” or “WATER” will not.