API
geometry Module
This module provides classes and functions to manage timber sections and their geometric properties.
Classes
ShapeType: Enum class defining section type string constants.
TimberSection: A class is used to manage timber section attributes.
RectangleShape: Represents structural section properties for a rectangular cross-section.
TimberShape: An alias for the RectangleShape class.
Functions
import_section_library(): Returns a DataFrame containing the section library defined in timberas/data/section_library.csv
Classes
ShapeType
Bases: str, Enum
An enumeration of section type string constants. Provides a type-safe way of representing different section types.
| Attributes: |
|
|---|
TimberSection
dataclass
Calculates geometric and structural section properties from cross-section parameters. Selects shape class from shape_type to calculate: A_g, A_t, A_c, I_x, I_y. Class properties Z_x, Z_y, b_tot, and A_s calculated as derived attributes.
| Attributes: |
|
|---|
Attributes
b_tot
property
b_tot: float
total width of section containing one or multiple boards, b_tot = n x b
Z_x
property
Z_x: float
Section modulus about x-axis.
Z_y
property
Z_y: float
Section modulus about y-axis. NOTE: Z for block section uses b_tot (n x b), but k12 stability factor uses b.
A_s
property
A_s: float
shear plane area 3.2.5
Functions
solve_shape
solve_shape()
Sets shape class based on shape_type and recalculates relevant section properties.
from_dict
classmethod
from_dict(input_dict, solve_me=True)
Create a TimberSection by directly populating attributes from input dictionary, ignoring dictionary keys which aren't class attributes.
| Parameters: |
|
|---|
| Returns: |
|
|---|
from_library
classmethod
from_library(name, library=None)
Creates a TimberSection object from a material library (DataFrame).
| Parameters: |
|
|---|
| Returns: |
|
|---|
RectangleShape
dataclass
Dataclass representing structural section properties for a rectangular cross-section. Class properties A_g, I_x, and I_y calculated as derived attributes.
| Attributes: |
|
|---|
Attributes
A_g
property
A_g: float
Gross area
I_x
property
I_x: float
Moment of inertia - major axis
I_y
property
I_y: float
Moment of inertia - minor axis
Functions
import_section_library
import_section_library()
Imports a section library from a CSV file.
The CSV file is located at 'timberas/data/section_library.csv'.
| Returns: |
|
|---|
| Raises: |
|
|---|
material Module
This module provides classes and functions for creating timber materials described in AS1720.1.
Classes
GradeType: Enum class defining material grade string constants.
TimberMaterial: Represents a timber material based on AS1720.
Functions
import_material_library(): Returns a DataFrame containing the material library defined in timberas/data/material_library.csv
Classes
GradeType
Bases: str, Enum
An enumeration of grade type string constants. Provide a type-safe way of representing different grade types.
| Attributes: |
|
|---|
TimberMaterial
dataclass
Represents timber material properties as defined in AS1720.
| Attributes: |
|
|---|
Functions
phi
phi(application_cat)
Returns the appropriate capacity factor for the given application category.
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Raises: |
|
|---|
update_from_section_size
update_from_section_size(d, b=None)
Updates the f_t property for large sections, including: f_t, f_b, f_c, f_s for MGP sections with d>140mm (AS1720.1 Table H3.1, Note 4); f_b for F-grade sections with d > 300mm (AS1720.1 Table H2.1 Note 1); f_t for F-grade sections with d > 150mm (AS1720.1 Table H.2 Note 2); f_t for Glulam sections with d > 150mm (AS1720.1 Table 7.1 Note 1).
| Parameters: |
|
|---|
from_dict
classmethod
from_dict(input_dict)
Create a TimberMaterial by directly populating attributes from input dictionary, ignoring dictionary keys which aren't class attributes.
| Parameters: |
|
|---|
| Returns: |
|
|---|
from_library
classmethod
from_library(name, library=None)
Creates a TimberMaterial object from a material library (DataFrame).
| Parameters: |
|
|---|
| Returns: |
|
|---|
Functions
import_material_library
import_material_library()
Imports a material library from a CSV file.
The CSV file is located at 'timberas/data/material_library.csv'.
| Returns: |
|
|---|
| Raises: |
|
|---|
member Module
TODO
Classes
EffectiveLengthFactor
Bases: float, Enum
Dataclass containing values for effective length factor g_13 for columns with intermediate lateral restraint. End restraint conditions as listed in Table 3.2, AS1720.1:2010.
| Attributes: |
|
|---|
ApplicationCategory
Bases: IntEnum
Table 2.1, AS1720.1:2010
DurationFactorStrength
Bases: float, Enum
Table 2.3, Table G1?, AS1720.1:2010
RestraintEdge
Bases: str, Enum
compression edge is critical edge
TimberMember
dataclass
TODO
Attributes
phi
property
phi: float
Table 2.1, AS1720.1:2010
S1
property
S1: float
Slenderness coefficient for lateral buckling under bending, major axis. Clause 3.2.3, AS1720.1:2010. Not implemented in TimberMember parent class, added in child classes.
S2
property
S2: float
Slenderness coefficient for lateral buckling under bending, minor axis. Clause 3.2.3(c), AS1720.1:2010.
S3
property
S3: float
Slenderness coefficient for lateral buckling under compression, x axis. Clause 3.3.2, AS1720.1:2010. Not implemented in TimberMember parent class, added in child classes.
S4
property
S4: float
Clause 3.3.2.2(b), AS1720.1:2010
rho_c
property
rho_c: float
Section E2, AS1720.1:2010
g_13_x
property
g_13_x: float
Effective length factor for compressive buckling, x-axis
g_13_y
property
g_13_y: float
Effective length factor for compressive buckling, y-axis
L_ax
property
L_ax: float
distance between effective lateral restraint against buckling about x-axis.
L_ay
property
L_ay: float
distance between effective lateral restraint against buckling about y-axis.
L_a_phi
property
L_a_phi: float
distance between effective torsional restraint against buckling, Cl 3.2.3.2(b).
rho_b
property
rho_b: float
Section E2, AS1720.1:2010
L_CLR
property
L_CLR: float
Clause
k_4
property
k_4: float
Table 2.5, AS1720.1:2010
k_6
property
k_6: float
Clause 2.4.3, AS1720.1:2010
k_9
property
k_9: float
Modification factor for strength sharing. Clause 2.4.5.3, AS1720.1:2010. Not Implemented in TimberMember parent class, added in child classes.
k_12_c
property
k_12_c: float
Modification factor for stability, to allow for slenderness effects on compression strength. Minimum of k_12_x and k_12_y. Clause 3.3.3, AS1720.1:2010.
k_12_x
property
k_12_x: float
Modification factor for stability, to allow for slenderness effects on compression strength (x-axis). Clause 3.3.3, AS1720.1:2010.
k_12_y
property
k_12_y: float
Modification factor for stability, to allow for slenderness effects on compression strength (y-axis). Clause 3.3.3, AS1720.1:2010.
k_12_bend
property
k_12_bend: float
Modification factor for stability, to allow for slenderness effects on bending strength. Clause 3.2.4, AS1720.1:2010.
Functions
solve_capacities
solve_capacities()
Calculate tension, compression, and bending design capacities.
update_k_1
update_k_1(k_1)
Change k_1 factor and recalculate section capacities.
_N_dcx
_N_dcx()
Clause 3.3.1.1, AS1720.1:2010
_N_dcy
_N_dcy()
Clause 3.3.1.1, AS1720.1:2010
_N_dc
_N_dc()
Clause 3.3.1.1, AS1720.1:2010
_N_dt
_N_dt()
Clause 3.4.1, AS1720.1:2010
_M_d
_M_d()
Clause 3.2.1.1, AS1720.1:2010
_V_d
_V_d()
flexural shear strength Cl 3.2.5
k_6_lookup
k_6_lookup(seasoned, high_temp_latitude)
Modification factor for strength for the effect of temperature. Clause 2.4.3, AS1720.1:2010.
calc_k12_compression
calc_k12_compression(rho_c, S3)
Calculate stability factor k12 for compression. Clause 3.3.3, AS 1720.1:2010.
calc_k12_bending
calc_k12_bending(rho_b, S1)
Calculate stability factor k12 for bending. Clause 3.2.4, AS1720.1:2010
RectangleMemberStabilityMixin
TODO
Attributes
S1
property
S1: float
Clause (b), AS1720.1:2010
S3
property
S3: float
Slenderness coefficient for buckling about x axis in rectangular sections. Clause 3.3.2.2(a), AS1720.1:2010.
L_CLR
property
L_CLR: float
3.2.3.2
BoardMember
Bases: RectangleMemberStabilityMixin, TimberMember
TODO
Attributes
k_9
property
k_9: float
Clause 2.4.5.3, AS1720.1:2010
g_31
property
g_31: float
Table 2.7, AS1720.1:2010
g_32
property
g_32: float
Table 2.7, AS1720.1:2010
Functions
g3_lookup
staticmethod
g3_lookup(n)
Table 2.7, AS1720.1:2010
GlulamMember
Bases: RectangleMemberStabilityMixin, TimberMember
TODO
Attributes
k_9
property
k_9: float
TODO