-
Notifications
You must be signed in to change notification settings - Fork 7
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
refactory energy calculation #185
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments, other wise lgtm 👍
We should also update the docstrings eventually
@@ -3,5 +3,5 @@ | |||
1,liquid_gas,kg,14.1 | |||
2,coal,kg,6.0 | |||
3,pellet,kg,5.4 | |||
4,woodchips,kg,5.2 | |||
4,wood chips,kg,5.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep it as one word - or alternatively "wood_chips" (similar to "liquid_gas"
@@ -122,8 +122,9 @@ def get(self, fuel_type, unit): | |||
:return: | |||
:rtype: | |||
""" | |||
print(f'fuel_type == "{fuel_type.value}" & unit == "{unit}"') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall this print statement be kept here?
consumption_kwh = consumption | ||
|
||
# co2 equivalents for heating and electricity refer to a consumption of 1 TJ | ||
# so consumption needs to be converted to TJ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These comments can be removed as we are not converting to TJ anymore
|
||
# co2 equivalents for heating and electricity refer to a consumption of 1 TJ | ||
# so consumption needs to be converted to TJ | ||
return consumption * params.energy_share / co2e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be multiplication not division! (I think we had this fixed somewhere before already?)
and comments can be removed, as we are not converting to TJ anymore (with the new emission factors)
No description provided.