Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Electrodialysis Experiment

A Python package for simulating electrodialysis experiments to assist electrodialysis process design, control, and optimization.

Installation

Recommended Setup (IDAES + editable install)

If you use IDAES-managed solver binaries (recommended for this project), do this in a fresh conda environment:

conda create -n edexp python=3.11 -y
conda activate edexp
pip install -e .
idaes get-extensions

For development and tests, use:

pip install -e ".[dev]"

For this package, use the WaterTAP IPOPT wrapper for process initialization and NLP solves:

from idaes.core.solvers import get_solver

solver = get_solver("ipopt-watertap")

This is the package default expectation for initialization and NLP solves.

Verify IPOPT + MA27 from Python:

python - <<'PY'
import watertap_solvers
from idaes.core.solvers import get_solver
from pyomo.environ import ConcreteModel, Var, Objective, Constraint, minimize

s = get_solver("ipopt-watertap")
print("IPOPT available:", s.available(exception_flag=False))

m = ConcreteModel()
m.x = Var(initialize=1.0)
m.obj = Objective(expr=(m.x - 2.0)**2, sense=minimize)
m.c = Constraint(expr=m.x >= 0)

s.options["linear_solver"] = "ma27"
res = s.solve(m, tee=False)
print("Termination:", res.solver.termination_condition)
PY

Notes:

  • If you use idaes get-extensions, you generally do not need a separate conda install ipopt.

Prerequisites

  • Python: 3.9-3.11 (see pyproject.toml)
  • IPOPT available on PATH (preferred linear solver: ma27)
  • Fast tests: pytest -m "not slow"
  • Full tests: pytest

Demo Files

All current demo files in scripts/demos/:

  • scripts/demos/model_training_walkthrough.ipynb
  • scripts/demos/demo_ossp_proc.py
  • scripts/demos/demo_kssp_proc_k2.py

Documentation

Project documentation lives in docs/.

  • Main entry: docs/index.rst
  • Workflow overview: docs/simulation-workflows.md
  • Docs map: docs/README.md

Project Structure

ELECTRODIALYSIS_EXPERIMENT/
├─ src/electrodialysis_experiment/   # Core package code
├─ scripts/                          # Runner scripts
├─ docs/                             # Project documentation
├─ tests/                            # Unit tests
├─ pyproject.toml                    # Build and dependency info
└─ README.md                         # Project description

License

Electrodialysis_Experiment is part of the WaterTAP software platform and shares the same license and copyright as WaterTAP. See LICENSE.md and COPYRIGHT.md in the repository root.

Contact

Main contact: Xiangyu Bi (xbi@lbl.gov)

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages