From 38da6fdf4d0c5d3bdc285d4a7151f08a7fe47e07 Mon Sep 17 00:00:00 2001 From: wwang2 Date: Fri, 23 Aug 2024 11:56:47 -0600 Subject: [PATCH] fix set nominal voltages recur --- ditto/modify/system_structure.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ditto/modify/system_structure.py b/ditto/modify/system_structure.py index 650b1d82..1701c163 100644 --- a/ditto/modify/system_structure.py +++ b/ditto/modify/system_structure.py @@ -237,10 +237,10 @@ def set_nominal_voltages_recur(self, *args): ] ) num_phases = len(self.model[trans_name].windings[0].phase_windings) - if self.model[trans_name].is_threephaseunit == 0: - new_value = new_value *1.732 - if num_phases!=3: + if self.model[trans_name].is_threephaseunit == 0 or num_phases!=3: new_value = new_value *1.732 + + #print(f"1num_phases={num_phases}") #print(f"1trans_name={trans_name}") #print(f"1new_value={new_value}") @@ -257,11 +257,9 @@ def set_nominal_voltages_recur(self, *args): ] ) num_phases = len(self.model[trans_name].windings[0].phase_windings) - if self.model[trans_name].is_threephaseunit == 0: # wenbo added this because naming convention in synergi warehouse.mdb + if self.model[trans_name].is_threephaseunit == 0 or num_phases!=3: # wenbo added this because naming convention in synergi warehouse.mdb new_value = new_value *1.732 - if num_phases!=3: - new_value = new_value *1.732 #print(f"2trans_name={trans_name}") #print(f"2new_value={new_value}") else: