From f5395ddfcfa4ed96e92788c52f34e2c7136f2873 Mon Sep 17 00:00:00 2001 From: IreneWoyna <98172186+IreneWoyna@users.noreply.github.com> Date: Wed, 27 Sep 2023 17:25:12 +0200 Subject: [PATCH] added phase parameter to assign_winding (#3658) --- pyaedt/maxwell.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyaedt/maxwell.py b/pyaedt/maxwell.py index 0c55e344b8f..114d786f4a7 100644 --- a/pyaedt/maxwell.py +++ b/pyaedt/maxwell.py @@ -300,6 +300,7 @@ def assign_matrix( >>> m2d.assign_matrix(sources=['1V'], group_sources=['0V'], matrix_name="Matrix1") """ + sources = self.modeler.convert_to_selections(sources, True) if self.solution_type in ["Electrostatic", "ACConduction", "DCConduction"]: turns = ["1"] * len(sources) @@ -1029,6 +1030,7 @@ def assign_winding( ind=0, voltage=0, parallel_branches=1, + phase=0, name=None, ): """Assign a winding to a Maxwell design. @@ -1054,6 +1056,8 @@ def assign_winding( Voltage value. The default is ``0``. parallel_branches : int, optional Number of parallel branches. The default is ``1``. + phase : float, optional + Value of the phase delay in degrees. The default is ``0``. name : str, optional Name of the boundary. The default is ``None``. @@ -1081,6 +1085,7 @@ def assign_winding( "Inductance": self.modeler._arg_with_dim(ind, "H"), "Voltage": self.modeler._arg_with_dim(voltage, "V"), "ParallelBranchesNum": str(parallel_branches), + "Phase": self.modeler._arg_with_dim(phase, "deg"), } ) bound = BoundaryObject(self, name, props, "Winding")