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

[FEATURE] Ideal source handling #733

Open
16 tasks
mgovers opened this issue Sep 24, 2024 · 0 comments
Open
16 tasks

[FEATURE] Ideal source handling #733

mgovers opened this issue Sep 24, 2024 · 0 comments
Labels
feature New feature or request good first issue Indicates a good issue for first-time contributors

Comments

@mgovers
Copy link
Member

mgovers commented Sep 24, 2024

Describe the feature request

An ideal source is represented by having infinite short circuit power (sk). However, the current implementation of the power-grid-model will raise a validation error when sk == inf:
image

This ticket is about supporting ideal sources for power flow and state estimation calculation types. (And undefined behavior for short circuit calculations.)

Background

When sk is extremely large but not infinite (e.g. sk == 10e50), the power flow and state estimation calculation types are already numerically stable, cfr. #458 . Unfortunately, this value is arbitrarily set. We currently require our users to provide such an arbitrarily large value when they desire an ideal source. Even more so, within the PGM, intermediate calculations may cause an arbitrarily large value to become infinite, e.g.:

  • 10e200 * 10e200 = 10e400 > std::numeric_limits<double>::max() (~10e306) => 10e200 * 10e200 will result in inf

A single such inf value in the internal calculations will result in NaN values in the output, i.e. nonsense output.

Desired solution

Cap the sk to some fixed non-infinite value so that it does not results in NaN output values but still mimics ideal sources well enough for realistic/practical purposes. This allows users to provide inf to request an ideal source.

@mgovers mgovers added feature New feature or request good first issue Indicates a good issue for first-time contributors labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Indicates a good issue for first-time contributors
Projects
Status: No status
Development

No branches or pull requests

1 participant