add_emitter_parts_to_particle_trace_part#
- Parts.add_emitter_parts_to_particle_trace_part(particle_trace_part: str | int | ENS_PART, parts: List[str | int | ENS_PART], part_distribution_type: int | None = 0, num_points: int | None = 100) ENS_PART_PARTICLE_TRACE #
Add a list of part emitters 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.- parts: list
A list of parts to emit the particle traces from. They can be their names, their IDs or the respective
ENS_PART
objects.- part_distribution_type: int
The distribution of emitters in case of emission from a part. This table describes the options:
Name
Query type
PART_EMIT_FROM_NODES
Emit from the nodes of the part
PART_EMIT_FROM_AREA
Create an area of equidistant points for emission
If not provided, it will default to
PART_EMIT_FROM_NODES
- num_points: int
The number of points to emit from. 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_parts_to_particle_trace_part(p, parts=["cold-inlet", "hot-inlet"], num_points=25)