Model.loadcreateonentity_curve#

Model.loadcreateonentity_curve(collection, config, type, comp1, comp2, comp3, comp4, comp5, comp6, x_loc, y_loc, z_loc, curve_id, x_scale)#

Creates load with magnitudes defined by a curve.

Parameters:
  • collection (Collection) – The collection containing the entities for loads to be applied. Valid entities are nodes, points, lines, elements, surfaces, components and sets.

  • config (int) –

    The config of the load to create:

    1 - Force

    2 - Moment

    3 - Constraint

    5 - Temperature

    6 - Nodal Flux

    8 - Velocity

    9 - Acceleration

  • type (int) – Solver-dependent type of the specified config.

  • comp1 (double) – The component of the load being applied. For all configs except constraints (config=3), this component represents the load in x-direction.

  • comp2 (double) – The component of the load being applied. For all configs except constraints (config=3), this component represents the load in y-direction.

  • comp3 (double) – The component of the load being applied. For all configs except constraints (config=3), this component represents the load in z-direction.

  • comp4 (double) – The component of the load being applied. Applicable only for constraints (config=3).

  • comp5 (double) – The component of the load being applied. Applicable only for constraints (config=3).

  • comp6 (double) –

    The component of the load being applied. Applicable only for constraints (config=3).

    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.

  • x_loc (double) – For loads on components or sets, this is the display location where the graphical image for the load is drawn in x-direction.

  • y_loc (double) – For loads on components or sets, this is the display location where the graphical image for the load is drawn in y-direction.

  • z_loc (double) –

    For loads on components or sets, this is the display location where the graphical image for the load is drawn in z-direction.

    Note

    If x_loc, y_loc, z_loc are 999999.0, or more than one entity is selected, the display location is automatically generated.

  • curve_id (unsigned int) – The ID of the curve defining the magnitude of the load.

  • x_scale (double) – A scale factor applied to the x-axis (or time-axis) of the curve.

Example#

Apply a temperature of 140.0 to all the nodes of a set , use the curve with ID 9 to vary this magnitude over time#
import hm
import hm.entities as ent

model = hm.Model()

set_collection = hm.Collection(model, ent.Set, "name=temperaturenodes")

model.loadcreateonentity_curve(
    collection=set_collection,
    config=5,
    type=1,
    comp1=140.0,
    comp2=0.0,
    comp3=0.0,
    comp4=0.0,
    comp5=0.0,
    comp6=0.0,
    x_loc=0.0,
    y_loc=0.0,
    z_loc=0.0,
    curve_id=9,
    x_scale=1.0,
)