Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ PathSim-Chem extends the [PathSim](https://github.com/pathsim/pathsim) simulatio
- **Excess Enthalpy & Departure** — NRTL, UNIQUAC, Wilson, Redlich-Kister excess enthalpy and EoS departure functions
- **Chemical Reactions** — Equilibrium constants, kinetic rate constants, and power-law rate expressions
- **Process Unit Operations** — CSTR, counter-current heat exchanger, flash drum, and distillation tray blocks with full ODE dynamics
- **Tritium Processing** — GLC columns, TCAP cascades, bubblers, and splitters for tritium separation
- **Residence Time Models** — first order residence time blocks for process and fuel cycle models. The tritium blocks (GLC, bubbler, ionisation chamber) have moved to [pathsim-fusion](https://github.com/pathsim/pathsim-fusion), the splitter to pathsim core

## Install

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ classifiers = [
"Topic :: Scientific/Engineering",
]
dependencies = [
# GLC block uses pathsim.blocks.BVP1D, introduced in pathsim 0.23
"pathsim>=0.23",
# Splitter alias points to pathsim.blocks.Splitter, introduced in pathsim 0.29
"pathsim>=0.29",
"numpy>=1.15",
"scipy>=1.2",
# If a dependency ships native code that can't be installed in Pyodide,
Expand Down
5 changes: 5 additions & 0 deletions src/pathsim_chem/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@
from .thermodynamics import *
from .process import *
from .neutronics import *


def __getattr__(name):
"""Deprecated aliases for the blocks that moved, see 'tritium'"""
return getattr(tritium, name)
2 changes: 1 addition & 1 deletion src/pathsim_chem/tritium/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Tritium Toolbox

This module contains blocks for nuclear fusion modeling. Especially for tritium cycle modeling.
This module contains residence time blocks for fuel cycle modeling. The tritium blocks (GLC, bubbler, ionisation chamber) have moved to [pathsim-fusion](https://github.com/pathsim/pathsim-fusion), the splitter to pathsim core.
37 changes: 33 additions & 4 deletions src/pathsim_chem/tritium/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
from .residencetime import *
from .splitter import *
from .bubbler import *
from .glc import *
from .ionisation_chamber import *
# from .tcap import *


#blocks that moved to pathsim core and to pathsim-fusion, still accessible
#from here as deprecated aliases -> (module, package)
_MOVED = {
"Splitter": ("pathsim.blocks", "pathsim"),
"GLC": ("pathsim_fusion", "pathsim-fusion"),
"Bubbler4": ("pathsim_fusion", "pathsim-fusion"),
"IonisationChamber": ("pathsim_fusion", "pathsim-fusion"),
}


def __getattr__(name):
"""Deprecated aliases for the blocks that moved, they are resolved
on access and are not registered as blocks of this package.
"""
import importlib
import warnings

if name not in _MOVED:
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")

module, package = _MOVED[name]
warnings.warn(
f"'{name}' has moved to '{module}', import it from there",
DeprecationWarning,
stacklevel=2
)

try:
return getattr(importlib.import_module(module), name)
except ImportError as e:
raise ImportError(f"'{name}' has moved to {package}: pip install {package}") from e
217 changes: 0 additions & 217 deletions src/pathsim_chem/tritium/bubbler.py

This file was deleted.

Loading
Loading