emulsim.actors.autonomous.active_particles module
- class ActiveParticleActor(parameters: dict[str, Any] | None = None)[source]
Bases:
ActorBaseActor moving arrows according to their direction.
- Parameters Dictionary:
rotational_diffusion: The rotational diffusion strength (default=0.0)
- Parameters:
parameters (dict) – Parameters defining the behavior of the actor. Call
show_parameters()for details.
Parameters of ActiveParticleActor:
- rotational_diffusion
The rotational diffusion strength (Default value:
0.0)
- element_classes: tuple[type[_ElementBase] | tuple[type[_ElementBase], ...], ...] | EllipsisType = (<class 'emulsim.elements.points.ArrowsElement'>,)
defines the elements this actor handles and in what order they need to be supplied. An ellipsis (…) indicates that all elements and lists of elements are accepted. Setting this attribute allows internal consistency checks.
- Type:
- estimate_dt(elements: tuple[_ElementBase, ...]) float[source]
Estimate the maximal time step for simulating this actor.
- Parameters:
elements (tuple of
ArrowsElement) – The element that is affected by the directed motion- Returns:
the maximal time step
- Return type:
- evolve(elements: tuple[_ElementBase, ...], t: float, dt: float) None[source]
Evolve the field state from time t to t + dt
- Parameters:
elements (tuple of
ArrowsElement) – The element that is affected by the directed motiont (float) – The current time point
dt (float) – The time step
- make_evolver_numba(elements: tuple[_ElementBase, ...]) Callable[[tuple[ndarray], float, float], None][source]
Return a function evolve the field state from time t to t + dt
- Parameters:
elements (tuple of
ArrowsElement) – The element that is affected by the directed motion- Returns:
- A function with signature
(state_data:
ndarray, t: float, dt: float), evolving state_data
- Return type:
callable