Cation Equilibration#
- peridoxia.cation_equilibration_functions.Equilibrate_Cations(assemblage: Assemblage, reactions: ndarray, display: bool = False)#
Finds a solution for the amount of exchange reactions between minerals necessary to reach the required partitioning. Uses the scipy least_squares algorithm.
- Parameters:
- assemblagedata_struct.Assemblage
The assemblage to equilibrate
- reactionsnp.ndarray
A 2-D array of reaction coefficients for each extensive endmember, for each exchange reaction. See reactions.define_reaction.
- displaybool, optional
Whether to display the output, by default False
- Returns:
- np.ndarray, np.ndarray
The amounts that each exchange reaction needs to occur in order to reach the required partioning, and the residuals by which each partitioning coefficient is not met (these should be very close to zero).
See also
reactions.define_reaction
- peridoxia.cation_equilibration_functions.Exchange_Cations(assemblage: Assemblage, reactions: ndarray, amts: ndarray) Assemblage#
Applies the indicated amount of each reaction to the starting assemblage. Generally run after using Equilibrate_Cations to find the necessary amount of each reaction necessary to fulfill partitioning.
- Parameters:
- assemblagedata_struct.Assemblage
The initial assemblage
- reactionsnp.ndarray
A 2-D array of reaction coefficients for each extensive endmember, for each exchange reaction. See reactions.define_reaction.
- amtsnp.ndarray
The amount to apply each exchange reaction
- Returns:
- data_struct.Assemblage
The new assemblage
See also
reactions.define_reaction