Skip to main content

Neuber correction for fatigue life prediction

Project description

Neuber Correction 💥

PyPI version Documentation

A Python tool that corrects elastic FEA results for plastic yielding using Neuber's rule. No more manual iterations or Excel spreadsheets - just plug in your material properties and get accurate stress corrections.

🚀 Quick Start

from neuber_correction import NeuberCorrection, MaterialForNeuberCorrection

# Set up your material (Aluminum 6061-T6 example)
material = MaterialForNeuberCorrection(
    yield_strength=240,      # MPa
    sigma_u=290,    # MPa  
    elastic_mod=68900, # MPa (69 GPa)
    eps_u=0.10     # 10%
)

neuber = NeuberCorrection(material)

# Get your corrected stress
elastic_stress = 500  # MPa
corrected_stress = neuber.correct_stress_values([elastic_stress])[0]
print(f"Elastic: {elastic_stress} MPa → Corrected: {corrected_stress:.1f} MPa")
# Output: Elastic: 500 MPa → Corrected: 260.0 MPa

📖 What's the Deal?

When your elastic FEA gives you stresses above the yield strength, those values are unrealistic because they don't account for plastic yielding. Neuber correction fixes that by finding the intersection between the Neuber hyperbola and your material's actual stress-strain curve.

Example: Aluminum 6061-T6 with 500 MPa elastic stress → 260 MPa corrected stress (48% reduction!)

✨ What You Get

Accurate stress corrections - No more overestimating elastic stresses
Material-specific calculations - Uses Ramberg-Osgood model
Visual analysis - Plot the curves and see what's happening
Batch processing - Handle multiple stress values at once
Robust convergence - Newton-Raphson with fallback methods
Performance optimized - Caching and memoization for repeated calculations

🎯 Perfect For

  • FEA result correction when stresses exceed yield
  • Fatigue analysis with plastic yielding
  • Material testing data analysis
  • Design validation and optimization

📦 Installation

pip install neuber-correction

Or if you're using uv (recommended):

uv add neuber-correction

🔧 Usage Examples

Basic Stress Correction

from neuber_correction import NeuberCorrection, MaterialForNeuberCorrection

# Steel S355
material = MaterialForNeuberCorrection(
    yield_strength=315,
    sigma_u=470,
    elastic_mod=210000,
    eps_u=0.12
)

neuber = NeuberCorrection(material)

# Correct your FEA results
elastic_stresses = [400, 500, 600]  # MPa
corrected_stresses = neuber.correct_stress_values(elastic_stresses)

Visual Analysis

# Create a plot showing the correction
fig, ax = neuber.plot_neuber_diagram(500, show_plot=True)

Advanced Settings

from neuber_correction import NeuberSolverSettings

# Custom convergence settings
settings = NeuberSolverSettings(
    tolerance=1e-8,        # More precise
    max_iterations=1000    # More iterations
)

neuber = NeuberCorrection(material, settings)

Performance Features

# Automatic caching for repeated calculations
result1 = neuber.correct_stress_values([500])[0]  # Computes
result2 = neuber.correct_stress_values([500])[0]  # Uses cache (fast!)

# Clear cache if needed
NeuberCorrection.clear_all_instances()

📚 Documentation

📖 Full Documentation

🔬 Theory

Neuber's rule states that the product of stress and strain remains constant:

$$\sigma \cdot \varepsilon = \frac{\sigma_e^2}{E}$$

Where:

  • $\sigma$ = actual (corrected) stress
  • $\varepsilon$ = actual strain
  • $\sigma_e$ = elastic stress (from FEA)
  • $E$ = Young's modulus

The tool finds the intersection between the Neuber hyperbola and the Ramberg-Osgood material curve to determine the corrected stress.

🛠️ Development

Setup

git clone https://github.com/manuel1618/neuber-correction.git
cd neuber-correction
uv sync

Testing

uv run pytest

Linting

uv run task lint

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📖 Sources

This tool is based on Neuber's rule for stress concentration analysis


Made with ❤️ for engineers who need accurate stress analysis

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neuber_correction-0.1.19a0.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neuber_correction-0.1.19a0-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file neuber_correction-0.1.19a0.tar.gz.

File metadata

  • Download URL: neuber_correction-0.1.19a0.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for neuber_correction-0.1.19a0.tar.gz
Algorithm Hash digest
SHA256 8d01f99c43f5e32e0ee3913f46a69ca60967c72db3c6606341afbe27b924e524
MD5 2ef3e337bf31e62b3985ad56413f9b89
BLAKE2b-256 223fa0df804af0cb62ff8d91dd79bdf472cdf0491560834f52f57c224be6bf04

See more details on using hashes here.

File details

Details for the file neuber_correction-0.1.19a0-py3-none-any.whl.

File metadata

File hashes

Hashes for neuber_correction-0.1.19a0-py3-none-any.whl
Algorithm Hash digest
SHA256 34a74ec087bc1537db90fd2ccc8d5cce89f14c13550d9997f8940c110233d4d3
MD5 be8523c7843a5aafcdde4aa706eef2f6
BLAKE2b-256 f5da29c8a59b22963b8a9e82962f6e486cc33a302d9ba08ed74eacd2b13458a0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page