Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: multiple streams in system #242

Merged
merged 1 commit into from
Oct 19, 2023
Merged

Conversation

jsolaas
Copy link
Contributor

@jsolaas jsolaas commented Oct 17, 2023

Multiple streams can be used to handle crossover streams individually in a train. Currently no additional streams can be given, as the system does not support providing several rates/streams per consumer.

@jsolaas jsolaas force-pushed the feat/multiple-streams-in-system branch from 51a533f to b4aaa4f Compare October 17, 2023 09:54
@@ -15,6 +15,7 @@ class Config:
alias_generator = to_camel_case
allow_population_by_field_name = True

name: Optional[str]
rate: TimeSeriesRate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we need either a (unique) name or an id to attach a stream to a compressor stage when we later allow for streams going into/out of any compressor stage.

Also consider including temperature here and the full fluid model/composition, not just the density.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, the plan is to implement that in another PR. I'm thinking a unique name for a stream within a component makes sense.

@jsolaas jsolaas marked this pull request as ready for review October 18, 2023 10:44
@jsolaas jsolaas requested a review from a team as a code owner October 18, 2023 10:44
- NAME: in_stream_crossover_1
FROM: compressor2
TO: compressor1
- FROM: compressor3
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing name

Comment on lines 106 to 111
- NAME: compressor1
ENERGY_USAGE_MODEL: compressor_with_turbine
- NAME: compressor2
ENERGY_USAGE_MODEL: compressor_sampled_1d
- NAME: compressor3
ENERGY_USAGE_MODEL: compressor_sampled_1d
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should only consume power, not fuel

@jsolaas jsolaas force-pushed the refactor/change-crossover-syntax branch from 7b6b47b to 088b4d5 Compare October 18, 2023 13:30
@jsolaas jsolaas force-pushed the feat/multiple-streams-in-system branch from b4aaa4f to 90741ff Compare October 18, 2023 13:39
@jsolaas jsolaas force-pushed the refactor/change-crossover-syntax branch from 088b4d5 to 11c2581 Compare October 18, 2023 13:43
Base automatically changed from refactor/change-crossover-syntax to main October 18, 2023 13:56
@jsolaas jsolaas force-pushed the feat/multiple-streams-in-system branch 2 times, most recently from 99f689e to 6e90c4b Compare October 19, 2023 06:57
@@ -242,6 +242,7 @@
2.0
]
},
"name": null,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should enforce it ... or generate it

@@ -95,6 +96,54 @@ def __init__(
# previous time step to recirculate. This will take care of that.
self.fluid_to_recirculate_in_stage_when_inlet_rate_is_zero = [None] * len(self.stages)

def evaluate_streams(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that this is not in use yet, just making it ready? Is that so? Possible to use it, and e.g. enable it with a feature flag? Or is it not ready?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used in v2. I'm overwriting the parent method so there is no change where it is used.

@jsolaas jsolaas force-pushed the feat/multiple-streams-in-system branch from 6e90c4b to 1e06c6d Compare October 19, 2023 10:43
Multiple streams can be used to handle crossover streams individually in
a train. Currently no additional streams can be given, as the system
does not support providing several rates/streams per consumer.
@jsolaas jsolaas force-pushed the feat/multiple-streams-in-system branch from 1e06c6d to fc69915 Compare October 19, 2023 10:45
@jsolaas jsolaas merged commit 419c2e9 into main Oct 19, 2023
6 checks passed
@jsolaas jsolaas deleted the feat/multiple-streams-in-system branch October 19, 2023 10:56
equinor-schen pushed a commit that referenced this pull request Nov 22, 2023
Multiple streams can be used to handle crossover streams individually in
a train. Currently no additional streams can be given, as the system
does not support providing several rates/streams per consumer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants