Model.split1delements#

Model.split1delements(collection, meshingtype, delorgelems, beamstartid, entity_list=s_defaultEntityList, numelems=0)#

Split 1D elements using various options. Only those 1D elements that have been directly assigned a valid 1D property are split. During split, each newly created element will be assigned a new property. This new property is of same type as the property of the parent element. Parent elements’ attributes like orientation, offset and DOFs are also copied/interpolated to new child elements. It also assigns the same ID to newly created elements and properties so that it is easy to map the element to its property.

Works only for OptiStruct and Nastran user profiles.

The match list of elements-to-properties is as follows:

  • CBAR/PBAR

  • CBAR/PBARL

  • CBEAM/PBEAM

  • CBEAM/PBEAML

  • CROD/PROD

For PBEAM, the new child properties inherit the intermediate stations of the parent property, in case where such station intersects with the new child element.

Limitations:

  • PBARL/PBAR - The attributes (stations/stress recovery points) associated to CBARAO are not supported.

  • PBEAM - Though the function supports intermediate stations, the beam sections (dimensions) are not interpolated for now. Hence the child properties will interpolate the attributes associated to beam sections from the parent property, but will not create new beam sections.

  • PBEAML - It is supported, only if there are no intermediate stations.

Parameters:
  • collection (Collection) – The collection containing the element entities to split.

  • meshingtype (hwString) –

    nodespoints - This option requires to specify list of nodes or points, along with reference entity type, to split 1D elements. The elements will split at nodes or points provided in the list. The nodes/points not lying on the input element are also considered and projected on the input element for split, given the condition, such nodes/points are within the tolerance, which is a bounding sphere. The diameter of this sphere is the input element length and its center is the element’s centroid.

    uniform - This option requires to specify number of elements to be created after split.

  • entity_list (EntityList) – The entity list of the selected nodes or points to split the element. Used when meshingtype="nodespoints".

  • numelems (unsigned int) – The number of elements to be created after split. Used when meshingtype="uniform".

  • delorgelems (bool) –

    False - Do not delete original input elements

    True - Delete original input elements

  • beamstartid (unsigned int) – The start ID for newly created 1D elements. If the specified ID already exists, the maximum ID available from elements/properties is considered and incremented by 1 to assign as start ID.

Examples#

Split 1D elements use uniform option for meshing type , result in create 3 new elements and properties ( IDs 300 , 301 and 302 )#
import hm
import hm.entities as ent

model = hm.Model()

model.split1delements(
    collection=hm.Collection(model, ent.Element),
    meshingtype="uniform",
    delorgelems=True,
    numelems=3,
    beamstartid=300,
)
Split element with ID 100 use nodes with IDs 10 and 20 , and use nodespoints option for meshing type#
import hm
import hm.entities as ent

model = hm.Model()

model.split1delements(
    collection=hm.Collection(model, ent.Element, [100]),
    meshingtype="nodespoints",
    delorgelems=True,
    beamstartid=1000,
    entity_list=[ent.Node(model, 10), ent.Node(model, 20)],
)