e2nIEE / pandapipes

A pipeflow calculation tool that complements pandapower in the simulation of multi energy grids
https://www.pandapipes.org
Other
149 stars 63 forks source link

heat source with create_pump #280

Open ggrrll opened 3 years ago

ggrrll commented 3 years ago

In the circular_flow_in_a_district_heating_grid tutorial I am tring to create a heating station, with create_pump (instead of create_circ_pump_const_mass_flow or create_circ_pump_const_pressure) and I get

RuntimeWarning: invalid value encountered in double_scalars
  residual_norm = (linalg.norm(epsilon) / (len(epsilon)))
Maximum number of iterations reached but hydraulics solver did not converge.

which I also get with type='p' (for create_circ_pump_const_mass_flow or create_circ_pump_const_pressure)

I am also adding a create_heat_exchanger with negative qext_w

So, I am wondering if it is possible at all in PP to create a heating source, without fixing pressure or temperature at the heating source

Thanks

dcronbach commented 3 years ago

Hi ggrrll,

This is indeed currently the expected behavior. For closed circuits like the one introduced in the district heating grid tutorial, pandapipes provides the circular pump components. Internally, these consist of an external grid and a sink, which leads to a fully defined equation system.

The pump component on the other hand simply calculates a pressure difference based on the mass flow. It can be used to introduce a pressure difference in a system which is already well defined in terms of external grids and sinks.

We are already aware that this different usage of pump components is confusing and will try to suggest a better solution in the future.

Best regards

Dennis Cronbach

ggrrll commented 3 years ago

ok, thanks for the clarification

...but more generally, it's still not clear to me how to build an heat source, that can supply a given demand (also, in terms of N of 'degrees of freedom' )...

if we have to include also a create_heat_exchanger (with negative qext_w, I guess equal to the total demand of the grid -- as written here ), then one should leave the pressure (the flow should follow from the pressure, if there is a characteristic curve) variable, right? so that it can be calculated according to the height differences, losses, etc... but:

...or there is no characteristic curve for create_circ_pump_const_mass_flow / create_circ_pump_const_pressure (?)

thanks for the clarification

cvTHM commented 3 years ago

In addition to ggrrll's comment I want to say that I am facing a similar problem when modelling multiple heat sources inside a heating network: As it is not clear from the beginning which heat source supplies which mass flow to the system (dependent on losses inside the network) the user can only apply set values for pressures in the feeed line for example. The demands inside the system are known. However, forcing to apply a pressure difference over the pump as well makes it impossible to use the circular_pump component in this case.