Section
Section
Bases: ABC
Abstract base class for all sections with manager-owned tagging.
Section objects do not self-register and do not assign their own tags.
A :class:~femora.core.section_manager.SectionManager owns lifecycle
operations, tag assignment, removal, and retagging for a local model context.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
section_type
|
str
|
The type of section (e.g., 'section'). |
required |
section_name
|
str
|
The specific section name for OpenSees (e.g., 'Elastic'). |
required |
user_name
|
str
|
User-specified name for the section. |
required |
Attributes:
| Name | Type | Description |
|---|---|---|
tag |
Optional[int]
|
Manager-assigned OpenSees tag. It remains |
_owner |
Optional[Any]
|
Reference to the owning manager, or |
Methods:
| Name | Description |
|---|---|
to_tcl |
Convert the section to a TCL string representation for OpenSees. |
resolve_material |
Resolve a material object, tag, or name in this section's context. |
resolve_materials_dict |
Resolve each value of a dependency mapping, preserving its keys. |
resolve_section |
Resolve a section object, integer tag, or user name. |
resolve_material_reference |
Accept a direct material object without a manager lookup. |
get_materials |
Return this base section's direct material dependency as a new list. |
has_material |
Report whether the base |
get_area |
Return section area in squared model length units. |
get_Iy |
Return the local-y second moment in length-to-the-fourth units. |
get_Iz |
Return the local-z second moment in length-to-the-fourth units. |
get_J |
Return the torsional constant in length-to-the-fourth units. |
Methods:
to_tcl
abstractmethod
Convert the section to a TCL string representation for OpenSees.
Returns:
| Type | Description |
|---|---|
str
|
TCL command string for this section. |
resolve_material
Resolve a material object, tag, or name in this section's context.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
material_input
|
int | str | Material | None
|
Material reference. Objects pass through unchanged and None remains None. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
material |
Material | None
|
Resolved dependency without copying. |
Raises:
| Type | Description |
|---|---|
ValueError
|
A name/tag cannot be resolved, or no owner is available to perform the lookup. Direct objects do not require an owner. |
resolve_materials_dict
resolve_materials_dict(materials_input: Dict[str, Union[int, str, 'Material']]) -> Dict[str, 'Material']
Resolve each value of a dependency mapping, preserving its keys.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
materials_input
|
dict[str, int | str | Material]
|
Named references
interpreted by |
required |
Returns:
| Name | Type | Description |
|---|---|---|
materials |
dict[str, Material]
|
New mapping containing resolved objects. Lookup failures propagate; input is not mutated. |
resolve_section
Resolve a section object, integer tag, or user name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
section_input
|
int | str | Section | None
|
Dependency reference. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
section |
Section | None
|
Direct object, looked-up section, or None for None input. Existing objects are neither copied nor registered. |
Raises:
| Type | Description |
|---|---|
ValueError
|
Lookup fails or an unmanaged section is asked to resolve a name/tag without an owning manager. |
resolve_material_reference
staticmethod
resolve_material_reference(material_input: Union[int, str, 'Material', None]) -> Optional['Material']
Accept a direct material object without a manager lookup.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
material_input
|
int | str | Material | None
|
Only Material objects and None can be resolved by this context-free helper. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
material |
Material | None
|
Original object, or None. |
Raises:
| Type | Description |
|---|---|
ValueError
|
A name, tag, or other unsupported value is supplied. |
get_materials
Return this base section's direct material dependency as a new list.
The base returns [self.material] or an empty list. Composite/fiber
implementations override this hook to report their own dependencies.
Material objects are shared, not copied.
has_material
Report whether the base material attribute is non-None.
Concrete section families may override this hook. The base does not search arbitrary nested sections or fiber collections.
get_area
Return section area in squared model length units.
The base returns 0.0 as a fallback, not an integrated geometric result. Implementations with area information must override the hook.
get_Iy
Return the local-y second moment in length-to-the-fourth units.
The base returns 0.0. A concrete section must override this method when a consuming element requires its bending property.
get_Iz
Return the local-z second moment in length-to-the-fourth units.
The base returns 0.0 rather than deriving geometry from materials or discretized fibers. Concrete implementations supply the property.