ALLSHIFT/docs/04-simulations/shift-input-data.md
pepe 72dd781dbc Organize documentation into docs/ and superseded/
Audit every document in the repository, convert the non-markdown ones into
markdown reports, and split current documentation from outdated material.

docs/ — 31 markdown documents in seven numbered sections. Twenty are new
reports generated from .docx / .pdf / .xlsx / .mlx / .m sources that were
previously unreadable in the browser and undiffable in git. Each report
carries a provenance block (source path, format, MD5) and links back to its
original; all 13 recorded checksums verify against the files on disk.
Machine-extraction losses (PDF table column interleaving, Word OMML
equations, embedded figures) are called out explicitly rather than silently
smoothed over.

superseded/ — outdated material with a documented reason per entry:
two byte-identical ClickUp re-exports, an older revision of the BIDMC/UCSD
energy-flow doc (the retained copy adds the SoC Violation Rate KPI), a
duplicate of Shift input data.docx, the May 2026 simulation plan, the
root PV+Battery.md now covered by a fuller report, GitHub's stock
demo-repository template, and a zero-byte placeholder. Its README also
records what was deliberately NOT retired and why — the "Old Frameworks"
and "Old Simulations" folders hold unique Simulink revisions, and
"Big Ugly Folder" holds the only copy of framework revision 1.3.

Findings worth flagging, all documented in the reports:
- Simulink lineage recovered from each .slx's internal coreProperties.xml
  revision counter. The current model is
  Current Framework/Bobert0206_Initial_Simulation_Framework.slx (rev 2.7);
  the top-level copy is rev 1.3, five revisions behind.
- Simulations/Constants.m is a truncated byte-prefix of the Current
  Framework copy, silently missing H2_leak, H2_cap and E_H2_vol_h.
- The PEM electrolyser and fuel cell are unmodified MathWorks Simscape
  examples still at vendor defaults; the "10x bigger" sizing TODO recorded
  in Constants.m was never carried out.
- controller-claude.m does not compile — undefined P_Electro_max, outputs
  unassigned on several paths.
- The specification set uses two incompatible variable naming conventions
  and disagrees on action-space size (5 vs 16).
- MA_hourly_load.csv (13.7 MB) is the same 35,040 rows as 89993-0.parquet
  (2.4 MB).
- Clinical data is the MIMIC-IV *demo* (ODbL, 100 patients), not full
  MIMIC-IV — redistributable, but the licence and citation are unrecorded.

Housekeeping: untrack 21 Simulink build artefacts (slprj/, *.slxc) and add
ignore rules for them. Root README rewritten around the new layout.

Recruitment notes naming individual candidates are excluded from version
control via .gitignore rather than committed; the generic question template
is kept in docs/07-team-and-operations/.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-25 21:20:33 -07:00

163 lines
6.6 KiB
Markdown

# Shift Input Data — Component Variable List
> **Markdown report of a non-markdown source document.**
>
> | | |
> |---|---|
> | **Source** | `Shift Matlab Drive/Shift Matlab Drive/Simulations/Shift input data.docx` |
> | **Format** | Microsoft Word (.docx) |
> | **MD5** | `b4e1cea6…` — **an identical copy** exists at `Simulations/Old Simulations/Shift input data.docx` |
> | **Author** | Robert (Simulations cluster) |
> | **Status** | Current, but **largely absorbed** by the [Simulator I/O Interface](../02-specifications/simulator-io-interface.md) |
> | **Report generated** | 2026-07-25 |
## What this document is
The first systematic enumeration of every variable each physical component needs — the raw
material from which the
[Simulator I/O Interface](../02-specifications/simulator-io-interface.md) was built. That
document cites this one directly:
> *"Set once per simulation run. These are the constants **Robert's doc** lists in bold."*
> — Simulator I/O Interface §1
It is therefore the **ancestor** of the current simulator contract, not a competitor to it.
It is kept because it records the per-component reasoning (and the alternatives considered)
that the formalised contract compressed away.
## Reading the original
The source document's structure is a single wide table whose header row explains the column
semantics. Extracted verbatim, that header reads:
> Component · Desirable Outputs — constant (if it can be found, good to compare against) ·
> Necessary Inputs — full name (unit) — Which element it applies to (less ideal alternative,
> has to be consistent throughout inputs found) · Other alternatives · Required together ·
> Output data — dynamic · Can most likely be read off the data · Unsure if it can be
> realistically acquired / if it's necessary at all *(post-processing ChatGPT assistance, thus
> it may not actually be needed)*
In practice the column-to-variable assignment does not survive extraction — the body is a flat
list per component. It is reproduced faithfully below, grouped as in the original. **Open the
original `.docx` if you need to know which column a given variable sat in.**
## Variables by component
### Electrolyser
| Symbol | Name |
|---|---|
| `N_c` | Number of cells — electrolyser |
| `P_ele` | Electrolyzer power consumption |
| `mu_F` | Faraday efficiency — electrolyser |
| `I` | Current (A) — electrolyser |
| `n_H2` | Hydrogen flow rate (mol/s) — electrolyser |
| `m_H2` | Hydrogen mass flow rate (kg/s) — electrolyser |
| `v_H2` | Hydrogen volume flow rate (L/s) — electrolyser |
| `P` | Power (W) — electrolyser |
| `V` | Voltage (V) — electrolyser |
Also listed: operating power setpoint · electrolyzer ON/OFF control signal · minimum operating
current · measured hydrogen production rate calibration factor.
### Fuel cell
| Symbol | Name |
|---|---|
| `N_c` | Number of cells — fuel cell |
| `I` | Current (A) — fuel cell |
| `Utilisation` | Percentage (%) — fuel cell |
| `n_H2_in` | Hydrogen flow rate into the fuel cell (mol) |
| `n_H2_used` | Hydrogen flow rate consumed by the fuel cell (mol) |
| `P` | Power (W) — fuel cell |
| `V` | Voltage (V) — fuel cell |
Also listed: fuel cell operating voltage range · maximum fuel cell output power · fuel cell
ON/OFF control signal.
### Hydrogen tank
| Symbol | Name |
|---|---|
| `V_H2` | Volume of hydrogen stored (L) + maximum + initial |
| `T` | Temperature (K) |
| `p` | Atmospheric pressure (atm) |
| `n_H2_in` | Hydrogen flow rate into the tank (mol) |
| `n_H2_used` | Hydrogen flow rate output by tank (mol) |
### PV
| Symbol | Name |
|---|---|
| `mu` | Panel efficiency |
| `P_PV` | Solar panel power |
| — | Irradiance (W/m²) — PV throughout the day |
| `A_PV` | Area of the solar cell |
| `I` | Current (A) — PV |
| `P` | Power (W) — PV |
| `V` | Voltage (V) — PV |
### Battery
| Symbol | Name |
|---|---|
| — | Maximum charge/discharge power |
| `SoC` | State of charge + maximum + initial |
| `E_rated` | Rated voltage |
| `Q_rated` | Rated charge capacity |
| `I` | Current (A) — battery |
| `P` | Power (W) — battery |
| `V` | Voltage (V) — battery |
> [!WARNING]
> `E_rated` is glossed here as **"rated voltage"**. In the
> [Simulator I/O Interface §1.5](../02-specifications/simulator-io-interface.md#15-battery) and
> in [`Constants.mlx`](matlab-live-scripts.md) it is **rated energy capacity in Wh**. The
> later definition is the one in use; this line is an early slip.
### Load (hospital / wards / rooms)
| Symbol | Name |
|---|---|
| `P` | Power (W) |
| `V` | Voltage (V) |
| `I` | Current (A) |
### External power (grid / microgrid)
| Symbol | Name |
|---|---|
| `P` | Power (W) + import/export |
| `V` | Voltage (V) |
| `I` | Current (A) |
| — | Grid availability (ON/OFF) |
| — | Maximum grid connection capacity |
## What changed on the way to the simulator contract
| This document | Simulator I/O Interface | Note |
|---|---|---|
| `N_c`, `mu_F`, `I` per component | `N_c_ele` / `N_c_fc`, `mu_F`, `I_ele_min` | Namespaced per component to remove collisions |
| `V_H2` in L | `V_H2_max` in **L or kg**; `H2_level(t)` in **mol or kg** | Unit still unresolved — flagged TBD there |
| `E_rated` = rated voltage | `E_rated` = rated energy capacity (Wh) | Corrected |
| Per-component `V` and `I` everywhere | Dropped; only `V_load`, `V_grid`, `V_fc_min/max` survive | The simulator is a power-flow model, not a circuit model |
| Operating setpoints listed inline | Split into a distinct §2.2 control-input block (`u_ele`, `u_fc`, `u_batt`, `sw_*`) | Setpoints separated from measurements |
| — | Sign conventions, power-balance invariant, priority rules, KPI block | New — these are the genuinely additive parts |
The one thing this document has that the successor lacks is the **per-component electrical
detail** (`V` and `I` for every element). If the project ever moves from power-flow to circuit
simulation — for example to use the PowerWorld model — this list is the starting point.
## Duplicate copy
An identical file (same MD5) sits at
`Shift Matlab Drive/Shift Matlab Drive/Simulations/Old Simulations/Shift input data.docx`. The
copy in `Old Simulations/` is retired to [`superseded/`](../../superseded/); the one in
`Simulations/` remains.
## Related
- [Simulator I/O Interface](../02-specifications/simulator-io-interface.md) — the formalised successor
- [MATLAB Live Scripts](matlab-live-scripts.md) — `Constants.mlx` implements a subset of these
- [PV + Battery Simulink Model](pv-battery-simulink.md)
- [BIDMC Digital Twin Readiness Checklist](../03-energy-management/bidmc-digital-twin-readiness-checklist.md) — repeatedly refers to "Shift data" meaning this variable set