Skip to content

Small clarity fixes ❤️ #7

Merged
vfinel merged 10 commits intodevelopfrom
vperron/smallfixes
Mar 7, 2026
Merged

Small clarity fixes ❤️ #7
vfinel merged 10 commits intodevelopfrom
vperron/smallfixes

Conversation

@vperron
Copy link
Copy Markdown
Collaborator

@vperron vperron commented Mar 7, 2026

A lot of tiny fixes where I manually went file by file to look for incorrect / incomplete stuff and make the code as clear as possible and adding tests wherever possible !

vperron added 10 commits March 7, 2026 10:26
It still needs some work but now at least we can point it directly at
any sheet (XLSX, ODS, online Google Sheet...)
Points (coordinates) are entered using GPS coordinates
Distances are measured accurately by projecting first on the correct CRS
metric system.

This can "fix" in the magnitude of a few meters per kilometer of cables.
It was the sole place where the code did consider (I suppose) a baseline
power of 400V but all the rest supposed V0 = 230V.

Also remove useless comments and rename internal variables to make it
all clearer
Comment thread src/nopywer/grid.py
cable.vdrop_volts = cable.resistance * np.max(cable.current_per_phase)
node.voltage = parent.voltage - cable.vdrop_volts
node.vdrop_percent = 100 * (V0 - node.voltage) / _vdrop_ref
node.vdrop_percent = 100 * (V0 - node.voltage) / V0
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh... interesting... could that explain the differences between calculations and measured values on site... ?! To be continued, I guess

@vfinel vfinel merged commit 42a4ad7 into develop Mar 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants