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

Documentation #97

Merged
merged 26 commits into from
Jul 26, 2023
Merged

Documentation #97

merged 26 commits into from
Jul 26, 2023

Conversation

benoit9126
Copy link
Member

@benoit9126 benoit9126 commented Jul 12, 2023

Improvement of the documentation. Creation of a models section #69.

@benoit9126 benoit9126 added the documentation Improvements or additions to documentation label Jul 12, 2023
@benoit9126 benoit9126 linked an issue Jul 12, 2023 that may be closed by this pull request
7 tasks
@alihamdan alihamdan linked an issue Jul 13, 2023 that may be closed by this pull request
@benoit9126
Copy link
Member Author

@alihamdan @Saelyos I have improved what I could. Now, there are remaining TODO (single-phase transformer, split-phase transformer, Switch example, etc) that remain in the documentation. Could you please read it when you have time?

@alihamdan alihamdan marked this pull request as ready for review July 25, 2023 14:20
@alihamdan alihamdan closed this Jul 26, 2023
@alihamdan alihamdan reopened this Jul 26, 2023
@alihamdan
Copy link
Member

@benoit9126 this is ready now.

We have models docs and usage examples for all elements.

I also fixed all the links 🤞🏻 (the relative link hack you used earlier in the code docstring does not always work, it depends on the page you are in when you click the link, for example, works from roseau.load_flow.models.line but not from roseau.load_flow.line. Using :doc: instead always works 🍾 )

@benoit9126
Copy link
Member Author

I will add some other modifications in this branch (Google Analytics, etc). @alihamdan @Saelyos Thanks! 👍

Small question when reading the documentation. In such example, I think there is a problem with delta connected voltage source (extracted from the example on the page "three-phase transformer"):

# Create a MV bus
bus_mv = Bus(id="bus_mv", phases="abc")

# ....

# Create a voltage source and connect it to the MV bus
voltages = 20e3 * np.exp([0, -2j * np.pi / 3, 2j * np.pi / 3])
vs = VoltageSource(id="vs", bus=bus_mv, voltages=voltages)

As it is a delta voltage source, its voltages should have been:

import numpy as np
from roseau.load_flow.converters import calculate_voltages

potentials = 20e3/np.sqrt(3) * np.exp([0, -2j * np.pi / 3, 2j * np.pi / 3])
voltages = calculate_voltages(potentials, "abc")
# array([ 17320.50807569+10000.j,      0.        -20000.j,  -17320.50807569+10000.j])

@alihamdan
Copy link
Member

I think both are correct. It depends on what you'd like to be your "reference" (angle 0 with the potential ref). At the end, voltage is relative and the results you get will depend on your definition but both are correct.

Small question when reading the documentation. In such example, I think there is a problem with delta connected voltage source (extracted from the example on the page "three-phase transformer"):

# Create a MV bus
bus_mv = Bus(id="bus_mv", phases="abc")

# ....

# Create a voltage source and connect it to the MV bus
voltages = 20e3 * np.exp([0, -2j * np.pi / 3, 2j * np.pi / 3])
vs = VoltageSource(id="vs", bus=bus_mv, voltages=voltages)

In this example, the voltage Uab has angle 0 with the potential ref

As it is a delta voltage source, its voltages should have been:

import numpy as np
from roseau.load_flow.converters import calculate_voltages

potentials = 20e3/np.sqrt(3) * np.exp([0, -2j * np.pi / 3, 2j * np.pi / 3])
voltages = calculate_voltages(potentials, "abc")
# array([ 17320.50807569+10000.j,      0.        -20000.j,  -17320.50807569+10000.j])

While in this example Va has the angle 0 with the potential ref.

In both cases you get a 20kV source with 120° between the phases.

@alihamdan alihamdan merged commit 4de7a62 into develop Jul 26, 2023
4 checks passed
@alihamdan alihamdan deleted the documentation branch July 26, 2023 11:54
@benoit9126 benoit9126 mentioned this pull request Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: Pycharm hangs on getpass in the "Run" console DOC: Models section
3 participants