Model.beamsectioncreatefromentities#
- Model.beamsectioncreatefromentities(collection, allowshellparts=1, allowsolidparts=1, center=2, centerposition=hwTriple(0.0, 0.0, 0.0), config=4, contactdistance=0.0, createsketch=0, defaultmaterial=1, mergetol=0.0, normal=hwTriple(0.0, 0.0, 0.0), order=1, usermaterial=5, vertexangle=60.0, topologycleanupfactor=-1.0, yaxis=hwTriple(0.0, 0.0, 0.0), welddistance=0.0)#
Creates a beamsection entity from in-plane entities.
- Parameters:
collection (Collection) – The collection containing the input entities. Valid values are elements, lines and surfaces. If
config=3(shell section), surfaces are not allowed.allowshellparts (int) –
If
config=4(elastic section), create shell parts from open segments.0 - Do not allow
1 - Allow (default)
allowsolidparts (int) –
If
config=4(elastic section), create solid parts from closed segment loops.0 - Do not allow
1 - Allow (default)
center (unsigned int) –
The reduction point to compute beamsection properties.
0 - User
1 - Centroid
2 - Shear center (default)
3 - Frame center
centerposition (hwTriple) – If
center=0, the global plane center to consider as reduction point to compute beamsection properties.config (unsigned int) –
The beamsection config.
0 - Solid
3 - Shell
4 - Elastic (default)
contactdistance (double) –
If
config=4(elastic section), the maximum contact distance between two separated domains.value < 0.0 - The maximum contact value will be considered as 0.8-times the average element size. (default)
value = 0.0 - No contact
value > 0.0 - Defines the maximum contact distance between elements from two different domain loops. The contact is then ensured by a classical MPC method, using a mortar finite elements method.
createsketch (int) –
Creates a sketch from beamsection topology after properties computation. It will map the domain description to the sketch topology.
0 - Do not create (default)
1 - Create
defaultmaterial (unsigned int) –
If
config=4(elastic section), the default material rule to compute beamsection properties. If the value is not set to geometric, the average moment of inertia will be evaluated considering Young’s modulus and Poisson’s ratio from entity intersected by a plane. It results in the evaluation of stiffness terms as EA, EIyy, EIzz, GJ of the full section. The material impacts the centroid and shear center location as well as warping properties. If a region is fully defined (no mix of entities with and without material assigned), the max, mean, nearest and user values are ignored. If a region is missing material property, then this parameter defines how to consider material for undefined regions.1 - Geometric: section properties are derived from the area moments of inertia without considering any material. User can select a target material that will be assigned to the created property. (default)
2 - Max: applies the highest Young Modulus (and related Nu) from the list of materials seen in intersection.
3 - Mean: applies the averaged Young Modulus (and Nu) from the list of materials seen in intersection.
4 - Nearest: applies the highest Young Modulus (and related Nu) from the closest region with material assigned.
5 - User: applies target material for this region. Requires material selection.
mergetol (double) – The merge tolerance to close gaps. If
config=3(shell section), all segments extremities in tolerance will be merged. Ifconfig=0(solid section) orconfig=4(elastic section), and entity type is Line or entity type is Element for 1D elements, segments in tolerance will be merged to create closed loops.normal (hwTriple) – The plane normal to use while creating beamsection. If not provided, the normal will be inferred from source entities.
order (unsigned int) –
If
config=0(solid section) orconfig=4(elastic section), the order to use for closed section meshing. The element order will change the interpolation functions, so properties may vary.1 - First order (default)
2 - Second order
usermaterial (unsigned int) – If
defaultmaterial=5, the ID of the material to be used to compute beamsection properties.vertexangle (double) – The angle used to smooth curves while defining the beamsection topology. Valid values are 0 to 90 (default 60).
yaxis (hwTriple) – Beamsection y axis in global system. If not provided, the y axis will be inferred from source entities using the principal axis.
welddistance (double) –
If
config=3(shell section), the maximum distance for autoweld on two separated domain loops.value < 0.0 - Autoweld applied in all cases
value = 0.0 - No autoweld applied (default)
Autoweld applied between two domains only if the minimum perpendicular distance between both domains is less than welddistance value.
topologycleanupfactor (double) – Resrved for future development.
Examples#
Create a solid section from surfaces using the centroid as center#import hm import hm.entities as ent model = hm.Model() surfs = hm.Collection(model, ent.Surface, [10]) model.beamsectioncreatefromentities( collection=surfs, center=1, config=0, )
Create a shell section from lines, weld the parts and create a sketch#import hm import hm.entities as ent model = hm.Model() lines = hm.Collection(model, ent.Line) model.beamsectioncreatefromentities( collection=lines, config=3, createsketch=1, welddistance=-1.0 )
Create an elastic section from lines with only solid parts and create a sketch#import hm import hm.entities as ent model = hm.Model() lines = hm.Collection(model, ent.Line) model.beamsectioncreatefromentities( collection=lines, allowshellparts=0, config=4, createsketch=1, mergetol=1e-3, normal=(1.0, 2.0, 3.0), yaxis=(4.0, 5.0, 6.0) )