add_emitter_plane_to_particle_trace_part#

Parts.add_emitter_plane_to_particle_trace_part(particle_trace_part: str | int | ENS_PART, point1: List[float], point2: List[float], point3: List[float], num_points_x: int | None = 25, num_points_y: int | None = 25) ENS_PART_PARTICLE_TRACE#

Add a plane emitter to an existing particle trace. The function will return the updated ENS_PART object.

Parameters:
particle_trace_part:

The particle trace part to be added emitters to. Can be the name, the ID or the ENS_PART object.

point1: list

The coordinates for point 1, being a corner of the plane.

point2: list

The coordinates for point 2, being a corner of the plane.

point3: list

The coordinates for point 3, being a corner of the plane.

num_points_x: int

The number of points on the X direction of the emission plane. Defaults to 25.

num_points_y: int

The number of points on the Y direction of the emission plane. Defaults to 25.

Examples

>>> s = LocalLauncher().start()
>>> cas_file = s.download_pyansys_example("mixing_elbow.cas.h5","pyfluent/mixing_elbow")
>>> dat_file = s.download_pyansys_example("mixing_elbow.dat.h5","pyfluent/mixing_elbow")
>>> s.load_data(cas_file, result_file=dat_file)
>>> p = s.ensight.utils.parts.create_particle_trace_from_points("mytraces", "Velocity", points=[[-0.02,-0.123,0.01576]], source_parts=parts.select_parts_by_dimension(3))
>>> p = s.ensight.utils.parts.add_emitter_plane_to_particle_trace_part(p, point1=[-0.02, -0.123, 0.01576], point2=[0.109876, -0.123, 0.0123], point3=[0.1, 0, 0.05], num_points_x=10, num_points_y=10)