wolfhece.lagrangian.particles

Author: HECE - University of Liege, Pierre Archambeau Date: 2024

Copyright (c) 2024 University of Liege. All rights reserved.

This script and its content are protected by copyright law. Unauthorized copying or distribution of this file, via any medium, is strictly prohibited.

Module Contents

class wolfhece.lagrangian.particles.Particles(x0: numpy.ndarray = None, y0: numpy.ndarray = None, dir: str | pathlib.Path = None, verbose: bool = False)[source]
property color: tuple[float][source]
property linewidth: float[source]
property dir: pathlib.Path[source]
property filename: str[source]
copy_prop_from(other: Particles) None[source]

Copy the properties from another Particles object.

serialize() dict[source]

Serialize the object.

deserialize(data: dict) None[source]

Deserialize the object.

save(f: str) str[source]

Save the particles to file.

load(f: str | pathlib.Path) None[source]

Load the particles from file.

update(uv_field: tuple[wolfhece.lagrangian.velocity_field.Velocity_Field, wolfhece.lagrangian.velocity_field.Velocity_Field, float, float], curtime: float, dt: float, scheme: Literal[Euler_expl, RK22, RK4, RK45] | int) None[source]

Update the position of the particles.

_check_alive(inside_array: numpy.ndarray, origx: float = 0.0, origy: float = 0.0, dx: float = 1.0, dy: float = 1.0) None[source]

Check if the particles are still alive.

get_alive(inside_array: numpy.ndarray, header: tuple[float] = (0.0, 0.0, 1.0, 1.0, 1, 1)) tuple[numpy.ndarray][source]

Return the alive particles.

plot_mpl(ax: matplotlib.pyplot.Axes) None[source]

Plot the particles using matplotlib.

plot(alpha: float = 1.0)[source]

Plot the particles.