Skip to content

Error capturing for solution initialization - water stability #303

@YitongPan1

Description

@YitongPan1

Description

Problem
During solution initialization, certain combinations of pe and pH can lead to physically inconsistent states, such as:

  • Water splitting

Currently, when such a pe–pH combination is provided, the system fails during the solution equilibrium stage, although this issue could be detected earlier during solution initialization.

Expected Behavior
When initializing a solution:

  • The system should detect invalid or unstable pe–pH combinations that would cause water splitting.
  • A clear and explicit error message should be raised during solution creation, explaining why the initialization failed.

Current Behavior

  • The solution initialization fails to capture an error when certain pe–pH combinations are used.
  • A ValueError is reported during the equilibrium stage, making it difficult to diagnose the root cause.

Suggested Improvement

  • Add a water stability check during solution initialization to evaluate whether the specified pe–pH combination falls within the water stability region of the pe–pH (Eh–pH) diagram.
  • Explicitly catch and report cases where:
    • Water splitting would occur
    • The water stability limits should be evaluated based on the specified temperature
  • Provide a user-friendly error message at initialization time.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions