assign_master_slave#
- Maxwell3d.assign_master_slave(independent, dependent, u_vector_origin_coordinates_master, u_vector_pos_coordinates_master, u_vector_origin_coordinates_slave, u_vector_pos_coordinates_slave, reverse_master=False, reverse_slave=False, same_as_master=True, bound_name=None)#
Assign dependent and independent boundary conditions to two faces of the same object.
- Parameters:
- independent
int
ID of the master entity.
- dependent
int
ID of the slave entity.
- u_vector_origin_coordinates_master
list
Master’s list of U vector origin coordinates.
- u_vector_pos_coordinates_master
list
Master’s list of U vector position coordinates.
- u_vector_origin_coordinates_slave
list
Slave’s list of U vector origin coordinates.
- u_vector_pos_coordinates_slave
list
Slave’s list of U vector position coordinates.
- reverse_masterbool,
optional
Whether to reverse the master edge to the V direction. The default is
False
.- reverse_slavebool,
optional
Whether to reverse the master edge to the U direction. The default is
False
.- same_as_masterbool,
optional
Whether the B-Field of the slave edge and master edge are the same. The default is
True
.- bound_name
str
,optional
Name of the master boundary. The default is
None
, in which case the default name is used. The name of the slave boundary has a_dep
suffix.
- independent
- Returns:
ansys.aedt.core.modules.boundary.common.BoundaryObject
,ansys.aedt.core.modules.boundary.common.BoundaryObject
Master and slave objects. If the method fails to execute it returns
False
.
References
>>> oModule.AssignIndependent >>> oModule.AssignDependent
Examples
>>> from ansys.aedt.core import Maxwell3d >>> m3d = Maxwell3d() >>> box = m3d.modeler.create_box(origin=[0, 0, 0], sizes=[10, 10, 1], material="copper") >>> m3d.assign_master_slave(master_entity=box.faces[1], >>> slave_entity=box.faces[5], >>> u_vector_origin_coordinates_master=["0mm", "0mm", "0mm"], >>> u_vector_pos_coordinates_master=["10mm", "0mm", "0mm"], >>> u_vector_origin_coordinates_slave=["10mm", "0mm", "0mm"], >>> u_vector_pos_coordinates_slave=["10mm", "10mm", "0mm"] >>> ) >>> m3d.release_desktop(True, True)