Model.BCM#

Model.BCM(collection, load_collection, config, type, filename, tolerance, facenode_collection, break_angle)#

Creates loads by interpolating between existing loads (field loads) or loads defined in a text file (linear interpolation).

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

  • load_collection (Collection) – The collection containing the entities of any existing loads to use during the interpolation. The collection does not have to be populated.

  • config (int) –

    The configuration of the load to create. Valid values are:

    1 - forces

    2 - moments

    4 - pressures

    5 - temperatures

    6 - fluxes

  • type (int) – The solver type of the load to create. This value is dependent on the current solver template loaded.

  • filename (hwString) –

    The name and path of a file containing the coordinates and values of any input loads to use for the linear interpolation. This parameter is optional and should be set to “” if not specified. The format of the file is:

    x y z value

    x y z value

    etc…

  • tolerance (double) – The search radius to use for finding nodes/elements for interpolation. If a negative value is provided, gap filling is used and a load is created at every selected node/element regardless of the search tolerance.

  • facenode_collection (Collection) – The collection containing the face node entities when defining solid element faces.Valid values are None when collection type is set to nodes.

  • break_angle (double) – The break angle to use when defining solid element faces. Should be set to None when collection type is set to nodes.

Examples#

Create forces on nodes with IDs 100, 101 and 102 by interpolating from existing loads on nodes with IDs 99 and 103, using a search radius of 10.0#
import hm
import hm.entities as ent

model = hm.Model()

nodes = hm.Collection(model, ent.Node, [101, 102])
loads = hm.Collection(model, ent.LoadForce, [99, 103])
model.BCM(
    collection=nodes,
    load_collection,
    config=1,
    type=1,
    filename="",
    tolerance=10.0,
    facenode_collection=None,
    break_angle=None
)
Create forces on nodes with IDs 100, 101 and 102 by interpolating from loads defined in the file C:/my_loads.txt, using a search radius of 10.0#
import hm
import hm.entities as ent

model = hm.Model()

nodes = hm.Collection(model, ent.Node, [101, 102])
loads = hm.Collection(model, ent.LoadForce, populate=False)
model.BCM(
    collection=nodes,
    load_collection,
    config=1,
    type=1,
    filename="C:/my_loads.txt",
    tolerance=10.0,
    facenode_collection=None,
    break_angle=None
)