Leveraging Physics-Informed Neural Networks for predicting stress, strain, and thickness in Incremental Sheet Forming (ISF) processes
- What is PINN?
- About This Project
- Project Structure
- Key Features
- Datasets
- Models & Methodology
- Installation
- Usage
- Results & Visualizations
- Research References
- Contributing
Physics-Informed Neural Networks (PINNs) are a revolutionary class of deep learning models that integrate physical laws and domain knowledge directly into the neural network architecture. Unlike traditional neural networks that rely solely on data, PINNs incorporate:
- Governing Equations: Physical laws (e.g., stress equilibrium, conservation laws)
- Boundary Conditions: Physical constraints at domain boundaries
- Initial Conditions: Starting states of the system
- Data: Experimental or simulation data
✅ Reduced Data Requirements: Leverage physics to learn from less data
✅ Physical Consistency: Predictions always satisfy governing equations
✅ Better Generalization: Physics constraints improve extrapolation
✅ Interpretability: Results are physically meaningful
PINNs minimize a composite loss function:
L_total = L_data + λ₁·L_physics + λ₂·L_boundary
Where:
- L_data: Mean squared error on training data
- L_physics: Residual of governing PDEs
- L_boundary: Boundary condition violations
- λ₁, λ₂: Weighting hyperparameters
This project applies Physics-Informed Neural Networks to the field of metal forming, specifically focusing on Incremental Sheet Forming (ISF) processes. ISF is an advanced manufacturing technique used to create complex 3D shapes from metal sheets without expensive dies.
In ISF, predicting the stress distribution, plastic strain (PEEQ), and sheet thickness is critical for:
- Preventing material failure
- Optimizing tool paths
- Ensuring product quality
- Reducing manufacturing costs
Traditional finite element analysis (FEA) is computationally expensive. This project demonstrates how PINNs can provide fast, accurate predictions while respecting the underlying physics.
🔹 Multi-Physics Modeling: Combines stress equilibrium, plasticity theory, and friction models
🔹 Membrane Theory Integration: Implements thin-shell mechanics equations
🔹 Real Manufacturing Data: Uses FEA simulation data from ABAQUS
🔹 Hybrid Approach: Both PyTorch and TensorFlow implementations
🔹 3D Visualization: Interactive stress and strain field visualizations
PINN-main/
│
├── 📊 Data Files
│ ├── T10_Truncated Cone ISH70H30 SD0.5WA45 Amplitude0.05.xlsx # Experimental/FEA data
│ ├── Plastic.txt # Plastic stress-strain curve
│ └── *.csv files # Processed datasets
│
├── 📓 Notebooks
│ ├── Model_revised.IPYNB # Main PINN model implementation
│ ├── StressProfile.ipynb # Stress field analysis
│ ├── Copy of PINN_Data_Analysis.ipynb # Data preprocessing & EDA
│ └── ODB_File_Reader.py # ABAQUS ODB file reader
│
├── 🖼️ Visualizations
│ ├── Correlation_matrix.jpeg # Feature correlation heatmap
│ ├── Plot1.jpeg # Stress profiles
│ ├── Plot2.jpeg # Strain distributions
│ └── Score.jpeg # Model performance metrics
│
├── 💾 Saved Models
│ └── pinn_model.keras # Trained PINN model
│
├── 📚 References
│ ├── Physics informed neural networks for continuum micromechanics.pdf
│ └── Plasticity Pinn.pdf
│
└── 📄 README.md # This file
- Deep feedforward networks with 3-4 hidden layers
- Hyperbolic tangent (Tanh) activation functions for smooth derivatives
- Custom loss functions incorporating physics residuals
The PINN enforces:
∂σφ/∂r + (σφ - σθ)/r + μφ·σt/(t·sin(α)) = 0
σ_yield = √(σφ² + σθ² - σφ·σθ)
Where:
- σφ, σθ, σt: Meridional, circumferential, and thickness stresses
- μ: Friction coefficient
- α: Wall angle
- t: Sheet thickness
The model predicts stress/strain fields as functions of:
- Tool diameter (6-12 mm)
- Wall angle (45°-70°)
- Initial thickness (1.0-2.0 mm)
- Spatial coordinates (X, Y, Z)
- Automated ODB (ABAQUS output database) reader
- Feature scaling and normalization
- Train/validation/test splitting
- Correlation analysis
| Parameter | Description | Range/Unit |
|---|---|---|
ToolDia |
Tool diameter | 6-12 mm |
WallAngle |
Forming angle | 45-70° |
InitThickness |
Initial sheet thickness | 1.0-2.0 mm |
CentroidX, Y, Z |
Element centroid coordinates | mm |
| Variable | Description | Unit |
|---|---|---|
S11, S22, S33 |
Principal stresses | MPa |
S12, S13, S23 |
Shear stresses | MPa |
PEEQ |
Equivalent plastic strain | - |
STH |
Current thickness | mm |
- Primary: ABAQUS FEA simulations
- Format: CSV extracted from ODB files
- Size: ~690,000 data points across 69 different parameter combinations
class StressPINN(nn.Module):
def __init__(self, layers):
super(StressPINN, self).__init__()
self.layers = nn.ModuleList()
for i in range(len(layers) - 2):
self.layers.append(nn.Linear(layers[i], layers[i+1]))
self.layers.append(nn.Tanh())
self.out = nn.Linear(layers[-2], layers[-1])
def forward(self, z):
x = z
for layer in self.layers:
x = layer(x)
out = self.out(x)
return out[:, 0:1], out[:, 1:2], out[:, 2:3] # σ_t, σ_φ, σ_θNetwork Configuration:
- Input: Forming depth (z)
- Layers: [1, 20, 20, 3]
- Outputs: σ_t, σ_φ, σ_θ
- Optimizer: Adam (lr=1e-3)
- Training: 5000 epochs
model = Sequential([
Dense(64, activation='relu', input_dim=n_features),
Dense(128, activation='relu'),
Dense(64, activation='relu'),
Dense(n_outputs, activation='linear')
])def membrane_residuals(model, z, t_data):
z.requires_grad_(True)
σ_t, σ_φ, σ_θ = model(z)
# Compute derivatives
dσ_φ_dz = autograd.grad(σ_φ, z, ...)[0]
# Equilibrium residuals
R1 = σ_t/t + σ_φ/r1 + σ_θ/r2
R2 = dσ_φ_dr + (σ_φ - σ_θ)/r + μ_φ·σ_t/(t·sin_α)
R3 = dσ_θ_dz/sin_α + μ_θ·σ_t
# Yield criterion
σ_vm = sqrt(σ_φ² + σ_θ² - σ_φ·σ_θ)
R_yield = max(σ_yield - σ_vm, 0)
return R1, R2, R3, R_yield- Python 3.8 or higher
- CUDA-capable GPU (optional, for faster training)
git clone <repository-url>
cd PINN-main# Using conda
conda create -n pinn python=3.8
conda activate pinn
# Or using venv
python -m venv pinn_env
source pinn_env/bin/activate # On Windows: pinn_env\Scripts\activatepip install numpy pandas matplotlib seaborn
pip install scikit-learn scipy
pip install tensorflow>=2.8.0 # For TensorFlow implementation
pip install torch torchvision # For PyTorch implementation
pip install openpyxl # For Excel file readingFor ODB file reading (requires ABAQUS installation):
# Use ABAQUS Python environment
abaqus python ODB_File_Reader.pyimport pandas as pd
from sklearn.preprocessing import StandardScaler
# Load data
df = pd.read_csv('your_data.csv')
# Feature engineering
X = df[['ToolDia', 'WallAngle', 'InitThickness', 'CentroidX', 'CentroidY', 'CentroidZ']]
y = df[['S11', 'S22', 'S33', 'PEEQ', 'STH']]
# Scaling
scaler_X = StandardScaler()
scaler_y = StandardScaler()
X_scaled = scaler_X.fit_transform(X)
y_scaled = scaler_y.fit_transform(y)import torch
from model import StressPINN
# Initialize model
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
model = StressPINN([1, 20, 20, 3]).to(device)
optimizer = torch.optim.Adam(model.parameters(), lr=1e-3)
# Training loop
for epoch in range(epochs):
optimizer.zero_grad()
loss = pinn_loss(model, z_data, t_data)
loss.backward()
optimizer.step()
if epoch % 500 == 0:
print(f"Epoch {epoch}: Loss = {loss.item():.6e}")# Load trained model
model = torch.load('pinn_model.pth')
model.eval()
# Predict stress field
with torch.no_grad():
σ_t, σ_φ, σ_θ = model(z_test)
# Visualize
import matplotlib.pyplot as plt
plt.plot(z_test.cpu(), σ_φ.cpu(), label='σ_φ (Meridional)')
plt.plot(z_test.cpu(), σ_θ.cpu(), label='σ_θ (Circumferential)')
plt.xlabel('Forming Depth (mm)')
plt.ylabel('Stress (MPa)')
plt.legend()
plt.show()# Run with ABAQUS Python
abaqus python ODB_File_Reader.pyThis will extract:
- Element centroid coordinates
- Stress components (S11, S22, S33, S12, S13, S23)
- Plastic strain (PEEQ)
- Thickness (STH)
- Nodal displacements (U1, U2, U3)
| Metric | Value |
|---|---|
| Training R² Score | 0.95+ |
| Validation MSE | < 50 MPa² |
| Physics Residual | < 1e-4 |
- Shows predicted σ_φ, σ_θ, σ_t vs. forming depth
- Captures stress evolution during forming
- Reveals relationships between input parameters and outputs
- Guides feature selection
- Plastic strain accumulation
- Critical for failure prediction
| Method | Computation Time | Accuracy |
|---|---|---|
| ABAQUS FEA | ~2 hours | Baseline |
| PINN (trained) | ~10 seconds | 95%+ of FEA |
Speedup: ~720x faster!
This project is inspired by cutting-edge research in:
-
Physics-Informed Neural Networks
- Raissi et al. (2019) - "Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations"
-
Metal Forming Applications
- Included PDFs:
Physics informed neural networks for continuum micromechanics.pdfPlasticity Pinn.pdf
- Included PDFs:
-
Incremental Sheet Forming
- Membrane theory for thin shells
- Stress equilibrium in axisymmetric forming
σ_vm = √(0.5·[(σ₁₁-σ₂₂)² + (σ₂₂-σ₃₃)² + (σ₃₃-σ₁₁)²] + 3·[σ₁₂² + σ₂₃² + σ₁₃²])
r = z / sin(α)
R₁ = σ_t/t + σ_φ/r₁ + σ_θ/r₂
R₂ = ∂σ_φ/∂r + (σ_φ - σ_θ)/r + μ_φ·σ_t/(t·sin(α))
Where:
- α = Wall angle
- r₁, r₂ = Radii of curvature
- μ_φ, μ_θ = Friction coefficients


