Model.loadcreate#

Model.loadcreate(collection, config, type, comp1, comp2, comp3, comp4, comp5, comp6)#

Creates a load (force, moment, pressure or constraint) at a node or element.

Parameters:
  • collection (Collection) – The collection containing the entities. Valid entities are nodes and elements.

  • config (int) –

    The type of load to apply to the entity.

    1 - Force

    2 - Moment

    3 - Constraints

    4 - Pressure

  • type (int) – Solver dependent types of the referenced load config.

  • comp1 (double) – Component of the load being applied in x-axis direction. For forces, moments, and pressures comp1 is the magnitude of load in x-axis. For contrains is the x-axis’ translational degree of freedom.

  • comp2 (double) – Component of the load being applied in y-axis direction. For forces, moments, and pressures comp2 is the magnitude of load in y-axis. For contrains is the y-axis’ translational degree of freedom.

  • comp3 (double) – Component of the load being applied in z-axis direction. For forces, moments, and pressures comp3 is the magnitude of load in z-axis. For contrains is the z-axis’ translational degree of freedom.

  • comp4 (double) – Component of the contraint being applied in the x-axis’ rotational degree of freedom. For forces, moments, and pressures comp4 is inactive, so comp4=0.0.

  • comp5 (double) – Component of the contraint being applied in the y-axis’ rotational degree of freedom. For forces, moments, and pressures comp5 is inactive, so comp5=0.0.

  • comp6 (double) – Component of the contraint being applied in the z-axis’ rotational degree of freedom. For forces, moments, and pressures comp6 is inactive, so comp6=0.0.

Note

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, to create a pressure which is normal to the element, set all components to zero.

Examples#

Apply a force of magnitude 10.0 along the x - axis to nodes with IDs 5 and 25#
import hm
import hm.entities as ent

model = hm.Model()

node_collection = hm.Collection(model, ent.Node, [5, 25])

model.loadcreate(
    collection=node_collection,
    config=1,
    type=1,
    comp1=10.0,
    comp2=0.0,
    comp3=0.0,
    comp4=0.0,
    comp5=0.0,
    comp6=0.0,
)
Apply a constraint of zero in the translational x - axis (comp1 ) , in the translational z - axis (comp3 ) , in the rotational y - axis (comp5 ) to nodes with IDs 12,13 and 14#
import hm
import hm.entities as ent

model = hm.Model()

node_collection = hm.Collection(model, ent.Node, [12, 13, 14])

model.loadcreate(
    collection=node_collection,
    config=3,
    type=1,
    comp1=0.0,
    comp2=-999999.0,
    comp3=0.0,
    comp4=-999999.0,
    comp5=0.0,
    comp6=-999999.0,
)