Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pump std_type confusing and somewhat inefficient #316

Open
dlohmeier opened this issue Nov 5, 2021 · 0 comments
Open

pump std_type confusing and somewhat inefficient #316

dlohmeier opened this issue Nov 5, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@dlohmeier
Copy link
Collaborator

In the PumpStdType class, regression parameters are identified to calculate a pressure lift from a volume flow. In general, the degree is adaptable. In the compressor component, the following code is executed:

pl = np.array(list(map(lambda x, y: x.get_pressure(y), fcts, vol)))

This does not make use of vectorization and can thus be quite slow. Another downside of the current approach is that there are objects in the std_types dictionary of every net, making it hard for the user to understand how this even works.

At the moment, all pump std_types are using polynomial approximations of degree 2. Is that normal? Is there a large variety in the curves, so that we need to make different polynomials available to the user? Or could we just simplify this aspect?

If different degrees need to be available, I would like to throw in the following suggestion:

  • Create different pump std_types of different degrees, either separated (e.g. pump_2d, pump_3d etc.) or all in one table including lists for the parameters.
  • Use a vectorized version of the current approach. If this only works with an array of fixed size, we can identify the largest degree in the beginning and hand over filled up lines to the vectorized function, which is not a problem, if we multiply with 0.
@jkisse jkisse added the enhancement New feature or request label Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants