Step actions

Step actions represent the actions that can be performed during a simulation step, such as the enforcement of boundary conditions, the application of external forces.

Body loads

MPMBodyLoadBase class

Body loads are loads that act on the entire body of the model.

class edelweissmeshfree.stepactions.base.mpmbodyloadbase.MPMBodyLoadBase(name, definition, jobInfo, model, fieldOutputController, dofmanager, journal)[source]

Base class for body loads.

If you want to implement a new body load, you should derive from this class.

Attributes:
cellSet

The cells this load is acting on.

loadType

Return the type of load (e.g., bodyforce, …

Parameters:
  • name (str)

  • definition (dict)

  • jobInfo (dict)

  • model (FEModel)

  • fieldOutputController (FieldOutputController)

  • journal (Journal)

Methods

applyAtIncrementStart(model, timeStep)

Is called when a step increment starts.

applyAtStepEnd(model)

Is called when a step successfully finished.

applyAtStepStart(model)

Is called when a step starts.

getCurrentLoad(timeStep)

Return the current magnitude for this body load.

updateStepAction(definition, jobInfo, model, ...)

Is called when an updated definition is present for a new step.

abstractmethod getCurrentLoad(timeStep)[source]

Return the current magnitude for this body load.

Parameters:

timeStep (TimeStep) – The current time step.

Returns:

The magnitude.

Return type:

np.ndarray

abstract property cellSet: CellSet

The cells this load is acting on.

Returns:

The list of cells.

Return type:

CellSet

abstract property loadType: str

Return the type of load (e.g., bodyforce, … )

Returns:

The load type.

Return type:

str

BodyLoad class

class edelweissmeshfree.stepactions.bodyload.BodyLoad(name, model, journal, cells, bodyLoadType, loadVector, **kwargs)[source]

This is a classical body load for MPM models.

Parameters:
  • name (str) – Name of the distributed load.

  • model (MPMModel) – The MPM model tree.

  • journal (Journal) – The journal to write messages to.

  • cells (CellSet) – The cells to apply the distributed load to.

  • bodyLoadType (str) – The type of the body load, e.g., “gravity”.

  • loadVector (np.ndarray) – The load vector to apply to the particles.

  • **kwargs

    Additional keyword arguments. The following are supported: - f_t : Callable[[float], float]

    The amplitude function of the distributed load.

Attributes:
cellSet

The cells this load is acting on.

loadType

Return the type of load (e.g., bodyforce, …

Methods

applyAtIncrementStart(model, timeStep)

Is called when a step increment starts.

applyAtStepEnd(model[, stepMagnitude])

Is called when a step successfully finished.

applyAtStepStart(model)

Is called when a step starts.

getCurrentLoad(timeStep)

Return the current magnitude for this body load.

updateStepAction(definition, jobInfo, model, ...)

Is called when an updated definition is present for a new step.

applyAtStepEnd(model, stepMagnitude=None)[source]

Is called when a step successfully finished.

Parameters:
  • U – The current solution vector.

  • P – The current reaction force vector.

getCurrentLoad(timeStep)[source]

Return the current magnitude for this body load.

Parameters:

timeStep (TimeStep) – The current time step.

Returns:

The magnitude.

Return type:

np.ndarray

property cellSet: CellSet

The cells this load is acting on.

Returns:

The list of cells.

Return type:

CellSet

property loadType: str

Return the type of load (e.g., bodyforce, … )

Returns:

The load type.

Return type:

str

Neumann boundary conditions

MPMDistributedLoadBase class

class edelweissmeshfree.stepactions.base.mpmdistributedloadbase.MPMDistributedLoadBase(name, definition, jobInfo, model, fieldOutputController, dofmanager, journal)[source]
Attributes:
loadType

Return the type of load (e.g., pressure, …

mpSet

The material points this load is acting on.

Parameters:
  • name (str)

  • definition (dict)

  • jobInfo (dict)

  • model (FEModel)

  • fieldOutputController (FieldOutputController)

  • journal (Journal)

Methods

applyAtIncrementStart(model, timeStep)

Is called when a step increment starts.

applyAtStepEnd(model)

Is called when a step successfully finished.

applyAtStepStart(model)

Is called when a step starts.

getCurrentMaterialPointLoad(materialPoint, ...)

Return the current load vector for a given material point.

updateStepAction(definition, jobInfo, model, ...)

Is called when an updated definition is present for a new step.

abstractmethod getCurrentMaterialPointLoad(materialPoint, timeStep)[source]

Return the current load vector for a given material point.

Parameters:
  • materialPoint (MaterialPointBase) – The material point for which the load definition is requrested.

  • timeStep (TimeStep) – The current time step.

Returns:

The tuple consisting of:
  • the surface ID.

  • the load vector.

Return type:

tuple[int, np.ndarray]

abstract property loadType: str

Return the type of load (e.g., pressure, … )

Returns:

The load type.

Return type:

str

abstract property mpSet: MaterialPointSet

The material points this load is acting on.

Returns:

The list of cells.

Return type:

MaterialPointSet

DistributedLoad class

class edelweissmeshfree.stepactions.distributedload.MaterialPointPointWiseDistributedLoad(name, model, journal, materialPoints, distributedLoadType, loadVector, f_t=None)[source]

This is a simple distributed load for material points which consist of a single vertex. Accordingly, the load vector already includes the surface vector defintion.

Attributes:
loadType

Return the type of load (e.g., pressure, …

mpSet

The material points this load is acting on.

Parameters:
  • name (str)

  • model (MPMModel)

  • journal (Journal)

  • materialPoints (MaterialPointSet)

  • distributedLoadType (str)

  • loadVector (ndarray)

  • f_t (Callable[[float], float])

Methods

applyAtIncrementStart(model, timeStep)

Is called when a step increment starts.

applyAtStepEnd(model[, stepMagnitude])

Is called when a step successfully finished.

applyAtStepStart(model)

Is called when a step starts.

getCurrentMaterialPointLoad(materialPoint, ...)

Return the current load vector for a given material point.

updateStepAction(definition, jobInfo, model, ...)

Is called when an updated definition is present for a new step.

applyAtStepEnd(model, stepMagnitude=None)[source]

Is called when a step successfully finished.

Parameters:
  • U – The current solution vector.

  • P – The current reaction force vector.

getCurrentMaterialPointLoad(materialPoint, timeStep)[source]

Return the current load vector for a given material point.

Parameters:
  • materialPoint – The material point for which the load definition is requrested.

  • timeStep (TimeStep) – The current time step.

Returns:

The tuple consisting of:
  • the surface ID.

  • the load vector.

Return type:

tuple[int, np.ndarray]

property loadType: str

Return the type of load (e.g., pressure, … )

Returns:

The load type.

Return type:

str

property mpSet: MaterialPointSet

The material points this load is acting on.

Returns:

The list of cells.

Return type:

MaterialPointSet

Dirichlet boundary conditions

Dirichlet class

class edelweissmeshfree.stepactions.dirichlet.Dirichlet(name, nSet, field, values, model, journal, f_t=None)[source]

This is a classical dirichlet boundary condition for MPM models.

Parameters:
  • name (str) – Name of the distributed load.

  • nSet (NodeSet) – The node set to apply the BC to.

  • field (str) – The field to apply the BC to.

  • model (MPMModel) – The MPM model tree.

  • journal (Journal) – The journal to write messages to.

  • cells (CellSet) – The cells to apply the distributed load to.

  • bodyLoadType (str) – The type of the body load, e.g., “gravity”.

  • loadVector (np.ndarray) – The load vector to apply to the particles.

  • f_t (Callable[[float], float]) – The amplitude function of the distributed load.

Attributes:
components

Methods

applyAtIncrementStart(model, timeStep)

Is called when a step increment starts.

applyAtStepEnd(model)

Is called when a step successfully finished.

applyAtStepStart(model)

Is called when a step starts.

updateStepAction(values[, f_t])

Is called when an updated definition is present for a new step.

getDelta

applyAtStepEnd(model)[source]

Is called when a step successfully finished.

Parameters:
  • U – The current solution vector.

  • P – The current reaction force vector.

updateStepAction(values, f_t=None)[source]

Is called when an updated definition is present for a new step.

Parameters:
  • name – The name of this step action.

  • definition – A dictionary containing the options for this step action.

  • jobInfo – A dictionary containing the information about the job.

  • model – A dictionary containing the model tree.

  • fieldOutputController – The fieldput controlling object.

  • journal – The journal object for logging.

  • f_t (Callable[[float], float])

Arclength control

ArclengthControllerBase class

class edelweissmeshfree.stepactions.base.arclengthcontrollerbase.ArcLengthControllerBase(name, definition, jobInfo, model, fieldOutputController, dofmanager, journal)[source]

Methods

applyAtIncrementStart(model, timeStep)

Is called when a step increment starts.

applyAtStepEnd(model)

Is called when a step successfully finished.

applyAtStepStart(model)

Is called when a step starts.

computeDDLambda(dU, ddU_0, ddU_f, timeStep, ...)

This method is response for compute the correction to dLamba, i.e., the increment of the arc length parameter.

updateStepAction(definition, jobInfo, model, ...)

Is called when an updated definition is present for a new step.

Parameters:
  • name (str)

  • definition (dict)

  • jobInfo (dict)

  • model (FEModel)

  • fieldOutputController (FieldOutputController)

  • journal (Journal)

abstractmethod computeDDLambda(dU, ddU_0, ddU_f, timeStep, dofManager)[source]

This method is response for compute the correction to dLamba, i.e., the increment of the arc length parameter.

Parameters:
  • dU (DofVector) – The current increment of the solution.

  • ddU_0 (DofVector) – The current dead increment of the solution.

  • ddU_f (DofVector) – The current reference increment of the solution.

  • timeStep (TimeStep) – The current time increment.

  • dofManager (DofManager) – The DofManager instance.

Returns:

The correction ddLambda to dLambda.

Return type:

float

Indirect control class

class edelweissmeshfree.stepactions.indirectcontrol.IndirectControl(name, model, materialPoints, L, cMatrix, field, journal)[source]

Methods

applyAtIncrementStart(model, timeStep)

Is called when a step increment starts.

applyAtStepEnd(model)

Is called when a step successfully finished.

applyAtStepStart(model)

Is called when a step starts.

computeDDLambda(dU, ddU_0, ddU_f, timeStep, ...)

This method is called by an arc length solver for computing the correction to the arc length parameter.

updateStepAction(definition, jobInfo, model, ...)

Is called when an updated definition is present for a new step.

Parameters:
  • name (str)

  • model (MPMModel)

  • materialPoints (list[MaterialPointBase])

  • L (float)

  • cMatrix (ndarray)

  • field (str)

  • journal (Journal)

applyAtStepEnd(model)[source]

Is called when a step successfully finished.

Parameters:
  • U – The current solution vector.

  • P – The current reaction force vector.

computeDDLambda(dU, ddU_0, ddU_f, timeStep, dofManager)[source]

This method is called by an arc length solver for computing the correction to the arc length parameter.

Parameters:
  • dU (DofVector) – The current solution increment.

  • ddU_0 (DofVector) – The dead (unconditional) correction to the solution.

  • ddU_f (DofVector) – The controllable correction to the solution resulting from the reference load.

  • timeStep (TimeStep) – The current time increment.

  • dofManager (DofManager) – The DofManager instance.

Returns:

The computed correction to the arc length parameter.

Return type:

float

identification = 'IndirectControl'

This class represent an ArcLengthControllerBase compatible module for indirect (displacement) controlled simulations.

Parameters:
  • name – The name for printing purposes.

  • model – The model tree instance.

  • materialPoints – The list of material points considered in the arc length computation

  • L – The target arc length.

  • cMatrix – The c-vector in matrix form: rows=material points, columns=c vector for this material point.

  • field – The field for which the arc length parameter is computed.

  • journal – The journal instance for logging purposes.