Section calculator

Beam section calculator

class structuralcodes.sections.BeamSectionCalculator(sec: BeamSection, integrator: Literal['marin', 'fiber'] = 'marin', **kwargs)[source]

Calculator class implementing analysis algorithms for code checks.

property n_min: float

Return minimum axial load.

In most situations, this is the capacity in compression.

property n_max: float

Return maximum axial load.

In most situations, this is the capacity in tension.

__init__(sec: BeamSection, integrator: Literal['marin', 'fiber'] = 'marin', **kwargs) None[source]

Initialize the BeamSectionCalculator.

Parameters:
  • section (BeamSection) – 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, integrate: Literal['stress'] = 'stress') IntegrateStrainForceResult[source]
integrate_strain_profile(strain: ArrayLike, integrate: Literal['modulus']) IntegrateStrainStiffnessResult

Integrate a strain profile returning stress resultants or tangent section stiffness matrix.

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.

  • integrate (str) – a string indicating the quantity to integrate over the section. It can be ‘stress’ or ‘modulus’. When ‘stress’ is selected, the return value will be the stress resultants N, My, Mz, while if ‘modulus’ is selected, the return will be the tangent section stiffness matrix (default is ‘stress’).

Returns:

IntegrateStrainForcesResult

When integrate="stress".

IntegrateStrainStiffnessResult

When integrate="modulus".

Return type:

Returns

Examples

result = self.integrate_strain_profile(strain,integrate=’modulus’) # result will contain the tangent stiffness matrix (a 3x3 array)

result = self.integrate_strain_profile(strain) # result will contain section forces (N, My, Mz)

Raises:
  • ValueError – If a unkown value is passed to the integrate

  • parameter.

calculate_bending_strength(theta=0, n=0, max_iter: int = 100, tol: float = 0.01) 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.

  • max_iter (int) – the maximum number of iterations in the iterative bisection process (default = 100).

  • tol (float) – the tolerance for convergence test in terms of $deltaN_a - deltaN_b$ (default = 1e-2

Returns:

The results from the calculation.

Return type:

UltimateBendingMomentResults

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, max_iter: int = 100, tol: float = 0.01) 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.

  • max_iter (int) – the maximum number of iterations in the iterative process (default = 100).

  • tol (float) – the tolerance for convergence test in terms of $deltaN_a - deltaN_b$ (default = 1e-2).

Returns:

The calculation results.

Return type:

MomentCurvatureResults

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', complete_domain: bool = False) NMInteractionDomainResult[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.

  • complete_domain (bool) – Flag to indicate if only the part of the domain related to the negative moment is returned (False), or if the positive part of the domain is also included (True).

Returns:

The calculation results.

Return type:

NMInteractionDomain

calculate_nmm_interaction_domain(num_theta: int = 33, 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') NMMInteractionDomainResult[source]

Calculates the NMM interaction domain.

Parameters:
  • num_theta (int) – Number of discretization of angle of neutral axis (Optional, Default = 33).

  • 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:

NMInteractionDomain

calculate_mm_interaction_domain(n: float = 0, num_theta: int = 33, max_iter: int = 100, tol: float = 0.01) MMInteractionDomainResult[source]

Calculate the My-Mz interaction domain.

Parameters:
  • n (float) – Axial force, default = 0.

  • n_theta (int) – Number of discretization for theta, default = 33.

  • max_iter (int) – the maximum number of iterations in the iterative process (default = 10).

  • tol (float) – the tolerance for convergence test in terms of $deltaN_a - deltaN_b$ (default = 1e-2).

Returns:

The calculation results.

Return type:

MMInteractionDomain

calculate_strain_profile(n, my, mz, initial: bool = False, max_iter: int = 10, tol: float = 1e-06) StrainProfileResult[source]

Get the strain plane for a given axial force and biaxial bending.

Parameters:
  • n (float) – Axial load.

  • my (float) – Bending moment around y-axis.

  • mz (float) – Bending moment around z-axis.

  • initial (bool) – If True the modified newton with initial tangent is used (default = False).

  • max_iter (int) – the maximum number of iterations in the iterative process (default = 10).

  • tol (float) – the tolerance for convergence test in terms of strain increment.

Returns:

A custom object of class StrainProfileResult

that contains the results. Note that the to_list() method returns as a list only the strain profile coefficients. These can be for instanced passed to integrate_strain_profile.

Return type:

StrainProfileResult

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, max_iter: int = 100, tol: float = 0.01) List[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) – If true, the yielding strain is used as the ultimate one, therefore finding yielding strength and not ultimate strength

  • max_iter (int) – the maximum number of iterations in the iterative process (default = 100).

  • tol (float) – the tolerance for convergence test in terms of $deltaN_a - deltaN_b$ (default = 1e-2).

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:

List(float)

find_equilibrium_fixed_curvature(geom: CompoundGeometry, n: float, curv: float, eps_0: float, max_iter: int = 100, tol: float = 0.01) 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.

  • max_iter (int) – the maximum number of iterations in the iterative process (default = 100).

  • tol (float) – the tolerance for convergence test in terms of $deltaN_a - deltaN_b$. (default = 1e-2)

Returns:

The axial strain and the two curvatures.

Return type:

Tuple(float, float, float)

Section results

class structuralcodes.core._section_results.SectionProperties(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 section properties.

class structuralcodes.core._section_results.SectionDetailedResultState(section, eps_a, chi_y, chi_z, n, m_y, m_z, num_points=1000, seed=None)[source]

A class for storing section detailed results for specific state.

This class stores in a specific data structure the results in terms of strain and stress fields for a specific state.

The state is characterized by a strain plane (describing the section kinematics). This can correspond for instance to the plane strain computed when determining the ultimate strength of the section, or it can be a specific step during a moment-curvature analysis.

property n

Return axial force.

property m_y

Return bending moment m_y.

property m_z

Return bending moment m_z.

property eps_a

Return axial strain at (0, 0).

property chi_y

Return curvature chi_y.

property chi_z

Return curvature chi_z.

property strain

Return the strain plane as a numpy array.

property surface_data

Return the datastructure for surface geometries.

The datastructure is a dictionary containing the following information for each point along the surfaces:

  • name: the name of the geometry

  • group_label: the group_label fo the geometry

  • material: the material of the geometry

  • y: the y coordinate of the point

  • z: the z coordinate of the point

  • strain: the strain of the point

  • stress: the stress of the point

This dictionary can be easily given as input for creating a DataFrame.

property point_data

Return the datastructure for point geometries.

The datastructure is a dictionary containing the following information for each point along the surfaces:

  • name: the name of the geometry

  • group_label: the group_label fo the geometry

  • material: the material of the geometry

  • diameter: the diameter of the geometry

  • area: the area of the geometry

  • y: the y coordinate of the point

  • z: the z coordinate of the point

  • strain: the strain of the point

  • stress: the stress of the point

This dictionary can be easily given as input for creating a DataFrame.

class structuralcodes.core._section_results.MomentCurvatureResults(theta: float = 0, n: float = 0, chi_y: ArrayLike = None, chi_z: ArrayLike = None, eps_a: ArrayLike = None, m_y: ArrayLike = None, m_z: ArrayLike = None, section: Section | None = None, _detailed_result: SectionDetailedResultState = None, seed: int = None, current_step: int = None, num_points: int = None)[source]

Class for storing moment curvature results.

The analysis will be done in general for a given inclination of n.a.

property detailed_result: SectionDetailedResultState

Returns the detailed result.

create_detailed_result(num_points=1000)[source]

Create the detailed result object.

Parameters:

num_points (int) – Number of random points to sample for each surface geometry (default = 1000).

Notes

It is called with default values when first accessing the property

detailed_result.

next_step()[source]

Advance to the next step in the detailed result.

previous_step()[source]

Go back to the previous step in the detailed result.

set_step(step: int)[source]

Set the detailed result to a specific step.

Parameters:

step (int) – the step to set for the datailed_result object.

get_point_strain(y: float, z: float, name: str | None = None, group_label: str | None = None, case_sensitive: bool = True, all_results: bool = False) ndarray[source]

Return the strain at a given point (y,z).

Parameters:
  • y (float) – The y-coordinate of the point.

  • z (float) – The z-coordinate of the point.

  • name (str, optional) – The name of the surface geometry to check.

  • group_label (str, optional) – The group label of the surface geometry to check.

  • case_sensitive (bool, optional) – If True (default) the matching is case sensitive.

  • all_results (bool) – If True, return the strain for all geometries that matches the filters, otherwise return the strain for the first geometry that matches the filters (default False).

Returns:

The strain at the given point for all the steps, or

None if the point is not within any of the geometries that match the filters.

Return type:

numpy.ndarray

get_point_stress(y: float, z: float, name: str | None = None, group_label: str | None = None, case_sensitive: bool = True, all_results: bool = False) ndarray[source]

Return the stress at a given point (y,z).

Parameters:
  • y (float) – The y-coordinate of the point.

  • z (float) – The z-coordinate of the point.

  • name (str, optional) – The pattern for filtering the geometries by their name.

  • group_label (str, optional) – The pattern for filtering the geometries by their group_label.

  • case_sensitive (bool, optional) – If True (default) the matching is case sensitive.

  • all_results (bool) – If True, return the stress for all geometries that matches the filters, otherwise return the stress for the first geometry that matches the filters (default False).

Returns:

The stress at the given point for all the steps, or

None if the point is not within any of the geometries that match the filters.

Return type:

numpy.ndarray

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, section: Section | None = None, _detailed_result: SectionDetailedResultState = None)[source]

Class for storing the ultimate bending moment computation for a given inclination of n.a. and axial load.

property detailed_result: SectionDetailedResultState

Returns the detailed result.

create_detailed_result(num_points=1000)[source]

Create the detailed result object.

Parameters:

num_points (int) – Number of random points to sample for each surface geometry (default = 1000).

Notes

It is called with default values when first accessing the property

detailed_result.

get_point_strain(y: float, z: float, name: str | None = None, group_label: str | None = None, case_sensitive: bool = True, all_results: bool = False) float[source]

Return the strain at a given point (y,z).

Parameters:
  • y (float) – The y-coordinate of the point.

  • z (float) – The z-coordinate of the point.

  • name (str, optional) – The name of the surface geometry to check.

  • group_label (str, optional) – The group label of the surface geometry to check.

  • case_sensitive (bool, optional) – If True (default) the matching is case sensitive.

  • all_results (bool) – If True, return the strain for all geometries that matches the filters, otherwise return the strain for the first geometry that matches the filters (default False).

Returns:

The strain at the given point, or None if the point is not

within any of the geometries that match the filters.

Return type:

float

get_point_stress(y: float, z: float, name: str | None = None, group_label: str | None = None, case_sensitive: bool = True, all_results: bool = False) float[source]

Return the stress at a given point (y,z).

Parameters:
  • y (float) – The y-coordinate of the point.

  • z (float) – The z-coordinate of the point.

  • name (str, optional) – The pattern for filtering the geometries by their name.

  • group_label (str, optional) – The pattern for filtering the geometries by their group_label.

  • case_sensitive (bool, optional) – If True (default) the matching is case sensitive.

  • all_results (bool) – If True, return the stress for all geometries that matches the filters, otherwise return the stress for the first geometry that matches the filters (default False).

Returns:

The strain at the given point, or None if the point is not

within any of the geometries that match the filters.

Return type:

float

class structuralcodes.core._section_results.StrainProfileResult(eps_a: float = 0.0, chi_y: float = 0.0, chi_z: float = 0.0, n_ext: float = 0.0, m_y_ext: float = 0.0, m_z_ext: float = 0.0, n: float = 0.0, m_y: float = 0.0, m_z: float = 0.0, tolerance: float = 0.0, max_iter: int = 0, used_initial_tangent: bool = False, iterations: int = 0, converged: bool = False, residual: ~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[~numpy.float64]] = <factory>, residual_history: list[~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[~numpy.float64]]] = <factory>, strain_history: list[~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[~numpy.float64]]] = <factory>, section: ~structuralcodes.core.base._section.Section | None = None, _detailed_result: ~structuralcodes.core._section_results.SectionDetailedResultState = None)[source]

Class for storing the results from calculate_strain_profile method.

property strain_plane: ndarray[tuple[Any, ...], dtype[float64]]

Returns the strain profile as a numpy array.

property residual_norm: float

Returns the norm of the residual at last iteration.

property residual_norm_history: List

Returns the history of residual norm.

property delta_strain_history: List

Returns as a list the history of delta_strain.

property delta_strain_norm_history: List

Returns as a list the history of norm of delta_strain.

property response_history: List

Returns as a list the response (i.e. internal forces) history.

property detailed_result: SectionDetailedResultState

Returns the detailed result.

to_list() List[source]

Returns the strain profile coefficients in a list.

create_detailed_result(num_points=1000)[source]

Create the detailed result object.

Parameters:

num_points (int) – Number of random points to sample for each surface geometry (default = 1000).

Notes

It is called with default values when first accessing the property

detailed_result.

get_point_strain(y: float, z: float, name: str | None = None, group_label: str | None = None, case_sensitive: bool = True, all_results: bool = False) float[source]

Return the strain at a given point (y,z).

Parameters:
  • y (float) – The y-coordinate of the point.

  • z (float) – The z-coordinate of the point.

  • name (str, optional) – The name of the surface geometry to check.

  • group_label (str, optional) – The group label of the surface geometry to check.

  • case_sensitive (bool, optional) – If True (default) the matching is case sensitive.

  • all_results (bool) – If True, return the strain for all geometries that matches the filters, otherwise return the strain for the first geometry that matches the filters (default False).

Returns:

The strain at the given point, or None if the point is not

within any of the geometries that match the filters.

Return type:

float

get_point_stress(y: float, z: float, name: str | None = None, group_label: str | None = None, case_sensitive: bool = True, all_results: bool = False) float[source]

Return the stress at a given point (y,z).

Parameters:
  • y (float) – The y-coordinate of the point.

  • z (float) – The z-coordinate of the point.

  • name (str, optional) – The pattern for filtering the geometries by their name.

  • group_label (str, optional) – The pattern for filtering the geometries by their group_label.

  • case_sensitive (bool, optional) – If True (default) the matching is case sensitive.

  • all_results (bool) – If True, return the stress for all geometries that matches the filters, otherwise return the stress for the first geometry that matches the filters (default False).

Returns:

The strain at the given point, or None if the point is not

within any of the geometries that match the filters.

Return type:

float

class structuralcodes.core._section_results.IntegrateStrainStiffnessResult(eps_a: float = 0.0, chi_y: float = 0.0, chi_z: float = 0.0, tangent: ~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[~numpy.float64]] = <factory>)[source]

Class for storing the results from integrating modulus.

asarray(dtype=<class 'numpy.float64'>) ndarray[tuple[Any, ...], dtype[_ScalarT]][source]

Return an array representation of the tangent.

class structuralcodes.core._section_results.IntegrateStrainForceResult(eps_a: float = 0.0, chi_y: float = 0.0, chi_z: float = 0.0, n: float = 0.0, m_y: float = 0.0, m_z: float = 0.0, section: Section | None = None, _detailed_result: SectionDetailedResultState = None)[source]

Class for storing the results from integrating stresses.

property detailed_result: SectionDetailedResultState

Returns the detailed result.

asarray(dtype=<class 'numpy.float64'>) ndarray[tuple[Any, ...], dtype[_ScalarT]][source]

Return an array representation of the forces.

astuple() tuple[float, float, float][source]

Return a tuple representation of the forces.

create_detailed_result(num_points=1000)[source]

Create the detailed result object.

Parameters:

num_points (int) – Number of random points to sample for each surface geometry (default = 1000).

Notes

It is called with default values when first accessing the property

detailed_result.

get_point_strain(y: float, z: float, name: str | None = None, group_label: str | None = None, case_sensitive: bool = True, all_results: bool = False) float[source]

Return the strain at a given point (y,z).

Parameters:
  • y (float) – The y-coordinate of the point.

  • z (float) – The z-coordinate of the point.

  • name (str, optional) – The name of the surface geometry to check.

  • group_label (str, optional) – The group label of the surface geometry to check.

  • case_sensitive (bool, optional) – If True (default) the matching is case sensitive.

  • all_results (bool) – If True, return the strain for all geometries that matches the filters, otherwise return the strain for the first geometry that matches the filters (default False).

Returns:

The strain at the given point, or None if the point is not

within any of the geometries that match the filters.

Return type:

float

get_point_stress(y: float, z: float, name: str | None = None, group_label: str | None = None, case_sensitive: bool = True, all_results: bool = False) float[source]

Return the stress at a given point (y,z).

Parameters:
  • y (float) – The y-coordinate of the point.

  • z (float) – The z-coordinate of the point.

  • name (str, optional) – The pattern for filtering the geometries by their name.

  • group_label (str, optional) – The pattern for filtering the geometries by their group_label.

  • case_sensitive (bool, optional) – If True (default) the matching is case sensitive.

  • all_results (bool) – If True, return the stress for all geometries that matches the filters, otherwise return the stress for the first geometry that matches the filters (default False).

Returns:

The strain at the given point, or None if the point is not

within any of the geometries that match the filters.

Return type:

float

class structuralcodes.core._section_results.NMInteractionDomainResult(strains: ndarray[tuple[Any, ...], dtype[float64]] = None, forces: ndarray[tuple[Any, ...], dtype[float64]] = None, theta: float = 0, num_points: int = 0, field_num: ndarray[tuple[Any, ...], dtype[float64]] = None)[source]

Class for storing the NM interaction domain results.

theta

the inclination of n.a.

Type:

float

field_num

a numpy array with shape (n,) containing a number between 1 and 6 indicating the failure field.

Type:

numpy.Array

property n

Return axial force.

property m_y

Return my.

property eps_a

Return eps_a (axial strain at 0, 0).

property chi_y

Return chi_y (curvature about y-axis.

class structuralcodes.core._section_results.NMMInteractionDomainResult(strains: ndarray[tuple[Any, ...], dtype[float64]] = None, forces: ndarray[tuple[Any, ...], dtype[float64]] = None, num_theta: int = 0, num_points: int = 0, field_num: ndarray[tuple[Any, ...], dtype[float64]] = None)[source]

Class for storing the NMM interaction domain results.

num_theta

the number of discretizations from 0 to 2pi.

Type:

int

field_num

a numpy array with shape (n,) containing a number between 1 and 6 indicating the failure field.

Type:

numpy.Array

property n

Return axial force.

property m_y

Return my.

property m_z

Return mz.

property eps_a

Return eps_a (axial strain at 0, 0).

property chi_y

Return chi_y (curvature about y-axis.

property chi_z

Return chi_z (curvature about z-axis).

class structuralcodes.core._section_results.MMInteractionDomainResult(strains: ndarray[tuple[Any, ...], dtype[float64]] = None, forces: ndarray[tuple[Any, ...], dtype[float64]] = None, num_theta: float = 0, theta: ndarray[tuple[Any, ...], dtype[float64]] = None)[source]

Class for storing the MM interaction domain results.

num_theta

the number of discretizations from 0 to 2pi.

Type:

int

theta

a numpy array with shape (n,) the angle theta

Type:

numpy.Array

property n

Return axial force.

property m_y

Return my.

property m_z

Return mz.

property eps_a

Return eps_a (axial strain at 0, 0).

property chi_y

Return chi_y (curvature about y-axis.

property chi_z

Return chi_z (curvature about z-axis).