sbruche / aristopy

UPDATE: The project has been moved to GitLab (https://git.tu-berlin.de/etus/public/aristopy)
https://git.tu-berlin.de/etus/public/aristopy
MIT License
3 stars 1 forks source link

Can the inlet and outlet energy flows in the bus instance be the same commodity only? #1

Closed hangtianzhang closed 4 years ago

hangtianzhang commented 4 years ago

In the example of creating an energy system, the bus outlet and entrance can only be one commodity, and the same commodity can only use the same commodity name. If you are using a more complex bus (multiple input and multiple output):

  1. How should the bus be initialized?
  2. How to mark different energy flows from different devices and multi-energy flows from outlets?
  3. Or what components can achieve the function of the bus?
sbruche commented 4 years ago

Thank you for your question. Right now, a Bus component can only work with one commodity. So it is the same commodity at the inlet and the outlet. We can think of it as a natural gas pipeline or an electrical transmission line. However, the variable names at the inlet and the outlet must be different. E.g., see the second example in the documentation:

heat_bus = ar.Bus(
    ensys=es, name='heat_bus',
    inlet=ar.Flow('Heat', var_name='Heat_inlet'),
    outlet=ar.Flow('Heat', var_name='Heat_outlet'))

You can easily connect multiple components to the same inlet and outlet of a Bus. E.g.,:

ar.Source(ensys=es, name='source_1', outlet=ar.Flow('Heat', link='heat_bus'), [...])
ar.Conversion(ensys=es, name='conversion_1', outlet=ar.Flow('Heat', link='heat_bus'), [...])

If more than one commodity should be transferred from one site to another, you would probably want to add multiple Bus components. I hope this answers your questions.

hangtianzhang commented 4 years ago

Thank you very much for your answers, but I still have a few small questions,

  1. Can a bus component have multiple inputs and outputs? Like this, power_bus = ar.Bus( ensys=es, name='power_bus', inlet=[ar.Flow('P_mt', var_name='P_mt',link='power_source'), ar.Flow('Power',var_name='Power',link='power_source')], outlet=[ar.Flow('P_ec', var_name='P_ec',link='EC'), ar.Flow('P_eb',var_name='P_eb',link='EB'), ar.Flow('demand_power',var_name='demand_power',link='power_sink')]) ,Among them, ‘mt’ stands for gas turbine; ‘ec’ stands for electric refrigerator; ‘eb’ stands for electric boiler
  2. What are the different output energy flows of the bus component connected to other components? Is it the link parameter? I didn't find the above question in the document, I hope you can answer it. I wish work well and happy life!
sbruche commented 4 years ago

I don't know if I fully understand the question. Yes, you can have multiple inlet and outlet connections. The "link" argument of the Flow instances is used on the source, destination, or both sides to tell aristopy about the component connection.

bus = ar.Bus(es, 'bus', 
             inlet=[
                 ar.Flow(commodity='P', link='elec_source', var_name='P_in'),
                 ar.Flow(commodity='P', link='gas_turbine', var_name='P_in')], 
             outlet=[
                 ar.Flow(commodity='P', link='elec_demand', var_name='P_out'),
                 ar.Flow(commodity='P', link='elec_heater', var_name='P_out')])

However, a Bus can only transport one commodity (e.g., electricity). If you have multiple commodities, you will need multiple Bus instances.