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

Floating point error in hydrogen storage calculation #1331

Open
mabijkerk opened this issue Mar 24, 2023 · 2 comments
Open

Floating point error in hydrogen storage calculation #1331

mabijkerk opened this issue Mar 24, 2023 · 2 comments
Assignees
Labels
Pinned Will never be marked as stale or auto-closed.

Comments

@mabijkerk
Copy link
Member

The energy_hydrogen_storage does not have any loss specified on the node:

V(energy_hydrogen_storage,loss_output_conversion)

0.0

However when I subtract the sum of the hydrogen output curve from the sum of the hydrogen input curve to confirm that the annual loss is 0, the result instead is a negative loss:

SUM(V(energy_hydrogen_storage,hydrogen_input_curve)) -
  SUM(V(energy_hydrogen_storage,hydrogen_output_curve))

-8.493661880493164e-07

@noracato this seems like a floating point error in the hourly calculation for hydrogen storage. Can you look into this? We're using this query in the new storage export and it is strange to see a negative loss in the export.

@github-actions
Copy link

This issue has had no activity for 60 days and will be closed in 7 days. Removing the "Stale" label or posting a comment will prevent it from being closed automatically. You can also add the "Pinned" label to ensure it isn't marked as stale in the future.

@github-actions github-actions bot added the Stale Issue had no activity for 60 days and will be, or has been, closed. label May 24, 2023
@mabijkerk mabijkerk added Pinned Will never be marked as stale or auto-closed. and removed Stale Issue had no activity for 60 days and will be, or has been, closed. labels May 24, 2023
@mabijkerk
Copy link
Member Author

Floating point errors also occur for the forecasting algorithm. For a flow battery with 500 MW installed output capacity and 250 MW input capacity, I get the following results:

MAX(V(energy_flexibility_flow_batteries_electricity,electricity_input_curve)

250.00000000000003

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pinned Will never be marked as stale or auto-closed.
Projects
None yet
Development

No branches or pull requests

2 participants