# Transformer which raises the temperature #97

Merged
merged 42 commits into from Feb 29, 2016

## Conversation

Projects
None yet
2 participants
Member

### uvchik commented Feb 23, 2016

 The aim of this feature is to transport energy from one bus to another while the buses may have different temperature level. So if the temperature of the input bus is lower than the temperature of the output bus external energy is used to heat up the flow. A new bus class has to be created named HeatBus that has an attribute for the temperature and the return flow temperature. Furthermore a transformer is needed that has two inputs (storage-bus, external energy) and one output. The output might be a bus for district heating with temperatures between 80 and 120°C. The storage bus might be a "low" temperature bus with a temperature below 100°C (unpressurised). The external energy might be gas, oil, electricity, etc..

### uvchik added some commits Feb 12, 2016

 add class HeatBus containing an attribute for the temperature 
 eb224db 
 fix typos 
 7687630 
 add post heating component 
 b42944e 
 add possibility to have more than one input into a component 
 4ee86b1 
 add return temperature to heat bus 
 1933abb 
 fix call from string-call to list-call for input flows 
 5fdc21a 
 change import to improve the readability 
"transformer.Simple" instead of just "Simple"
 b232a65 
 fix pep8 
 f42a900 
 add relation of two components having one joined output flow 
 0c30ba9 
 add relation of a postheater related to the temperature levels of the… 
… buses
 b96c3f6 
 add assembler for a postheater 
 f5ccf9c 
 fix bounds for upper bound of the input flows 
 973ec1f 
 Merge branch 'dev' of github.com:oemof/oemof into features/heatstorag… 
…e_with_dT

Conflicts:
oemof/solph/linear_constraints.py
 9e5a57d 
Member Author

### uvchik commented Feb 23, 2016

 The additional device will heat up the flow and therefore will deliver an amount of energy. This amount depends on the temperature difference between the buses and the temperature difference between the input bus and the return flow temperature. Then the amount of all input flows multiplied with their efficiency will be the output flow. The efficiency of the each will be calculated so that the sum of the efficiency of both flows might be greater than one. f=\frac{T^{flow}_{bus,o}-T^{flow}_{bus,i}}{T^{flow}_{bus,i}-T^{return}_{bus,o}} w_{e,i_{e,1}}(t)=w_{e,i_{e,2}}(t)\cdot f,\forall e,\forall t w_{e,i_{e,1}}(t)\cdot\eta_{e,i_{e,1}}(t)+w_{e,i_{e,2}}(t)\cdot\eta_{e,i_{e,2}}(t)=w_{e,o_{e}},\forall e,\forall t 

### uvchik added some commits Feb 23, 2016

 fix sphinx build (very small issues) 
 107d415 
 add docstring for function "add_postheat_relation" 
 dd6e14d 
 add docstring for "add_two_inputs_io_relation" 
 10a4883 
 extend docstring 
 c79078f 
 add whatsnew entry 
 335dc33 
 fix missing "out_max" if one component has an "ub_out" attribute 
fI one component has an ub_out attribute and if invest=True the rule
"add_output_rule_time_depended_bound" will be used for all components of
the block. Out_max was not generated for components that does not have
the ub_out attribute.

Conflicts:
oemof/solph/variables.py
 e1d1b00 
 add additional capacity to the objective expression for PostHeating 
 18b4b6d 
 avoid error message if input-bound (in_max) is infinity or None 
 a065031 
Member Author

### uvchik commented on a065031Feb 24, 2016

 Click on the commit here ⬆️ because this is a commit-comment 😄 If investment=True and an input rule is used an error message is raised. Sometimes the in_max value exists but is set to 'inf' or even to 'None' or it does not exist but can exist. In all these cases the error is still raised. I think this should not be the case so I check for 'None' and 'inf' values before raising an error. @simonhilpert Is it okay for you?
Member

### simnh replied Feb 24, 2016

 I am not sure what you are trying to avoid. You can't use side="input" because this isn't implemented. No matter what. Even if in_max of the components exist ... So the error should be raised in any way, only if you implement the constraint it would make sense to change anything there.
Member Author

### uvchik replied Feb 25, 2016

 In my assembler I use the following function. def linear_constraints(om, block): lc.add_two_inputs_io_relation(om, block) var.set_bounds(om, block, side="output") var.set_bounds(om, block, side="input") lc.add_postheat_relation(om, block) I do not need if-clauses within this function because the bounds for in_max will be set if in_max is defined and will be set to infinity if in_max is not set. If they are set to infinity and I use the investment mode the error above is raised. This makes no sense because I do not need a constraint in_max + in_add < inf. Therefore the error is wrong and should be skipped. This is what my changes do, skipping the error if in_max is set to "inf" or is not set.
 add HeatBus assembler 
This is just a test and does not work.
 9564be7 

Closed

### Simon Hilpert added some commits Feb 25, 2016

 Add slack components 
 dd18861 
 Adapt example_app from developing examples 
 13ade2d 

### Hilpert and others added some commits Feb 26, 2016

 Integrate SlackComponents in oemof structure 
 c4035ac 
 Remove obsolete code 
 48c598d 
 Remove obsolete print statement 
 14d6bdb 
 Merge branch 'features/slack_components' of github.com:oemof/oemof in… 
…to features/heatstorage_with_dT

Conflicts:
oemof/solph/optimization_model.py
oemof/solph/variables.py
 a27fa9f 
 fix import of shortage and excess 
 d4710d9 

### Simon Hilpert and others added some commits Feb 27, 2016

 Move slack component creation from bus class to optimization_model.py 
 0dceeb2 
 Merge branch 'features/slack_components' of github.com:oemof/oemof in… 
…to features/heatstorage_with_dT

Conflicts:
oemof/solph/optimization_model.py
 ae7fe3e 
 fix pep8 
 4f68889 
Member Author

### uvchik commented Feb 29, 2016

 I merged PR #107, so if I merge this branch the content of features/slack_components will be merged, too.

### uvchik added some commits Feb 29, 2016

 Revert "Move slack component creation from bus class to optimization_… 
…model.py"

This reverts commit 0dceeb2.

Conflicts:
oemof/solph/optimization_model.py
 09c8a09 
 fix import error 
 e6b262a 
 restructure test 
 541e6ef 
 fix constraint test to new variable name of the excess variable 
 3f538d7 
 fix all tests to new variable name of "excess" and test default (exce… 
…ss=True)
 a4259c5 
 fix test to changed order of entities 
 49a7948 
 add excess variable to invest test 
 f8b37bf 
 optimise the structure of the constraint tests 
 10d1ba8 
 add HeatBus and PostHeating tests 
 2ec83a4 
Member

### uvchik commented on oemof/core/network/entities/__init__.py in dd18861Feb 29, 2016

 We have to decide whether it is possible to use non-string uid's. Using tuples as uid was the idea of @gnn but the issue fixing that is still pending (see #26). @simonhilpert : Your changes will not work with tuples.
 fix two_region_example due to changes with the excess variable 
 2c0411f 
Member Author

### uvchik commented Feb 29, 2016

 All tests are okay, all examples work. Plausibility test look fine. I will merge this branch. With this branch features/slack_components is merged without commit 0dceeb2. @simonhilpert : To merge #107 you will have to rebase an solve the merge conflicts and the warnings.

### uvchik added a commit that referenced this pull request Feb 29, 2016

 Merge pull request #97 from oemof/features/heatstorage_with_dT 
Transformer which raises the temperature
 3519b00 

Closed