Model.absorbbeamsections#

Model.absorbbeamsections(entity=Entity(), collection=Collection(), deleteunused=1, option=0, tolerance=0.01)#

Creates /compares beam sections with 1D property values as per the options provided. Currently valid only for OptiStruct and Nastran profiles.

Parameters:
  • entity (Entity) – The entity object of the property to be modified.

  • collection (Collection) – The collection containing properties to be modified. Not required if entity argument is defined.

  • deleteunused (int) –

    A flag with valid values:

    0 - Preserves the beam sections not referenced in any entity.

    1 - Deletes the beam sections not referenced in any entity.

  • option (int) –

    An option with valid values:

    0 - Create new beam sections if there are not beam sections attached to the 1D properties.

    1 - If the beam section is attached to the 1D property, it will compare the beam section values and property values. If there is a mismatch in values, it will create a new beam section honoring the values on the property.

    2 - Creates new beam sections even if beam sections are attached to the 1D property, by honoring the values on the property.

  • tolerance (double) – Valid for option=1 to compare the beam section values and property values with the user defined tolerance value.

Example#

Create beam sections for all the 1D properties in the model which do not have beam section#
import hm
import hm.entities as ent

model = hm.Model()
model.absorbbeamsections()
Compare the beam section and property values for property ID 1 with a default relative tolerance of 0.01#
import hm
import hm.entities as ent

model = hm.Model()
model.absorbbeamsections(entity=ent.Property(model,1),option=1)
Compare the beam section and property values for property ID 1 with a relative tolerance of 0.05#
import hm
import hm.entities as ent

model = hm.Model()
model.absorbbeamsections(entity=ent.Property(model,1),tolerance=0.05)
Overwrite the beam section referred in property ID 1#
import hm
import hm.entities as ent

model = hm.Model()
model.absorbbeamsections(entity=ent.Property(model,1),option=2)