emulsim.actors.autonomous.brownian_motion module
- class BrownianMotionActor(parameters: dict[str, Any] | None = None)[source]
Bases:
ActorBaseActor moving objects according to Brownian motion.
- Parameters Dictionary:
diffusivity: Expression that determines the strength of the Brownian motion of droplets (default=’1’)
- Parameters:
parameters (dict) – Parameters defining the behavior of the actor. Call
show_parameters()for details.
Parameters of BrownianMotionActor:
- diffusivity
Expression that determines the strength of the Brownian motion of droplets. The expression may depend on time and potentially on a radius if this is defined for the element on which the actor acts (Default value:
'1')
- element_classes: tuple[type[_ElementBase] | tuple[type[_ElementBase], ...], ...] | EllipsisType = ((<class 'emulsim.elements.points.ArrowsElement'>, <class 'emulsim.elements.points.PointsElement'>, <class 'emulsim.elements.spherical_droplets.SphericalDropletsElement'>),)
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
SphericalDropletsElement) – The element that is affected by the Brownian motion- Returns:
the maximal time step
- Return type:
- evolve(elements: tuple[_ElementBase, ...], t: float, dt: float) None[source]
Evolve the state from time t to t + dt
- 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
SphericalDropletsElement) – The field element that is affected by the Brownian motion- Returns:
- A function with signature
(state_data:
ndarray, t: float, dt: float), evolving state_data
- Return type:
callable