Materials and sections¶
A material is not a section. A section is a material plus a cross-section (b x h, or a
profile); bars use sections. There is no set_section() call: create the new section
first, then point the element at it. Pointing a bar at a section name that was never
created leaves it without a section.
Materials¶
Material: add¶
To create only a material (for example "create the steel material S355"):
model.create_steel_material('S355') # steel grade
model.create_rc_material('C25/30') # concrete class
model.create_timber_material('C24') # timber class
Each returns the material and is shared if it already exists. A material alone changes nothing in the model until a section uses it. Do not make up a section (or give a section the name of a grade) when the request is for a material.
Material: edit (change the material)¶
Make a material, then change what the section points to; every bar using that section follows:
mat = model.create_rc_material('C25/30') # concrete class, shared
model.sections['S1'].material_name = mat.name
For steel or timber use create_steel_material('S355') or create_timber_material('C24').
To change only the name: model.rename_material('C25/30', 'Concrete').
Material: remove¶
Delete a material:
model.remove_material('C25/30')
It is refused while a section still uses the material.
Sections of bars¶
Section: add¶
The section makes its material too:
model.create_rc_section('S1', b=0.3, h=0.5, concrete='C30/37') # b x h in metres
model.create_steel_section('S2', 'IPE300', grade='S355') # a profile
model.create_timber_bar_section('S3', 0.1, 0.2, timber='C24')
Materials are shared: asking for the same concrete class twice does not duplicate it. The section must exist before the bar that uses it.
Section: edit (change the section)¶
Change the section of an existing bar (give it another section): create the new one, then point the bar at it.
# 1. create the new section (it makes its material too)
model.create_rc_section('S2', b=0.3, h=0.6, concrete='C25/30')
# 2. point the existing bar at it
model.bar_elements_by_id['B1'].section_name = 'S2'
Several bars:
model.create_rc_section('S2', b=0.3, h=0.6, concrete='C25/30')
for bar_id in ('B1', 'B2', 'B3'):
model.bar_elements_by_id[bar_id].section_name = 'S2'
A steel profile instead:
model.create_steel_section('S3', 'IPE300', grade='S355')
model.bar_elements_by_id['B1'].section_name = 'S3'
To rename a section (the bars that use it follow): model.rename_section('S1', 'Beam').
Section: remove¶
Delete a section:
model.remove_section('S1')
It is refused while a bar still uses the section.
Sections of areas¶
Area section: add and edit¶
An area section is created with its material, then the elements are pointed at it.
model.create_area_section('A2', 'C25/30', thickness=0.25)
model.tri_elements_by_id['T1'].section_name = 'A2'
model.quad_elements_by_id['Q1'].section_name = 'A2'
To change only the material of an area section, as for bars:
model.tri_sections['A1'].material_name = mat.name (and quad_sections).
The section of a slab or a wall made with create_polygon comes with the region: see
Slabs and walls.
Ids¶
Ids are text ('B1', 'T1', 'Q1'). Read them with the geometry tool before changing
anything; do not invent them.