Model.loadsupdate#

Model.loadsupdate(collection, config, type, updatevector, comp1, comp2, comp3, comp4, comp5, comp6, updatemag, magnitude, update_system, system_id, transform_flag)#

Updates the magnitude, direction, and coordinate system of selected loads.

When applying a force, the active components are comp1, comp2, and comp3, which represent a force x, y, and z-axis, respectively.

When applying a moment, the active components are also comp1, comp2, and comp3, and represent the moment about the x, y, and z-axis, respectively.

For constraints, all of the components are active unless they are set equal to -999999.0.

All of the other components of the constraints are active in the respective directions. For pressures, the active components are comp1, comp2, and comp3, which represent the x, y, and z-axis, respectively. To create a pressure that is normal to the element, set all components to zero.

Parameters:
  • collection (Collection) – The collection containing the loads entities to update.

  • config (int) –

    The configuration of the load:

    1 - Force

    2 - Moment

    3 - Constraints

    5 - Temperature

    6 - Flux

    8 - Velocity

    9 - Acceleration

  • type (int) – The type assigned to the load (as defined on the Load Types panel).

  • updatevector (int) – A variable that controls if the direction of the load should be updated.

  • comp1 (double) – Components of the load being applied. Representing force on x axis if force is being applied or moment about x axis if moment is being applied.

  • comp2 (double) – Components of the load being applied. Representing force on y axis if force is being applied or moment about y axis if moment is being applied.

  • comp3 (double) – Components of the load being applied. Representing force on z axis if force is being applied or moment about z axis if moment is being applied.

  • comp4 (double) – Components of the load being applied.

  • comp5 (double) – Components of the load being applied.

  • comp6 (double) – Components of the load being applied.

  • updatemag (int) – An integer variable that controls if the magnitude is updated.

  • magnitude (double) – The new value of magnitude of the load.

  • update_system (int) – A variable that controls if the system is updated.

  • system_id (unsigned int) – The ID of the local system.

  • transform_flag (int) – A simple integer variable that controls if the load is created in the local system.

Example#

Update a force of 10.0 N along the y axis to a force of 20.0 N along the y axis#
import hm
import hm.entities as ent

model = hm.Model()

model.loadsupdate(
    collection=hm.Collection(model, ent.LoadForce, [4]),
    config=1,
    type=1,
    updatevector=0,
    comp1=0.0,
    comp2=1.0,
    comp3=0.0,
    comp4=0.0,
    comp5=0.0,
    comp6=0.0,
    updatemag=1,
    magnitude=20.0,
    update_system=0,
    system_id=0,
    transform_flag=1,
)

Note

Model.loadsupdate() is the update function for all loads.