mpacts.commands.force.constraints. volumeforce

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

import mpacts.commands.force.constraints.volumeforce
#or assign it to a shorter name
import mpacts.commands.force.constraints.volumeforce as vol

ComputeArrayGlobalVolumeForceCommand

class mpacts.commands.force.constraints.volumeforce.ComputeArrayGlobalVolumeForceCommand

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

Compute total pressure per deformable body which is proportional to the difference between a set (or initial) target volume and the body’s actual volume. A decreased volume leads to a positive pressure. It is up to the user to ensure that when this command is executed, the volume of the body has been accurately set and calculated (e.g. using the Gauss theorem). It is also the responsibility of the user to use another command that translates this global force called volume_force to the degrees of freedom of the body.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • kv — Global volume conservation constant (for whole body): p_global = kv * (total_volume_eq - total_volume) / total_volume_eq.
    • 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)
    • internal_pressure (default value = None) — Internal pressure (such as turgor pressure)
    • kvi (default value = None) — Optional integrative term for global volume conservation. Setting this to non-zero would make this effectively a PI controller.The integrative gain = kv/kvi, hence kvi has units of time (lower = stiffer integrative control)If kvi is given, an array with name ‘volume_error_int’ should be present, and this array should be intialized to zero at the beginning of the simulation.
    • 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, kv, [gate, predicate, kvi, internal_pressure]
ComputeArrayGlobalVolumeForceCommand(name, parent, **kwargs)

ComputeGlobalVolumeForceCommand

class mpacts.commands.force.constraints.volumeforce.ComputeGlobalVolumeForceCommand

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

Compute total pressure per deformable body which is proportional to the difference between a set (or initial) target volume and the body’s actual volume. A decreased volume leads to a positive pressure. It is up to the user to ensure that when this command is executed, the volume of the body has been accurately set and calculated (e.g. using the Gauss theorem). It is also the responsibility of the user to use another command that translates this global force called volume_force to the degrees of freedom of the body.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • kv — Global volume conservation constant (for whole body): p_global = kv * (total_volume_eq - total_volume) / total_volume_eq.
    • 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)
    • internal_pressure (default value = 0) — Internal pressure (such as turgor pressure)
    • kvi (default value = 0) — Optional integrative term for global volume conservation. Setting this to non-zero would make this effectively a PI controller.The integrative gain = kv/kvi, hence kvi has units of time (lower = stiffer integrative control)If kvi is given, an array with name ‘volume_error_int’ should be present, and this array should be intialized to zero at the beginning of the simulation.
    • 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, kv, [gate, predicate, kvi, internal_pressure]
ComputeGlobalVolumeForceCommand(name, parent, **kwargs)

ComputeNodeVolumeForceCommand

class mpacts.commands.force.constraints.volumeforce.ComputeNodeVolumeForceCommand

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

This command translates a volume pressure which is calculated for a complete deformable body to actual forces (F) on the nodes of the body. For this it makes use of the local normal per node (which should be available and updated) and the ‘area’ of each node, which could be calculated e.g. in the Laplace-Beltrami operator. It is the responsibility of the user to make sure that these properties have been calculated when this command is executed.
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]
ComputeNodeVolumeForceCommand(name, parent, **kwargs)