Thermodynamic NGCT model - #805
Conversation
There was a problem hiding this comment.
I've added both the optional dependency as well as the mainline dependency here; one should be removed, at the discretion of the H2I devs. I actually thought at first (said this to @johnjasa) that pyfluids was already in the dependency chain, but I was apparently incorrect in that understanding.
…n/H2Integrate into feature/thermodynamic_NGCT_model
| extras = ["h2integrate[gis,ard]"] | ||
| all = ["h2integrate[develop,extras,examples]"] |
There was a problem hiding this comment.
| extras = ["h2integrate[gis,ard]"] | |
| all = ["h2integrate[develop,extras,examples]"] | |
| extras = ["h2integrate[gis,ard,thermo]"] | |
| all = ["h2integrate[develop,extras,examples]"] |
| state_outlet, | ||
| mass_flow_fluid=1.0, # by default unity, returns unit-mass kJ/kg | ||
| ): | ||
| # heat transfer to a system should be positive |
There was a problem hiding this comment.
Should there be a user warning or error message if this isn't true?
| return state_outlet | ||
|
|
||
|
|
||
| class ThermodynamicCycleResult: |
There was a problem hiding this comment.
could you add a docstring to this?
|
|
||
|
|
||
| @define(kw_only=True) | ||
| class SimpleCycleTurbinePerformanceConfig(BaseConfig): |
There was a problem hiding this comment.
It seems useful to add design_conditions as an input to the config to be able to use all of the functionality of the NGCT model
| return float(np.min(mass_flowrate_candidates)) | ||
|
|
||
|
|
||
| class GE_7FA05_NGCT(NGCT): |
There was a problem hiding this comment.
I'd be inclined to see the GE_7FA05_NGCT and GE_7EA_NGCT_2014 classes be converted to yaml files for easy inclusion when running the SimpleCycleTurbinePerformanceModel. It seems right now their functionality is limited to this particular file and not as something that would be able to be used within the larger H2I system.
| ) # (min, max) time step lengths (in seconds) compatible with this model | ||
| _control_classifier = "dispatchable" | ||
|
|
||
| def initialize(self, fuel_source="natural_gas"): |
There was a problem hiding this comment.
Is there a reason to initialize the fuel_source here vs using the typical feedstocks? Is this to limit the fuel source type?
| m * q for m, q in zip(mass_flowrates, unit_mass_net_heat_input_vec) | ||
| ] # kJ/s | ||
|
|
||
| # import matplotlib.pyplot as plt |
There was a problem hiding this comment.
You could functionalize this and add a show_plots attribute to the base config for folks to be able to see these outputs if they want.
| Q_fluid_max=1.0, # (explicitly) unit-mass analysis | ||
| ) | ||
|
|
||
| # try to run NGCT cycle here expensively, and all compute variations |
There was a problem hiding this comment.
Is there that big of a computational advantage precomputing this in the setup method versus using the given temperature and pressure data based on the solar resource in the actual compute method? It seems slightly redundant but maybe I'm missing something?
| for T, P in wx_data | ||
| ] | ||
| self.fundamental_cycle = self.ngct.run_turbine_model(self.ambient_fluid_list) | ||
| # print("DEBUG!!!!! RE-COMPUTING UNIT-MASS CYCLE B/C AMBIENT FLUID STATES CHANGED") |
There was a problem hiding this comment.
can we remove these print statements but keep the comment of what's happening in the if statement?
| ) | ||
|
|
||
|
|
||
| if __name__ == "__main__": |
There was a problem hiding this comment.
I'd love to see this as a test and remove everything after if __name__ == "__main__": in this file
Thermodynamic models for NGCT (w/ support for future
combustion_machines)The performance of combustion machines, including both combustion turbines, combined cycle turbines, and reciprocating internal combustion engines, has significant dependence on ambient conditions (real time and design-specified).
These models use standard thermodynamic cycles to increase the fidelity of ICE combustion systems in H2I. These are critical for understanding complementarity of renewables and fuel combustion systems in hybrid energy generation, where ambient conditions determine the performance of nominally firm power sources as well as renewables, often in mutually complimentary ways.
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 4: Related Issues
Section 5: Impacted Areas of the Software
Section 5.1: New Files
h2integrate/converters/combustion_machines/__init__.pyh2integrate/converters/combustion_machines/NGCT_thermo_model.pyh2integrate/converters/combustion_machines/test_NGCT_thermo_model.pyh2integrate/converters/combustion_machines/turbine_simple_cycle.pySection 5.2: Modified Files
h2integrate/core/supported_models.pySection 6: Additional Supporting Information
Section 7: Test Results, if applicable
Section 8 (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.ymlgenerate_class_hierarchy.pyto update the class hierarchy diagram indocs/developer_guide/class_structure.md