h2integrate.core.commodity_stream_definitions#
Commodity stream definitions for H2Integrate.
This module contains:
multivariable_streams: Definitions for streams that bundle multiple related variables
add_multivariable_output / add_multivariable_input: Helpers to register all constituent variables of a multivariable stream on an OpenMDAO component
Functions
|
Add all constituent variables of a multivariable stream as inputs. |
|
Add all constituent variables of a multivariable stream as outputs. |
- h2integrate.core.commodity_stream_definitions.add_multivariable_output(component, stream_name, n_timesteps)#
Add all constituent variables of a multivariable stream as outputs.
For each variable defined in
multivariable_streams[stream_name], an output named<stream_name>:<var_name>_outis added to component.- Parameters:
component -- An OpenMDAO component instance (must have
add_output).stream_name (str) -- Key into
multivariable_streams.n_timesteps (int) -- Length of the time-series dimension.
- Raises:
KeyError -- If stream_name is not in
multivariable_streams.- Return type:
None
- h2integrate.core.commodity_stream_definitions.add_multivariable_input(component, stream_name, n_timesteps)#
Add all constituent variables of a multivariable stream as inputs.
For each variable defined in
multivariable_streams[stream_name], an input named<stream_name>:<var_name>_inis added to component.- Parameters:
component -- An OpenMDAO component instance (must have
add_input).stream_name (str) -- Key into
multivariable_streams.n_timesteps (int) -- Length of the time-series dimension.
- Raises:
KeyError -- If stream_name is not in
multivariable_streams.- Return type:
None