mpacts.commands.misc. stresstensor

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

import mpacts.commands.misc.stresstensor
#or assign it to a shorter name
import mpacts.commands.misc.stresstensor as str


class mpacts.commands.misc.stresstensor.PrincipalStressCommand

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

Command for computing the eigen values and eigen vectors of the 3x3 stress tensor which is stored in the ‘stress’ DynamicArray. The eigen values are stored in DynamicArray of Vectors ‘principal_stress’ and contain the 3 principal components of the stress tensor, always sorted from smallest to largest eigen value. Optionally, a (not necessarily unique) set of eigen vectors is computed which correspond to each eigen value. The eigen vector (or principal axis of stress) corresponding to the first eigen value (or principal stress) is stored in the first column of a full 3x3 matrix, and so on. The DynamicArray keeping these eigen vectors should be given as a input argument (‘principal_axes’). If not given, the principal axes will NOT be computed, significantly saving time in execution time of the command.
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)
    • mean_stress (default value = None) — Array to store the mean stress (one third of the trace of the stress tensor). If not given, it will not be calculated
    • 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.
    • principal_axes (default value = None) — Array to store the calculated principal axes. If not given, the principal axes will not be calculated
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, [gate, predicate, principal_axes, mean_stress]
PrincipalStressCommand(name, parent, **kwargs)