hydrogen-station-sim 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. hydrogen_station_sim-0.1.2/.gitignore +45 -0
  2. hydrogen_station_sim-0.1.2/CITATION.cff +22 -0
  3. hydrogen_station_sim-0.1.2/LICENSE +21 -0
  4. hydrogen_station_sim-0.1.2/PKG-INFO +301 -0
  5. hydrogen_station_sim-0.1.2/README.md +247 -0
  6. hydrogen_station_sim-0.1.2/designs/monitor-20260927/README.md +23 -0
  7. hydrogen_station_sim-0.1.2/designs/monitor-20260927/vendor/three/LICENSE +21 -0
  8. hydrogen_station_sim-0.1.2/pyproject.toml +80 -0
  9. hydrogen_station_sim-0.1.2/src/h2station/__init__.py +233 -0
  10. hydrogen_station_sim-0.1.2/src/h2station/__main__.py +7 -0
  11. hydrogen_station_sim-0.1.2/src/h2station/api.py +5345 -0
  12. hydrogen_station_sim-0.1.2/src/h2station/apparatus_release_validation.py +380 -0
  13. hydrogen_station_sim-0.1.2/src/h2station/calibration_profiles.py +535 -0
  14. hydrogen_station_sim-0.1.2/src/h2station/cli.py +19 -0
  15. hydrogen_station_sim-0.1.2/src/h2station/component_bundle_evidence.py +275 -0
  16. hydrogen_station_sim-0.1.2/src/h2station/components.py +520 -0
  17. hydrogen_station_sim-0.1.2/src/h2station/confidential_cascade_sequence_holdout.py +391 -0
  18. hydrogen_station_sim-0.1.2/src/h2station/confidential_history_profile.py +321 -0
  19. hydrogen_station_sim-0.1.2/src/h2station/confidential_lifecycle_pressure_alignment.py +557 -0
  20. hydrogen_station_sim-0.1.2/src/h2station/confidential_pressure_cycle_filtered_holdout.py +237 -0
  21. hydrogen_station_sim-0.1.2/src/h2station/confidential_pressure_cycle_holdout.py +360 -0
  22. hydrogen_station_sim-0.1.2/src/h2station/confidential_pressure_cycle_ordered_holdout.py +216 -0
  23. hydrogen_station_sim-0.1.2/src/h2station/confidential_recharge_flow.py +350 -0
  24. hydrogen_station_sim-0.1.2/src/h2station/confidential_recharge_forecast.py +557 -0
  25. hydrogen_station_sim-0.1.2/src/h2station/confidential_signal_consistency.py +481 -0
  26. hydrogen_station_sim-0.1.2/src/h2station/controlled_station_replay.py +1133 -0
  27. hydrogen_station_sim-0.1.2/src/h2station/data/emergency_playbooks.json +615 -0
  28. hydrogen_station_sim-0.1.2/src/h2station/data/hazop.sqlite3 +0 -0
  29. hydrogen_station_sim-0.1.2/src/h2station/data/hydrogen_properties_v1.npz +0 -0
  30. hydrogen_station_sim-0.1.2/src/h2station/detector_policy.py +106 -0
  31. hydrogen_station_sim-0.1.2/src/h2station/dispenser.py +871 -0
  32. hydrogen_station_sim-0.1.2/src/h2station/dispersion_proxy.py +185 -0
  33. hydrogen_station_sim-0.1.2/src/h2station/ekoto_2012_validation.py +115 -0
  34. hydrogen_station_sim-0.1.2/src/h2station/full_loop_bundle_evidence.py +270 -0
  35. hydrogen_station_sim-0.1.2/src/h2station/full_station.py +1473 -0
  36. hydrogen_station_sim-0.1.2/src/h2station/grune_2014_validation.py +142 -0
  37. hydrogen_station_sim-0.1.2/src/h2station/hazop/__init__.py +2 -0
  38. hydrogen_station_sim-0.1.2/src/h2station/hazop/__main__.py +17 -0
  39. hydrogen_station_sim-0.1.2/src/h2station/hazop/database.py +185 -0
  40. hydrogen_station_sim-0.1.2/src/h2station/hazop/engine.py +137 -0
  41. hydrogen_station_sim-0.1.2/src/h2station/hazop/expressions.py +184 -0
  42. hydrogen_station_sim-0.1.2/src/h2station/hazop/flame.py +26 -0
  43. hydrogen_station_sim-0.1.2/src/h2station/hazop/mapping.py +424 -0
  44. hydrogen_station_sim-0.1.2/src/h2station/hazop/response.py +470 -0
  45. hydrogen_station_sim-0.1.2/src/h2station/hazop/runtime.py +245 -0
  46. hydrogen_station_sim-0.1.2/src/h2station/hazop/scenario_actions.py +144 -0
  47. hydrogen_station_sim-0.1.2/src/h2station/hydrogen_blend_dispersion_validation.py +242 -0
  48. hydrogen_station_sim-0.1.2/src/h2station/hytunnel_carpark_validation.py +470 -0
  49. hydrogen_station_sim-0.1.2/src/h2station/hytunnel_spatial_validation.py +252 -0
  50. hydrogen_station_sim-0.1.2/src/h2station/hytunnel_two_zone_diagnostic.py +270 -0
  51. hydrogen_station_sim-0.1.2/src/h2station/ignited_pressure_peaking.py +244 -0
  52. hydrogen_station_sim-0.1.2/src/h2station/integration_lock.py +6 -0
  53. hydrogen_station_sim-0.1.2/src/h2station/liang_2026_release_benchmark.py +213 -0
  54. hydrogen_station_sim-0.1.2/src/h2station/lifecycle_evidence.py +153 -0
  55. hydrogen_station_sim-0.1.2/src/h2station/line_transient_development.py +259 -0
  56. hydrogen_station_sim-0.1.2/src/h2station/llm_grounding.py +20586 -0
  57. hydrogen_station_sim-0.1.2/src/h2station/local_evidence.py +2975 -0
  58. hydrogen_station_sim-0.1.2/src/h2station/nbsdc_ingest.py +387 -0
  59. hydrogen_station_sim-0.1.2/src/h2station/network.py +378 -0
  60. hydrogen_station_sim-0.1.2/src/h2station/operations.py +176 -0
  61. hydrogen_station_sim-0.1.2/src/h2station/pipes.py +248 -0
  62. hydrogen_station_sim-0.1.2/src/h2station/preslhy_80k_holdout.py +116 -0
  63. hydrogen_station_sim-0.1.2/src/h2station/preslhy_e31_concentration_transport.py +312 -0
  64. hydrogen_station_sim-0.1.2/src/h2station/preslhy_e5_validation.py +203 -0
  65. hydrogen_station_sim-0.1.2/src/h2station/preslhy_nonadiabatic.py +307 -0
  66. hydrogen_station_sim-0.1.2/src/h2station/preslhy_partb_validation.py +357 -0
  67. hydrogen_station_sim-0.1.2/src/h2station/preslhy_validation.py +476 -0
  68. hydrogen_station_sim-0.1.2/src/h2station/pressure_driven_thermal.py +230 -0
  69. hydrogen_station_sim-0.1.2/src/h2station/privacy_safe_full_loop_intake.py +1073 -0
  70. hydrogen_station_sim-0.1.2/src/h2station/prospective_spatial_rank.py +98 -0
  71. hydrogen_station_sim-0.1.2/src/h2station/protocol.py +569 -0
  72. hydrogen_station_sim-0.1.2/src/h2station/proust_release_network_development.py +106 -0
  73. hydrogen_station_sim-0.1.2/src/h2station/proust_release_validation.py +173 -0
  74. hydrogen_station_sim-0.1.2/src/h2station/public_benchmarks.py +280 -0
  75. hydrogen_station_sim-0.1.2/src/h2station/public_tank_calibration.py +114 -0
  76. hydrogen_station_sim-0.1.2/src/h2station/public_validation.py +1314 -0
  77. hydrogen_station_sim-0.1.2/src/h2station/release_network.py +680 -0
  78. hydrogen_station_sim-0.1.2/src/h2station/release_network_development.py +134 -0
  79. hydrogen_station_sim-0.1.2/src/h2station/research_evaluation.py +285 -0
  80. hydrogen_station_sim-0.1.2/src/h2station/restricted_attestation.py +287 -0
  81. hydrogen_station_sim-0.1.2/src/h2station/restricted_attestation_review.py +299 -0
  82. hydrogen_station_sim-0.1.2/src/h2station/risk/__init__.py +48 -0
  83. hydrogen_station_sim-0.1.2/src/h2station/risk/cabinet_ventilation.py +225 -0
  84. hydrogen_station_sim-0.1.2/src/h2station/risk/consequence_uncertainty.py +145 -0
  85. hydrogen_station_sim-0.1.2/src/h2station/risk/coordinator.py +216 -0
  86. hydrogen_station_sim-0.1.2/src/h2station/risk/delayed_ignition.py +164 -0
  87. hydrogen_station_sim-0.1.2/src/h2station/risk/hyram_adapter.py +380 -0
  88. hydrogen_station_sim-0.1.2/src/h2station/risk/jet_flame.py +109 -0
  89. hydrogen_station_sim-0.1.2/src/h2station/risk/live.py +280 -0
  90. hydrogen_station_sim-0.1.2/src/h2station/risk/release_uncertainty.py +242 -0
  91. hydrogen_station_sim-0.1.2/src/h2station/risk/runtime_backend.py +621 -0
  92. hydrogen_station_sim-0.1.2/src/h2station/risk/scenario_planning.py +70 -0
  93. hydrogen_station_sim-0.1.2/src/h2station/risk/sensor_assessment.py +377 -0
  94. hydrogen_station_sim-0.1.2/src/h2station/runtime_evidence_gate.py +67 -0
  95. hydrogen_station_sim-0.1.2/src/h2station/safe_operation.py +1511 -0
  96. hydrogen_station_sim-0.1.2/src/h2station/safety.py +387 -0
  97. hydrogen_station_sim-0.1.2/src/h2station/safety_runtime.py +422 -0
  98. hydrogen_station_sim-0.1.2/src/h2station/scenario.py +746 -0
  99. hydrogen_station_sim-0.1.2/src/h2station/schefer_2006_validation.py +187 -0
  100. hydrogen_station_sim-0.1.2/src/h2station/schefer_2007_nonadiabatic_diagnostic.py +191 -0
  101. hydrogen_station_sim-0.1.2/src/h2station/schefer_2007_validation.py +190 -0
  102. hydrogen_station_sim-0.1.2/src/h2station/simulation_clock.py +69 -0
  103. hydrogen_station_sim-0.1.2/src/h2station/spatial_detector.py +190 -0
  104. hydrogen_station_sim-0.1.2/src/h2station/spatial_development.py +135 -0
  105. hydrogen_station_sim-0.1.2/src/h2station/station_dynamics_calibration.py +502 -0
  106. hydrogen_station_sim-0.1.2/src/h2station/station_pressure_forecast.py +256 -0
  107. hydrogen_station_sim-0.1.2/src/h2station/station_thermal_diagnostic.py +493 -0
  108. hydrogen_station_sim-0.1.2/src/h2station/tabulated.py +375 -0
  109. hydrogen_station_sim-0.1.2/src/h2station/thermo.py +34 -0
  110. hydrogen_station_sim-0.1.2/src/h2station/thermo_types.py +25 -0
  111. hydrogen_station_sim-0.1.2/src/h2station/unreal_api.py +252 -0
  112. hydrogen_station_sim-0.1.2/src/h2station/usn_ignited_jet.py +151 -0
  113. hydrogen_station_sim-0.1.2/src/h2station/validation.py +220 -0
  114. hydrogen_station_sim-0.1.2/src/h2station/vehicle.py +514 -0
  115. hydrogen_station_sim-0.1.2/src/h2station/ventilation_calibration.py +137 -0
  116. hydrogen_station_sim-0.1.2/src/h2station/virtual_safety.py +681 -0
  117. hydrogen_station_sim-0.1.2/src/h2station/visualization.py +163 -0
  118. hydrogen_station_sim-0.1.2/unreal/README.md +82 -0
  119. hydrogen_station_sim-0.1.2/web/vendor/three/LICENSE +21 -0
@@ -0,0 +1,45 @@
1
+ # Local environments and editor state
2
+ .venv/
3
+ .idea/
4
+ .pytest_cache/
5
+ __pycache__/
6
+ *.py[cod]
7
+ *.egg-info/
8
+ .ruff_cache/
9
+ .mypy_cache/
10
+
11
+ # Generated simulation runs, event databases, and server logs
12
+ /data/
13
+ *.log
14
+ *.sqlite3-journal
15
+ *.sqlite3-wal
16
+ *.sqlite3-shm
17
+
18
+ # Build output and local configuration
19
+ /build/
20
+ /dist/
21
+ /tmp/
22
+ .env
23
+ .env.*
24
+ !.env.example
25
+ .DS_Store
26
+ Thumbs.db
27
+
28
+ # Locally generated journal build artifacts
29
+ /manuscript/ijhe_manuscript_draft.pdf
30
+ /manuscript/ijhe_manuscript_draft.log
31
+ /output/pdf/ijhe_manuscript_draft.pdf
32
+ /output/partial_mc_default_recheck/
33
+ /output/partial_mc_default_recheck_120/
34
+
35
+ # Unreal generated assets and compiled artifacts; source and contracts are versioned.
36
+ /unreal/HRSUnreal/Binaries/
37
+ /unreal/HRSUnreal/Intermediate/
38
+ /unreal/HRSUnreal/Saved/
39
+ /unreal/HRSUnreal/DerivedDataCache/
40
+ /unreal/HRSUnreal/Content/
41
+ /unreal/PixelStreamingInfrastructure/
42
+ /unreal/.tooling/
43
+ /output/unreal/
44
+ *.sln
45
+ *.suo
@@ -0,0 +1,22 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use this software, please cite the archived release."
3
+ type: software
4
+ title: "Hydrogen Station Dynamic Simulator"
5
+ authors:
6
+ - family-names: Lee
7
+ given-names: Ugwiyeon
8
+ affiliation: "Korea Gas Safety Corporation"
9
+ version: 0.1.2
10
+ license: MIT
11
+ date-released: 2026-10-18
12
+ repository-code: "https://github.com/lyullee/hydrogen-station-sim"
13
+ url: "https://github.com/lyullee/hydrogen-station-sim"
14
+ doi: "10.5281/zenodo.23084421"
15
+ identifiers:
16
+ - type: doi
17
+ value: "10.5281/zenodo.23084421"
18
+ description: "Concept DOI resolving to the latest archived software release"
19
+ abstract: >-
20
+ Physics-based dynamic simulation and safety monitoring of a gaseous hydrogen
21
+ refueling station, including process equipment, incident scenarios, consequence
22
+ assessment, and operator training interfaces.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ugwiyeon Lee
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,301 @@
1
+ Metadata-Version: 2.5
2
+ Name: hydrogen-station-sim
3
+ Version: 0.1.2
4
+ Summary: First-principles dynamic models for gaseous hydrogen refueling stations
5
+ Project-URL: Homepage, https://github.com/lyullee/hydrogen-station-sim
6
+ Project-URL: Documentation, https://github.com/lyullee/hydrogen-station-sim/blob/main/docs/USER_MANUAL.md
7
+ Project-URL: Repository, https://github.com/lyullee/hydrogen-station-sim
8
+ Project-URL: Issues, https://github.com/lyullee/hydrogen-station-sim/issues
9
+ Project-URL: Archive, https://doi.org/10.5281/zenodo.23084421
10
+ Author: Ugwiyeon Lee
11
+ License-Expression: MIT
12
+ License-File: LICENSE
13
+ Keywords: HAZOP,digital twin,hydrogen,process safety,refueling station
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Scientific/Engineering
22
+ Requires-Python: >=3.10
23
+ Requires-Dist: fluids<2,>=1.0
24
+ Requires-Dist: ht<2,>=1.0
25
+ Requires-Dist: numpy<3,>=1.26
26
+ Requires-Dist: scipy<1.16,>=1.11
27
+ Provides-Extra: all
28
+ Requires-Dist: fastapi<0.116,>=0.115; extra == 'all'
29
+ Requires-Dist: hyram==6.1; extra == 'all'
30
+ Requires-Dist: uvicorn[standard]<0.36,>=0.30; extra == 'all'
31
+ Provides-Extra: api
32
+ Requires-Dist: fastapi<0.116,>=0.115; extra == 'api'
33
+ Requires-Dist: uvicorn[standard]<0.36,>=0.30; extra == 'api'
34
+ Provides-Extra: research
35
+ Requires-Dist: coolprop<9,>=7.1; extra == 'research'
36
+ Requires-Dist: h5py<4,>=3.10; extra == 'research'
37
+ Requires-Dist: httpx<0.29,>=0.27; extra == 'research'
38
+ Requires-Dist: matplotlib<4,>=3.9; extra == 'research'
39
+ Requires-Dist: openpyxl<4,>=3.1; extra == 'research'
40
+ Requires-Dist: pillow<13,>=10; extra == 'research'
41
+ Requires-Dist: pypdf<7,>=6; extra == 'research'
42
+ Requires-Dist: pyyaml<7,>=6; extra == 'research'
43
+ Requires-Dist: xlrd<3,>=2.0; extra == 'research'
44
+ Provides-Extra: risk
45
+ Requires-Dist: hyram==6.1; extra == 'risk'
46
+ Provides-Extra: table-build
47
+ Requires-Dist: coolprop<9,>=7.1; extra == 'table-build'
48
+ Provides-Extra: test
49
+ Requires-Dist: httpx<0.29,>=0.27; extra == 'test'
50
+ Requires-Dist: openpyxl<4,>=3.1; extra == 'test'
51
+ Requires-Dist: pypdf<7,>=6; extra == 'test'
52
+ Requires-Dist: pytest<10,>=8; extra == 'test'
53
+ Description-Content-Type: text/markdown
54
+
55
+ # Hydrogen Station Dynamic Simulator
56
+
57
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.23084421.svg)](https://doi.org/10.5281/zenodo.23084421)
58
+
59
+ The badge DOI resolves to the latest archived release. Earlier versions retain their own DOIs.
60
+
61
+ Original project software and associated documentation are available under the [MIT license](LICENSE). Bundled third-party libraries and assets retain their respective notices and terms.
62
+
63
+ ## Current documentation
64
+
65
+ - [Technical report](docs/TECHNICAL_REPORT.md): architecture, physical model, safety logic, APIs, LLM boundaries, validation and limits.
66
+ - [User manual](docs/USER_MANUAL.md): startup, remote operation, incident exercises, response controls, trends and troubleshooting.
67
+ - [Reproducible release candidate](docs/RELEASE_CANDIDATE_0.1.1_RC1.md): exact source boundary, CI evidence, readiness counts and remaining blockers.
68
+ - [Promotional accuracy snapshot](docs/PROMOTIONAL_ACCURACY_SNAPSHOT_2026_10_12.md): claim-bounded metrics for software, tank, release, consequence and SAGA validation.
69
+ - [Paper evaluation](docs/PAPER_EVALUATION.md): repeatable fueling-boundary metrics and alarm-only versus SAGA-PY A/B scoring.
70
+ - [Public-data validation](docs/PUBLIC_VALIDATION.md): checksum-verified SAE J2601 experiments, HIAD incidents, dispersion data, and the publication-readiness gate.
71
+ - [Local station-data inventory](research/LOCAL_HYDROGEN_STATION_DATA_DISCOVERY_RECHECK_2026_10_09.md): privacy-bounded inventory of the measured station-side archive, its validated uses and the remaining vehicle/full-loop boundary.
72
+ - [Local data catalog](research/LOCAL_DATA_CATALOG_2026_10_09.md): aggregate map of station telemetry, operational workbooks, public component data, engineering/media context and the full-loop exclusion screen.
73
+ - [Data-scarcity validation strategy](research/DATA_SCARCITY_VALIDATION_STRATEGY_2026_10_09.md): what the large privacy-bounded station archive can validate now, why vehicle/full-loop claims remain closed, and the smallest three-event request that can open the next gate.
74
+ - [Public station aggregate benchmark](research/calstate_la_multi_year_aggregate_reference_2026_10_09.json): aggregate Cal State LA operating/energy context used only for sanity checks and grounded explanations; it is not raw full-loop validation.
75
+ - [3Emotion bus-station aggregate benchmark](research/threeemotion_station_operating_aggregate_reference_2026_10_09.json): open 350 bar fleet-operation context used for throughput/utilization checks; it is not raw full-loop validation.
76
+ - [Station-data custodian attestation request](research/LOCAL_STATION_CUSTODIAN_ATTESTATION_REQUEST_2026_10_09.md): de-identified semantic and rights checklist required before vehicle/full-loop validation.
77
+ - [MetHyTrucks public intake](research/METHYTRUCKS_2026_PUBLIC_MEASUREMENT_INTAKE.md): 15 checksum-verified physical-HRS sampling-system workbooks and a claim-bounded flow/mass component diagnostic.
78
+ - [Detector-logic replay](research/DISPERSION_DETECTOR_LOGIC_VALIDATION.md): a bounded 22-case replay of alarm/trip thresholds and persistence against public USN/FFI concentration measurements.
79
+ - [HyRAM adapter verification](docs/HYRAM_ADAPTER_VERIFICATION.md): exact v6.1 source identity, upstream experimental validation-suite execution, and field-by-field production-adapter parity.
80
+ - [Consequence geometry validation](research/CONSEQUENCE_GEOMETRY_VALIDATION.md): bounded public-experiment-to-browser traceability for directional plume and sampled radial effects.
81
+ - [PRESLHY blowdown validation](research/PRESLHY_BLOWDOWN_EXTERNAL_VALIDATION.md): prospectively specified 22-case external result, including retained negative cases and claim boundary.
82
+ - [Woodfield metal-tank heat-transfer development](research/WOODFIELD_METAL_TANK_HEAT_TRANSFER_DEVELOPMENT_2026_10_08.md): pinned, aggregate-only filling/discharge replay that supports the existing inlet-mixing mechanism without changing a validation gate or runtime default.
83
+ - [PRESLHY non-adiabatic development](research/PRESLHY_NONADIABATIC_DEVELOPMENT_RESULT.md): immutable follow-up on consumed cases; 20/22 pass the original diagnostic screens but cannot serve as external confirmation.
84
+ - [PRESLHY E5.1 holdout protocol](research/PRESLHY_E5_1_HOLDOUT_PROTOCOL.md): model-hash-locked independent evaluation rules frozen before archive access.
85
+ - [PRESLHY E5.1 holdout result](research/PRESLHY_E5_1_HOLDOUT_RESULT.md): retained ineligible negative result; 3 primary ambient cases and 2/3 joint passes did not meet the frozen minimums or 70% rule.
86
+ - [Independent 90 MPa release holdout](research/PROUST_RELEASE_HOLDOUT_RESULT.md): prospectively frozen INERIS/CEA mass-flow transfer test; all three nozzle series were eligible and all failed the joint screens.
87
+ - [Proust boundary-semantics diagnostic](research/PROUST_RELEASE_BOUNDARY_SEMANTICS_DIAGNOSTIC_2026_10_12.md): post-outcome diagnosis of the diameter-dependent effective coefficient and the unresolved supply-line/valve boundary; it does not change the failed holdout.
88
+ - [Release-flow sensitivity contract](research/RELEASE_FLOW_UNCERTAINTY_CONTRACT_2026_10_13.md): preserves the runtime point model while exposing the independent Proust model--experiment flow range, public-domain status and claim limit to the API, LLM and operator UI.
89
+ - [HIAD expert-review protocol](docs/EXPERT_REVIEW_PROTOCOL.md): frozen casebook, masking, reviewer rubric, endpoints, and analysis plan.
90
+ - [HIAD evaluation readiness](research/hiad_evaluation_readiness.json): machine-checkable status of coordinator review, ethics, holdout collection and independent expert-review gates; advisory prescreen output never counts as approval.
91
+ - [Validation evidence matrix](research/VALIDATION_EVIDENCE_MATRIX_2026_10_11.md): claim-bounded map of the owner-data holdouts, independent component evidence, station-to-vehicle limitation, and SAGA human-study boundary.
92
+ - [Validation split and scope decision](research/VALIDATION_DATA_SPLIT_AND_SCOPE_DECISION_2026_10_11.md): frozen chronology-preserving split of the private station-side archive and the decision to exclude unavailable synchronized station-to-vehicle raw validation from the primary goal.
93
+ - [Ethics and expert-review scope](research/ETHICS_AND_EXPERT_REVIEW_SCOPE_2026_10_11.md): distinguishes institutional ethics determination from independent blinded subject-matter review and defines when each is required.
94
+ - [Paper goal and scope amendment](research/GOAL_SCOPE_AMENDMENT_2026_10_12.md): objective claims, KGS/AI-assisted source handling, station-to-vehicle limitation and facility-specific deployment conditions.
95
+ - [Current validation progress delta](research/PROGRESS_DELTA_2026_10_12.md): current gate counts, scope-adjusted progress, full-loop exclusion, and unresolved P0 physics gates.
96
+ - [IJHE working manuscript](manuscript/ijhe_manuscript_draft.tex): claim-bounded English draft, journal-format checks, figures, graphical abstract and the remaining submission gates.
97
+ - [IJHE reproducibility route](manuscript/REPRODUCIBILITY.md): one-command integrity check, focused tests, full-regression option and the scientific-readiness claim boundary.
98
+ - [Goal closeout checklist](research/GOAL_CLOSEOUT_CHECKLIST_2026_10_14.md): machine-verified completion, required author confirmations, remaining independent-data gates and fixed paper limitations.
99
+ - [New-data search and bounded development decision](research/NEW_DATA_SEARCH_AND_DEVELOPMENT_SCOPE_2026_10_15.md): sources rechecked, unavailable raw-data lanes excluded, and re-entry conditions.
100
+ - [Runtime evidence, uncertainty and paired response runs](docs/53_RUNTIME_EVIDENCE_UNCERTAINTY_AND_COUNTERFACTUALS.md): fail-closed model-use gate, bounded consequence ensemble, automatic counterfactual API and new fault coverage.
101
+
102
+ The monitor and remote now have a Korean/English language selector. New main and sensor assistant requests use the selected output language while consequence calculations and source data remain unchanged. English answers are advisory translations/analyses; verify exact safety requirements against their original source.
103
+
104
+ Physics-first Python simulator for gaseous hydrogen refueling stations. The existing
105
+ Java/browser simulator is a visual reference only; this package has an independent
106
+ model, API, and monitoring interface.
107
+
108
+ ## Implemented system
109
+
110
+ - CoolProp-generated hydrogen property table (runtime lookup; no CoolProp calls in the process solver)
111
+ - Storage mass, energy, and wall-temperature dynamics
112
+ - Three-stage compressor with intercooling and electrical power
113
+ - Three-bank cascade dispatch and recharge with a finite common-header mass and energy inventory
114
+ - Real-gas PCV, nozzle, check valve, and relief primitives
115
+ - Finite-UA precooler and finite-volume hose line-pack
116
+ - Gas, HDPE liner, and CFRP Type IV vehicle tank
117
+ - Split-validated public Type IV tank calibration applied by default; the API
118
+ exposes an uncalibrated reference sensitivity mode and keeps this component
119
+ evidence separate from the station-controller model
120
+ - External SAE J2601-compatible APRR schedule boundary
121
+ - Sampled normal control and independent latched safety PLC
122
+ - Sensor, actuator, cooling, compressor, E-stop, and leak faults
123
+ - Leak mass and enthalpy feedback to the physical inventory
124
+ - HyRAM+ 6.1 outdoor and optional indoor consequence bridge
125
+ - FastAPI simulation jobs and responsive monitoring UI
126
+ - H2FillS-compatible validation channels and metrics
127
+
128
+ Internal units are SI. The API accepts MPa, degrees Celsius, g/s, and millimetres and
129
+ converts them at the boundary.
130
+
131
+ The process solver reads `src/h2station/data/hydrogen_properties_v1.npz`, generated
132
+ offline by `scripts/generate_hydrogen_table.py`. PCV/nozzle/release choking uses a
133
+ small critical-pressure lookup derived from that same table; unusual pressures or
134
+ temperatures outside its operating grid fall back to direct table-based search.
135
+
136
+ ## Installation
137
+
138
+ ```powershell
139
+ py -3.12 -m venv .venv
140
+ .venv\Scripts\python -m pip install -e ".[api]"
141
+ ```
142
+
143
+ Include HyRAM+ when its GPL-3.0 licensing is appropriate for the deployment:
144
+
145
+ ```powershell
146
+ .venv\Scripts\python -m pip install -e ".[all]"
147
+ ```
148
+
149
+ ## Run
150
+
151
+ ```powershell
152
+ .venv\Scripts\h2station
153
+ ```
154
+
155
+ Open `http://127.0.0.1:8000`.
156
+
157
+ ## Monitoring and sensor provenance
158
+
159
+ The monitor keeps the 3D station footprint, process flow, equipment specifications,
160
+ and CCTV gallery in the same 16:9 display region. The 3D scene omits the surrounding
161
+ district and traffic, and caps render resolution to reduce GPU load. The equipment
162
+ and CCTV top-menu entries switch that region without opening a separate dialog.
163
+
164
+ API monitoring jobs enable simulation outputs for all 82 HAZOP database sensor tags.
165
+ The 15 gas detector tags are virtual zone proxies that respond to injected leaks or explicit sensor faults;
166
+ they are not physical detector connections. Compressor-stage readings follow the
167
+ three-stage model. Shared header and precooler channels are derived from upstream
168
+ flows and temperatures. The coolant flow channel is a thermal-equivalent estimate;
169
+ the vent channels use an assumed ambient boundary until a release is injected.
170
+ Each API signal includes an `origin`, while `/api/hazop/mapping` reports its binding
171
+ and still reports zero physical sensor connections. Site telemetry should replace
172
+ these proxies before operational use.
173
+
174
+ ## Operator process control
175
+
176
+ The remote's **안전 대응** tab adds simulation-only equipment isolation, delayed
177
+ valve position/flow confirmation, venting, ventilation, cooling, evacuation,
178
+ recovery tests, and training replay. Active sensor scenarios and SAGA response
179
+ cards provide the same executable virtual actions. See
180
+ [`docs/virtual-safety-simulation.md`](docs/virtual-safety-simulation.md) for the
181
+ model assumptions, recovery gates, and limits.
182
+
183
+ Open `/remote.html` and start continuous monitoring. The trailer supply, storage-bank
184
+ recharge, and each of the two vehicle fills begin **off**. The process inventories
185
+ remain unchanged while no command or fault is active. The remote couples trailer
186
+ supply and storage-bank recharge on one transfer path; either start/stop control
187
+ changes both requests. Vehicle 1 and 2 fills remain individually controlled and
188
+ draw from the cascade banks.
189
+
190
+ The remote offers 0.5×, 1×, 2×, 3×, 5×, 10×, 30×, 50×, and 100× target speeds and
191
+ allows switching during a run. This changes wall-clock pacing without enlarging
192
+ the physical solver step. The remote shows both the selected target and measured
193
+ speed; a computation-bound run may stay below its target. Accident delays entered
194
+ during a run are anchored at the solver step that accepts the command.
195
+
196
+ The remote exposes a finite trailer inventory, initial pressure and temperature,
197
+ individual bank starting fills, and configurable bank/vehicle stopping pressures.
198
+ Each process target has an automatic-stop switch. Turning it off allows a virtual
199
+ overfill exercise; relief valves and independent ESD protections remain separate.
200
+ Trailer pressure falls as compressor transfer removes mass. Its fixed volume and
201
+ isothermal temperature are explicit reference-model assumptions.
202
+
203
+ The **실측 경계 보정** option is an explicit opt-in. It loads only the
204
+ de-identified station-boundary aggregate in
205
+ `research/confidential_operational_envelope_calibration_summary_2026_10_06.json`.
206
+ The observed pressure margin is applied to both cascade-bank dispatch and
207
+ recharge restart selection, reducing READY/CHARGE chatter around the measured
208
+ noise band. The default reference model remains unchanged; the profile does
209
+ not calibrate vehicle-side pressure, temperature, mass flow, protocol
210
+ conformance, or consequence distance.
211
+
212
+ Seven virtual relief valves cover the three storage banks, two dispenser hoses,
213
+ and two vehicle tanks. Their enable switches, opening and closing pressures, and
214
+ orifice sizes are adjustable during a run. A valve stays open until pressure
215
+ falls to its closing setting; close opening/closing settings reproduce sampled
216
+ chatter. Relief mass flow is deducted from the corresponding inventory and enters
217
+ the same leak, detector, HAZOP, and consequence pipeline as other releases. These
218
+ settings are simulation inputs, not certified relief-valve sizing values.
219
+
220
+ The remote shows command acknowledgement separately from actual flow, including
221
+ why a requested path is waiting or blocked. It also displays wall-clock lag and
222
+ simulation speed. Operator-mode integration uses SciPy LSODA, while the legacy
223
+ batch API retains BDF. Continuous operator monitoring paces successful solves to
224
+ wall time; if a step takes longer than real time, the solver keeps all physical
225
+ steps and reports the accumulated lag instead of silently skipping them.
226
+
227
+ ## HyRAM configuration
228
+
229
+ When `hyram==6.1` is installed, the native adapter is selected automatically. Default
230
+ outdoor observation points are spaced every 0.5 m from 0.5–10 m, then at
231
+ 12, 15, 20, 25, 30, 40, and 50 m downstream at 1.5 m elevation. The reported
232
+ extent is the farthest threshold-exceeding sample, not a certified safety radius.
233
+ Override them with JSON:
234
+
235
+ ```powershell
236
+ $env:H2STATION_HYRAM_LOCATIONS='[[0.5,0,1.5],[1,0,1.5],[1.5,0,1.5],[2,0,1.5],[2.5,0,1.5],[3,0,1.5],[5,0,1.5],[10,0,1.5]]'
237
+ ```
238
+
239
+ Site overrides replace the entire default sampling transect. Sparse overrides
240
+ can make a threshold crossed between two points appear at the nearer point.
241
+
242
+ Indoor accumulation requires an explicit enclosure definition through
243
+ `H2STATION_HYRAM_INDOOR_JSON`; no enclosure geometry is invented. A site-specific
244
+ backend can instead be selected with
245
+ `H2STATION_HYRAM_EVALUATOR=module:function`.
246
+
247
+ The digital-twin SAGA panel and selected-sensor follow-up questions use dedicated
248
+ `/direct` API routes. The simulator first evaluates the current sensor state,
249
+ then sends the operator's actual question and its calculated context to SAGA's
250
+ single-completion LLM endpoint. This bypasses SAGA's multi-stage RAG/review
251
+ pipeline but retains free-form question answering. The operator can manually
252
+ select Service Hub or Groq. Groq's direct model defaults to Qwen with reasoning
253
+ disabled; Service Hub defaults to the non-reasoning Llama instruct model. If the selected LLM is
254
+ unavailable, the interface labels the connection error and retains a local
255
+ sensor-based fallback answer. The older analysis API remains available for
256
+ existing integrations, but the digital-twin interface does not call it.
257
+
258
+ The direct-answer numeric guard normalizes equivalent value/unit spellings and
259
+ shared-unit ranges before filtering. Its provider-free 5-case regression is
260
+ documented in
261
+ [`research/SAGA_MEASUREMENT_GUARD_REGRESSION_2026_10_08.md`](research/SAGA_MEASUREMENT_GUARD_REGRESSION_2026_10_08.md);
262
+ this verifies filter behavior only, not response correctness or operator benefit.
263
+
264
+ Consequence evaluation remains in the direct path. An active warning/critical
265
+ state automatically evaluates relevant nodes before building the answer. Normal
266
+ operation only evaluates consequences when the operator explicitly requests an
267
+ impact or uses **센서 기준 가상 평가**. The calculations use current GOOD-quality
268
+ pressure and temperature readings. An active leak uses its current orifice size
269
+ and flow; a hypothetical case uses a 1 mm horizontal release at 1 m height and
270
+ 101325 Pa ambient pressure. The calculated result, sensor tags, and assumptions
271
+ are passed to both the direct state endpoint and the one-pass LLM. Reported distance is the farthest sampled
272
+ point exceeding 5 kW/m² or 5 kPa, not a validated site safety boundary. Missing
273
+ sensor pairs or an unavailable backend never produce an invented distance.
274
+
275
+ ## Engineering status
276
+
277
+ This is a modeling and monitoring prototype, not a certified controller. Reference
278
+ scenario dimensions and thermal parameters are illustrative until calibrated against
279
+ traceable equipment and test data. SAE J2601 tables remain licensed external inputs.
280
+ The complete modeling basis, literature, limitations, and validation plan are in
281
+ `docs/`.
282
+
283
+ The partial-station boundary experiment is documented in
284
+ [`docs/PARTIAL_STATION_VALIDATION.md`](docs/PARTIAL_STATION_VALIDATION.md).
285
+ It is a development diagnostic with an explicit upstream-pressure assumption;
286
+ it does not upgrade the full-station validation claim.
287
+
288
+ The current public-data intake lead is documented in
289
+ [`research/NBSDC_HEAVY_VEHICLE_FAST_REFUELING_ACCESS_RECHECK_2026_10_06.md`](research/NBSDC_HEAVY_VEHICLE_FAST_REFUELING_ACCESS_RECHECK_2026_10_06.md).
290
+ Its numerical files require an approved portal request. Once a rights-cleared
291
+ workbook or CSV export is obtained, the explicit-unit loader in
292
+ [`src/h2station/nbsdc_ingest.py`](src/h2station/nbsdc_ingest.py) can produce
293
+ in-memory pressure, temperature and flow traces without publishing raw rows.
294
+ The test-cylinder data remains a component/protocol candidate until its mapping
295
+ to a vehicle-side validation contract is independently confirmed.
296
+
297
+ For owner-held full-loop logger data, the controlled exporter accepts CSV, XLSX,
298
+ and XLSM sources. It offers a header-only preflight that does not read
299
+ measurement rows, then writes only canonical columns and relative time to a
300
+ directory outside this repository. See
301
+ [`research/CONTROLLED_FULL_LOOP_XLSX_INTAKE.md`](research/CONTROLLED_FULL_LOOP_XLSX_INTAKE.md).
@@ -0,0 +1,247 @@
1
+ # Hydrogen Station Dynamic Simulator
2
+
3
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.23084421.svg)](https://doi.org/10.5281/zenodo.23084421)
4
+
5
+ The badge DOI resolves to the latest archived release. Earlier versions retain their own DOIs.
6
+
7
+ Original project software and associated documentation are available under the [MIT license](LICENSE). Bundled third-party libraries and assets retain their respective notices and terms.
8
+
9
+ ## Current documentation
10
+
11
+ - [Technical report](docs/TECHNICAL_REPORT.md): architecture, physical model, safety logic, APIs, LLM boundaries, validation and limits.
12
+ - [User manual](docs/USER_MANUAL.md): startup, remote operation, incident exercises, response controls, trends and troubleshooting.
13
+ - [Reproducible release candidate](docs/RELEASE_CANDIDATE_0.1.1_RC1.md): exact source boundary, CI evidence, readiness counts and remaining blockers.
14
+ - [Promotional accuracy snapshot](docs/PROMOTIONAL_ACCURACY_SNAPSHOT_2026_10_12.md): claim-bounded metrics for software, tank, release, consequence and SAGA validation.
15
+ - [Paper evaluation](docs/PAPER_EVALUATION.md): repeatable fueling-boundary metrics and alarm-only versus SAGA-PY A/B scoring.
16
+ - [Public-data validation](docs/PUBLIC_VALIDATION.md): checksum-verified SAE J2601 experiments, HIAD incidents, dispersion data, and the publication-readiness gate.
17
+ - [Local station-data inventory](research/LOCAL_HYDROGEN_STATION_DATA_DISCOVERY_RECHECK_2026_10_09.md): privacy-bounded inventory of the measured station-side archive, its validated uses and the remaining vehicle/full-loop boundary.
18
+ - [Local data catalog](research/LOCAL_DATA_CATALOG_2026_10_09.md): aggregate map of station telemetry, operational workbooks, public component data, engineering/media context and the full-loop exclusion screen.
19
+ - [Data-scarcity validation strategy](research/DATA_SCARCITY_VALIDATION_STRATEGY_2026_10_09.md): what the large privacy-bounded station archive can validate now, why vehicle/full-loop claims remain closed, and the smallest three-event request that can open the next gate.
20
+ - [Public station aggregate benchmark](research/calstate_la_multi_year_aggregate_reference_2026_10_09.json): aggregate Cal State LA operating/energy context used only for sanity checks and grounded explanations; it is not raw full-loop validation.
21
+ - [3Emotion bus-station aggregate benchmark](research/threeemotion_station_operating_aggregate_reference_2026_10_09.json): open 350 bar fleet-operation context used for throughput/utilization checks; it is not raw full-loop validation.
22
+ - [Station-data custodian attestation request](research/LOCAL_STATION_CUSTODIAN_ATTESTATION_REQUEST_2026_10_09.md): de-identified semantic and rights checklist required before vehicle/full-loop validation.
23
+ - [MetHyTrucks public intake](research/METHYTRUCKS_2026_PUBLIC_MEASUREMENT_INTAKE.md): 15 checksum-verified physical-HRS sampling-system workbooks and a claim-bounded flow/mass component diagnostic.
24
+ - [Detector-logic replay](research/DISPERSION_DETECTOR_LOGIC_VALIDATION.md): a bounded 22-case replay of alarm/trip thresholds and persistence against public USN/FFI concentration measurements.
25
+ - [HyRAM adapter verification](docs/HYRAM_ADAPTER_VERIFICATION.md): exact v6.1 source identity, upstream experimental validation-suite execution, and field-by-field production-adapter parity.
26
+ - [Consequence geometry validation](research/CONSEQUENCE_GEOMETRY_VALIDATION.md): bounded public-experiment-to-browser traceability for directional plume and sampled radial effects.
27
+ - [PRESLHY blowdown validation](research/PRESLHY_BLOWDOWN_EXTERNAL_VALIDATION.md): prospectively specified 22-case external result, including retained negative cases and claim boundary.
28
+ - [Woodfield metal-tank heat-transfer development](research/WOODFIELD_METAL_TANK_HEAT_TRANSFER_DEVELOPMENT_2026_10_08.md): pinned, aggregate-only filling/discharge replay that supports the existing inlet-mixing mechanism without changing a validation gate or runtime default.
29
+ - [PRESLHY non-adiabatic development](research/PRESLHY_NONADIABATIC_DEVELOPMENT_RESULT.md): immutable follow-up on consumed cases; 20/22 pass the original diagnostic screens but cannot serve as external confirmation.
30
+ - [PRESLHY E5.1 holdout protocol](research/PRESLHY_E5_1_HOLDOUT_PROTOCOL.md): model-hash-locked independent evaluation rules frozen before archive access.
31
+ - [PRESLHY E5.1 holdout result](research/PRESLHY_E5_1_HOLDOUT_RESULT.md): retained ineligible negative result; 3 primary ambient cases and 2/3 joint passes did not meet the frozen minimums or 70% rule.
32
+ - [Independent 90 MPa release holdout](research/PROUST_RELEASE_HOLDOUT_RESULT.md): prospectively frozen INERIS/CEA mass-flow transfer test; all three nozzle series were eligible and all failed the joint screens.
33
+ - [Proust boundary-semantics diagnostic](research/PROUST_RELEASE_BOUNDARY_SEMANTICS_DIAGNOSTIC_2026_10_12.md): post-outcome diagnosis of the diameter-dependent effective coefficient and the unresolved supply-line/valve boundary; it does not change the failed holdout.
34
+ - [Release-flow sensitivity contract](research/RELEASE_FLOW_UNCERTAINTY_CONTRACT_2026_10_13.md): preserves the runtime point model while exposing the independent Proust model--experiment flow range, public-domain status and claim limit to the API, LLM and operator UI.
35
+ - [HIAD expert-review protocol](docs/EXPERT_REVIEW_PROTOCOL.md): frozen casebook, masking, reviewer rubric, endpoints, and analysis plan.
36
+ - [HIAD evaluation readiness](research/hiad_evaluation_readiness.json): machine-checkable status of coordinator review, ethics, holdout collection and independent expert-review gates; advisory prescreen output never counts as approval.
37
+ - [Validation evidence matrix](research/VALIDATION_EVIDENCE_MATRIX_2026_10_11.md): claim-bounded map of the owner-data holdouts, independent component evidence, station-to-vehicle limitation, and SAGA human-study boundary.
38
+ - [Validation split and scope decision](research/VALIDATION_DATA_SPLIT_AND_SCOPE_DECISION_2026_10_11.md): frozen chronology-preserving split of the private station-side archive and the decision to exclude unavailable synchronized station-to-vehicle raw validation from the primary goal.
39
+ - [Ethics and expert-review scope](research/ETHICS_AND_EXPERT_REVIEW_SCOPE_2026_10_11.md): distinguishes institutional ethics determination from independent blinded subject-matter review and defines when each is required.
40
+ - [Paper goal and scope amendment](research/GOAL_SCOPE_AMENDMENT_2026_10_12.md): objective claims, KGS/AI-assisted source handling, station-to-vehicle limitation and facility-specific deployment conditions.
41
+ - [Current validation progress delta](research/PROGRESS_DELTA_2026_10_12.md): current gate counts, scope-adjusted progress, full-loop exclusion, and unresolved P0 physics gates.
42
+ - [IJHE working manuscript](manuscript/ijhe_manuscript_draft.tex): claim-bounded English draft, journal-format checks, figures, graphical abstract and the remaining submission gates.
43
+ - [IJHE reproducibility route](manuscript/REPRODUCIBILITY.md): one-command integrity check, focused tests, full-regression option and the scientific-readiness claim boundary.
44
+ - [Goal closeout checklist](research/GOAL_CLOSEOUT_CHECKLIST_2026_10_14.md): machine-verified completion, required author confirmations, remaining independent-data gates and fixed paper limitations.
45
+ - [New-data search and bounded development decision](research/NEW_DATA_SEARCH_AND_DEVELOPMENT_SCOPE_2026_10_15.md): sources rechecked, unavailable raw-data lanes excluded, and re-entry conditions.
46
+ - [Runtime evidence, uncertainty and paired response runs](docs/53_RUNTIME_EVIDENCE_UNCERTAINTY_AND_COUNTERFACTUALS.md): fail-closed model-use gate, bounded consequence ensemble, automatic counterfactual API and new fault coverage.
47
+
48
+ The monitor and remote now have a Korean/English language selector. New main and sensor assistant requests use the selected output language while consequence calculations and source data remain unchanged. English answers are advisory translations/analyses; verify exact safety requirements against their original source.
49
+
50
+ Physics-first Python simulator for gaseous hydrogen refueling stations. The existing
51
+ Java/browser simulator is a visual reference only; this package has an independent
52
+ model, API, and monitoring interface.
53
+
54
+ ## Implemented system
55
+
56
+ - CoolProp-generated hydrogen property table (runtime lookup; no CoolProp calls in the process solver)
57
+ - Storage mass, energy, and wall-temperature dynamics
58
+ - Three-stage compressor with intercooling and electrical power
59
+ - Three-bank cascade dispatch and recharge with a finite common-header mass and energy inventory
60
+ - Real-gas PCV, nozzle, check valve, and relief primitives
61
+ - Finite-UA precooler and finite-volume hose line-pack
62
+ - Gas, HDPE liner, and CFRP Type IV vehicle tank
63
+ - Split-validated public Type IV tank calibration applied by default; the API
64
+ exposes an uncalibrated reference sensitivity mode and keeps this component
65
+ evidence separate from the station-controller model
66
+ - External SAE J2601-compatible APRR schedule boundary
67
+ - Sampled normal control and independent latched safety PLC
68
+ - Sensor, actuator, cooling, compressor, E-stop, and leak faults
69
+ - Leak mass and enthalpy feedback to the physical inventory
70
+ - HyRAM+ 6.1 outdoor and optional indoor consequence bridge
71
+ - FastAPI simulation jobs and responsive monitoring UI
72
+ - H2FillS-compatible validation channels and metrics
73
+
74
+ Internal units are SI. The API accepts MPa, degrees Celsius, g/s, and millimetres and
75
+ converts them at the boundary.
76
+
77
+ The process solver reads `src/h2station/data/hydrogen_properties_v1.npz`, generated
78
+ offline by `scripts/generate_hydrogen_table.py`. PCV/nozzle/release choking uses a
79
+ small critical-pressure lookup derived from that same table; unusual pressures or
80
+ temperatures outside its operating grid fall back to direct table-based search.
81
+
82
+ ## Installation
83
+
84
+ ```powershell
85
+ py -3.12 -m venv .venv
86
+ .venv\Scripts\python -m pip install -e ".[api]"
87
+ ```
88
+
89
+ Include HyRAM+ when its GPL-3.0 licensing is appropriate for the deployment:
90
+
91
+ ```powershell
92
+ .venv\Scripts\python -m pip install -e ".[all]"
93
+ ```
94
+
95
+ ## Run
96
+
97
+ ```powershell
98
+ .venv\Scripts\h2station
99
+ ```
100
+
101
+ Open `http://127.0.0.1:8000`.
102
+
103
+ ## Monitoring and sensor provenance
104
+
105
+ The monitor keeps the 3D station footprint, process flow, equipment specifications,
106
+ and CCTV gallery in the same 16:9 display region. The 3D scene omits the surrounding
107
+ district and traffic, and caps render resolution to reduce GPU load. The equipment
108
+ and CCTV top-menu entries switch that region without opening a separate dialog.
109
+
110
+ API monitoring jobs enable simulation outputs for all 82 HAZOP database sensor tags.
111
+ The 15 gas detector tags are virtual zone proxies that respond to injected leaks or explicit sensor faults;
112
+ they are not physical detector connections. Compressor-stage readings follow the
113
+ three-stage model. Shared header and precooler channels are derived from upstream
114
+ flows and temperatures. The coolant flow channel is a thermal-equivalent estimate;
115
+ the vent channels use an assumed ambient boundary until a release is injected.
116
+ Each API signal includes an `origin`, while `/api/hazop/mapping` reports its binding
117
+ and still reports zero physical sensor connections. Site telemetry should replace
118
+ these proxies before operational use.
119
+
120
+ ## Operator process control
121
+
122
+ The remote's **안전 대응** tab adds simulation-only equipment isolation, delayed
123
+ valve position/flow confirmation, venting, ventilation, cooling, evacuation,
124
+ recovery tests, and training replay. Active sensor scenarios and SAGA response
125
+ cards provide the same executable virtual actions. See
126
+ [`docs/virtual-safety-simulation.md`](docs/virtual-safety-simulation.md) for the
127
+ model assumptions, recovery gates, and limits.
128
+
129
+ Open `/remote.html` and start continuous monitoring. The trailer supply, storage-bank
130
+ recharge, and each of the two vehicle fills begin **off**. The process inventories
131
+ remain unchanged while no command or fault is active. The remote couples trailer
132
+ supply and storage-bank recharge on one transfer path; either start/stop control
133
+ changes both requests. Vehicle 1 and 2 fills remain individually controlled and
134
+ draw from the cascade banks.
135
+
136
+ The remote offers 0.5×, 1×, 2×, 3×, 5×, 10×, 30×, 50×, and 100× target speeds and
137
+ allows switching during a run. This changes wall-clock pacing without enlarging
138
+ the physical solver step. The remote shows both the selected target and measured
139
+ speed; a computation-bound run may stay below its target. Accident delays entered
140
+ during a run are anchored at the solver step that accepts the command.
141
+
142
+ The remote exposes a finite trailer inventory, initial pressure and temperature,
143
+ individual bank starting fills, and configurable bank/vehicle stopping pressures.
144
+ Each process target has an automatic-stop switch. Turning it off allows a virtual
145
+ overfill exercise; relief valves and independent ESD protections remain separate.
146
+ Trailer pressure falls as compressor transfer removes mass. Its fixed volume and
147
+ isothermal temperature are explicit reference-model assumptions.
148
+
149
+ The **실측 경계 보정** option is an explicit opt-in. It loads only the
150
+ de-identified station-boundary aggregate in
151
+ `research/confidential_operational_envelope_calibration_summary_2026_10_06.json`.
152
+ The observed pressure margin is applied to both cascade-bank dispatch and
153
+ recharge restart selection, reducing READY/CHARGE chatter around the measured
154
+ noise band. The default reference model remains unchanged; the profile does
155
+ not calibrate vehicle-side pressure, temperature, mass flow, protocol
156
+ conformance, or consequence distance.
157
+
158
+ Seven virtual relief valves cover the three storage banks, two dispenser hoses,
159
+ and two vehicle tanks. Their enable switches, opening and closing pressures, and
160
+ orifice sizes are adjustable during a run. A valve stays open until pressure
161
+ falls to its closing setting; close opening/closing settings reproduce sampled
162
+ chatter. Relief mass flow is deducted from the corresponding inventory and enters
163
+ the same leak, detector, HAZOP, and consequence pipeline as other releases. These
164
+ settings are simulation inputs, not certified relief-valve sizing values.
165
+
166
+ The remote shows command acknowledgement separately from actual flow, including
167
+ why a requested path is waiting or blocked. It also displays wall-clock lag and
168
+ simulation speed. Operator-mode integration uses SciPy LSODA, while the legacy
169
+ batch API retains BDF. Continuous operator monitoring paces successful solves to
170
+ wall time; if a step takes longer than real time, the solver keeps all physical
171
+ steps and reports the accumulated lag instead of silently skipping them.
172
+
173
+ ## HyRAM configuration
174
+
175
+ When `hyram==6.1` is installed, the native adapter is selected automatically. Default
176
+ outdoor observation points are spaced every 0.5 m from 0.5–10 m, then at
177
+ 12, 15, 20, 25, 30, 40, and 50 m downstream at 1.5 m elevation. The reported
178
+ extent is the farthest threshold-exceeding sample, not a certified safety radius.
179
+ Override them with JSON:
180
+
181
+ ```powershell
182
+ $env:H2STATION_HYRAM_LOCATIONS='[[0.5,0,1.5],[1,0,1.5],[1.5,0,1.5],[2,0,1.5],[2.5,0,1.5],[3,0,1.5],[5,0,1.5],[10,0,1.5]]'
183
+ ```
184
+
185
+ Site overrides replace the entire default sampling transect. Sparse overrides
186
+ can make a threshold crossed between two points appear at the nearer point.
187
+
188
+ Indoor accumulation requires an explicit enclosure definition through
189
+ `H2STATION_HYRAM_INDOOR_JSON`; no enclosure geometry is invented. A site-specific
190
+ backend can instead be selected with
191
+ `H2STATION_HYRAM_EVALUATOR=module:function`.
192
+
193
+ The digital-twin SAGA panel and selected-sensor follow-up questions use dedicated
194
+ `/direct` API routes. The simulator first evaluates the current sensor state,
195
+ then sends the operator's actual question and its calculated context to SAGA's
196
+ single-completion LLM endpoint. This bypasses SAGA's multi-stage RAG/review
197
+ pipeline but retains free-form question answering. The operator can manually
198
+ select Service Hub or Groq. Groq's direct model defaults to Qwen with reasoning
199
+ disabled; Service Hub defaults to the non-reasoning Llama instruct model. If the selected LLM is
200
+ unavailable, the interface labels the connection error and retains a local
201
+ sensor-based fallback answer. The older analysis API remains available for
202
+ existing integrations, but the digital-twin interface does not call it.
203
+
204
+ The direct-answer numeric guard normalizes equivalent value/unit spellings and
205
+ shared-unit ranges before filtering. Its provider-free 5-case regression is
206
+ documented in
207
+ [`research/SAGA_MEASUREMENT_GUARD_REGRESSION_2026_10_08.md`](research/SAGA_MEASUREMENT_GUARD_REGRESSION_2026_10_08.md);
208
+ this verifies filter behavior only, not response correctness or operator benefit.
209
+
210
+ Consequence evaluation remains in the direct path. An active warning/critical
211
+ state automatically evaluates relevant nodes before building the answer. Normal
212
+ operation only evaluates consequences when the operator explicitly requests an
213
+ impact or uses **센서 기준 가상 평가**. The calculations use current GOOD-quality
214
+ pressure and temperature readings. An active leak uses its current orifice size
215
+ and flow; a hypothetical case uses a 1 mm horizontal release at 1 m height and
216
+ 101325 Pa ambient pressure. The calculated result, sensor tags, and assumptions
217
+ are passed to both the direct state endpoint and the one-pass LLM. Reported distance is the farthest sampled
218
+ point exceeding 5 kW/m² or 5 kPa, not a validated site safety boundary. Missing
219
+ sensor pairs or an unavailable backend never produce an invented distance.
220
+
221
+ ## Engineering status
222
+
223
+ This is a modeling and monitoring prototype, not a certified controller. Reference
224
+ scenario dimensions and thermal parameters are illustrative until calibrated against
225
+ traceable equipment and test data. SAE J2601 tables remain licensed external inputs.
226
+ The complete modeling basis, literature, limitations, and validation plan are in
227
+ `docs/`.
228
+
229
+ The partial-station boundary experiment is documented in
230
+ [`docs/PARTIAL_STATION_VALIDATION.md`](docs/PARTIAL_STATION_VALIDATION.md).
231
+ It is a development diagnostic with an explicit upstream-pressure assumption;
232
+ it does not upgrade the full-station validation claim.
233
+
234
+ The current public-data intake lead is documented in
235
+ [`research/NBSDC_HEAVY_VEHICLE_FAST_REFUELING_ACCESS_RECHECK_2026_10_06.md`](research/NBSDC_HEAVY_VEHICLE_FAST_REFUELING_ACCESS_RECHECK_2026_10_06.md).
236
+ Its numerical files require an approved portal request. Once a rights-cleared
237
+ workbook or CSV export is obtained, the explicit-unit loader in
238
+ [`src/h2station/nbsdc_ingest.py`](src/h2station/nbsdc_ingest.py) can produce
239
+ in-memory pressure, temperature and flow traces without publishing raw rows.
240
+ The test-cylinder data remains a component/protocol candidate until its mapping
241
+ to a vehicle-side validation contract is independently confirmed.
242
+
243
+ For owner-held full-loop logger data, the controlled exporter accepts CSV, XLSX,
244
+ and XLSM sources. It offers a header-only preflight that does not read
245
+ measurement rows, then writes only canonical columns and relative time to a
246
+ directory outside this repository. See
247
+ [`research/CONTROLLED_FULL_LOOP_XLSX_INTAKE.md`](research/CONTROLLED_FULL_LOOP_XLSX_INTAKE.md).