Token导航 LogoToken导航

Agent Skill · 开发

fatigue-analysis(疲劳分析)

fatigue-analysis 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

fatigue-analysis 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 17,088。

总安装 442周安装 19GitHub Stars 8下载 155核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:fatigue-analysis(疲劳分析)
来源仓库:https://github.com/vamseeachanta/workspace-hub
仓库路径:skills/fatigue-analysis
安装命令:
npx skills add https://github.com/vamseeachanta/workspace-hub --skill fatigue-analysis
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/vamseeachanta/workspace-hub --skill fatigue-analysis

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

fatigue-analysis 提供海洋与 offshore 结构部件的疲劳寿命评估,基于 S-N 曲线与损伤累积模型。适用于在 Codex、Claude、Cursor、Gemini CLI 中对机械结构进行循环载荷下的可靠性分析。集成信号分析与结构力学模块,支持自定义载荷谱输入与材料属性配置。

使用前需确认输入应力数据格式正确,并选择合适的环境修正系数与表面加工因子。输出结果应结合工程经验判断,避免过度依赖算法而忽略实际制造缺陷影响。

来源仓库内路径:skills/fatigue-analysis

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/vamseeachanta/workspace-hub --skill fatigue-an…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

fatigue-analysis 怎么安装?

在终端执行 npx skills add https://github.com/vamseeachanta/workspace-hub --skill fatigue-analysis。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

fatigue-analysis 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

fatigue-analysis 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

fatigue-analysis 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

fatigue-analysis 用的人多吗?

公开数据是累计安装 442 次,近一周安装 19 次,下载 155 次,GitHub 8 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

fatigue-analysis 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
fatigue-analysis

疲劳分析 · 本页

4428需要联网MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Fatigue Analysis Skill

Perform fatigue analysis for marine and offshore structural components using industry-standard S-N curves and damage accumulation methods.

Version Metadata

version: 1.0.0
python_min_version: '3.10'
dependencies:
  signal-analysis: '>=1.0.0,<2.0.0'
  structural-analysis: '>=1.0.0,<2.0.0'
compatibility:
  tested_python:
  - '3.10'
  - '3.11'
  - '3.12'
  - '3.13'
  os:
  - Windows
  - Linux
  - macOS

Changelog

[1.0.0] - 2026-01-07

Added:

  • Initial version metadata and dependency management
  • Semantic versioning support
  • Compatibility information for Python 3.10-3.13

Changed:

  • Enhanced skill documentation structure

When to Use

  • Fatigue life assessment of welded joints
  • S-N curve selection from international standards
  • Stress concentration factor application
  • Damage accumulation using Palmgren-Miner rule
  • Fatigue limit evaluation
  • Comparison of different standards
  • Generating fatigue analysis reports

Supported Standards

Available S-N Curves (221 total)

StandardCurvesDescription
DNV-RP-C20345+Offshore steel structures
API RP 2A15+Offshore platforms
BS 760820+Fatigue design of steel structures
ABS18+Marine vessel structures
Eurocode 314Steel structures
IIW12+Welded joints
ASME10+Pressure vessels
AWS D1.18+Structural welding
AISC5Steel construction
ISO 1990212+Fixed offshore structures

Core Concepts

S-N Curve Equation

The basic S-N relationship:

N = a / S^m

Where:
- N = Number of cycles to failure
- S = Stress range
- a = Intercept parameter (log scale)
- m = Slope parameter (typically 3-5 for steel)

Damage Accumulation (Miner's Rule)

D = Σ (ni / Ni)

Where:
- D = Accumulated damage (failure at D ≥ 1.0)
- ni = Number of cycles at stress level i
- Ni = Cycles to failure at stress level i (from S-N curve)

Implementation Pattern

S-N Curve Database

from dataclasses import dataclass
from typing import Dict, List, Optional, Tuple
import numpy as np
import logging

logger = logging.getLogger(__name__)

@dataclass
class SNCurve:
    """S-N curve parameters."""
    name: str
    standard: str
    category: str
    log_a: float          # Intercept (log10 scale)
    m: float              # Slope
    log_a_2: Optional[float] = None  # Second slope intercept
    m_2: Optional[float] = None      # Second slope
    n_transition: float = 1e7        # Transition point
    fatigue_limit: Optional[float] = None  # Endurance limit
    t_ref: float = 25.0   # Reference thickness (mm)
    k: float = 0.0        # Thickness exponent
    environment: str = "air"  # air, seawater, cathodic

    def get_cycles_to_failure(
        self,
        stress_range: float,
        thickness: float = None
    ) -> float:
        """
        Calculate cycles to failure for given stress range.

        Args:
            stress_range: Stress range in MPa
            thickness: Actual thickness in mm (for thickness correction)

        Returns:
            Number of cycles to failure
        """
        # Apply thickness correction if needed
        if thickness and thickness > self.t_ref:
            stress_range = stress_range * (thickness / self.t_ref) ** self.k

        # Check fatigue limit
        if self.fatigue_limit and stress_range < self.fatigue_limit:
            return float('inf')

        # Single slope or bi-linear
        log_s = np.log10(stress_range)

        # Calculate N for first slope
        log_n = self.log_a - self.m * log_s

        # Check if bi-linear and past transition
        if self.log_a_2 and self.m_2:
            n_first = 10 ** log_n
            if n_first > self.n_transition:
                log_n = self.log_a_2 - self.m_2 * log_s

        return 10 ** log_n

class SNCurveDatabase:
    """Database of S-N curves from various standards."""

    def __init__(self):
        self.curves: Dict[str, SNCurve] = {}
        self._load_standard_curves()

    def _load_standard_curves(self):
        """Load standard S-N curves."""
        # DNV-RP-C203 curves (air)
        dnv_curves = [
            ("B1", 15.117, 4.0, 17.146, 5.0, "Base metal"),
            ("B2", 14.885, 4.0, 16.856, 5.0, "Base metal"),
            ("C", 13.640, 3.5, 16.081, 5.0, "Butt welds"),
            ("C1", 13.365, 3.5, 15.606, 5.0, "Butt welds"),
            ("C2", 13.091, 3.5, 15.132, 5.0, "Butt welds"),
            ("D", 12.592, 3.0, 15.606, 5.0, "Fillet welds"),
            ("E", 12.301, 3.0, 15.106, 5.0, "Fillet welds"),
            ("F", 12.049, 3.0, 14.656, 5.0, "Complex joints"),
            ("F1", 11.801, 3.0, 14.206, 5.0, "Complex joints"),
            ("F3", 11.546, 3.0, 13.756, 5.0, "Attachments"),
            ("G", 11.299, 3.0, 13.306, 5.0, "Attachments"),
            ("W1", 11.051, 3.0, 12.856, 5.0, "Tubular joints"),
            ("W2", 10.806, 3.0, 12.406, 5.0, "Tubular joints"),
            ("W3", 10.561, 3.0, 11.956, 5.0, "Tubular joints"),
            ("T", 12.164, 3.0, 15.606, 5.0, "Tubular T/Y"),
        ]

        for name, log_a, m, log_a_2, m_2, category in dnv_curves:
            curve_id = f"DNV_{name}"
            self.curves[curve_id] = SNCurve(
                name=name,
                standard="DNV-RP-C203",
                category=category,
                log_a=log_a,
                m=m,
                log_a_2=log_a_2,
                m_2=m_2,
                n_transition=1e7,
                t_ref=25.0,
                k=0.25,
                environment="air"
            )

        # API RP 2A curves
        api_curves = [
            ("X", 11.08, 3.74, "Tubular joints"),
            ("X'", 10.78, 3.74, "Weld root"),
        ]

        for name, log_a, m, category in api_curves:
            curve_id = f"API_{name}"
            self.curves[curve_id] = SNCurve(
                name=name,
                standard="API RP 2A",
                category=category,
                log_a=log_a,
                m=m,
                environment="air"
            )

    def get_curve(self, curve_id: str) -> SNCurve:
        """Get S-N curve by ID."""
        if curve_id not in self.curves:
            available = ', '.join(self.curves.keys())
            raise ValueError(f"Unknown curve: {curve_id}. Available: {available}")
        return self.curves[curve_id]

    def list_curves(self, standard: str = None) -> List[str]:
        """List available curve IDs, optionally filtered by standard."""
        if standard:
            return [k for k, v in self.curves.items() if v.standard == standard]
        return list(self.curves.keys())

    def get_by_category(self, category: str) -> List[SNCurve]:
        """Get curves matching a joint category."""
        return [v for v in self.curves.values() if category.lower() in v.category.lower()]

Fatigue Calculator

@dataclass
class StressBlock:
    """Stress range block for fatigue analysis."""
    stress_range: float  # MPa
    cycles: int          # Number of cycles

@dataclass
class FatigueResult:
    """Results of fatigue analysis."""
    total_damage: float
    fatigue_life_years: float
    design_life_years: float
    utilization: float
    damage_by_block: List[float]
    curve_used: str
    passes: bool

    def summary(self) -> str:
        """Generate summary string."""
        status = "PASS" if self.passes else "FAIL"
        return (
            f"Fatigue Analysis Result: {status}\n"
            f"  S-N Curve: {self.curve_used}\n"
            f"  Total Damage: {self.total_damage:.4f}\n"
            f"  Fatigue Life: {self.fatigue_life_years:.1f} years\n"
            f"  Design Life: {self.design_life_years:.1f} years\n"
            f"  Utilization: {self.utilization:.1%}"
        )

class FatigueCalculator:
    """Perform fatigue damage calculations."""

    def __init__(self, sn_database: SNCurveDatabase = None):
        self.db = sn_database or SNCurveDatabase()

    def calculate_damage(
        self,
        curve_id: str,
        stress_blocks: List[StressBlock],
        design_life_years: float = 25.0,
        scf: float = 1.0,
        thickness: float = None,
        dff: float = 1.0
    ) -> FatigueResult:
        """
        Calculate cumulative fatigue damage.

        Args:
            curve_id: S-N curve identifier
            stress_blocks: List of stress range blocks
            design_life_years: Design fatigue life
            scf: Stress concentration factor
            thickness: Actual thickness for thickness correction
            dff: Design fatigue factor (safety factor)

        Returns:
            FatigueResult with damage and life calculations
        """
        curve = self.db.get_curve(curve_id)

        total_damage = 0.0
        damage_by_block = []

        for block in stress_blocks:
            # Apply SCF
            effective_stress = block.stress_range * scf

            # Get cycles to failure
            n_failure = curve.get_cycles_to_failure(effective_stress, thickness)

            # Calculate damage for this block
            if n_failure == float('inf'):
                block_damage = 0.0
            else:
                block_damage = block.cycles / n_failure

            damage_by_block.append(block_damage)
            total_damage += block_damage

        # Apply design fatigue factor
        total_damage *= dff

        # Calculate life
        if total_damage > 0:
            fatigue_life_years = design_life_years / total_damage
        else:
            fatigue_life_years = float('inf')

        utilization = total_damage

        return FatigueResult(
            total_damage=total_damage,
            fatigue_life_years=fatigue_life_years,
            design_life_years=design_life_years,
            utilization=utilization,
            damage_by_block=damage_by_block,
            curve_used=curve_id,
            passes=total_damage <= 1.0
        )

    def compare_standards(
        self,
        curve_ids: List[str],
        stress_blocks: List[StressBlock],
        design_life_years: float = 25.0,
        scf: float = 1.0
    ) -> Dict[str, FatigueResult]:
        """Compare fatigue damage across different S-N curves."""
        results = {}
        for curve_id in curve_ids:
            try:
                results[curve_id] = self.calculate_damage(
                    curve_id=curve_id,
                    stress_blocks=stress_blocks,
                    design_life_years=design_life_years,
                    scf=scf
                )
            except ValueError as e:
                logger.warning(f"Skipping {curve_id}: {e}")
        return results

Stress Spectrum Generator

def generate_weibull_spectrum(
    n_blocks: int = 20,
    max_stress: float = 100.0,
    shape: float = 1.0,
    total_cycles: int = 1e7
) -> List[StressBlock]:
    """
    Generate stress spectrum using Weibull distribution.

    Args:
        n_blocks: Number of stress blocks
        max_stress: Maximum stress range (MPa)
        shape: Weibull shape parameter
        total_cycles: Total number of cycles

    Returns:
        List of StressBlock objects
    """
    blocks = []

    # Generate stress levels (evenly spaced)
    stress_levels = np.linspace(max_stress, max_stress * 0.1, n_blocks)

    # Calculate probability for each level (Weibull)
    scale = max_stress / (-np.log(1 - 0.632)) ** (1/shape)
    probabilities = np.exp(-(stress_levels / scale) ** shape)

    # Normalize to get cycle distribution
    prob_diff = np.diff(np.concatenate([[0], probabilities, [1]]))
    cycles_per_block = (prob_diff[:-1] * total_cycles).astype(int)

    for stress, cycles in zip(stress_levels, cycles_per_block):
        if cycles > 0:
            blocks.append(StressBlock(stress_range=stress, cycles=cycles))

    return blocks

def generate_rainflow_spectrum(
    time_history: np.ndarray,
    bin_edges: np.ndarray = None
) -> List[StressBlock]:
    """
    Generate stress spectrum from time history using rainflow counting.

    Args:
        time_history: Array of stress values over time
        bin_edges: Edges for binning stress ranges

    Returns:
        List of StressBlock objects
    """
    # Simple rainflow implementation
    # For production, use fatpack or similar library

    if bin_edges is None:
        max_range = np.ptp(time_history)
        bin_edges = np.linspace(0, max_range, 21)

    # Identify reversals (peaks and valleys)
    reversals = []
    for i in range(1, len(time_history) - 1):
        if ((time_history[i] > time_history[i-1] and
             time_history[i] > time_history[i+1]) or
            (time_history[i] < time_history[i-1] and
             time_history[i] < time_history[i+1])):
            reversals.append(time_history[i])

    # Count ranges (simplified 4-point algorithm)
    ranges = []
    i = 0
    while i < len(reversals) - 3:
        s1 = abs(reversals[i+1] - reversals[i])
        s2 = abs(reversals[i+2] - reversals[i+1])
        s3 = abs(reversals[i+3] - reversals[i+2])

        if s2 <= s1 and s2 <= s3:
            ranges.append(s2)
            del reversals[i+1:i+3]
        else:
            i += 1

    # Bin the ranges
    counts, _ = np.histogram(ranges, bins=bin_edges)
    bin_centers = (bin_edges[:-1] + bin_edges[1:]) / 2

    blocks = []
    for stress, cycles in zip(bin_centers, counts):
        if cycles > 0:
            blocks.append(StressBlock(stress_range=stress, cycles=int(cycles)))

    return blocks

YAML Configuration

# config/fatigue_analysis.yaml

analysis:
  name: "Riser Girth Weld Fatigue"
  design_life_years: 25
  design_fatigue_factor: 3.0

joint:
  type: "girth_weld"
  sn_curve: "DNV_D"
  thickness_mm: 32.0
  scf: 1.25
  environment: "seawater_cp"

stress_spectrum:
  type: "weibull"
  max_stress_mpa: 150.0
  shape_parameter: 1.0
  total_cycles: 1.0e8

# Alternative: direct blocks
# stress_blocks:
#   - stress_range: 150.0
#     cycles: 1000
#   - stress_range: 100.0
#     cycles: 10000
#   - stress_range: 50.0
#     cycles: 100000

output:
  report_path: "reports/fatigue_analysis.html"
  include_comparison: true
  comparison_curves:
    - "DNV_D"
    - "DNV_E"
    - "API_X"

Usage Examples

Basic Analysis

from fatigue_analysis import FatigueCalculator, StressBlock

calc = FatigueCalculator()

# Define stress spectrum
blocks = [
    StressBlock(stress_range=150.0, cycles=1000),
    StressBlock(stress_range=100.0, cycles=10000),
    StressBlock(stress_range=75.0, cycles=50000),
    StressBlock(stress_range=50.0, cycles=200000),
    StressBlock(stress_range=25.0, cycles=1000000),
]

# Calculate fatigue damage
result = calc.calculate_damage(
    curve_id="DNV_D",
    stress_blocks=blocks,
    design_life_years=25,
    scf=1.2,
    dff=3.0
)

print(result.summary())

Compare Standards

calc = FatigueCalculator()

# Compare across standards
results = calc.compare_standards(
    curve_ids=["DNV_D", "DNV_E", "API_X"],
    stress_blocks=blocks,
    design_life_years=25,
    scf=1.2
)

for curve_id, result in results.items():
    print(f"{curve_id}: Damage = {result.total_damage:.4f}")

Generate Report

from fatigue_analysis import FatigueCalculator
from engineering_report_generator import generate_report
import pandas as pd

# Run analysis
calc = FatigueCalculator()
result = calc.calculate_damage(...)

# Create data for visualization
df = pd.DataFrame({
    'Block': range(1, len(blocks) + 1),
    'Stress Range': [b.stress_range for b in blocks],
    'Cycles': [b.cycles for b in blocks],
    'Damage': result.damage_by_block
})

# Generate report
generate_report(
    df=df,
    output_path='reports/fatigue_report.html',
    title='Fatigue Analysis Report',
    sections={
        'summary': f'Total Damage: {result.total_damage:.4f}',
        'charts': [
            {'type': 'bar', 'x': 'Block', 'y': 'Damage', 'title': 'Damage by Block'},
            {'type': 'scatter', 'x': 'Stress Range', 'y': 'Cycles', 'title': 'S-N Spectrum'}
        ]
    }
)

Best Practices

S-N Curve Selection

  • Select curves based on joint type and fabrication quality
  • Consider environment (air, seawater, cathodic protection)
  • Apply appropriate thickness corrections
  • Use design curves (mean minus 2 standard deviations)

Stress Analysis

  • Include all stress concentration effects
  • Consider mean stress correction if needed
  • Account for multiaxial stresses
  • Include weld misalignment effects

Safety Factors

  • DNV recommends DFF of 1.0 to 10.0 depending on consequence
  • API uses single safety factor approach
  • Consider inspection accessibility
  • Account for consequences of failure

Reporting

  • Document S-N curve selection rationale
  • Include stress spectrum derivation
  • Show damage distribution
  • Compare with alternative standards

Related Skills

平台分布

Claude Code

25.41%
按下载量换算39

windsurf

23.84%
按下载量换算37

trae

18.42%
按下载量换算29

OpenCode

11.26%
按下载量换算17

Cursor

6.8%
按下载量换算11

Codex

3.35%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills