-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wwang2
committed
Jan 23, 2024
1 parent
b2dbb9f
commit f34c764
Showing
6 changed files
with
470 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import absolute_import, division, print_function | ||
from builtins import super, range, zip, round, map | ||
|
||
from .base import ( | ||
DiTToHasTraits, | ||
Float, | ||
Unicode, | ||
Any, | ||
Int, | ||
List, | ||
Bool, | ||
observe, | ||
Instance, | ||
) | ||
|
||
from .position import Position | ||
from .winding import Winding | ||
|
||
|
||
class DistributionTransformer(DiTToHasTraits): | ||
|
||
name = Unicode(help="""Name of the transformer object""", default_value="") | ||
|
||
# Modification: Nicolas (August 2017) | ||
# Moved the rated_power from the transformer down to the windings | ||
# rated_power = Float(help='''The rated power of the entire transformer''', default_value=None) | ||
|
||
install_type = Unicode( | ||
help="""The mounting type of the transformer: one of {POLETOP, PADMOUNT, VAULT}""", | ||
default_value=None, | ||
) | ||
noload_loss = Float( | ||
help="""The no-load loss for a zero sequence short-circuit test on the entire transformer""", | ||
default_value=None, | ||
) | ||
phase_shift = Float( | ||
help="""The degree phase shift that the transformer causes.""", | ||
default_value=None, | ||
) | ||
from_element = Any( | ||
help="""Name of the node which connects to the 'from' end of the transformer""", | ||
default_value=None, | ||
) | ||
to_element = Any( | ||
help="""'Name of the node which connects to the 'to' end of the transformer""", | ||
default_value=None, | ||
) | ||
from_element_connection_index = Int( | ||
help="""Index of the position in the node that the 'from' end of the line connects to (e.g. for a long bus)""", | ||
default_value=None, | ||
) | ||
to_element_connection_index = Int( | ||
help="""Index of the position in the node that the 'to' end of the line connects to (e.g. for a long bus)""", | ||
default_value=None, | ||
) | ||
connecting_element = Any( | ||
help="""Name of the node which connects to the transformer""", | ||
default_value=None, | ||
) | ||
phase_loads = Any( | ||
help="""phase_loads which connects to the transformer""", | ||
default_value=None, | ||
) | ||
|
||
reactances = List( | ||
Float(), | ||
help="""Reactances are described between all the windings. There are n*(n-1)/2 reactances (where n is the number of windings). For two a winding transformer this gives one value, and for a 3 winding transformer it gives 3.""", | ||
default_value=None, | ||
) | ||
|
||
windings = List( | ||
Instance(Winding), | ||
help="""A list of the windings that the transformer contains. Most will have two windings but center tap transformers have three.""", | ||
default_value=None, | ||
) | ||
positions = List( | ||
Instance(Position), | ||
help="""This parameter is a list of positional points describing the transformer - it should contain just one. The positions are objects containing elements of long, lat and elevation.""", | ||
default_value=None, | ||
) | ||
|
||
# Modification: Nicolas (August 2017) | ||
loadloss = Float(help="Percent Losses at rated load", default_value=None) | ||
normhkva = Float(help="Normal maximum kVA rating for H winding", default_value=None) | ||
|
||
# Modification: Nicolas (November 2017) | ||
is_center_tap = Bool( | ||
help="""Set to 1 if the transformer is a center tap transformer""" | ||
) | ||
|
||
# Modification: Nicolas (December 2017) | ||
is_substation = Bool( | ||
help="""Set to 1 if the transformer is a substation or is inside a substation""", | ||
) | ||
|
||
# Modification: Wenbo (Nov. 2023) | ||
is_threephaseunit = Int( | ||
help="""Set to 1 if the transformer is a three phase unit, otherwise it is a bank of 1-3 single phase transformers""", | ||
) | ||
ConnKvaPh = List(help="ConnKvaPh1, ConnKvaPh2, ConnKvaPh3", default_value=None) | ||
|
||
nominal_voltage = Any(help=""" voltage can be primary only or pri - sec """, default_value=None) | ||
|
||
xhl = Float(help="xhl for dtransformer", default_value=None) | ||
pct_loadloss = Float(help="pct_loadloss", default_value=None) | ||
bus1 = Unicode(help="Primary node", default_value=None) | ||
bus2 = Unicode(help="Secondary node", default_value=None) | ||
conn = List(help="conn1, conn2", default_value=None) | ||
|
||
kvas = List(help="kva1, kva2", default_value=None) | ||
|
||
|
||
# Modification: Nicolas (December 2017) | ||
# Multiple feeder support. Each element keeps track of the name of the substation it is connected to, as well as the name of the feeder. | ||
# I think we need both since a substation might have multiple feeders attached to it. | ||
# These attributes are filled once the DiTTo model has been created using the Network module | ||
substation_name = Unicode( | ||
help="""The name of the substation to which the object is connected.""", | ||
) | ||
feeder_name = Unicode(help="""The name of the feeder the object is on.""",) | ||
|
||
def build(self, model): | ||
""" | ||
The high and low properties are used to creat windings which are added to the windings list | ||
Winding data (e.g. high_ground_reactance) should be referenced thorugh the windings list | ||
""" | ||
self._model = model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.