Quick Start Guide
Get up and running with Neuber correction in under 5 minutes.
Basic Usage
1. Import and Setup
from neuber_correction import NeuberCorrection, MaterialForNeuberCorrection
# Define your material properties
material = MaterialForNeuberCorrection(
yield_strength=240, # MPa
sigma_u=290, # MPa
elastic_mod=68900, # MPa (69 GPa)
eps_u=0.10 # 10%
)
neuber = NeuberCorrection(material)
2. Single Stress Correction
# Your elastic stress from FEA or hand calc
elastic_stress = 500 # MPa
# Get the corrected stress
corrected_stress = neuber.correct_stress_values([elastic_stress])[0]
print(f"Elastic: {elastic_stress} MPa")
print(f"Corrected: {corrected_stress:.1f} MPa")
print(f"Reduction: {elastic_stress - corrected_stress:.1f} MPa")
3. Multiple Stress Values
# Process a range of stresses
stress_values = [400, 600, 800, 1000] # MPa
corrected_values = neuber.correct_stress_values(stress_values)
for elastic, corrected in zip(stress_values, corrected_values):
print(f"{elastic:4.0f} MPa → {corrected:6.1f} MPa")
Visual Analysis
Plot the Neuber Diagram
# Create a visualization
neuber.plot_neuber_diagram(elastic_stress=600)
This shows you:
- Hooke's law line (green) - Linear elastic behavior
- Ramberg-Osgood curve (blue) - Actual material behavior
- Neuber hyperbola (red dashed) - Neuber's rule
- Intersection point - Your corrected stress/strain
- Value annotations - Exact numbers at the intersection
- Yield strength line (orange dotted) - Material yield point
- Color-coded markers - Orange for below yield, magenta for above yield
Example Plot
Here's how the Neuber correction works for Aluminum 6061-T6 with an elastic stress of 300 MPa:

The intersection point between the Neuber hyperbola and the Ramberg-Osgood curve gives the corrected stress and strain values.
Important: The intersection is calculated regardless of yield strength for numerical stability. When the corrected stress falls below yield (orange marker), it indicates overcorrection, which is acceptable for analyzing FEA results that may span both elastic and plastic regions.
Advanced Options
Custom Convergence Settings
from neuber_correction import NeuberSolverSettings
# Create custom solver settings
settings = NeuberSolverSettings(
tolerance=1e-8, # More precise convergence
max_iterations=1000 # Limit iterations
)
material = MaterialForNeuberCorrection(
yield_strength=315,
sigma_u=470,
elastic_mod=210000,
eps_u=0.12
)
neuber = NeuberCorrection(material, settings)
Silent Plotting (for scripts)
# Don't show the plot, just get the figure object
fig, ax = neuber.plot_neuber_diagram(600, show_plot=False)
# Do something with fig/ax, then close
plt.close(fig)
Save Plots to File
# Save the plot directly to a file
neuber.plot_neuber_diagram(
elastic_stress=600,
plot_file="neuber_diagram.png",
plot_pretty_name="Aluminum 6061-T6"
)
Performance Features
Caching and Memoization
The library automatically caches results for repeated calculations:
# First calculation - computes everything
result1 = neuber.correct_stress_values([500])[0]
# Second calculation - uses cached result (much faster)
result2 = neuber.correct_stress_values([500])[0]
# Clear cache if needed
NeuberCorrection.clear_all_instances()
Instance Reuse
Identical material and settings create the same instance:
# These create the same instance (shared cache)
material1 = MaterialForNeuberCorrection(240, 290, 68900, 0.10)
material2 = MaterialForNeuberCorrection(240, 290, 68900, 0.10)
neuber1 = NeuberCorrection(material1)
neuber2 = NeuberCorrection(material2)
# neuber1 and neuber2 are the same object
print(neuber1 is neuber2) # True
Limitations
Important: This tool is designed for monotonic loading conditions only. It assumes proportional loading and requires accurate material properties. The continuous solution approach may overcorrect stresses around/below yield strength for numerical stability.