quintel / refinery

Calculates node demands and edge shares for sparse energy graphs.
2 stars 0 forks source link

Validation error in energy_treatment_natural_gas #49

Closed wouterterlouw closed 11 years ago

wouterterlouw commented 11 years ago

After merging the atlas branch on etsource (https://github.com/quintel/etsource/pull/495), the following validation error occurs with running refinery:

  * #<Refinery::Slot (out, natural_gas) node=:energy_treatment_natural_gas> demand (2154480.000000) 
does not match output of the node (2124353.190842)

The 2154480 TJ is exactly the amount of natural_gas from the extraction converter. The output of the node (2124353 TJ) is the input from the extraction converter times the efficiency of the treatment converter (0.98...). It seems that this loss is not included in the calculation slot demand.

Including @antw and @ChaelKruip

ChaelKruip commented 11 years ago

I changed the efficiency of the gas power fuel mix chp in industry here. Is this efficiency is not taken into account in the CHP analysis yet, could that have this kind of fall-out @wouterterlouw @StijnDellaert ?

StijnDellaert commented 11 years ago

The CHP analysis also has the correct 48% heat efficiency for the industry gas engine CHP. So this is not causing the problem.

antw commented 11 years ago

It was a Refinery bug whereby the calculation for overflow edges (inversed_flexible) wasn't respecting the slot conversion. Should be resolved now.

antw commented 11 years ago

FYI @dennisschoenmakers: ETEngine had the same bug! Fixed it in quintel/etengine@761f374.

dennisquintel commented 11 years ago

Etengine as in 'production'?

antw commented 11 years ago

Etengine as in 'production'?

Yep; the buggy version of calculate_inversed_flexible was added two years ago, and it looks like the version it replaced also had this problem.

However, it turns out this doesn't actually pose a problem in production today because all of the nodes which have an outgoing inversed_flexible have 0% loss: