From 42bd240ad7aa97c7f7855870dcd6526ed12b64ba Mon Sep 17 00:00:00 2001 From: haitao-ZCU Date: Tue, 8 Sep 2026 12:09:21 +0200 Subject: [PATCH] Replace f with w in motor1's oper_params and excitation formulas --- motors/synrm_3f_36s.py | 7 +++---- tests/test_synrm_3f_36s.py | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/motors/synrm_3f_36s.py b/motors/synrm_3f_36s.py index 6ad8369..2ef010d 100644 --- a/motors/synrm_3f_36s.py +++ b/motors/synrm_3f_36s.py @@ -178,7 +178,6 @@ def set_oper_params(self): "Im": "1.5*sqrt(2)A", "epsI": "pi/4", # current angle "InitPos": "-30deg", - "f": f"{f}Hz", "w": f"{w}Hz", "RotSpeed": f"{RotSpeed}rpm", "Nper": "1/6", # number of included periods @@ -232,9 +231,9 @@ def set_post_params(self): def assign_stator_coils(self, m2d: Maxwell2d) -> None: # Excitations - I_A = "Im * cos(2*pi*f*time+epsI)" - I_B = "Im * cos(2*pi*f*time-120deg+epsI)" - I_C = "Im * cos(2*pi*f*time-240deg+epsI)" + I_A = "Im * cos(w*time+epsI)" + I_B = "Im * cos(w*time-120deg+epsI)" + I_C = "Im * cos(w*time-240deg+epsI)" phases_polarity = ["Positive", "Negative", "Positive"] phases_name = ["A", "C", "B"] diff --git a/tests/test_synrm_3f_36s.py b/tests/test_synrm_3f_36s.py index 9dfe35a..9b2a205 100644 --- a/tests/test_synrm_3f_36s.py +++ b/tests/test_synrm_3f_36s.py @@ -75,7 +75,6 @@ def test_oper_params(computation): "Im": "1.5*sqrt(2)A", "epsI": "pi/4", "InitPos": "-30deg", - "f": "50Hz", "w": f"{2 * np.pi * 50}Hz", "RotSpeed": "1500.0rpm", "Nper": "1/6",