mpacts.commands.force. random

In order to be able to use this module import it like this:

import mpacts.commands.force.random
#or assign it to a shorter name
import mpacts.commands.force.random as ran

BrownianForceCommand

class mpacts.commands.force.random.BrownianForceCommand

Bases: mpacts.core.command.Command, mpacts.core.baseobject.BaseObject

Force generating Brownian motion due to the particles being suspended in a liquid. DEPRECATED - check ThermalForceCommand!
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
    • temperature — Temperature of the medium in which the particles are submerged.
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
    • viscosity (kg . m^-1 . s^-1) (default value = -1) — viscosity of the medium in which the particles are submerged. Will be calculated from the temperature if not given.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, temperature, [gate, predicate, viscosity]
BrownianForceCommand(name, parent, **kwargs)

BrownianRotationalForcesCommand

class mpacts.commands.force.random.BrownianRotationalForcesCommand

Bases: mpacts.core.command.Command, mpacts.core.baseobject.BaseObject

Particles in ‘pc’ rotate according to given friction matrix
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
    • temperature (m^2 . kg . s^-2) — Temperature (as multiple of kB units)
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, temperature, [gate, predicate]
BrownianRotationalForcesCommand(name, parent, **kwargs)

BrownianTranslationForcesCommand

class mpacts.commands.force.random.BrownianTranslationForcesCommand

Bases: mpacts.core.command.Command, mpacts.core.baseobject.BaseObject

Particles in ‘pc’ move according to given friction matrix
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
    • temperature (m^2 . kg . s^-2) — Temperature (as multiple of kB units)
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, temperature, [gate, predicate]
BrownianTranslationForcesCommand(name, parent, **kwargs)

DiffuseCommand

class mpacts.commands.force.random.DiffuseCommand

Bases: mpacts.core.command.Command, mpacts.core.baseobject.BaseObject

Particles in ‘pc’ move according to given Diffusivity in the medium ‘D_medium’. DEPRECATED - check ThermalForceCommand!
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • D_medium (m^2 . s^-1) — Diffusivity of the medium
    • pc — Particle container on which the command is applied
    • temperature (K) — Temperature
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, temperature, D_medium, [gate, predicate]
DiffuseCommand(name, parent, **kwargs)

RandomForceCommand

class mpacts.commands.force.random.RandomForceCommand

Bases: mpacts.core.command.Command, mpacts.core.baseobject.BaseObject

Force in a fully random direction drawn from uniform distribution over unit sphere surface with a magnitude following a normal distribution with given standard deviation sigma. Note: It is not equivalent to the Brownian motion.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
    • sigma — Standard deviation of the Random force magnitude; if sigma<0, we keep a unit-vector.
  • Optional keywords:
    • array_name (default value = F) — Name of the array to operate on (default: ‘F’). Note: this option is kept for legacy reasons. Please use pass property ‘force_array’ instead
    • direction (1) (default value = 0 0 0) — If given, this axis (plus and minus) will be used for the random force, with only its magnitude randomized.
    • force_array (default value = None) — Array to which the force should be added. If not given, array with name ‘array_name’ will be used.
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
    • restrict_to_plane (1) (default value = 0 0 0) — If a plane normal is given, the command will project its direction in the plane.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, sigma, [gate, predicate, force_array, array_name, restrict_to_plane, direction]
RandomForceCommand(name, parent, **kwargs)

ThermalForceCommand

class mpacts.commands.force.random.ThermalForceCommand

Bases: mpacts.core.command.Command, mpacts.core.baseobject.BaseObject

Force generating Brownian motion due to the particles being suspended in a medium.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • D_sqrt (default value = None) — Array that contains the square root of diffusion matrix divided by the mobility matrix ( chi^{-1} . sqrt(D) ). By default the array ‘D_sqrt’ is used.
    • F (default value = None) — Array where the thermal force will be contributed. By default ‘F’ is used.
    • div_D_F (default value = None) — Array that contains the force associated with divergence of the diffusion matrix ( F = chi^{-1} . div D, where chi is mobility). By default the array ‘div_D_F’ is used.
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, [gate, predicate, F, D_sqrt, div_D_F]
ThermalForceCommand(name, parent, **kwargs)