Quick Start
Basic Usage
Running HydDown is as simple as:
python scripts/hyddown_main.py input.yml
where input.yml is your input file in YAML syntax.
Simple Example
Here’s a minimal example for a vessel depressurization calculation:
vessel:
length: 2.0
diameter: 0.5
orientation: "vertical"
initial:
pressure: 15000000
temperature: 293.15
fluid: "Hydrogen"
calculation:
type: "isentropic"
time_step: 0.1
end_time: 100
valve:
flow: "discharge"
type: "orifice"
diameter: 0.01
discharge_coef: 0.84
back_pressure: 101325
Save this as input.yml and run:
python scripts/hyddown_main.py input.yml
Streamlit Application
HydDown includes an interactive web interface built with Streamlit:
streamlit run scripts/streamlit_app.py
This provides a user-friendly interface for:
Setting up calculations without writing YAML
Visualizing results in real-time
Comparing with validation data
Available Streamlit Apps
streamlit_app.py- Main applicationstreamlit_genapp.py- General purpose calculatorstreamlit_h2app.py- Hydrogen-specific calculatorstreamlit_sbapp.py- Stefan-Boltzmann fire scenariostreamlit_bdv_sbapp.py- Blowdown valve with fire
Example Files
Example input files for various calculation types are located in:
src/hyddown/examples/
These include:
Isothermal filling/discharge
Isentropic expansion
Isenthalpic throttling
Energy balance with heat transfer
Fire scenarios
Two-phase calculations
Relief valve sizing