Model.pressures#

Model.pressures(collection, face_nodes, x_comp, y_comp, z_comp, magnitude, break_angle, on_face)#

Creates pressure loads on elements.

Parameters:
  • collection (Collection) – The collection containing the element entities which should have pressures applied to them.

  • face_nodes (Collection) – The collection containing the node entities which lie on the face of one or more elements (solids only).

  • x_comp (double) – The x component of the pressure.

  • y_comp (double) – The y component of the pressure.

  • z_comp (double) – The z component of the pressure.

  • magnitude (double) – The magnitude of the pressure.

  • break_angle (double) – The break angle of a solid face.

  • on_face (int) – A logical which determines whether pressures are being applied to faces.

Example#

Apply a pressure of 4.0 on elements of surface with ID 11#
import hm
import hm.entities as ent

model = hm.Model()

model.pressures(
    collection=hm.Collection(model, ent.Element, hm.Collection(model, ent.Surface, [11])),
    face_nodes=hm.Collection(model, ent.Node, populate=False),
    x_comp=0.0,
    y_comp=0.0,
    z_comp=0.0,
    magnitude=4.0,
    break_angle=30.0,
    on_face=1,
)

Note

By setting x_comp=0, y_comp=0, or z_comp=0, a pressure is applied.

If you assign a value to x_comp=0, y_comp=0, or z_comp, a traction is applied.