Compressed Gas H2 Storage#680
Conversation
| self, | ||
| p_outlet, | ||
| flow_rate_kg_d, | ||
| compressor_type="pipeline", |
There was a problem hiding this comment.
The compressor cost model works different for pipeline compressors and storage compressors - see HDSAM, "Cost Data" tab, "Compressor Costs" section (lines 120-131)
elenya-grant
left a comment
There was a problem hiding this comment.
Thanks for this PR Jonathan! This is looking awesome! I wanted to give some high-level feedback sooner rather than later but would like to do a more detailed review of the h2_storage_cost.py file and the h2_compression.py file. The doc pages look awesome - and the added cost model looks good I think it's hard with converting spreadsheet models to decide what should be hard-coded vs what should be user-configurable - so feel free to push back on any comments I have related to that!
Again - its looking great and although I'd like to do a more thorough review of two files that were primarily changed, I don't want to hold-up the PR if I can't get to it soon! Great work!
johnjasa
left a comment
There was a problem hiding this comment.
Nice, thanks for this Jonathan! Really smooth addition and I appreciate your fantastic docs and clarity of where your numbers came from in HDSAM. Just some small notes, nothing major for sure. I do want @elenya-grant to re-review before we bring this in to make sure it's meeting her expectations.
| ## Cost Correlations | ||
| ## Cost Correlations - Options 1-3 | ||
|
|
||
| For the first three options (underground pipe, lined rock caverns, and salt caverns), cost correlations from [Papadias and Ahluwalia](https://doi.org/10.1016/j.ijhydene.2021.08.028) are used for capital cost calculation. |
There was a problem hiding this comment.
Thanks for this citation addition!
|
|
||
| The model uses the calculation in the HDSAM "Compressed Gas H2 Terminal" sheet. | ||
| Although HDSAM as a whole calculates the "Terminal capacity (kg/day)", and "Design terminal storage capacity (kg)" values from other sheets, our simplified CGT model instead takes these as inputs. | ||
| - "Terminal capacity (kg/day)" from HDSAM is, in our model, set by the maximum value of the `hydrogen_in` input |
There was a problem hiding this comment.
Minor but maybe worth clarifying in the docs here; is it the max across a 24-hour timespan? Since the capacity is kg/day. Or is it the kg/hr amount multiplied by 24? I bet I'll find out shortly, but worth saying here imo
There was a problem hiding this comment.
It's the max across the whole timeseries - happening in lines 614-617 of h2_storage_cost.py. Updating the docs text
| Attributes: | ||
| - max_capacity (float): Maximum storage capacity (kg) | ||
| - max_charge_rate (float): Maximum charging rate (kg/h) | ||
| - sizing_mode (str): Mode for sizing storage (auto or set) | ||
| - commodity_name (str): Name of the commodity | ||
| - commodity_rate_units (str): Units of the commodity | ||
| - cost_year (int): Year for cost calculations | ||
| - labor_rate (float): Labor rate for cost calculations | ||
| - insurance (float): Insurance cost as a fraction of total cost | ||
| - property_taxes (float): Property taxes as a fraction of total cost | ||
| - licensing_permits (float): Licensing and permits cost as a fraction of total cost | ||
| - compressor_om (float): Compressor operation and maintenance cost as a fraction of total cost | ||
| - facility_om (float): Facility operation and maintenance cost as a fraction of total cost | ||
| - inlet_pressure_bar (float): Inlet pressure for compressed gas storage (bar) | ||
| - storage_pressure_bar (float): Storage pressure for compressed gas storage (bar) - max 700 | ||
| - cg_capex_per_kg_350_bar (float): Capital cost per kg for compressed gas storage at 350 bar | ||
| Default is $1200 (2013 dollars) from HDSAM, converted to 2018 dollars using CEPCI. | ||
| - cg_capex_per_kg_700_bar (float): Capital cost per kg for compressed gas storage at 700 bar | ||
| Default is $1800 (2013 dollars) from HDSAM, converted to 2018 dollars using CEPCI. |
There was a problem hiding this comment.
Thanks for cleaning this up!
|
|
||
| commodity_name: str = field(default="hydrogen") | ||
| commodity_units: str = field(default="kg/h", validator=contains(["kg/h", "g/h", "t/h"])) | ||
| commodity_rate_units: str = field(default="kg/h", validator=contains(["kg/h", "g/h", "t/h"])) |
There was a problem hiding this comment.
Marking this for @elenya-grant to review; does this jive with your desired usage of commodity_rate_units for storage? i.e. those are the kg/h units? Was this h2_storage_cost.py just not up-to-date with other naming conventions in H2I?
There was a problem hiding this comment.
yes - this one was not up-to-date and thanks Jonathan for updating it!
| installed_capex = depreciable_capex + land_capex + other_capex | ||
|
|
||
| # ============================================================================ | ||
| # Calculate OPEX - NEEDS TO BE UPDATED |
There was a problem hiding this comment.
Is this "NEEDS TO BE UPDATED" note still relevant? part of this PR or follow-on work?
There was a problem hiding this comment.
Nope - I put that there in an intermediate commit where I had just copy-pasted code from the geologic storage. Now it is updated, I'll remove the note
…ting for doc string
elenya-grant
left a comment
There was a problem hiding this comment.
Looks good to me! Thanks for putting this together Jonathan! I pushed up a small change (I removed commodity_name from the config since it wasn't being used)
johnjasa
left a comment
There was a problem hiding this comment.
Perfect, thanks for addressing those comments! 🎉
Compressed Gas H2 Storage
This adds in the Compressed Gas Terminal storage cost model from HDSAM, to complement the geologic and pipe storage models that were already (partially) based on HDSAM. HDSAM's "Compressed Gas H2 Terminal" tab contains highly detailed calculations for the cost of H2 stored in many compressed gas tanks, at either 350 bar or 700 bar, as well as the mechanisms needed to load H2 onto shipment trucks. This cost model makes a key simplifications to the HDSAM model to reduce computational complexity and make it match the cost of just storage, without the truck loading pieces that are considered in HDSAM. The principal additions are made in
h2integrate/storage/hydrogen/hydrogen_storage_cost.pyThe piping, plumbing, and land costs, which are minor cost components compared to the storage vessel and compressor costs, have had their computation simplified. Constant ratios of material to H2 charge/discharge capacity have been established for these costs, by varying the capacity as an input to HDSAM and recording the ratio of material needed to achieve this H2 charge/discharge capacity. Although these ratios varied slightly throughout the range of possible capacities, they have been simplified to a constant for the purposes of this model. These constants are as follows:
The tank cost is only modeled in HDSAM at two specific pressures: 350 bar and 700 bar. To allow any storage pressure to be simulated, I have simply used a linear interpolation of the two discrete $/kg costs for these pressure levels.
The compressor model
h2integrate/storage/hydrogen/h2_transport/h2_compression.py, also based on HDSAM, is modified to distinguish between pipeline and storage compressors. This was previous using only the pipeline compressor HDSAM model; a new input has been created to distinguish between pipeline and storage compressors.Regression tests for this new model were added to match the previous existing tests in
h2integrate/storage/hydrogen/test/test_hydrogen_storage.py. For this, a distinction was added betweenexpected_capex(used intest_h2_storage_capex_opex) and a newexpected_storage_capex(used intest_h2_storage_capex_per_kg) - this is because, while the Papadias polynomial fits were used to calculate storage costs as a single capex value, the new compressed gas model distinguishes between the tank cost per kg (used to calculateexpected_storage_capex) and other, minor capex components. Thetest_h2_storage_capex_per_kgonly calculates this first tank component of the capex, not the whole capex.Feedback is requested on whether the simplifications to the HDSAM model are acceptable, and if this model will serve larger H2 storage modeling goals.
Section 1: Type of Contribution
Section 2: Draft PR Checklist
TODO:
Type of Reviewer Feedback Requested (on Draft PR)
Structural feedback:
Implementation feedback:
Other feedback:
Section 3: General PR Checklist
docs/files are up-to-date, or added when necessaryCHANGELOG.md"A complete thought. [PR XYZ]((https://github.com/NatLabRockies/H2Integrate/pull/XYZ)", where
XYZshould be replaced with the actual number.Section 3: Related Issues
#355 and #508
Section 4: Impacted Areas of the Software
Section 4.1: New Files
None
Section 4.2: Modified Files
h2integrate/storage/hydrogen/h2_storage_cost.pyCompressedGasStorageCostModel: Models compressed gas h2 storageHydrogenStorageBaseCostModelConfig: Addedinlet_pressure_barandstorage_pressure_baras fields to allow compressor in/out pressures to vary.h2integrate/storage/hydrogen/h2_compression.pyCompressor: Split into pipeline and storage compressors.gitignore: Not ignoring images within docsdocs\storage\hydrogen_storage.mdinto the right folder so broken images aren't shownSection 5: Additional Supporting Information
Section 6: Test Results, if applicable
Section 7 (Optional): New Model Checklist
docs/developer_guide/coding_guidelines.mdattrsclass to define theConfigto load in attributes for the modelBaseConfigorCostModelBaseConfiginitialize()method,setup()method,compute()methodCostModelBaseClasssupported_models.pycreate_financial_modelinh2integrate_model.pytest_all_examples.pydocs/user_guide/model_overview.mddocs/section<model_name>.mdis added to the_toc.yml