mpacts.commands.geometry. sphere

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

import mpacts.commands.geometry.sphere
#or assign it to a shorter name
import mpacts.commands.geometry.sphere as sph

CompensateSphereRadiusForLostVolumeCommand

class mpacts.commands.geometry.sphere.CompensateSphereRadiusForLostVolumeCommand

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

Command that will compensate the radius of a sphere so that its taken up volume (usually reduced due to overlap in contacts) will once again approach the reference (usually initial) volume of the sphere.
Default location: ‘loop_cmds/integration_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • init_from_radius (default value = 1) — If ‘True’, will initialize the ‘volume_eq’ array from the initial radius
    • min_radius (default value = 0) — Minimal radius that the ‘r’ array can be set to, regardless of the volume. Default = zero.
    • 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.
    • uninitialized (default value = 1) — If ‘True’, and if init_from_radius is ‘True’ then the volume_eq will be calculated, the command then automatically sets uninitialized to ‘False’ so computation is done only once
    • volume_eq (default value = None) — Array with ‘equilibrium or ‘base’ volume of each sphere
    • volume_loss (default value = None) — Array with net volume lost due to contact for each particle
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, [gate, predicate, volume_loss, volume_eq, init_from_radius, uninitialized, min_radius]
CompensateSphereRadiusForLostVolumeCommand(name, parent, **kwargs)

ComputeSphereRadiusFromVolumeCommand

class mpacts.commands.geometry.sphere.ComputeSphereRadiusFromVolumeCommand

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

Command that will (back)compute spheres’ radii ‘r’ based on their volume (either given or in the array ‘volume’) as r = (0.75*V/pi)^(1/3)
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • 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.
    • volume (default value = None) — Array with volumes of the spheres. If not given, array ‘volume’ is searched
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, [gate, predicate, volume]
ComputeSphereRadiusFromVolumeCommand(name, parent, **kwargs)

ComputeSphereVolumeFromRadiusCommand

class mpacts.commands.geometry.sphere.ComputeSphereVolumeFromRadiusCommand

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

Command that will compute spheres’ volume (either given or in the array ‘volume’) based on their radii ‘r’ as V = 4/3*pi*r^3
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • 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.
    • volume (default value = None) — Array with volumes of the spheres. If not given, array 'volume' is searched
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, [gate, predicate, volume]
ComputeSphereVolumeFromRadiusCommand(name, parent, **kwargs)

ReduceSphereVolumeBasedOnAliveFractionCommand

class mpacts.commands.geometry.sphere.ReduceSphereVolumeBasedOnAliveFractionCommand

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

Modifies ‘lost_volume’ as to reduce the sphere’s volume based on its alive_fraction. This command presumes ‘lost_volume’ will be calculated in a contact model, and that the spheres’ radius will be modified using ‘CompensateSphereRadiusForLostVolumeCommand’ based on this lost volume and the reference volume ‘volume_eq’.
Default location: ‘loop_cmds/integration_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • alive_fraction (default value = None) — Array [0,1] containing the alive fraction of the spheres
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • min_fraction (default value = 0) — Minimal fraction of volume that the sphere can be reduced to, to avoid zero radii.
    • 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.
    • volume_eq (default value = None) — Array with ‘equilibrium or ‘base’ volume of each sphere
    • volume_loss (default value = None) — Array with net volume lost due to contact for each particle
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, [gate, predicate, volume_loss, volume_eq, alive_fraction, min_fraction]
ReduceSphereVolumeBasedOnAliveFractionCommand(name, parent, **kwargs)