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

fix: remove inlet actual rate in compressor sampled results #190

Merged
merged 1 commit into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -909,22 +909,7 @@
false,
false
],
"inlet_stream_condition": {
"actual_rate_m3_per_hr": [
3500000.0,
3600000.0,
3700000.0,
3800000.0,
3900000.0,
4000000.0,
4100000.0,
4500000.0,
3500000.0,
2500000.0,
2000000.0,
3000000.0
]
},
"inlet_stream_condition": {},
"is_valid": [
true,
true,
Expand Down Expand Up @@ -1342,22 +1327,7 @@
false,
false
],
"inlet_stream_condition": {
"actual_rate_m3_per_hr": [
233000000.0,
237000000.0,
241000000.0,
254000000.0,
258000000.0,
271000000.0,
275000000.0,
279000000.0,
283000000.0,
286000000.0,
290000000.0,
293000000.0
]
},
"inlet_stream_condition": {},
"is_valid": [
true,
true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -909,22 +909,7 @@
false,
false
],
"inlet_stream_condition": {
"actual_rate_m3_per_hr": [
3500000.0,
3600000.0,
3700000.0,
3800000.0,
3900000.0,
4000000.0,
4100000.0,
4500000.0,
3500000.0,
2500000.0,
2000000.0,
3000000.0
]
},
"inlet_stream_condition": {},
"is_valid": [
true,
true,
Expand Down Expand Up @@ -1342,22 +1327,7 @@
false,
false
],
"inlet_stream_condition": {
"actual_rate_m3_per_hr": [
233000000.0,
237000000.0,
241000000.0,
254000000.0,
258000000.0,
271000000.0,
275000000.0,
279000000.0,
283000000.0,
286000000.0,
290000000.0,
293000000.0
]
},
"inlet_stream_condition": {},
"is_valid": [
true,
true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ def evaluate_rate_ps_pd(
energy_usage = turbine_result.energy_usage if turbine_result is not None else list(interpolated_consumer_values)

# Returning a result as if the sampled compressor is a train with a single stage.
# Note that actual rates are not available since it is not possible to convert from standard rates to
# actual rates when information about fluid composition (density in particular) is not available
result = CompressorTrainResult(
energy_usage=energy_usage,
energy_usage_unit=Unit.MEGA_WATT if self.function_values_are_power else Unit.STANDARD_CUBIC_METER_PER_DAY,
Expand All @@ -226,7 +228,6 @@ def evaluate_rate_ps_pd(
power_unit=Unit.MEGA_WATT,
inlet_stream_condition=CompressorStreamCondition(
pressure=list(suction_pressure) if suction_pressure is not None else None,
actual_rate_m3_per_hr=list(rate) if rate is not None else None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add a comment here or in CompressorStreamCondition to specify what you mentioned in the PR comment that knowing fluid_density is a requirement to set this, to avoid doing the same mistake in the future, and to bring awareness?

),
outlet_stream_condition=CompressorStreamCondition(
pressure=list(discharge_pressure) if discharge_pressure is not None else None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8359,12 +8359,7 @@
],
"inlet_stream_condition": {
"actual_rate_before_asv_m3_per_hr": null,
"actual_rate_m3_per_hr": [
3035242.5,
2372352.0,
2667349.5,
0.0
],
"actual_rate_m3_per_hr": null,
"density_kg_per_m3": null,
"kappa": null,
"pressure": [
Expand Down Expand Up @@ -19502,12 +19497,7 @@
],
"inlet_stream_condition": {
"actual_rate_before_asv_m3_per_hr": null,
"actual_rate_m3_per_hr": [
3035242.5,
2372352.0,
2667349.5,
0.0
],
"actual_rate_m3_per_hr": null,
"density_kg_per_m3": null,
"kappa": null,
"pressure": [
Expand Down Expand Up @@ -19690,12 +19680,7 @@
],
"inlet_stream_condition": {
"actual_rate_before_asv_m3_per_hr": null,
"actual_rate_m3_per_hr": [
3035242.5,
2372352.0,
2667349.5,
0.0
],
"actual_rate_m3_per_hr": null,
"density_kg_per_m3": null,
"kappa": null,
"pressure": [
Expand Down Expand Up @@ -19925,12 +19910,7 @@
],
"inlet_stream_condition": {
"actual_rate_before_asv_m3_per_hr": null,
"actual_rate_m3_per_hr": [
3035242.5,
2372352.0,
2667349.5,
0.0
],
"actual_rate_m3_per_hr": null,
"density_kg_per_m3": null,
"kappa": null,
"pressure": [
Expand Down Expand Up @@ -20113,12 +20093,7 @@
],
"inlet_stream_condition": {
"actual_rate_before_asv_m3_per_hr": null,
"actual_rate_m3_per_hr": [
3035242.5,
2372352.0,
2667349.5,
0.0
],
"actual_rate_m3_per_hr": null,
"density_kg_per_m3": null,
"kappa": null,
"pressure": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1659,12 +1659,7 @@
],
"inlet_stream_condition": {
"actual_rate_before_asv_m3_per_hr": null,
"actual_rate_m3_per_hr": [
1000000.0,
1000000.0,
1000000.0,
1000000.0
],
"actual_rate_m3_per_hr": null,
"density_kg_per_m3": null,
"kappa": null,
"pressure": [
Expand Down Expand Up @@ -1847,12 +1842,7 @@
],
"inlet_stream_condition": {
"actual_rate_before_asv_m3_per_hr": null,
"actual_rate_m3_per_hr": [
5000000.0,
5000000.0,
5000000.0,
5000000.0
],
"actual_rate_m3_per_hr": null,
"density_kg_per_m3": null,
"kappa": null,
"pressure": [
Expand Down Expand Up @@ -2035,12 +2025,7 @@
],
"inlet_stream_condition": {
"actual_rate_before_asv_m3_per_hr": null,
"actual_rate_m3_per_hr": [
5000000.0,
5000000.0,
5000000.0,
5000000.0
],
"actual_rate_m3_per_hr": null,
"density_kg_per_m3": null,
"kappa": null,
"pressure": [
Expand Down Expand Up @@ -2225,12 +2210,7 @@
],
"inlet_stream_condition": {
"actual_rate_before_asv_m3_per_hr": null,
"actual_rate_m3_per_hr": [
2000000.0,
2000000.0,
2000000.0,
6000000.0
],
"actual_rate_m3_per_hr": null,
"density_kg_per_m3": null,
"kappa": null,
"pressure": [
Expand Down Expand Up @@ -2413,12 +2393,7 @@
],
"inlet_stream_condition": {
"actual_rate_before_asv_m3_per_hr": null,
"actual_rate_m3_per_hr": [
4000000.0,
4000000.0,
4000000.0,
4000000.0
],
"actual_rate_m3_per_hr": null,
"density_kg_per_m3": null,
"kappa": null,
"pressure": [
Expand Down Expand Up @@ -2601,12 +2576,7 @@
],
"inlet_stream_condition": {
"actual_rate_before_asv_m3_per_hr": null,
"actual_rate_m3_per_hr": [
4000000.0,
4000000.0,
4000000.0,
4000000.0
],
"actual_rate_m3_per_hr": null,
"density_kg_per_m3": null,
"kappa": null,
"pressure": [
Expand Down Expand Up @@ -2791,12 +2761,7 @@
],
"inlet_stream_condition": {
"actual_rate_before_asv_m3_per_hr": null,
"actual_rate_m3_per_hr": [
3000000.0,
3000000.0,
3000000.0,
3000000.0
],
"actual_rate_m3_per_hr": null,
"density_kg_per_m3": null,
"kappa": null,
"pressure": [
Expand Down Expand Up @@ -2979,12 +2944,7 @@
],
"inlet_stream_condition": {
"actual_rate_before_asv_m3_per_hr": null,
"actual_rate_m3_per_hr": [
4000000.0,
4000000.0,
4000000.0,
4000000.0
],
"actual_rate_m3_per_hr": null,
"density_kg_per_m3": null,
"kappa": null,
"pressure": [
Expand Down Expand Up @@ -3167,12 +3127,7 @@
],
"inlet_stream_condition": {
"actual_rate_before_asv_m3_per_hr": null,
"actual_rate_m3_per_hr": [
4000000.0,
4000000.0,
4000000.0,
4000000.0
],
"actual_rate_m3_per_hr": null,
"density_kg_per_m3": null,
"kappa": null,
"pressure": [
Expand Down Expand Up @@ -3402,12 +3357,7 @@
],
"inlet_stream_condition": {
"actual_rate_before_asv_m3_per_hr": null,
"actual_rate_m3_per_hr": [
2000000.0,
2000000.0,
2000000.0,
3000000.0
],
"actual_rate_m3_per_hr": null,
"density_kg_per_m3": null,
"kappa": null,
"pressure": [
Expand Down Expand Up @@ -3590,12 +3540,7 @@
],
"inlet_stream_condition": {
"actual_rate_before_asv_m3_per_hr": null,
"actual_rate_m3_per_hr": [
4000000.0,
4000000.0,
4000000.0,
4000000.0
],
"actual_rate_m3_per_hr": null,
"density_kg_per_m3": null,
"kappa": null,
"pressure": [
Expand Down Expand Up @@ -3778,12 +3723,7 @@
],
"inlet_stream_condition": {
"actual_rate_before_asv_m3_per_hr": null,
"actual_rate_m3_per_hr": [
4000000.0,
4000000.0,
4000000.0,
4000000.0
],
"actual_rate_m3_per_hr": null,
"density_kg_per_m3": null,
"kappa": null,
"pressure": [
Expand Down
Loading