Skip to content

Elemental Si not conserved in get_total_amount() after equilibration #329

@SuixiongTay

Description

@SuixiongTay

Description

After calling equilibrate(), the get_total_amount("Si") returns double the input concentration. This is relevant to a fix from a previous bug.

Reproducible example

s1=Solution({"Si+4": "0.02 mol/L", "Cl-": "0.02 mol/L"}, balance_charge=None)
s1.equilibrate()
assert np.isclose(s1.get_total_amount("Si", 'mol/L').magnitude, 0.02), s1.get_total_amount("Si", 'mol/L').magnitude

#AssertionError: 0.03999888940384343

We should expect the get_total_amount for elemental Si to be conserved at 0.02 mol/L regardless of speciation. The bug may be an odd case of double counting for both the input and equilibrated Si species.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions