docs(bmad): Add Hierarchical Subsystems (FR48) to PRD, Arch, Epics and Sprint
This commit is contained in:
@@ -283,6 +283,32 @@ impl Compressor<Disconnected> {
|
||||
- Extensible pour composants custom (e.g., Ejecteur de Robert)
|
||||
- AHRI 540 coefficients intégrés dans struct Compressor
|
||||
|
||||
### Hierarchical Subsystems (MacroComponents)
|
||||
|
||||
**Decision:** Wrapper Pattern matching the `Component` trait
|
||||
|
||||
**Core Pattern:**
|
||||
```rust
|
||||
struct MacroComponent {
|
||||
internal_system: System,
|
||||
port_mapping: HashMap<PortId, InternalLocation>, /* e.g., Exposes 'Condenser Water In' */
|
||||
}
|
||||
|
||||
impl Component for MacroComponent {
|
||||
fn compute_residuals(&self, state: &SystemState, residuals: &mut ResidualVector) {
|
||||
// Delegates or flattens computation to internal_system
|
||||
self.internal_system.compute_residuals(state, residuals);
|
||||
}
|
||||
// ... maps external ports to internal boundary ports ...
|
||||
}
|
||||
```
|
||||
|
||||
**Rationale:**
|
||||
- Allows users to build reusable blocks (like a full Chiller, Air Handling Unit)
|
||||
- Mimics Modelica/Simulink ecosystem composability
|
||||
- The global solver treats `MacroComponent` exactly like a basic Component, preserving zero-cost abstractions
|
||||
- `SystemState` flattening ensures equations are solved simultaneously globally, avoiding nested numerical solver delays.
|
||||
|
||||
### Fluid Properties Backend
|
||||
|
||||
**Decision:** Trait abstraction with multiple backends
|
||||
@@ -794,7 +820,7 @@ pub trait Solver {
|
||||
| Feature | FRs | Location |
|
||||
|---------|-----|----------|
|
||||
| Component Modeling | FR1-FR8 | `crates/components/src/` |
|
||||
| System Topology | FR9-FR13 | `crates/solver/src/system.rs` |
|
||||
| System Topology | FR9-FR13, FR48 | `crates/solver/src/system.rs` & `macro_component.rs` |
|
||||
| Solver Engine | FR14-FR21 | `crates/solver/src/strategies/` |
|
||||
| Inverse Control | FR22-FR24 | `crates/solver/src/inverse/` |
|
||||
| Fluid Properties | FR25-FR29 | `crates/fluids/src/` |
|
||||
|
||||
Reference in New Issue
Block a user