Skip to content

Commit

Permalink
Update Main with latest Systems code (#7)
Browse files Browse the repository at this point in the history
* Create hydrogen_networks folder

Create new folder for modeling hydrogen networks and generalized hydrogen carriers.

* Delete old files

Delete input and output files that are no longer used.

* Add annual station capacity factor

Add annual station capacity factor as an input parameter. Update cost and emissions calculations to incorporate station capacity factor.

* Fix typo in "s2a_systems_run_analysis.ipynb"

Fix typo in "s2a_systems_run_analysis.ipynb". This change does not impact results.

* Update input to "calcs" function

Add hydrogenation electrolyzer voltage and current density  as user-supplied input parameters to "calcs" function. (These were fixed parameters.)

* Generalize hydrogen carrier mass balance

Generalize mass balance for user-supplied hydrogen carrier. Hydrogen carriers are characterized by name, molar mass, density, and stoichiometry.

---------

Co-authored-by: Mengyao Yuan <[email protected]>
  • Loading branch information
emsunshine and yuan-mengyao authored Jun 27, 2024
1 parent 8e8a25f commit 622492c
Show file tree
Hide file tree
Showing 89 changed files with 87,480 additions and 0 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

62 changes: 62 additions & 0 deletions analyses/hydrogen_networks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# S2A System-Scale Analysis: Hydrogen Delivery Costs

## Description
This folder contains the scripts to run the system-scale analysis and make the plots for the manuscript "Systems-to-Atoms Examination of Formic Acid as a Liquid Organic Hydrogen Carrier in Transportation Applications".
Input files, raw output files, and plots are also included.

* `cross-scale data handoff`: Outputs from material and component modeling that are passed to the system scale and/or used to make plots.
* `inputs`: Input files to run the system-scale analysis.
* `outputs`: Folders containing raw output files.
* `plots`: Plots and scripts used to make these plots.
* `requirements.txt`: List of Python packages needed to run the system-scale analysis.
* `s2a_sys.yml`: Environment file.
* `s2a_systems_functions.py`: Functions, including mass and energy balances, equipment sizing and costing, levelized cost of hydrogen for hydrogen delivery via compressed hydrogen, liquid hydrogen, and formic acid.
* `s2a_systems_run_analysis.ipynb`: Script used to run the system-scale analysis for user-specified inputs (e.g., in an `input params_[scenario group].xlsx` file). Imports `s2a_systems_functions.py`.

## Getting Started
### [For first-time users] Create the conda environment
* Open Anaconda Prompt.
* Nagivate to the main folder.
* Type:
```
conda env create -f s2a_sys.yml
```

### Activate the conda environment
* Open Anaconda Prompt.
* Nagivate to the main folder.
* Type:
```
conda activate s2a_sys
```

### Run the analysis
* Open `s2a_systems_run_analysis.ipynb`. [Recommended: open in Jupyter Notebook.]
* Run `s2a_systems_run_analysis.ipynb`.
* This will run the "baseline" scenarios (with input parameters specified in `input params_baseline.xlsx`) and create an `outputs [today's date] baseline` folder containing raw output files in the `outputs` folder.
* [Optional] To run a different set of scenarios, change the input filename and output folder name (if desired) under the `USER INPUT` section:
```
# specify input parameter file
df_input_params_all = pd.read_excel('inputs/[your input filename].xlsx')
# specify output folder
output_folder = 'outputs/[your output folder name]'
```
Note: `[your input filename].xlsx` needs to exist in the `inputs` folder. See instructions below for creating new input parameter files.

### [Optional] Add or update scenarios and input parameters
* Navigate to the `inputs` folder.
* Add an `.xlsx` file using the same format as one of the `input params_[scenario group].xlsx` files.
* The easiest way to do this would be to copy an existing `input params_[scenario group].xlsx` file and make changes in the copied file.
* Notes on the input parameters can be found in the `input params_[scenario group].xlsx` files.
* [Not recommended] Alternatively, can make changes in one of the existing `input params_[scenario group].xlsx` files.
* The existing `input params_[scenario group].xlsx` files are used for the analysis in the manuscript. It is recommended to keep these files for reproducibility.

## Authors

Mengyao Yuan ([email protected])

Bo-Xun Wang (University of Wisconsin-Madison), Corey Myers (LLNL), Thomas Moore (Queensland University of Technology), and Wenqin Li (LLNL) have contributed to the development of the systems model and analysis.

## Citation
[TBD]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 622492c

Please sign in to comment.