quintel / refinery

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

How to deal with converters that have multiple carriers as input? #21

Closed wouterterlouw closed 11 years ago

wouterterlouw commented 11 years ago

There are several converters in the Metals sub-sector that convert multiple carriers into another carrier, e.g. the energy_steel_blastfurnace_current_transformation_cokes converts coal and cokes into coal_gas with a certain efficiency.

beta et-engine com_data_164953_layout-2

The amount of coal_gas that comes out of this converter is known, but it seems that Refinery is not able to calculate the amount coal and cokes needed.

Most likely is something similar the case with the energy_cokesoven_consumption_coal_gas (coal_gas and electricity) and energy_steel_blastfurnace_bat_transformation_cokes (coal and cokes).

Including @wmeyers, @ChaelKruip and @antw

ChaelKruip commented 11 years ago

This is another one of those pseudo-mixers that were discussed in this ticket

wouterterlouw commented 11 years ago

This is a temporary solution!

The input and output conversion (efficiency) of the energy_steel_blastfurnace_currnet_transformation_cokes and energy_steel_blastfurnace_bat_transformation_cokes converter is calculated based on IEA 2011 data. These efficiencies will be hard coded in active document of the converter as:

For energy_steel_blastfurnace_current_transformation_cokes

- input.coal = 0.391683437555641
- input.cokes = 0.608316562444359
- output.coal_gas = 0.400029027576197

For energy_steel_blastfurnace_bat_transformation_cokes

- input.coal = 0.391683437555641
- input.cokes = 0.608316562444359
- output.coal_gas = 0.400029027576197

The related attributes for the consumption part are:

For industry_steel_blastfurnace_current_consumption_useable_heat

- output.not_defined = 0.217614737914602

For industry_steel_blastfurnace_current_consumption_useable_heat

- output.not_defined = 0.241794153238447
wouterterlouw commented 11 years ago

Assigning myself.

antw commented 11 years ago

These efficiencies will be hard coded in active document of the converter as

Please note that you cannot currently do this as changes made directly to these files will be lost whenever we re-import them from InputExcel. Naturally this is a temporary problem and won't exist once we switch away from InputExcel.

As a temporary solution, we could could specify these conversions as a query once quintel/atlas#6 is done, since queries will not be deleted during import, and it's totally acceptable for a query to just be a number.

I'll have to get back to you with more information in a day or two, once that Atlas feature is implemented.

ChaelKruip commented 11 years ago

I'll have to get back to you with more information in a day or two, once that Atlas feature is implemented.

@antw what is the status?

antw commented 11 years ago

@antw what is the status?

Done! I'll have to write some documentation by the end of the today, but the feature is now implemented. :grinning:

ChaelKruip commented 11 years ago

:+1:

antw commented 11 years ago

@wouterterlouw It's now possible to do what you want in Atlas. Static attributes will still be overwritten when we do a fresh import of the documents, but dynamic attributes (i.e. queries) will be kept.

Therefore, if you specify these conversions as queries, your custom values will used. Do this by writing the attributes with a tilde ~ instead of a dash -:

~ input.coal = 0.391683437555641
~ input.cokes = 0.608316562444359
~ output.coal_gas = 0.400029027576197

(a number is a perfectly valid query)

One limitation you need to be aware of is that you cannot use an "elastic" slot when also specifying conversions with a query. An elastic slot is one whose value increases or decreases so that all the conversions add up to 1.0 (typically used for loss). I will fix this within a day or two, but until then the elastic slots must be specified explicitly (as queries):

No:

~ output.coal_gas = 0.400029027576197
- output.loss     = elastic

Yes:

~ output.coal_gas = 0.400029027576197
~ output.loss     = 1.0 - 0.400029027576197
wouterterlouw commented 11 years ago

It's now possible to do what you want in Atlas.

@antw Great! :)

Is it possible to combine dynamic attributes as input and an elastic slot as output? E.g.:

~ input.coal_gas = 0.75
~ input.electricity = 1 - 0.75
- output.loss = elastic
antw commented 11 years ago

Is it possible to combine dynamic attributes as input and an elastic slot as output? E.g.:

Sure; inputs and outputs are handled separately, so that's fine.

wouterterlouw commented 11 years ago

Closing.

antw commented 11 years ago

FYI @wouterterlouw:

One limitation you need to be aware of is that you cannot use an "elastic" slot when also specifying conversions with a query.

This is no longer the case. You can now use elastic slots while using a query to set the conversion of others.