Add a cross-section
create_sectionAdd or replace a cross-section on an existing FERS model and optionally assign it to members. Takes the model JSON, mutates model.sections (and model.materials when a new preset is introduced), returns the model.
THREE WAYS TO DEFINE IT:
LIBRARY — shape:"library" with library_name (or just
name) set to a library profile — European IPE/HEA/HEB/HEM/UPE/RHS/SHS/CHS/L or UK UB/UC/PFC, e.g. "IPE300", "HEB240", "CHS 114.3x5", "RHS 100x50x5", "UB 457x191x67". This is the ONLY way to get exact rolled-profile properties (root fillets included) and it carries every EC3 modulus. Prefer it whenever a standard profile fits.PARAMETRIC — shape:"rect" (h_mm, b_mm), "circle" (d_mm), "chs" (d_mm, t_mm), "rhs"/"shs"/"box" (h_mm, b_mm, t_mm) or "i" (h_mm, b_mm, tf_mm, tw_mm), dimensions in MILLIMETRES. rect/circle/chs are exact and rhs area+inertias are exact (its Bredt torsion J is ~2% low), but the "i" generator assumes SHARP fillets: against a real rolled IPE300 it is 3.6% low on area, 4.3% low on i_z and 22% low on J. Use "i" for WELDED plate girders, not for rolled profiles.
CUSTOM — shape:"custom" with your own SI numbers. area, i_y, i_z and j are all MANDATORY and strictly positive; a missing one is a hard parse error and a MISTYPED one is silently ignored (Section has no deny_unknown_fields), giving a wrong answer that still solves.
AXIS CONVENTION: local z is the STRONG axis. For depth h and width b, i_z = b·h³/12 (strong, resists gravity on a horizontal member) and i_y = h·b³/12 (weak). Getting these the wrong way round is the most common authoring error and the solver cannot detect it.
EC3 CHECKS NEED MORE THAN STIFFNESS. An Ec3Steel check on a section lacking wel_y/wpl_y/i_w does not fail — it returns utilization 0.0, status Green and an explanatory message, which reads as a clean pass. So also give wel_y, wel_z, wpl_y, wpl_z and i_w (warping constant, m⁶); the parametric shapes compute these for you. Optionally add ec3 {"section_class":1,"buckling_curve_y":"B","buckling_curve_z":"C","buckling_curve_lt":"B"} — curves A0/A/B/C/D (alpha 0.13/0.21/0.34/0.49/0.76); omitting the block silently uses curve b. Unlike the rest of the section, the ec3 block DOES reject unknown keys, so a typo there is a hard solve-time error.
ASSIGNMENT: apply_to "all" reassigns every member, a JSON array of member ids reassigns those, a classification string reassigns every member in that group. A section whose name already exists is overwritten IN PLACE, keeping its id and all existing member references.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| j | No | Torsion constant, m⁴. | |
| ec3 | No | EN 1993-1-1 design parameters: {"section_class":1,"buckling_curve_y":"a","buckling_curve_z":"b","buckling_curve_lt":"c"}. Unlike the rest of Section, a typo here IS a hard error. | |
| i_w | No | Warping constant, m⁶. | |
| i_y | No | Second moment about local y, m⁴. | |
| i_z | No | Second moment about local z (STRONG axis), m⁴. | |
| a_sy | No | Shear area along local y, m². | |
| a_sz | No | Shear area along local z, m². | |
| area | No | Area in m² (required for shape 'custom'). | |
| b_mm | No | Width in MILLIMETRES. | |
| d_mm | No | Diameter in MILLIMETRES (circle/chs). | |
| h_mm | No | Depth in MILLIMETRES. | |
| name | Yes | Name for the section in this model. | |
| t_mm | No | Wall thickness in MILLIMETRES. | |
| model | No | Stringified FERS model JSON | |
| shape | No | library (default when library_name is given) | rect | circle | chs | rhs | shs | box | i | custom. Prefer "library" for a standard profile: the parametric "i" generator has sharp fillets and is ~4% low on area and ~22% low on J versus a real rolled IPE300. | |
| tf_mm | No | Flange thickness in MILLIMETRES. | |
| tw_mm | No | Web thickness in MILLIMETRES. | |
| wel_y | No | Elastic modulus about y, m³. | |
| wel_z | No | Elastic modulus about z, m³. | |
| wpl_y | No | Plastic modulus about y, m³. | |
| wpl_z | No | Plastic modulus about z, m³. | |
| apply_to | No | "all", a JSON array of member ids, or a classification string — assigns the section to those members. | |
| material | No | Material preset for this section (see list_materials). | |
| model_ref | No | Handle from stash_model, used INSTEAD of `model`. Avoids sending the whole document on every step; the tool returns the same handle back. | |
| library_name | No | Library section name, e.g. IPE300 (see list_sections). |