tespy.components.heat package¶
tespy.components.heat.bus module¶
Module of class HeatBus.
This file is part of project TESPy (github.com/oemof/tespy). It’s copyrighted by the contributors recorded in the version control history of the file, available from its original location tespy/components/heat/bus.py
SPDX-License-Identifier: MIT
- class tespy.components.heat.bus.HeatBus(label, **kwargs)[source]¶
Bases:
_EnergyBusA HeatBus can hold any number of incoming and outgoing heat flows.
It is the heat-domain equivalent of
PowerBusand follows the same usage pattern - replacePowerConnectionwithHeatConnectionandPowerSource/PowerSinkwithHeatSource/HeatSink.Mandatory Equations
tespy.components.energy._bus._EnergyBus.energy_balance_func()
HeatConnection inlets/outlets
specify number of inlets with
num_in: ‘heat_in1’, …specify number of outlets with
num_out: ‘heat_out1’, …
- Parameters:
label (str) – The label of the component.
design (list) – List containing design parameters (stated as String).
offdesign (list) – List containing offdesign parameters (stated as String).
design_path (str) – Path to the components design case.
local_offdesign (boolean) – Treat this component in offdesign mode in a design calculation.
local_design (boolean) – Treat this component in design mode in an offdesign calculation.
char_warnings (boolean) – Ignore warnings on default characteristics usage for this component.
printout (boolean) – Include this component in the network’s results printout.
num_in (float) – Number of inlets.
num_out (float) – Number of outlets.
Example
A HeatBus collects heat from two sources and distributes it to one sink.
>>> from tespy.components import HeatSource, HeatSink, HeatBus >>> from tespy.connections import HeatConnection >>> from tespy.networks import Network >>> nw = Network(iterinfo=False) >>> src1 = HeatSource('source 1') >>> src2 = HeatSource('source 2') >>> bus = HeatBus('heat bus', num_in=2, num_out=1) >>> sink = HeatSink('sink') >>> h1 = HeatConnection(src1, 'heat', bus, 'heat_in1') >>> h2 = HeatConnection(src2, 'heat', bus, 'heat_in2') >>> h3 = HeatConnection(bus, 'heat_out1', sink, 'heat') >>> nw.add_conns(h1, h2, h3) >>> h1.set_attr(E=10e3) >>> h2.set_attr(E=20e3) >>> nw.solve('design') >>> nw.assert_convergence() >>> round(h3.E.val_SI) == 30000 True
tespy.components.heat.sink module¶
Module of class HeatSink.
This file is part of project TESPy (github.com/oemof/tespy). It’s copyrighted by the contributors recorded in the version control history of the file, available from its original location tespy/components/heat/sink.py
SPDX-License-Identifier: MIT
- class tespy.components.heat.sink.HeatSink(label, **kwargs)[source]¶
Bases:
_EnergySinkA heat flow drains in a HeatSink.
- Parameters:
label (str) – The label of the component.
design (list) – List containing design parameters (stated as String).
offdesign (list) – List containing offdesign parameters (stated as String).
design_path (str) – Path to the components design case.
local_offdesign (boolean) – Treat this component in offdesign mode in a design calculation.
local_design (boolean) – Treat this component in design mode in an offdesign calculation.
char_warnings (boolean) – Ignore warnings on default characteristics usage for this component.
printout (boolean) – Include this component in the network’s results printout.
Example
Create a HeatSink and specify a label.
>>> from tespy.components import HeatSink >>> si = HeatSink('a labeled heat sink') >>> si.label 'a labeled heat sink'
tespy.components.heat.source module¶
Module of class HeatSource.
This file is part of project TESPy (github.com/oemof/tespy). It’s copyrighted by the contributors recorded in the version control history of the file, available from its original location tespy/components/heat/source.py
SPDX-License-Identifier: MIT
- class tespy.components.heat.source.HeatSource(label, **kwargs)[source]¶
Bases:
_EnergySourceA heat flow emerges from a HeatSource.
- Parameters:
label (str) – The label of the component.
design (list) – List containing design parameters (stated as String).
offdesign (list) – List containing offdesign parameters (stated as String).
design_path (str) – Path to the components design case.
local_offdesign (boolean) – Treat this component in offdesign mode in a design calculation.
local_design (boolean) – Treat this component in design mode in an offdesign calculation.
char_warnings (boolean) – Ignore warnings on default characteristics usage for this component.
printout (boolean) – Include this component in the network’s results printout.
Example
Create a HeatSource and specify a label.
>>> from tespy.components import HeatSource >>> so = HeatSource('a labeled heat source') >>> so.label 'a labeled heat source'