Thermodynamic NGCT model - #805
Conversation
…n/H2Integrate into feature/thermodynamic_NGCT_model
|
|
||
|
|
||
| @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.
| 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?
There was a problem hiding this comment.
yes! I was surprised to see that there was a significant speedup but there are a lot of chemical property lookups that are a function of the ambient conditions (typically unique per timestep). once those are done, they don't change as a function of the throttled mass flow, although this is a simplified model of throttled flow and it's likely better to include a plenum pressure drop to be slightly more accurate (which would necessitate moving away from precomputation but introduces a lot more complexity in how the compute stage would have to operate). anyway this is way too much info but I think this is the best way to do it for now.
elenya-grant
left a comment
There was a problem hiding this comment.
This is just a partial review that I wanted to submit before reviewing the whole thing! Mostly had minor questions and suggestions! I can do a more full review later!
| self.ngct = NGCT.NGCT( | ||
| ratio_P=self.config.pressure_ratio, | ||
| Trel_firing=self.config.firing_temp_C, | ||
| isentropic_efficiency_compressor=self.config.isentropic_efficiency_compressor, | ||
| isentropic_efficiency_turbine=self.config.isentropic_efficiency_turbine, | ||
| Q_fluid_max=1.0, # (explicitly) unit-mass analysis | ||
| ) |
There was a problem hiding this comment.
would any of the inputs to NGCT be optimization variables or swept in a parameter sweep for any foreseeable use-case? If so - then I think these should be inputs and then this could be moved to the compute() method.
There was a problem hiding this comment.
I didn't see these as being really in-scope as design variables for optimization ever and it's hard to see where they'd be used for a parameter sweep? they're kind of firing temp is limited by metallurgical considerations and the pressure ratio is a fairly fixed thing, it lives in a really tight window and is limited by specific design details of the engine
There was a problem hiding this comment.
the one piece we might want to understand is the questions of like "if we could improve the fundamental science of a combustion turbine by x what is the fleet-scale benefit?" but idk that our modeling is detailed enough to really dig in that far
|
|
||
| # extract from the solar resource data | ||
| temperature_degC = discrete_inputs["solar_resource_data"]["temperature"] | ||
| pressure_Pa = ( |
There was a problem hiding this comment.
I think the pressure data output by the solar resource data defaults to mbar - not hPa?
There was a problem hiding this comment.
1 mbar == 1 hPa, iirc
| # try to run NGCT cycle here expensively, and all compute variations | ||
| # should be derivable w/o major new computation after that | ||
| P_ambient = 101325.0 # Pa | ||
| T_ambient = 15.0 # °C | ||
| self.working_fluid = NGCT.pyfluids.Fluid(NGCT.pyfluids.FluidsList.Air) | ||
| wx_data = [(T_ambient, P_ambient)] | ||
| self.wx_checksums = [hash(wxd) for wxd in wx_data] | ||
| self.ambient_fluid_list = [ | ||
| self.working_fluid.with_state( | ||
| NGCT.pyfluids.Input.pressure(P), | ||
| NGCT.pyfluids.Input.temperature(T), | ||
| ) | ||
| for T, P in wx_data | ||
| ] | ||
| self.fundamental_cycle = self.ngct.run_turbine_model(self.ambient_fluid_list) |
There was a problem hiding this comment.
I'm confused by this comment and the code itself. If the first run is always with the ambient temperature and pressure - then the self.wx_checksums and wx_checksums will always be different the first time compute() is called. Why not just initialize the self.wx_checksums to a list of empty strings or Nones and not run the NGCT model in the setup() method?
…n/H2Integrate into feature/thermodynamic_NGCT_model
…n/H2Integrate into feature/thermodynamic_NGCT_model
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