Model.createelements1d_byentitylist#
- Model.createelements1d_byentitylist(entity_list, beamsection='', property='', biasintensity=0, biasstyle=0, breakangle=0.0, elemconfig='', elemdensity=0, elemsize=0.0, elemtype='', engineeringconfig='', linecomp=False, orientvec=hwTriple(0.0, 0.0, 0.0), propcardimage='', proximitytolerance=-1.0, useelemdensity=False, useproximity=False, useshell=0)#
Creates 1D beams, bars and rods, and optionally assigns properties to created elements.
- Parameters:
entity_list (EntityList) – The list containing the entities. Valid entities are nodes and lines.
beamsection (hwString) – If provided, an auto 1D property is created to which this beam section is assigned. The property card image depends on the
elemtypeprovided. This property is assigned to the newly created 1D elements. In case bothpropertyandbeamsectionare provided,propertytakes precedence. This option is supported for OptiStruct, Abaqus and Nastran. For properties that do not support beam sections, the relevant attributes (for example, area) of such properties are updated by copying values from the beam section.property (hwString) – If provided, the property is assigned to newly created 1D elements. Also, it will ensure that the created 1D elements are of a type compatible with the property card image, thereby overriding the
elemtypevalue. This option is supported for OptiStruct, Abaqus and Nastran only.biasintensity (int) – The biasing value of the element length to use.
biasstyle (int) –
The style of biasing to use. Valid values are:
0 - Linear
1 - Exponential
2 - Bell curve
breakangle (double) – If the angle between the lines’ tangents at a joint is greater than this value, the line is split to force a node at that location. If set to 0.0, no split will occur.
useshellis not considered if this is > 0.elemconfig (hwString) – The config of 1D element to be created.
elemdensity (int) – The element density to use.
elemsize (double) – The size of the 1D elements to be created. This input will not be considered if
useshell=1.elemtype (hwString) – The type of 1D element to be created.
engineeringconfig (hwString) – The configuration of the created entities (bar2/bar3 or rod) based on the attached shell for stiffener meshing or using
meshorderif mesh is not a stiffener mesh attached to the shell. This option requirespropcardimageto be defined.linecomp (bool) –
The component in which the 1D elements are to be created. This option works only for line entities. Valid values are:
False - Current component
True - Line component
orientvec (hwTriple) – If provided, specifies a custom orientation for 1D elements when
useshell=0oruseshell=3.propcardimage (hwString) – The property card image for automatic property creation from beamsection. Ignored if property is specified. If specified together with
elemconfigandelemtype, a validity check is performed to ensure compatibility of the property card image with the specified config/type. If the property card image is invalid, it will be reset to a valid default property.proximitytolerance (double) – The proximity tolerance used to find the nearest shell nodes a long the line. Used when
useproximity=1anduseshell=3. (Default = -1.0)useelemdensity (bool) –
False - Do not use
elemdensityTrue - Use
elemdensityuseproximity (bool) –
False - Do not use shell element nodes which exist along the line to create the line mesh.
True - Use shell element nodes which exist along the line to create the line mesh.
useshell (int) –
If set to 1 or 2, considers neighboring shells of selected lines/nodes of a meshed surface for connectivity, orientation, and offset. After creation of 1D elements, the normal and thickness of these shells are used to orient and offset the 1D elements appropriately. Valid values are:
0 - Do not use shells for connectivity, orientation, or offset
1 - Use only displayed shells for connectivity, orientation, and offset
2 - Use all shells for connectivity, orientation, and offset
3 - Use shells for connectivity only. within the tolerance zone. If
useproximity=1, the ordered nodesproximitytoleranceare used to create 1D elements.
Example#
Create 1D elements use nodes with IDs 1,2,3 and 4 and assign beam section to these newly created elements#import hm import hm.entities as ent model = hm.Model() nodes = [ent.Node(model, 1), ent.Node(model, 2), ent.Node(model, 3), ent.Node(model,4)] model.createelements1d_byentitylist( entity_list=nodes, beamsection="Circ", biasintensity=0, biasstyle=0, breakangle=30.0, elemconfig="rod", elemdensity=1, elemsize=2.0, elemtype="CROD", linecomp=False, proximitytolerance=-1.0, useelemdensity=False, useshell=0, )