mpacts.commands.misc. damage_estimation

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

import mpacts.commands.misc.damage_estimation
#or assign it to a shorter name
import mpacts.commands.misc.damage_estimation as dam

ComputeDamageCommand

class mpacts.commands.misc.damage_estimation.ComputeDamageCommand

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

Command which computes relative damage between 0 and 1 based on the force that is transmitted on the particles.
Default location: ‘loop_cmds/post_contact_cmds’
  • Required keywords:
    • damage — Scalar array with damage per particle
    • max_force — maximal force which results in a maximal damage of ‘1’
    • min_force — minimal force for which damage should be added
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • F (default value = None) — Array with forces on the particle
    • 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, damage, min_force, max_force, [gate, predicate, F]
ComputeDamageCommand(name, parent, **kwargs)

ComputeNormalPressureCommand

class mpacts.commands.misc.damage_estimation.ComputeNormalPressureCommand

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

Given a force array, and using existing normals and areas, computes the normal pressure ‘p’ for each particle
Default location: ‘loop_cmds/post_contact_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • F (default value = None) — Array with forces on the particle to be used as input for this command. If not given, we will look up ‘F’.
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • p (default value = None) — Array to put computed normal pressures in. If not given, we will look up ‘p’ array.
    • 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, p]
ComputeNormalPressureCommand(name, parent, **kwargs)