Section calculator¶
Generic section calculator¶
- class structuralcodes.sections.GenericSectionCalculator(sec: GenericSection, integrator: Literal['marin', 'fiber'] = 'marin', **kwargs)[source]¶
Calculator class implementing analysis algorithms for code checks.
- property n_min: float¶
Return minimum axial load.
- property n_max: float¶
Return maximum axial load.
- __init__(sec: GenericSection, integrator: Literal['marin', 'fiber'] = 'marin', **kwargs) None [source]¶
Initialize the GenericSectionCalculator.
- Parameters:
section (GenericSection) – The section object.
integrator (str) – The SectionIntegrator to be used for computations (default = ‘marin’).
Note
When using fiber integrator the kwarg mesh_size can be used to specify a dimensionless number (between 0 and 1) specifying the size of the resulting mesh.
- calculate_limit_axial_load()[source]¶
Compute maximum and minimum axial load.
- Returns:
Minimum and Maximum axial load.
- Return type:
Tuple(float, float)
- check_axial_load(n: float)[source]¶
Check if axial load n is within section limits.
- Raises:
ValueError – If axial load cannot be carried by the section.
- integrate_strain_profile(strain: ArrayLike) Tuple[float, float, float] [source]¶
Integrate a strain profile returning internal forces.
- Parameters:
strain (ArrayLike) – Represents the deformation plane. The strain should have three entries representing respectively: axial strain (At 0,0 coordinates), curv_y, curv_z.
- Returns:
N, My and Mz.
- Return type:
Tuple(float, float, float)
- calculate_bending_strength(theta=0, n=0) UltimateBendingMomentResults [source]¶
Calculates the bending strength for given inclination of n.a. and axial load.
- Parameters:
theta (float) – Inclination of n.a. respect to section y axis in radians, default = 0.
n (float) – Axial load applied to the section (+: tension, -: compression), default = 0.
- Returns:
The results from the calculation.
- Return type:
- calculate_moment_curvature(theta: float = 0.0, n: float = 0.0, chi_first: float = 1e-08, num_pre_yield: int = 10, num_post_yield: int = 10, chi: ArrayLike | None = None) MomentCurvatureResults [source]¶
Calculates the moment-curvature relation for given inclination of n.a. and axial load.
- Parameters:
theta (float) – Inclination of n.a. respect to y axis in radians, default = 0.
n (float) – Axial load applied to the section (+: tension, -: compression), default = 0.
chi_first (float) – The first value of the curvature, default = 1e-8.
num_pre_yield (int) – Number of points before yielding. Note that the yield curvature will be at the num_pre_yield-th point in the result array, default = 10.
num_post_yield (int) – Number of points after yielding, default = 10.
chi (Optional[ArrayLike]) – An ArrayLike with curvatures to calculate the moment response for. If chi is None, the array is constructed from chi_first, num_pre_yield and num_post_yield. If chi is not None, chi_first, num_pre_yield and num_post_yield are disregarded, and the provided chi is used directly in the calculations.
- Returns:
The calculation results.
- Return type:
- calculate_nm_interaction_domain(theta: float = 0, num_1: int = 1, num_2: int = 2, num_3: int = 15, num_4: int = 10, num_5: int = 3, num_6: int = 4, num: int | None = None, type_1: Literal['linear', 'geometric', 'quadratic'] = 'linear', type_2: Literal['linear', 'geometric', 'quadratic'] = 'linear', type_3: Literal['linear', 'geometric', 'quadratic'] = 'geometric', type_4: Literal['linear', 'geometric', 'quadratic'] = 'linear', type_5: Literal['linear', 'geometric', 'quadratic'] = 'linear', type_6: Literal['linear', 'geometric', 'quadratic'] = 'linear') NMInteractionDomain [source]¶
Calculate the NM interaction domain.
- Parameters:
theta (float) – Inclination of n.a. respect to y axis in radians (Optional, default = 0).
num_1 (int) – Number of strain profiles in field 1 (Optional, default = 1).
num_2 (int) – Number of strain profiles in field 2 (Optional, default = 2).
num_3 (int) – Number of strain profiles in field 3 (Optional, default = 15).
num_4 (int) – Number of strain profiles in field 4 (Optional, default = 10).
num_5 (int) – Number of strain profiles in field 5 (Optional, default = 3).
num_6 (int) – Number of strain profiles in field 6 (Optional, default = 4).
num (int) – Total number of strain profiles (Optional, default = None). If specified num and num_1, …, num_6 the total number of num may be different.
type_1 (str) – Type of spacing for field 1. ‘linear’ for a linear spacing, ‘geometric’ for a geometric spacing ‘quadratic’ for a quadratic spacing (default = ‘linear’).
type_2 (str) – Type of spacing for field 2 (default = ‘linear’). See type_1 for options.
type_3 (str) – Type of spacing for field 3 (default = ‘geometric’). See type_1 for options.
type_4 (str) – Type of spacing for field 4 (default = ‘linear’). See type_1 for options.
type_5 (str) – Type of spacing for field 5 (default = ‘linear’). See type_1 for options.
type_6 (str) – Type of spacing for field 6 (default = ‘linear’). See type_1 for options.
- Returns:
The calculation results.
- Return type:
- calculate_nmm_interaction_domain(num_theta: int = 32, num_1: int = 1, num_2: int = 2, num_3: int = 15, num_4: int = 10, num_5: int = 3, num_6: int = 4, num: int | None = None, type_1: Literal['linear', 'geometric', 'quadratic'] = 'linear', type_2: Literal['linear', 'geometric', 'quadratic'] = 'linear', type_3: Literal['linear', 'geometric', 'quadratic'] = 'geometric', type_4: Literal['linear', 'geometric', 'quadratic'] = 'linear', type_5: Literal['linear', 'geometric', 'quadratic'] = 'linear', type_6: Literal['linear', 'geometric', 'quadratic'] = 'linear') NMMInteractionDomain [source]¶
Calculates the NMM interaction domain.
- Parameters:
num_theta (int) – Number of discretization of angle of neutral axis (Optional, Default = 32).
num_1 (int) – Number of strain profiles in field 1 (Optional, default = 1).
num_2 (int) – Number of strain profiles in field 2 (Optional, default = 2).
num_3 (int) – Number of strain profiles in field 3 (Optional, default = 15).
num_4 (int) – Number of strain profiles in field 4 (Optional, default = 10).
num_5 (int) – Number of strain profiles in field 5 (Optional, default = 3).
num_6 (int) – Number of strain profiles in field 6 (Optional, default = 4).
num (int) – Total number of strain profiles (Optional, default = None). If specified num and num_1, …, num_6 the total number of num may be different.
type_1 (literal) – Type of spacing for field 1. ‘linear’ for a linear spacing, ‘geometric’ for a geometric spacing ‘quadratic’ for a quadratic spacing (Optional default = ‘linear’).
type_2 (literal) – Type of spacing for field 2 (default = ‘linear’). See type_1 for options.
type_3 (literal) – Type of spacing for field 3 (default = ‘geometric’). See type_1 for options.
type_4 (literal) – Type of spacing for field 4 (default = ‘linear’). See type_1 for options.
type_5 (literal) – Type of spacing for field 5 (default = ‘linear’). See type_1 for options.
type_6 (literal) – Type of spacing for field 6 (default = ‘linear’). See type_1 for options.
- Returns:
The calculation results.
- Return type:
- calculate_mm_interaction_domain(n: float = 0, num_theta: int = 32) MMInteractionDomain [source]¶
Calculate the My-Mz interaction domain.
- Parameters:
n (float) – Axial force, default = 0.
n_theta (int) – Number of discretization for theta, default = 32.
- Returns:
The calculation results.
- Return type:
- get_balanced_failure_strain(geom: CompoundGeometry, yielding: bool = False) Tuple[float, float, float] [source]¶
Returns the strain profile corresponding to balanced failure.
This is found from all ultimate strains for all materials, checking the minimum value of curvature.
- Parameters:
geom (CompoundGeometry) – The compund geometry.
yielding (bool) – consider yielding instead of ultimate strain, default = False.
- Returns:
It returns a tuple with, 1) Value of y coordinate for negative failure, 2) Value of y coordinate for positive failure, 3) Strain profile as a list with three values: axial strain, curvature y*, curvature z* (assumed zero since in the rotated frame y*z* it is a case of uniaxial bending).
- Return type:
Tuple(float, float, List)
- find_equilibrium_fixed_pivot(geom: CompoundGeometry, n: float, yielding: bool = False) Tuple[float, float, float] [source]¶
Find the equilibrium changing curvature fixed a pivot. The algorithm uses bisection algorithm between curvature of balanced failure and 0. Selected the pivot point as the top or the bottom one, the neutral axis is lowered or raised respectively.
- Parameters:
geom (CompoundGeometry) – A geometry in the rotated reference system.
n (float) – Value of external axial force needed to be equilibrated.
yielding (bool) –
…
- Returns:
3 floats: Axial strain at (0,0), and curvatures of y* and z* axes. Note that being uniaxial bending, curvature along z* is 0.0.
- Return type:
Tuple(float, float, float)
- find_equilibrium_fixed_curvature(geom: CompoundGeometry, n: float, curv: float, eps_0: float) Tuple[float, float, float] [source]¶
Find strain profile with equilibrium with fixed curvature.
Given curvature and external axial force, find the strain profile that makes internal and external axial force in equilibrium.
- Parameters:
geom (CompounGeometry) – The geometry.
n (float) – The external axial load.
curv (float) – The value of curvature.
eps_0 (float) – A first attempt for neutral axis position.
- Returns:
The axial strain and the two curvatures.
- Return type:
Tuple(float, float, float)
Section results¶
- class structuralcodes.core._section_results.GrossProperties(area: float = 0, area_reinforcement: float = 0, ea: float = 0, mass: float = 0, perimeter: float = 0, sy: float = 0, sz: float = 0, e_sy: float = 0, e_sz: float = 0, cy: float = 0, cz: float = 0, iyy: float = 0, izz: float = 0, iyz: float = 0, iyy_c: float = 0, izz_c: float = 0, iyz_c: float = 0, i11: float = 0, i22: float = 0, theta: float = 0, e_iyy: float = 0, e_izz: float = 0, e_iyz: float = 0, e_iyy_c: float = 0, e_izz_c: float = 0, e_iyz_c: float = 0, e_i11: float = 0, e_i22: float = 0, e_theta: float = 0)[source]¶
Simple dataclass for storing gross section properties.
- class structuralcodes.core._section_results.CrackedProperties(i_yy: float = 0, i_zz: float = 0, i_yz: float = 0, ei_yy: float = 0, ei_zz: float = 0)[source]¶
Simple dataclass for storing cracked section properties.
- class structuralcodes.core._section_results.MomentCurvatureResults(theta: float = 0, n: float = 0, chi_y: ArrayLike = None, chi_z: ArrayLike = None, eps_axial: ArrayLike = 0, m_y: ArrayLike = None, m_z: ArrayLike = None)[source]¶
Class for storing moment curvature results.
The analysis will be done in general for a given inclination of n.a.
- class structuralcodes.core._section_results.UltimateBendingMomentResults(theta: float = 0, n: float = 0, m_y: float = 0, m_z: float = 0, chi_y: float = 0, chi_z: float = 0, eps_a: float = 0)[source]¶
Class for storing the ultimate bending moment computation for a given inclination of n.a. and axial load.
- class structuralcodes.core._section_results.NMInteractionDomain(strains: ArrayLike = None, forces: ArrayLike = None, field_num: ArrayLike = None, theta: float = 0, num_axial: float = 0)[source]¶
Class for storing the NM interaction domain results.
- property n¶
Return axial force.
- property m_y¶
Return my.
- property e_a¶
Return ea.
- property k_y¶
Return ky.
- class structuralcodes.core._section_results.NMMInteractionDomain(strains: ArrayLike = None, forces: ArrayLike = None, field_num: ArrayLike = None, num_theta: int = 0, num_axial: int = 0)[source]¶
Class for storing the NMM interaction domain results.
- property n¶
Return axial force.
- property m_y¶
Return my.
- property m_z¶
Return mz.
- property e_a¶
Return ea.
- property k_y¶
Return ky.
- property k_z¶
Return kz.
- class structuralcodes.core._section_results.MMInteractionDomain(strains: ArrayLike = None, forces: ArrayLike = None, field_num: ArrayLike = None, num_theta: float = 0, theta: ArrayLike = None)[source]¶
Class for storing the MM interaction domain results.
- property n¶
Return axial force.
- property m_y¶
Return my.
- property m_z¶
Return mz.
- property e_a¶
Return ea.
- property k_y¶
Return ky.
- property k_z¶
Return kz.