mpacts.commands.force. body

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

import mpacts.commands.force.body
#or assign it to a shorter name
import mpacts.commands.force.body as bod

AppliedForceCommand

class mpacts.commands.force.body.AppliedForceCommand

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

Applied user-specified force on a given particle or - if not given - on every particle in an ArrayManager
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • force (kg . m . s^-2) — Applied force vector
    • 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)
    • index (default value = -1) — Index of particle to which the force should be applied. If not given, force will be applied to all particles (possibly selected by the predicate)
    • 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, force, [gate, predicate, index]
AppliedForceCommand(name, parent, **kwargs)

AppliedPressureCommand

class mpacts.commands.force.body.AppliedPressureCommand

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

Applied user-specified pressure on all particles in a given particle container. A user-specified array with ‘area’ is used to compute a force for each particle.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • area — Area to be used
    • direction — Direction vector
    • pc — Particle container on which the command is applied
    • pressure — Applied pressure
  • 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, pressure, area, direction, [gate, predicate]
AppliedPressureCommand(name, parent, **kwargs)

ArchimedesForceTriangleCommand

class mpacts.commands.force.body.ArchimedesForceTriangleCommand

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

Command to compute the ‘upward’ Archimedes force for a triangulated shape that is - partially - submerged in a liquid with given density.The water-air interface is represented by a given position and surface normal vector. Arrays for submerged volume and submerged center of mass must be present.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • g — Gravitational acceleration
    • pc — Particle container on which the command is applied
    • x — Positions of the nodes/controlPoints of the submerged solid body
  • Optional keywords:
    • density_fluid (default value = 999.97199999999998) — Density of the fluid in which the rigid body is to be immersed. If not specified, we use water at standard conditions.
    • 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.
    • surface_normal (default value = 0 1 0) — Unit normal vector of the liquid-void interface, pointing towards the void phase. Default = (0,1,0)
    • surface_origin (default value = 0 0 0) — Any point on the liquid-void interface. Default = (0,0,0)
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, g, x, [gate, predicate, density_fluid, surface_origin, surface_normal]
ArchimedesForceTriangleCommand(name, parent, **kwargs)

BuoyancyForceCommand

class mpacts.commands.force.body.BuoyancyForceCommand

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

Command to compute the ‘upward’ Archimedes force for a triangulated shape that is - partially - submerged in a liquid with given density.The water-air interface is represented by a given position and surface normal vector. Arrays for submerged volume and submerged center of mass must be present (NOTE: this is the modular replacement for ‘ArchimedesForceTriangleCommand’)
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • g — Gravitational acceleration
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • density_fluid (default value = 999.97199999999998) — Density of the fluid in which the rigid body is to be immersed. If not specified, we use water at standard conditions.
    • 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, g, [gate, predicate, density_fluid]
BuoyancyForceCommand(name, parent, **kwargs)

CFDDragForceCommand

class mpacts.commands.force.body.CFDDragForceCommand

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

Drag force command for CFD coupling: drag is calculated using voidage function of Di Felice, 1993
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • density (kg . m^-3) — Density of the fluid in which the particles are submerged
    • pc — Particle container on which the command is applied
    • viscosity (m^2 . s^-1) — Dynamic viscosity of the fluid 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.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, density, viscosity, [gate, predicate]
CFDDragForceCommand(name, parent, **kwargs)

CentralGravityCommand

class mpacts.commands.force.body.CentralGravityCommand

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

A force is exerted on all particles in a given particle container with magnitude F = GMm/r**2 where m is the mass of the particle in the container, and GM is an input parameter representing the gravitational constant, multiplied with the mass of the ‘large’ central pulling body
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • GM (m^3 . s^-2) — The multiplicaton of the gravitational constant G and the mass of the central mass M
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • center (m) (default value = 0 0 0) — The location of the central mass
    • 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, GM, [gate, predicate, center]
CentralGravityCommand(name, parent, **kwargs)

CentralPullCommand

class mpacts.commands.force.body.CentralPullCommand

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

CentralPullCommand where a force is exerted on all particles in a given particle container equal to Force in the direction of the center point given.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • force (kg . m . s^-2) — The (constant) force that pulls the particles to the center point.
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • center (m) (default value = 0 0 0) — The center location towards particles are pulled
    • 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, force, [gate, predicate, center]
CentralPullCommand(name, parent, **kwargs)

CentrifugalTorqueCommand

class mpacts.commands.force.body.CentrifugalTorqueCommand

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

Added combined effect of centrifugal force and Coriolis’s force to the torque in the overdamped case.
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 of the medium in which the particles are submerged in k_B 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]
CentrifugalTorqueCommand(name, parent, **kwargs)

CentrifugationForceCommand

class mpacts.commands.force.body.CentrifugationForceCommand

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

Centrifugation Force command. Computes the centrifugational force in the body frame of the centrifuge, that rotates with a given angular velocity, and which is located by an axis and a location.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • Omega (s^-1) — Angular velocity of centrifuge
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • Axis (1) (default value = 0 0 1) — Axis of rotation
    • Position_axis (m) (default value = 0 0 0) — Position of centrifuge
    • 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, Omega, [gate, predicate, Position_axis, Axis]
CentrifugationForceCommand(name, parent, **kwargs)

ConcaveCentripetalForceCommand

class mpacts.commands.force.body.ConcaveCentripetalForceCommand

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

Net central force due to particles being in a concavity with a given radius.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • concave_radius (m) — radius (inverse_curvature) of the concavity
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • center (m) (default value = 0 0 0) — The center location towards particles are pulled
    • force (kg . m . s^-2) (default value = -1) — The downward force that will pull the particle to the center point of the concavity.If not specified, will use the ‘mass’ array and the property ‘g’with the gravitational acceleration
    • g (m . s^-2) (default value = 9.8100000000000005) — Scalar version of the gravitational accelaration (should be positive)This parameter will be ignored is a positive ‘force’ argument is provided!
    • 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, concave_radius, [gate, predicate, force, center, g]
ConcaveCentripetalForceCommand(name, parent, **kwargs)

DirectedForceCommand

class mpacts.commands.force.body.DirectedForceCommand

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

Force with fixed magnitude in a direction given by the user-given array ‘direction’
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • direction — Array with a direction vector
    • magnitude (kg . m . s^-2) — Magnitude of the applied force
    • 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)
    • normalize (default value = 0) — If ‘True’, the direction vector will first be normalized
    • 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.
    • use_contact_area (default value = 0) — If ‘True’, the contact area array will be used to weight the obtained directed force
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, direction, magnitude, [gate, predicate, normalize, use_contact_area]
DirectedForceCommand(name, parent, **kwargs)

DragForceCommand

class mpacts.commands.force.body.DragForceCommand

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

Drag force command: drag force is proportional to the velocity squared and in the opposite direction of the velocity. For example to be used for approximated air drag forces
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • c (kg . m^-1) — Drag coefficient c of the particle. Drag force: F = -c v^2
    • 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.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, c, [gate, predicate]
DragForceCommand(name, parent, **kwargs)

EnvironmentalDragForceCommand

class mpacts.commands.force.body.EnvironmentalDragForceCommand

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

Computes the drag force applied to a cylinder based on the environments velocity. Environmental velocity is assumed to be stored at nodes in “v_env” array and is then linearly interpolated over the overall length of the cylinder. The resulting force is then given by :math:`vec{F} = frac{1}{2} gamma cdot left( vec{v}^0_+ + vec{v}^0_- right) `
Default location: ‘loop_cmds/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.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, [gate, predicate]
EnvironmentalDragForceCommand(name, parent, **kwargs)

EnvironmentalDragTorqueCommand

class mpacts.commands.force.body.EnvironmentalDragTorqueCommand

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

Computes the drag torque applied to a cylinder based on the environments velocity. Environmental velocity is assumed to be stored at nodes in “v_env” array and is then linearly interpolated over the overall length of the cylinder. The resulting force is then given by :math:`vec{T} = frac{1}{ell} gamma_{rot} cdot left( vec{v}^0_+ - vec{v}^0_- right) `
Default location: ‘loop_cmds/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.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, [gate, predicate]
EnvironmentalDragTorqueCommand(name, parent, **kwargs)

Fixed1DSpringsCommand

class mpacts.commands.force.body.Fixed1DSpringsCommand

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

For each particle, a spring is constructed in a given ‘dimension’ with reference position at given array ‘x0’ and a linear force with stiffness ‘k’
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • dimension (1) — dimension in which the fixed springs act
    • k (kg . s^-2) — spring stiffness
    • 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.
    • x0 (default value = None) — Array with initial positions. Will be set to x at initialization if not given (make sure that x is completely set and never changes when adding this command without setting x0 explicitely!).
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, k, dimension, [gate, predicate, x0]
Fixed1DSpringsCommand(name, parent, **kwargs)

FixedNormalSpringsCommand

class mpacts.commands.force.body.FixedNormalSpringsCommand

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

A spring in the direction of a ‘normal’ array is constructed for each particle, with reference position at a given array ‘x0’. A given array with ‘area’s of the particles will be used to scale the force. F_spring = k * area * dot( x0-x, normal )
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • area (default value = None) — Array with ‘areas’ (or submerged areas,...) that will be used to scale the force in the normal direction for each node. If not given, the array named ‘area’ will be searched in ‘pc’.
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • k_array (default value = None) — Optional array that stores ‘stiffness’ values per node (Pa/m). If given, the value provided in property ‘k’ will be ignored.
    • k (kg . m^-2 . s^-2) (default value = -1) — spring ‘stiffness’ (in Pa/m). Should be provided if no ‘k_array’ was passed.
    • max_displacement (default value = 1.7976931348623157e+308) — Max value that the displacement can obtain. Set this to zero if you want only ‘compressive’ forces to be exerted.
    • 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.
    • relaxation_time (s) (default value = -1) — Optional relaxation timescale of the fixed springs. This will change the value of x0.
    • x0_to_be_copied (default value = 0) — If explicitly set to true, will initialize x0 with array ‘x’ the next time the command is executed, whenever that might be.This propery will ALWAYS be changed to ‘false’ after this initialization.
    • x0 (default value = None) — Array with initial positions. Will be set to x at first run if not given. In that case, an array with name ‘x0’ will be added to pc, and the flag property flag ‘x0_to_be_copied’ will be set to ‘true’
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, [gate, predicate, x0, k, x0_to_be_copied, area, max_displacement, k_array, relaxation_time]
FixedNormalSpringsCommand(name, parent, **kwargs)

FixedSpringsCommand

class mpacts.commands.force.body.FixedSpringsCommand

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

For each particle, a spring is constructed with with reference position at given array ‘x0’ and a linear force with stiffness ‘k’
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • k (kg . s^-2) — spring stiffness
    • 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.
    • x0 (default value = None) — Array with initial positions. Will be set to x at initialization if not given (make sure that x is completely set and never changes when adding this command without setting x0 explicitely!).
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, k, [gate, predicate, x0]
FixedSpringsCommand(name, parent, **kwargs)

FixedStiffnessMatrixSpringsCommand

class mpacts.commands.force.body.FixedStiffnessMatrixSpringsCommand

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

Computes a restoring stiffness w.r.t. x0 for particles for which the positions are implicitly solved in a system K * x = F. To achieve this, both a diagonal stiffness term is added in stiffness matrix K and a partial rhs force is added as F = k x0.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
    • x0 — Array with initial positions. Will be set to x at initialization if not given
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • k (default value = None) — Spring stiffness array. If not given, you have to provide an ‘m’ array.
    • m (default value = None) — Mass array. If given instead of ‘k’, we will compute the effective inertial stiffness for this timestep as m / dt^2. Will be ignored if ‘k’ is given.
    • 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.
    • v0 (default value = None) — Array with intial velocities (typically, just ‘v’ array). If given, an apparent stiffness due to inertial velocity k * dt * v0 will be added to the force array.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, x0, [gate, predicate, k, m, v0]
FixedStiffnessMatrixSpringsCommand(name, parent, **kwargs)

GaussianConeForceCommand

class mpacts.commands.force.body.GaussianConeForceCommand

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


Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • direction — Array with a direction vector
    • force_base (kg . m . s^-2) — Magnitude of the applied force
    • pc_nozzles
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • cone_angle_deg (default value = 0) — Magnitude of the applied force
    • cone_edge_std (default value = 2) — Magnitude of the applied force
    • force_centerline_decay (default value = 0) — Magnitude of the applied force
    • 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, pc_nozzles, direction, force_base, [gate, predicate, force_centerline_decay, cone_angle_deg, cone_edge_std]
GaussianConeForceCommand(name, parent, **kwargs)

Gravity2Command

class mpacts.commands.force.body.Gravity2Command

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

More generic Gravitation command. Computes a force F=m*g, with ‘m’ a mass array and ‘g’ the gravitational acceleration vector, but also adds the moment of that force from the given x_cog array to the center of rotation (0,0,0) (both defined in body frame coordinates).
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • g (m . s^-2) (default value = 0 -9.81 0) — The gravitational vector
    • 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, g]
Gravity2Command(name, parent, **kwargs)

GravityCommand

class mpacts.commands.force.body.GravityCommand

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

Gravitation command. Computes a force F=m*g, with ‘m’ a mass array and ‘g’ the gravitational acceleration vector. Note that this command implicitly assumes that the center of gravity is (0,0,0) in body frame coordinates, and therefore does not apply a gravitational moment.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • g (m . s^-2) (default value = 0 -9.81 0) — The gravitational vector
    • 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, g]
GravityCommand(name, parent, **kwargs)

InternalNormalStiffnessCommand

class mpacts.commands.force.body.InternalNormalStiffnessCommand

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

Internal normal stiffness of composed body (e.g. deformable cell), with a linear stiffness in the direction of the normal of each node
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • E (kg . m^-1 . s^-2) — Young’s modulus of the internal material
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • area (default value = None) — Array with ‘areas’ that will be used to scale the force in the normal direction for each node. If not given, the array named ‘area’ will be searched in ‘pc’.
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • l0 (default value = None) — Array with initial spring lengths. If not given an array will be made and initialized at first run
    • pre_factor (1) (default value = 1) — Pre-factor applied to compute ‘k’ from E, l0 and area. Accounts for geometry
    • 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, E, [gate, predicate, l0, area, pre_factor]
InternalNormalStiffnessCommand(name, parent, **kwargs)

LinearDampingForceCommand

class mpacts.commands.force.body.LinearDampingForceCommand

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

Linear damping force command: damping force is proportional to and in the opposite direction of the velocity ‘v’.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • c (kg . s^-1) — Linear damping coefficient. Damping force: F = -c v
    • 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.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, c, [gate, predicate]
LinearDampingForceCommand(name, parent, **kwargs)

LinearDampingMomentCommand

class mpacts.commands.force.body.LinearDampingMomentCommand

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

Linear damping moment command: damping moment is proportional to and in the opposite direction of the angular velocity.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • c (m^2 . kg . s^-1) — Linear damping coefficient. Damping Moment: M = -c w
    • 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.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, c, [gate, predicate]
LinearDampingMomentCommand(name, parent, **kwargs)

LinearStretchingTorqueCommand

class mpacts.commands.force.body.LinearStretchingTorqueCommand

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

The Torque generated by the stretching of the segment out of equilibrium length.
Default location: ‘loop_cmds/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)
    • k_array (default value = None) — Array containing stiffnesses of the harmonic springs (either k or k_array has to be specified).
    • k (kg . s^-2) (default value = -1) — Stiffness of the harmonic spring.
    • l0_array (default value = None) — Array containing equilibrium lengths of individual segments (either l0 or l0_array has to be specified).
    • l0 (m) (default value = -1) — Equilibrium length.
    • 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, k, k_array, l0, l0_array]
LinearStretchingTorqueCommand(name, parent, **kwargs)

SaffmanLiftForceCommand

class mpacts.commands.force.body.SaffmanLiftForceCommand

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

Saffmann approximation for lift forces exerted on spherical particles submerged in a fluid due to a velocity gradient. For spheres with volume V, we compute a lift force as:

\vec{F}_\mathrm{lift} = - C_l\,\rho\,V\,( \vec{v_0}-\vec{v} )\times (\nabla \vec{v}_0 ).

with lift coefficient

C_l = \frac{ 3\cdot 6.46 }{ 2\pi\sqrt{Re_\omega} }

where we have used the vorticity Reynolds number:

Re_\omega = \frac{ 4 \rho |\nabla \vec{v}_0| r^2 }{\mu}.

This implementation was adapted from: Fluent manual.

Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • F0 — Array with forces that are applied on the fluid
    • density (kg . m^-3) — Density of the fluid in which the particles are submerged
    • pc — Particle container on which the command is applied
    • v0 — Array with the local velocity of the fluid at the position of each particle
    • viscosity (kg . m^-1 . s^-1) — Dynamic viscosity of the fluid in which the particles are submerged
    • vorticity — Array with the local vorticity of the fluid at the position of each particle
  • 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, density, viscosity, vorticity, v0, F0, [gate, predicate]
SaffmanLiftForceCommand(name, parent, **kwargs)

StokesDragForceCommand

class mpacts.commands.force.body.StokesDragForceCommand

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

Command to compute, given an already computed ‘ContactMatrixDiagonal’ with friction constants (see e.g. ‘LiquidFrictionCommand’), a linear Stokes drag force. velocity can either be the particle’s own velocity (sign should be ‘-1’) or an external ‘driving’ velocity field that is interpolated to the position of the particle (‘sign’ should be 1).
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gamma (default value = None) — Array containing the friction matrices. If not provided first tries to find ‘ContactMatrixDiagonal’ then tries to find ‘gamma’ array.
    • 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.
    • sign (1) (default value = -1) — Sign of the force (-1 or 1) in F=sign*gamma*v. If v is the particle’s own velocity, use -1 (default). If v is an external field, you typically want to use 1. Only 1 and -1 are accepted as valid arguments.
    • v (default value = None) — Array containing the velocity, which is either the particle’s own velocity, or the local interpolation of some external field. If not given, pc[‘v’] will be searched.
    • vorticity (default value = None) — Array with local fluid ‘vorticity’ (vector with angular velocities). If given, a correction force will be added based on the timestep to prevent ‘overshooting’ a flow-line due to discrete time-stepping. Only applicable in case an explicit and non-trivial fluid-field is provided, e.g. from a CFD-computation.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, [gate, predicate, sign, v, vorticity, gamma]
StokesDragForceCommand(name, parent, **kwargs)

StokesDragForceFluidFeedbackCommand

class mpacts.commands.force.body.StokesDragForceFluidFeedbackCommand

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

Command to compute the feedback force that should be exerted on the fluid for particles moving inside of it, i.e, F = gamma * (v_particle - v_fluid). Note that this is NOT a true body force since the own ‘F’ array will not be touched by this command.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • F_fluid (default value = None) — Array containing forces that should be exerted on the fluid
    • gamma (default value = None) — Array containing the friction matrices. If not provided first tries to find ‘ContactMatrixDiagonal’ then tries to find ‘gamma’ array.
    • 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.
    • v_fluid (default value = None) — Array containing fluid velocity
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, [gate, predicate, v_fluid, gamma, F_fluid]
StokesDragForceFluidFeedbackCommand(name, parent, **kwargs)

SurfaceElementDragForceCommand

class mpacts.commands.force.body.SurfaceElementDragForceCommand

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

Drag force command: drag force is proportional to the velocity squared, in the opposite direction of the velocity and proportional to the (polygon’s) area.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • c (1) — Dimensionless drag coefficient. Dependent on general geometry and Reynolds number.
    • density (kg . m^-3) — Density of the fluid
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • area (default value = None) — Array with area values for the polygons. If not given, the array ‘area’ will be looked up
    • 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.
    • v0_array (default value = None) — If given, specifies the velocity of the ‘medium’ for each triangle in which the particles experience the drag force. If given, this array takes precedence over the v0 value.
    • v0 (default value = 0 0 0) — If given, specifies the velocity of the ‘medium’ in which the particles experience the drag force.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, c, density, [gate, predicate, area, v0, v0_array]
SurfaceElementDragForceCommand(name, parent, **kwargs)