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

New parameter for transformer type (number of transformers in parallel for the template selected) #319

Open
wants to merge 2 commits into
base: 204_investments_evaluation
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/GridCalEngine/Devices/Branches/transformer_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def __init__(self,
asymmetry_angle: float = 90.0,
tc_type: TapChangerTypes = TapChangerTypes.NoRegulation,
name: str = 'TransformerType',
num_tx: int = 1,
idtag: Union[None, str] = None) -> None:
"""
Transformer template from the short circuit study
Expand Down Expand Up @@ -89,6 +90,7 @@ def __init__(self,
dV=dV,
asymmetry_angle=asymmetry_angle,
tc_type=tc_type)
self.num_tx = int(num_tx)

self.register(key='HV', units='kV', tpe=float, definition='Nominal voltage al the high voltage side')
self.register(key='LV', units='kV', tpe=float, definition='Nominal voltage al the low voltage side')
Expand All @@ -109,6 +111,7 @@ def __init__(self,
self.register(key='tap_phase_min', units='rad', tpe=float, definition='Min tap phase', editable=False)
self.register(key='tap_phase_max', units='rad', tpe=float, definition='Max tap phase', editable=False)

self.register(key='num_tx', units='', tpe=int, definition='number of transformers in parallel')
@property
def tap_module_min(self) -> float:
"""
Expand Down
10 changes: 7 additions & 3 deletions src/GridCalEngine/IO/gridcal/catalogue.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def get_transformers_catalogue_df(grid: MultiCircuit):
'tap module min [p.u.]': elm.tap_module_min,
'tap module max [p.u.]': elm.tap_module_max,
'tap phase max [p.u.]': elm.tap_phase_max,
'number transformers': elm.num_tx
})

return pd.DataFrame(data)
Expand Down Expand Up @@ -151,7 +152,8 @@ def parse_transformer_types(df: pd.DataFrame) -> List[TransformerType]:
dV=item['dV [p.u.]'],
neutral_position=item['neutral position'],
asymmetry_angle=item['asymmetry angle [deg]'],
tc_type=tc_type
tc_type=tc_type,
num_tx=item['number transformers']
)
lst.append(tpe)

Expand All @@ -175,7 +177,8 @@ def parse_underground_line_types(df: pd.DataFrame) -> List[UndergroundLineType]:
B=item['B [uS/km]'],
R0=item['R0 (AC) [Ohm/km]'],
X0=item['X0 [Ohm/km]'],
B0=item['B0 [uS/km]']
B0=item['B0 [uS/km]'],
num_circuits=item['Number of circuits']
)
lst.append(tpe)

Expand Down Expand Up @@ -219,7 +222,8 @@ def parse_sequence_line_types(df: pd.DataFrame) -> List[SequenceLineType]:
B=item['b (uS/km)'],
R0=item['r0 (ohm/km)'],
X0=item['x0 (ohm/km)'],
B0=item['b0 (uS/km)'])
B0=item['b0 (uS/km)'],
num_circuits=item['Number of circuits'])
lst.append(tpe)

return lst
Expand Down