Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.idea/workspace.xml
  • Loading branch information
SanPen committed Oct 23, 2024
2 parents 1ba2bdd + f9536e7 commit b1874e7
Show file tree
Hide file tree
Showing 10 changed files with 453 additions and 72 deletions.
1 change: 0 additions & 1 deletion src/GridCal/Gui/Main/SubClasses/Model/diagrams.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
from GridCal.Gui.Diagrams.MapWidget.Tiles.TileProviders.blue_marble import BlueMarbleTiles
from GridCal.Gui.Diagrams.MapWidget.Tiles.TileProviders.cartodb import CartoDbTiles
from GridCal.Gui.Diagrams.MapWidget.Tiles.TileProviders.open_street_map import OsmTiles
from trunk.qt_related.slippy_map import MapWidget

ALL_EDITORS = Union[SchematicWidget, GridMapWidget]
ALL_EDITORS_NONE = Union[None, SchematicWidget, GridMapWidget]
Expand Down
2 changes: 1 addition & 1 deletion src/GridCal/Gui/Main/icons_rc.py
Original file line number Diff line number Diff line change
Expand Up @@ -38287,7 +38287,7 @@
\x00\x00\x12\xb6\x00\x01\x00\x00\x00\x01\x00\x06\xc5\xc7\
\x00\x00\x01\x88\xae\xf9[%\
\x00\x00\x07\xa8\x00\x00\x00\x00\x00\x01\x00\x02\xda$\
\x00\x00\x01\x92\xb3\xa2\x89y\
\x00\x00\x01\x92\xb8\x97\x16\xad\
\x00\x00\x010\x00\x00\x00\x00\x00\x01\x00\x00N\xe0\
\x00\x00\x01\x90N\xda\x14\x95\
\x00\x00\x12\x84\x00\x01\x00\x00\x00\x01\x00\x06\xb0\xef\
Expand Down
2 changes: 1 addition & 1 deletion src/GridCal/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
_current_year_ = datetime.datetime.now().year

# do not forget to keep a three-number version!!!
__GridCal_VERSION__ = "5.1.53"
__GridCal_VERSION__ = "5.1.55"

url = 'https://github.com/SanPen/GridCal'

Expand Down
23 changes: 13 additions & 10 deletions src/GridCalEngine/Devices/Branches/transformer3w.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
def delta_to_star(z12: float, z23: float, z31: float) -> Tuple[float, float, float]:
"""
Perform the delta->star transformation
See: https://www.electronics-tutorials.ws/dccircuits/dcp_10.html
:param z12: 1 to 2 delta value
:param z23: 2 to 3 delta value
:param z31: 3 to 1 delta value
Expand All @@ -44,17 +45,19 @@ def delta_to_star(z12: float, z23: float, z31: float) -> Tuple[float, float, flo
return 1e-20, 1e-20, 1e-20


def start_to_delta(z1: float, z2: float, z3: float):
def star_to_delta(z1: float, z2: float, z3: float) -> Tuple[float, float, float]:
"""
Perform the star->delta transformation
:param z1:
:param z2:
:param z3:
:return:
See: https://www.electronics-tutorials.ws/dccircuits/dcp_10.html
:param z1: 0->1 impedance
:param z2: 0->2 impedance
:param z3: 0->3 impedance
:return: z12, z23, z31 impedances
"""
z12 = z1 + z2
z23 = z2 + z3
z31 = z3 + z1
zt = z1 * z2 + z2 * z3 + z3 * z1
z12 = zt / z3
z23 = zt / z2
z31 = zt / z1

return z12, z23, z31

Expand Down Expand Up @@ -427,8 +430,8 @@ def fill_from_star(self, r1: float, r2: float, r3: float, x1: float, x2: float,
:param x2: reactance of the branch 2 (p.u.)
:param x3: reactance of the branch 3 (p.u.)
"""
self._r12, self._r23, self._r31 = start_to_delta(z1=r1, z2=r2, z3=r3)
self._x12, self._x23, self._x31 = start_to_delta(z1=x1, z2=x2, z3=x3)
self._r12, self._r23, self._r31 = star_to_delta(z1=r1, z2=r2, z3=r3)
self._x12, self._x23, self._x31 = star_to_delta(z1=x1, z2=x2, z3=x3)

self.winding1.R = r1
self.winding1.X = x1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,19 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
from __future__ import annotations

from GridCalEngine.IO.base.units import UnitMultiplier, UnitSymbol
from GridCalEngine.IO.cim.cgmes.base import Base
from GridCalEngine.IO.cim.cgmes.cgmes_enums import cgmesProfile, UnitSymbol
from GridCalEngine.IO.cim.cgmes.cgmes_enums import UnitSymbol


class SvPowerFlow(Base):
def __init__(self, rdfid, tpe, resources=list(), class_replacements=dict()):
def __init__(self, rdfid, tpe="SvPowerFlow", resources=list(), class_replacements=dict()):
Base.__init__(self, rdfid=rdfid, tpe=tpe, resources=resources, class_replacements=class_replacements)

self.p: float = None
self.q: float = None
self.p: float = 0.0
self.q: float = 0.0
from GridCalEngine.IO.cim.cgmes.cgmes_v3_0_0.devices.terminal import Terminal
self.Terminal: Terminal | None = None

Expand Down
Loading

0 comments on commit b1874e7

Please sign in to comment.