Integrators

Integrators are used to advance particle coordinates and velocities in time according to forces acting on them.

Summary

Integrator() Base integration class
Oscillate() Move particles with the periodically changing velocity \(\mathbf{u}(t) = \cos(2 \pi \, t / T) \mathbf{u}_0\)
RigidVelocityVerlet() Integrate the position and rotation (in terms of quaternions) of the rigid bodies as per Velocity-Verlet scheme.
Rotate() Rotate particles around the specified point in space with a constant angular velocity \(\mathbf{\Omega}\)
SubStepMembrane() Takes advantage of separation of time scales between membrane forces (fast forces) and other forces acting on the membrane (slow forces).
Translate() Translate particles with a constant velocity \(\mathbf{u}\) regardless forces acting on them.
VelocityVerlet() Classical Velocity-Verlet integrator with fused steps for coordinates and velocities.
VelocityVerlet_withConstForce() Same as regular VelocityVerlet, but the forces on all the particles are modified with the constant pressure term:
VelocityVerlet_withPeriodicForce() Same as regular Velocity-Verlet, but the forces on all the particles are modified with periodic Poiseuille term.

Details

class Integrator

Bases: object

Base integration class

__init__()

Initialize self. See help(type(self)) for accurate signature.

class Oscillate

Bases: _ymero.Integrators.Integrator

Move particles with the periodically changing velocity \(\mathbf{u}(t) = \cos(2 \pi \, t / T) \mathbf{u}_0\)

__init__(name: str, velocity: Tuple[float, float, float], period: float) → None
Parameters:
  • name – name of the integrator
  • velocity\(\mathbf{u}_0\)
  • period – oscillation period \(T\)
class RigidVelocityVerlet

Bases: _ymero.Integrators.Integrator

Integrate the position and rotation (in terms of quaternions) of the rigid bodies as per Velocity-Verlet scheme. Can only applied to RigidObjectVector or RigidEllipsoidVector.

__init__(name: str) → None
Parameters:name – name of the integrator
class Rotate

Bases: _ymero.Integrators.Integrator

Rotate particles around the specified point in space with a constant angular velocity \(\mathbf{\Omega}\)

__init__(name: str, center: Tuple[float, float, float], omega: Tuple[float, float, float]) → None
Parameters:
  • name – name of the integrator
  • center – point around which to rotate
  • omega – angular velocity \(\mathbf{\Omega}\)
class SubStepMembrane

Bases: _ymero.Integrators.Integrator

Takes advantage of separation of time scales between membrane forces (fast forces) and other forces acting on the membrane (slow forces). This integrator advances the membrane with constant slow forces for ‘substeps’ sub time steps. The fast forces are updated after each sub step. Positions and velocity are updated using an internal velocity verlet integrator.

__init__(name: str, substeps: int, fastForces: Interactions.Interaction) → None
Parameters:
  • name – name of the integrator
  • substeps – number of sub steps
  • fastForces – the fast interaction module. Only accepts InteractionMembrane!
class Translate

Bases: _ymero.Integrators.Integrator

Translate particles with a constant velocity \(\mathbf{u}\) regardless forces acting on them.

__init__(name: str, velocity: Tuple[float, float, float]) → None
Parameters:
  • name – name of the integrator
  • velocity – translational velocity \(\mathbf{\Omega}\)
class VelocityVerlet

Bases: _ymero.Integrators.Integrator

Classical Velocity-Verlet integrator with fused steps for coordinates and velocities. The velocities are shifted with respect to the coordinates by one half of the time-step

\[\begin{split}\mathbf{a}^{n} &= \frac{1}{m} \mathbf{F}(\mathbf{x}^{n}, \mathbf{v}^{n-1/2}) \\ \mathbf{v}^{n+1/2} &= \mathbf{v}^{n-1/2} + \mathbf{a}^n \Delta t \\ \mathbf{x}^{n+1} &= \mathbf{x}^{n} + \mathbf{v}^{n+1/2} \Delta t\end{split}\]

where bold symbol means a vector, \(m\) is a particle mass, and superscripts denote the time: \(\mathbf{x}^{k} = \mathbf{x}(k \, \Delta t)\)

__init__(name: str) → None
Parameters:name – name of the integrator
class VelocityVerlet_withConstForce

Bases: _ymero.Integrators.Integrator

Same as regular VelocityVerlet, but the forces on all the particles are modified with the constant pressure term:

\[\begin{split}\mathbf{a}^{n} &= \frac{1}{m} \left( \mathbf{F}(\mathbf{x}^{n}, \mathbf{v}^{n-1/2}) + \mathbf{F}_{extra} \right) \\\end{split}\]
__init__(name: str, force: Tuple[float, float, float]) → None
Parameters:
  • name – name of the integrator
  • force\(\mathbf{F}_{extra}\)
class VelocityVerlet_withPeriodicForce

Bases: _ymero.Integrators.Integrator

Same as regular Velocity-Verlet, but the forces on all the particles are modified with periodic Poiseuille term. This means that all the particles in half domain along certain axis (Ox, Oy or Oz) are pushed with force \(F_{Poiseuille}\) parallel to Oy, Oz or Ox correspondingly, and the particles in another half of the domain are pushed in the same direction with force \(-F_{Poiseuille}\)

__init__(name: str, force: float, direction: str) → None
Parameters:
  • name – name of the integrator
  • force – force magnitude, \(F_{Poiseuille}\)
  • direction – Valid values: “x”, “y”, “z”. Defines the direction of the pushing force if direction is “x”, the sign changes along “y”. if direction is “y”, the sign changes along “z”. if direction is “z”, the sign changes along “x”.