deflex.allocate_fuel_deflex

deflex.allocate_fuel_deflex(method, eta_e, eta_th)[source]

Allocate the fuel input of chp plants to the two output flows.

In contrast to allocate_fuel() default parameter from the config file (deflex.ini) are used.

To change the default parameters create a deflex.ini file in $HOME/.deflex and add the following section:

[chp] eta_c = 0.555 eta_e_ref = 0.5 eta_th_ref = 0.9

This will overwrite the default values from deflex and use them as user default values. Lines with values that are not needed in the chosen method can be removed.

The following methods are available:

Parameters:
  • method (str) – The method to allocate the output flows of chp plants: alternative_generation, carnot, efficiency, electricity, exergy, finnish, heat, iea
  • eta_e (numeric) – The efficiency of the electricity production in the chp plant.
  • eta_th (numeric) – The efficiency of the heat output in the chp plant.
Returns:

The fuel factors of the output flows (heat/electricity)

Return type:

namedtuple

Examples

>>> a = allocate_fuel_deflex("efficiency", eta_e=0.3, eta_th=0.5)
>>> round(a.electricity, 2)
2.08
>>> round(a.heat, 2)
0.75
>>> a = allocate_fuel_deflex("electricity", eta_e=0.3, eta_th=0.5)
>>> round(a.electricity, 2)
3.33
>>> a.heat
0.0
>>> a = allocate_fuel_deflex("exergy", eta_e=0.3, eta_th=0.5)
>>> round(a.electricity, 2)
1.73
>>> round(a.heat, 2)
0.96
>>> a = allocate_fuel_deflex("finnish", eta_e=0.3, eta_th=0.5)
>>> round(a.electricity, 2)
1.73
>>> round(a.heat, 2)
0.96
>>> a = allocate_fuel_deflex("heat", eta_e=0.3, eta_th=0.5)
>>> a.electricity
0.0
>>> a.heat
2.0
>>> a = allocate_fuel_deflex("iea", eta_e=0.3, eta_th=0.5)
>>> round(a.electricity, 2)
1.25
>>> round(a.heat, 2)
1.25