Model.createspotweld#

Model.createspotweld(independent, dependent, length_given, length, systems, movenode, remesh, configval, property)#

Creates a spotweld between two nodes on the finite element mesh for a given type of element, coordinate system, and property ID.

Parameters:
  • independent (Entity) – Independent node pointer entity.

  • dependent (Entity) – Dependent node pointer entity.

  • length_given (int) – Specifies if a length has been given.

  • length (double) – Length of the spotweld element.

  • systems (int) –

    Local coordinate system switch.

    0 - Without coordinate system.

    1 - With coordinate system.

  • movenode (int) – Moves dependent node.

  • remesh (int) – Remeshes dependent region.

  • configval (int) – Element type configuration value.

  • property (hwString) – Name of property collector Retrieves property ID.

Example#

Create a spotweld ( spring element ) between nodes with IDs 1 and 3 with the coordinate system and property collector “ name_prop “ (movenode and remesh options are not used )#
import hm
import hm.entities as ent

model = hm.Model()

model.createspotweld(
    independent=ent.Node(model, 1),
    dependent=ent.Node(model, 3),
    length_given=0,
    length=0.0,
    systems=1,
    movenode=0,
    remesh=0,
    configval=21,
    property="name_prop",
)