Skip to content
Merged
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
9 changes: 9 additions & 0 deletions src/ditto/writers/opendss/components/distribution_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,16 @@ def map_bus(self):
for phase in self.model.phases:
self.opendss_dict["Bus1"] += self.phase_map[phase]
# TODO: Should we include the phases its connected to here?

nom_voltage = self.model.bus.rated_voltage.to("kV").magnitude
voltage_type = self.model.bus.voltage_type

nom_voltage = (
nom_voltage / LL_LN_CONVERSION_FACTOR
if voltage_type == "line-to-line"
else nom_voltage
)

self.opendss_dict["kV"] = (
nom_voltage if num_phases == 1 else nom_voltage * LL_LN_CONVERSION_FACTOR
)
Expand Down
Loading