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

standard type functions in pandapipes vs. pandapower #312

Open dlohmeier opened 3 years ago

dlohmeier commented 3 years ago

I was trying to build some code implementing simple std_type functions for both pandapipes and pandapower, when I noted an incompatibility: standard types are saved in pandapower nets at the key "std_types", while in pandapipes it is "std_type". I was actually looking for an equivalent function of std_type_exists(net) in pandapipes.

I will open a pull request that adds this function. However, I would like to raise the question if it still makes sense to change the key in pandapipes to be the same as in pandapower.

dlohmeier commented 2 years ago

The PR is opened and I added quite a bunch of functionality and changed the std_type key. However, I realized that there are some errors in the implementation that make the functionality pandapipes.change_std_type not usable. In a typical std_type library, we store pipe std_types with the following entries:

std_type | nominal_width_mm | outer_diameter_mm | inner_diameter_mm | standard_dimension_ratio | material 80_GGG | 80 | 98.0 | 86.0 | 16.33 | GGG 100_GGG| 100 | 118.0 | 105.8 | 19.34 | GGG 125_GGG| 125 | 144.0 | 131.6 | 23.23 | GGG

However, in the pandapipes.create_pipe() function, we use the entry 'inner_diameter_mm' and convert it with a factor of 1/1000 to 'diameter_m'. If we now exchange the table entries with the std_type entries, nothing really happens, as none of the entries match, and even if, there would be a factor of 1000 between them.

My favorite option would be to do the following:

kbensafta commented 1 year ago

Should this issue be considered as closed?

dlohmeier commented 1 year ago

Unfortunately, we still didn't implement the mentioned features and I think the discussion on how StdTypes should be defined (is a class a suitable definition type?) is continued...