Model.CE_FE_Register#

Model.CE_FE_Register(connector, testpoint_idx, existing_entities)#

Registers pre-existing FE to a single connector ID. Successfully registering pre-existing FE forces a connector to its realized state.

To use this function, a connector must be in user control mode. Also, note that a single FE entity can be registered with, at most, a single connector. Any FE registered with a given connector is treated as part of that connector-s realization.

Parameters:
  • connector (Entity) – The object describing the connector entity to register to. Supported types are elements, systems, vectors, loads and equations.

  • testpoint_idx (unsigned int) – The connector sub-index in which to register this FE. A connector line with a density of three has three sub-indices (0-2), and a connector point has a single sub-index (0).

  • existing_entities (CollectionSet) – The set of collections containing possibly multiple type of entities.

Example#

Register pre-existing FE to connector with ID 7#
import hm
import hm.entities as ent

model = hm.Model()

# First, change connector 7 to the user control mode:
model.CE_SetSpecificDetailById(ce_id=7, detail_type=2, int_val=1, dbl_val=0)

# Second, create the necessary collection set to register collections of multiple types of entities:
collection_set = hm.CollectionSet(model)
# Create collection of system entity with ID 30 and add to collection set:
systems_1 = hm.Collection(model, ent.System, [30])
collection_set.set(systems_1)
# Create collection of system entity with ID 31 and add to collection set:
systems_2 = hm.Collection(model, ent.System, [31])
collection_set.set(systems_2)
# Create collection of element entity with ID 2127 and add to collection set:
elements = hm.Collection(model, ent.Element, [2127])
collection_set.set(elements)

# Third, register the entities with connector 7:
model.CE_FE_Register(
    connector=ent.Connector(model, 7),
    testpoint_idx=0,
    existing_entities=collection_set
)

# Finally, turn the user control mode off for connector 7 (optional):
model.CE_SetSpecificDetailById(ce_id=7, detail_type=2, int_val=0, dbl_val=0)