metallurgy.alloy.donate_percentage(composition: Composition, constraints: dict, donor: str, recipient: str)[source]

Adjusts a composition by transferring some percentage from one element (the donor) to another element (the recipient).

Parameters:
composition: Composition

The percentages of the alloy.

constraints: dict

The constraints on the alloy.

donor: str

The element to give away some percentage.

recipient: str

The element to receive some percentage.


Last update: Jun 08, 2023