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

Adding Green Steel compressor test to greenheart tests #279

Draft
wants to merge 1 commit into
base: greensteel-eco-sync
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Copy link
Collaborator

Choose a reason for hiding this comment

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

After talking with Masha it sounds like we should try to check against a published source of our model rather than the Greensteel code as their values are pretty rough estimates.

Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,25 @@ def test_max_flow_rate_per_compressor(self):
n_compressors = 2
with raises(ValueError, match=r".* 5\.4 .*"):
comp = Compressor(p_outlet,flow_rate_kg_d, p_inlet=p_inlet, n_compressors=n_compressors)


class TestH2Compressor_Comp():
p_inlet = 20 # bar
p_outlet = 68 # bar
flow_rate_kg_d = 205114.4564015925
n_compressors = 1

def test_capex(self):
comp = Compressor(self.p_outlet, self.flow_rate_kg_d, p_inlet=self.p_inlet, n_compressors=self.n_compressors)
comp.compressor_power()
total_capex, total_OM = comp.compressor_costs()
assert total_capex == 7910145

# This test is failing because the assert value comes from the after storage case from Green Steel, based on
# pipeline compressor data file loaded into Green Steel analysis. The flow_rate_kg_d value is from the Green
# Steel file, but the other inputs were not specified in the Green Steel analysis and are defaults

# def test_opex(self):
# comp = Compressor(self.p_outlet, self.flow_rate_kg_d, p_inlet=self.p_inlet, n_compressors=self.n_compressors)
# comp.compressor_power()
# total_capex, total_OM = comp.compressor_costs()
# assert total_OM == 200014.00244504173