Claude
Skills
Sign in
Back

structural-analysis

Included with Lifetime
$97 forever

# Structural Analysis Skill

General

What this skill does

# Structural Analysis Skill

```yaml
name: structural-analysis
version: 1.0.0
category: sme
tags: [structural, mechanics, dnv, buckling, uls, als, beam-theory, stress-analysis]
created: 2026-01-06
updated: 2026-01-06
author: Claude
description: |
  Expert structural analysis for marine and offshore structures including
  beam theory, buckling, ULS/ALS limit state checks, and DNV standards.
  Covers tubular members, stiffened panels, and combined loading scenarios.
```

## When to Use This Skill

Use this skill when you need to:
- Perform structural analysis of marine structures
- Check ULS (Ultimate Limit State) and ALS (Accidental Limit State) criteria
- Analyze buckling of columns, beams, and stiffened panels
- Calculate section properties and stress distributions
- Apply DNV structural design standards
- Evaluate combined loading (axial + bending + torsion)
- Design tubular members and jacket structures
- Perform fatigue analysis integration with structural checks

## Core Knowledge Areas

### 1. Beam Theory and Section Properties

Calculate section properties for structural members:

```python
import numpy as np
from dataclasses import dataclass
from typing import Tuple

@dataclass
class SectionProperties:
    """Section properties for structural analysis."""
    area: float  # Cross-sectional area [m²]
    Ix: float  # Second moment of area about x-axis [m⁴]
    Iy: float  # Second moment of area about y-axis [m⁴]
    J: float  # Torsional constant [m⁴]
    Zx: float  # Section modulus about x-axis [m³]
    Zy: float  # Section modulus about y-axis [m³]
    rx: float  # Radius of gyration about x-axis [m]
    ry: float  # Radius of gyration about y-axis [m]

def circular_tube_properties(
    outer_diameter: float,
    wall_thickness: float
) -> SectionProperties:
    """
    Calculate section properties for circular tube.

    Args:
        outer_diameter: Outer diameter [m]
        wall_thickness: Wall thickness [m]

    Returns:
        Section properties

    Example:
        >>> props = circular_tube_properties(D=0.914, t=0.030)
        >>> print(f"Area: {props.area:.4f} m²")
        >>> print(f"Ix: {props.Ix:.6f} m⁴")
    """
    D = outer_diameter
    t = wall_thickness
    d = D - 2 * t  # Inner diameter

    # Cross-sectional area
    A = np.pi / 4 * (D**2 - d**2)

    # Second moments of area (circular symmetry: Ix = Iy)
    I = np.pi / 64 * (D**4 - d**4)

    # Torsional constant (polar moment)
    J = np.pi / 32 * (D**4 - d**4)

    # Section modulus
    Z = I / (D / 2)

    # Radius of gyration
    r = np.sqrt(I / A)

    return SectionProperties(
        area=A,
        Ix=I,
        Iy=I,
        J=J,
        Zx=Z,
        Zy=Z,
        rx=r,
        ry=r
    )

def rectangular_tube_properties(
    width: float,
    height: float,
    wall_thickness: float
) -> SectionProperties:
    """
    Calculate section properties for rectangular hollow section.

    Args:
        width: Outer width [m]
        height: Outer height [m]
        wall_thickness: Wall thickness [m]

    Returns:
        Section properties
    """
    b = width
    h = height
    t = wall_thickness

    # Inner dimensions
    bi = b - 2 * t
    hi = h - 2 * t

    # Cross-sectional area
    A = b * h - bi * hi

    # Second moments of area
    Ix = (b * h**3 - bi * hi**3) / 12
    Iy = (h * b**3 - hi * bi**3) / 12

    # Approximate torsional constant for thin-walled section
    # J ≈ 2·t·(b-t)²·(h-t)² / (b+h-2t) for t << b,h
    J = 2 * t * (b - t)**2 * (h - t)**2 / (b + h - 2 * t)

    # Section moduli
    Zx = 2 * Ix / h
    Zy = 2 * Iy / b

    # Radii of gyration
    rx = np.sqrt(Ix / A)
    ry = np.sqrt(Iy / A)

    return SectionProperties(
        area=A,
        Ix=Ix,
        Iy=Iy,
        J=J,
        Zx=Zx,
        Zy=Zy,
        rx=rx,
        ry=ry
    )

def i_beam_properties(
    flange_width: float,
    web_height: float,
    flange_thickness: float,
    web_thickness: float
) -> SectionProperties:
    """
    Calculate section properties for I-beam/H-beam.

    Args:
        flange_width: Flange width [m]
        web_height: Web height (total height - 2×flange thickness) [m]
        flange_thickness: Flange thickness [m]
        web_thickness: Web thickness [m]

    Returns:
        Section properties
    """
    bf = flange_width
    hw = web_height
    tf = flange_thickness
    tw = web_thickness
    h_total = hw + 2 * tf

    # Cross-sectional area
    A = 2 * bf * tf + hw * tw

    # Second moment about x-axis (strong axis)
    Ix = (bf * h_total**3 - (bf - tw) * hw**3) / 12

    # Second moment about y-axis (weak axis)
    Iy = (2 * tf * bf**3 + hw * tw**3) / 12

    # Approximate torsional constant
    # J ≈ Σ(b·t³/3) for thin-walled open sections
    J = (2 * bf * tf**3 + hw * tw**3) / 3

    # Section moduli
    Zx = 2 * Ix / h_total
    Zy = 2 * Iy / bf

    # Radii of gyration
    rx = np.sqrt(Ix / A)
    ry = np.sqrt(Iy / A)

    return SectionProperties(
        area=A,
        Ix=Ix,
        Iy=Iy,
        J=J,
        Zx=Zx,
        Zy=Zy,
        rx=rx,
        ry=ry
    )
```

### 2. Stress Analysis

Calculate stresses under combined loading:

```python
@dataclass
class LoadCase:
    """Loading case for structural member."""
    axial_force: float  # Axial force [N] (tension positive)
    bending_moment_x: float  # Bending moment about x-axis [N·m]
    bending_moment_y: float  # Bending moment about y-axis [N·m]
    shear_force_x: float  # Shear force in x-direction [N]
    shear_force_y: float  # Shear force in y-direction [N]
    torsional_moment: float  # Torsional moment [N·m]

def calculate_stresses(
    load: LoadCase,
    section: SectionProperties,
    distance_x: float = None,
    distance_y: float = None
) -> dict:
    """
    Calculate stresses at a point in the cross-section.

    Args:
        load: Load case
        section: Section properties
        distance_x: Distance from neutral axis in x-direction [m]
        distance_y: Distance from neutral axis in y-direction [m]

    Returns:
        Dictionary with stress components [Pa]

    Example:
        >>> load = LoadCase(
        ...     axial_force=1000e3,
        ...     bending_moment_x=500e3,
        ...     bending_moment_y=0,
        ...     shear_force_x=0,
        ...     shear_force_y=100e3,
        ...     torsional_moment=50e3
        ... )
        >>> section = circular_tube_properties(0.914, 0.030)
        >>> stresses = calculate_stresses(load, section, 0, 0.457)
        >>> print(f"Axial stress: {stresses['axial']/1e6:.1f} MPa")
    """
    # Axial stress: σ_axial = N/A
    sigma_axial = load.axial_force / section.area

    # Bending stress: σ_bending = M·y/I
    if distance_y is not None:
        sigma_bending_x = load.bending_moment_x * distance_y / section.Ix
    else:
        # Maximum bending stress at extreme fiber
        sigma_bending_x = abs(load.bending_moment_x) / section.Zx

    if distance_x is not None:
        sigma_bending_y = load.bending_moment_y * distance_x / section.Iy
    else:
        sigma_bending_y = abs(load.bending_moment_y) / section.Zy

    # Total normal stress
    sigma_total = sigma_axial + sigma_bending_x + sigma_bending_y

    # Shear stress from torsion: τ = T·r/J
    if distance_x is not None and distance_y is not None:
        r = np.sqrt(distance_x**2 + distance_y**2)
        tau_torsion = load.torsional_moment * r / section.J
    else:
        # Maximum torsional shear stress at outer fiber
        # For circular tube: r = D/2
        # Approximate for other sections
        tau_torsion = load.torsional_moment / (section.J / np.sqrt(section.rx**2 + section.ry**2))

    # Shear stress from transverse loads (approximate)
    # For rectangular sections: τ_avg = V/A
    tau_shear_x = load.shear_force_x / section.area
    tau_shear_y = load.shear_force_y / section.area

    # Total shear stress (vectorial sum)
    tau_total = np.sqrt((tau_torsion + tau_shear_x)**2 + tau_shear_y**2)

    # Von Mises equivalent str

Related in General