assign_translate_motion#
- Maxwell2d.assign_translate_motion(assignment, coordinate_system='Global', axis='Z', positive_movement=True, start_position=0, periodic_translate=True, negative_limit=0, positive_limit=0, velocity=0, mechanical_transient=False, mass=1, damping=0, load_force=0, motion_name=None)#
Assign a translation motion to an object container.
For both rotational and translational problems, the band objects must always enclose all the moving objects.
- Parameters:
- assignment
str Object container.
- coordinate_system
str,optional Coordinate system name. The default is
"Global".- axis
strorint,optional Coordinate system axis. The default is
"Z". It can be aansys.aedt.core.generic.constants.Axisenumerator value.- positive_movementbool,
optional Whether movement is positive. The default is
True.- start_position
floatorstr,optional Starting position of the movement. The default is
0. If a float value is used, default modeler units are applied.- periodic_translatebool,
optional Whether movement is periodic. The default is
False.- negative_limit
floatorstr,optional Negative limit of the movement. The default is
0. If a float value is used, the default modeler units are applied.- positive_limit
floatorstr,optional Positive limit of the movement. The default is
0. If a float value is used, the default modeler units are applied.- velocity
floatorstr,optional Initial velocity. The default is
0. If a float value is used, “m_per_sec” units are applied.- mechanical_transientbool,
optional Whether to consider the mechanical movement. The default is
False.- mass
floatorstr,optional Mechanical mass. The default is
1. If a float value is used, “Kg” units are applied.- damping
float,optional Damping factor. The default is
0.- load_force
floatorstr,optional Load force is positive if it’s applied in the same direction as the moving vector and negative in the opposite direction. The default is
0. If a float value is used, “newton” units are applied.- motion_name
str,optional Motion name. The default is
None.
- assignment
- Returns:
ansys.aedt.core.modules.boundary.common.BoundaryObjectorFalseBoundary object or bool if not successful.
References
>>> oModule.AssignBand
Examples
Assign translation motion to a band cointaing all moving objects.
>>> from ansys.aedt.core import Maxwell3d >>> m3d = Maxwell3d(solution_type="Transient") >>> m3d.modeler.create_box([0, 0, 0], [10, 10, 10], name="Inner_Box") >>> m3d.modeler.create_box([0, 0, 0], [30, 20, 20], name="Outer_Box") >>> m3d.assign_translate_motion("Outer_Box", velocity=1, mechanical_transient=True) >>> m3d.desktop_class.close_desktop()