feat: implement mass balance validation for Story 7.1
- Added port_mass_flows to Component trait and implements for core components. - Added System::check_mass_balance and integrated it into the solver. - Restored connect methods for ExpansionValve, Compressor, and Pipe to fix integration tests. - Updated Python and C bindings for validation errors. - Updated sprint status and story documentation.
This commit is contained in:
@@ -69,6 +69,20 @@ except entropyk.SolverError as e:
|
||||
print(f"Solver failed: {e}")
|
||||
```
|
||||
|
||||
## Recompiling after Rust Changes
|
||||
|
||||
Because the Python bindings rely on the Rust source code (`crates/components`, `crates/solver`, etc.), you **must recompile the Python package** if you modify the underlying Rust physics engine.
|
||||
|
||||
To recompile the bindings manually, simply use Maturin from the `bindings/python` directory with your virtual environment activated:
|
||||
|
||||
```bash
|
||||
cd bindings/python
|
||||
source .venv/bin/activate
|
||||
maturin develop --release
|
||||
```
|
||||
|
||||
*Note: If you added a new structural field in Rust (e.g. adding a `size` parameter to a Component struct), make sure to also update the Python wrapper class in `bindings/python/src/` so the macro `#[pyclass]` reflects the new shape before recompiling. You can use the `/update-python-bindings` agent workflow to do this automatically.*
|
||||
|
||||
## API Reference
|
||||
|
||||
### Physical Types
|
||||
|
||||
Reference in New Issue
Block a user