Hi, developpers of OpenMC,

The “percent_type” argument of “add_element_from_formula” confuses me a little, since it seems that it should not be “wo”. Thus, it may be better to remove this argument and force “percent_type” as “ao”?

Another choice is adding “percent” argument for this method and adding the following modification:

- If “percent_type” is “ao”, the atom percent of each element in formula is “percent” arg multiplied by atom number of this element in formula.

(e.g. call add_element(percent = percent * atom_number, percent_type = “ao”, …) in the last part of the implementation of “add_element_from_formula()”)) - If “percent_type” is “wo”, each element’s weight percent is “percent” arg multiplied by weight percent of this element in the chemical formula.

(e.g. call add_element(percent = percent * element_weight_percent, percent_type = “wo”, …) in the last part of the implementation of “add_element_from_formula()”)

Then users can easily define a material composed of several compounds with different weight or molecule percent. For example, UO2-Gd2O3 fuel with a density a of 10.3g/cm3 can be defined as below:

```
fuel.add_elements_from_formula(“UO2”,percent=0.92,percent_type=”wo”,enrichment=3.2,percent_type=’wo’)
fuel.add_elements_from_formula(“Gd2O3”,percent=0.08,percent_type=”wo”,percent_type=’wo’)
fuel.set_density(10.3)
```

This modification can also make the arguments of this method similar to “add_element” and enables users to call both “add_element_from_formula” and “add_element” for the same openmc.Material object. Just my litte recommendation.

PS: why can’t I log in with my “staged” account?

Best regards,

Yue