add_emitter_line_to_particle_trace_part#
- Parts.add_emitter_line_to_particle_trace_part(particle_trace_part: str | int | ENS_PART, point1: List[float], point2: List[float], num_points: int | None = 100) ENS_PART_PARTICLE_TRACE #
Add a line 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.
- point2: list
The coordinates for point 2.
- num_points: int
The number of seed points. Defaults to 100.
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_line_to_particle_trace_part(p, point1=[-0.02, -0.123, 0.01576], point2=[0.109876, -0.123, 0.0123], num_points=10)