mpacts.commands.force.constraints. virtualforces

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

import mpacts.commands.force.constraints.virtualforces
#or assign it to a shorter name
import mpacts.commands.force.constraints.virtualforces as vir

AddForcesToReferedParticleForcesCommand

class mpacts.commands.force.constraints.virtualforces.AddForcesToReferedParticleForcesCommand

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

Add forces of the given particles to forces of the of the particles they refer to.
Default location: ‘loop_cmds/post_contact_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)
    • indexArray (default value = None) — Array containing indeces of particles to which we are attached (to which we refer to), if not provided use ‘segmentIndex’ by default!
    • 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, indexArray]
AddForcesToReferedParticleForcesCommand(name, parent, **kwargs)

AddForcesToReferedParticleTorquesCommand

class mpacts.commands.force.constraints.virtualforces.AddForcesToReferedParticleTorquesCommand

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

Add forces of the given particles to torques of the of the particles they refer to. Noto: Parent paticle is assumed to be of DeformableCapsuleWithTorque type.
Default location: ‘loop_cmds/post_contact_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
    • weights — Array with the weights of the parents nodes - one weight per node.
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • indexArray (default value = None) — Array containing indices of particles to which we are attached (to which we refer to), if not provided use ‘segmentIndex’ by default!
    • 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, weights, [gate, predicate, indexArray]
AddForcesToReferedParticleTorquesCommand(name, parent, **kwargs)

AddNodeForcesToSegmentForcesCommand

class mpacts.commands.force.constraints.virtualforces.AddNodeForcesToSegmentForcesCommand

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

Add an additional force to segment generated by the forces applied directly on its nodes, i.e.

\vec{F}_i = \sum\limits_{k \in \text{nodes}(i) } \vec{F}_k .

Attention

This command shall be applied on the particle container containing ‘segments’. Moreover, it is assumed that ‘nodes’ have a nodeIndexList array containing indices of segments, which the given node is part of, see ComputeCylinderIndexListCommand for further details.

Default location: ‘loop_cmds/post_contact_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]
AddNodeForcesToSegmentForcesCommand(name, parent, **kwargs)

AddNodeForcesToSegmentTorqueCommand

class mpacts.commands.force.constraints.virtualforces.AddNodeForcesToSegmentTorqueCommand

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

Add an additional torque to segment generated by forces applied directly on its nodes, i.e.

\vec{T}_i = \sum\limits_{k \in \text{nodes}(i) } \left( \vec{x}_k - \vec{x}_C^i \right) \cdot \hat{t}_i \, \vec{F}_k ,

where \vec{x}_k is the position of node k, \vec{x}_C^i is the position of the i-th segment’s center and \hat{t}_i is a unit vector in the direction of the segment axis.

Attention

This command shall be applied on the particle container containing ‘segments’. Moreover, it is assumed that ‘nodes’ have a nodeIndexList array containing indices of segments, which the given node is part of, see ComputeCylinderIndexListCommand for further details.

Default location: ‘loop_cmds/post_contact_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]
AddNodeForcesToSegmentTorqueCommand(name, parent, **kwargs)

ChainOfCapsulesConstrainsCommand

class mpacts.commands.force.constraints.virtualforces.ChainOfCapsulesConstrainsCommand

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

Compute the virtual forces associated with the constrain that x[i][1]==x[i+1][0].
Default location: ‘loop_cmds/post_contact_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
    • segmentIndexList — std::vector array with indices of segment for single filament.
    • segmentpc — Particle container containing segments.
  • Optional keywords:
    • chi_r (default value = None) — Array containing mobility matrices for rotation. By default the ‘invgamma_rot’ array is used.
    • chi_t (default value = None) — Array containing mobility matrices for translation. By default the ‘invgamma’ array 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, segmentpc, segmentIndexList, [gate, predicate, chi_t, chi_r]
ChainOfCapsulesConstrainsCommand(name, parent, **kwargs)

ChainOfCapsulesConstrainsSparseSolverCommand

class mpacts.commands.force.constraints.virtualforces.ChainOfCapsulesConstrainsSparseSolverCommand

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

Compute the virtual forces associated with the constrain that x[i][1]==x[i+1][0] by using SparseMatrix conjugant gradient solver.
Default location: ‘loop_cmds/post_contact_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
    • segmentIndexList — std::vector array with indices of segment for single filament.
    • segmentpc — Particle container containing segments.
  • Optional keywords:
    • chi_r (default value = None) — Array containing mobility matrices for rotation. By default the ‘invgamma_rot’ array is used.
    • chi_t (default value = None) — Array containing mobility matrices for translation. By default the ‘invgamma’ array 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.
    • tolerance (1) (default value = 1.0000000000000001e-05) — Tolerance, maximal residual expressed as |Ax-b|/|b|. If not specified, a default tolerance of 1e-5 will be used.
  • Read only properties:
    • steps — The number of steps ConjugateGradient has taken to converge at the last execution.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, segmentpc, segmentIndexList, [gate, predicate, chi_t, chi_r, tolerance]
ChainOfCapsulesConstrainsSparseSolverCommand(name, parent, **kwargs)

ComputeForcesFromSegmentForcesAndTorqueCommand

class mpacts.commands.force.constraints.virtualforces.ComputeForcesFromSegmentForcesAndTorqueCommand

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

Determine the actual forces on the nodes from segment data.
Default location: ‘loop_cmds/pre_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)
    • 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]
ComputeForcesFromSegmentForcesAndTorqueCommand(name, parent, **kwargs)