multi-vector-simulator icon indicating copy to clipboard operation
multi-vector-simulator copied to clipboard

[question] direction of getting the optimal capacity of a transformer

Open SabineHaas opened this issue 5 years ago • 5 comments

How is the optimal capacity of a transformer derived?

max(heat_demand) / COP or max(electricity_demand) ?

SabineHaas avatar Apr 08 '20 16:04 SabineHaas

I do not quite understand this question.

Here is the part where the optimized capacity is extracted from the oemof results:

    if "optimizeCap" in dict_asset:
        if dict_asset["optimizeCap"]["value"] == True:
            if direction == "input":
                optimal_capacity = bus["scalars"][
                    ((bus_name, dict_asset["label"]), "invest")
                ]
            elif direction == "output":
                optimal_capacity = bus["scalars"][
                    ((dict_asset["label"], bus_name), "invest")
                ]
            else:
                logging.error(
                    "Function get_optimal_cap has invalid value of parameter direction."
                )

Ie. if there is an inflow direction (transfomers, sinks) the capacity will be determined based on the inflow into the asset. The transformer has also an output, but as that is checked only secondary, the loop is already exited with the first test passing at "input". Incase of, eg. a PV plant with only an output flow, the output flow would determine the capacity (there is some more calculation going on in that case, see below).

smartie2076 avatar Apr 09 '20 07:04 smartie2076

In our discussion we weren't sure whether the optimal capacity will be determined based on inputs or outputs. Thanks @smartie2076 that answers my question and is the behaviour I expected.

SabineHaas avatar Apr 09 '20 11:04 SabineHaas

Sorry I need to reopen this. This is where get_optimal_cap is executed and where direction is defined:

# definie capacities. Check if the component has multiple input or output busses
    if "output_bus_name" in dict_asset and "input_bus_name" in dict_asset:
        if not isinstance(output_name, list):
            get_optimal_cap(bus_data[output_name], dict_asset, output_name, "output")
        else:
            for bus in output_name:
                get_optimal_cap(bus_data[bus], dict_asset, bus, "output")

So if there is an inflow and outflow the outflow will be used, right?

For example for a diesel generator it makes sense to determine the optimal capacity on the outflow (electricity). I checked a heat pump data information: there they give the heat and cooling capacity as well as the power input for both, heating and cooling mode. I assume, it's fine to determine the optimal capacity via the output flows.

SabineHaas avatar Apr 09 '20 11:04 SabineHaas

So if there is an inflow and outflow the outflow will be used, right?

Yes, I would say so.

For example for a diesel generator it makes sense to determine the optimal capacity on the outflow (electricity). I checked a heat pump data information: there they give the heat and cooling capacity as well as the power input for both, heating and cooling mode. I assume, it's fine to determine the optimal capacity via the output flows.

Okay. I am actually not quite sure how the capacity determination is handled when we have multiple outputs, and if the get_optimal_cap even works in that case. We will have to see, as soon as it comes up.

smartie2076 avatar Apr 15 '20 10:04 smartie2076

Relates to #451

smartie2076 avatar Apr 06 '21 10:04 smartie2076