GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com β€” GitHub - Sasmxtha/beam-elasticity-pinn: Solving 1D beam, 2D plate, and 3D solid mechanics problems using Physics-Informed Neural Networks (PINNs) with DeepXDE and TensorFlow. Results validated against ANSYS Mechanical 2025 R1. 2nd sem project

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
results
results
 
 
.gitignore
.gitignore
 
 
1d_beam.py
1d_beam.py
 
 
2d_plate.py
2d_plate.py
 
 
README.md
README.md
 
 
comparison_notes.md
comparison_notes.md
 
 
requirements.txt
requirements.txt
 
 
simulation.py
simulation.py
 
 

Repository files navigation

PINN for Solid Mechanics

Amrita Logo

Amrita Vishwa Vidyapeetham
Physics-Informed Neural Networks for Structural Mechanics
2nd Semester Group Project β€” GROUP 17


πŸ“š Courses

Course Code
Introduction to Materials Informatics 23CHY115
Computational Mechanics 2 23PHY114
Mathematics for Intelligent Systems 2 23MAT112

πŸ“Œ Problem Statement

This project explores the use of Physics-Informed Neural Networks (PINNs) to model how a mechanical structure β€” like a beam or a plate β€” deforms under a known load. By embedding the physics of the problem directly into the neural network, we predict displacement across the structure without relying on a traditional mesh.

To ensure accuracy, we compare predictions with ANSYS Mechanical 2025 R1 (a well-established FEM tool). This approach blends machine learning with classical physics for faster, mesh-free structural analysis.


πŸ”„ Methodology

DEFINE PROBLEM          SET INITIAL &         DESIGN NEURAL        TRAIN THE PINN
DOMAIN & GEOMETRY  β†’   BOUNDARY          β†’   NETWORK          β†’   USING OPTIMIZER
                        CONDITIONS            ARCHITECTURE
                                                                        ↓
VALIDATE                OBTAIN                ANALYSIS &           RUN SIMULATION
PREDICTIONS        ←   SOLUTION          ←   VISUALIZATION    ←   IN ANSYS
WITH ANSYS RESULT

πŸ“ Case Studies

Case 1 β€” 1D Aluminum Beam (Euler-Bernoulli)

Governing Equation:

$$EI \cdot \frac{d^4w(x)}{dx^4} = q(x), \quad q(x) = \frac{q_0}{\sigma\sqrt{2\pi}} \exp\left(-\frac{(x-L/2)^2}{2\sigma^2}\right)$$

Where w(x) = transverse deflection, E = Young's Modulus (70 GPa for aluminum), I = bhΒ³/12 = moment of inertia.

Beam Setup:

Parameter Value
Length L 1.0 m
Width b 0.02 m
Thickness h 0.005 m
Material Aluminum (E = 70 GPa)
Support Fixed-Fixed
Load Central point load (Gaussian approximation)

ANSYS Result:

1D ANSYS Directional Deformation (Y Axis)

PINN Results:

1D PINN Deflection Curve 1D PINN vs ANSYS Comparison

1D Loss History


Case 2 β€” 2D Aluminum Plate (Kirchhoff Plate Theory)

Governing Equation:

$$D\left(\frac{\partial^4 w}{\partial x^4} + 2\frac{\partial^4 w}{\partial x^2 \partial y^2} + \frac{\partial^4 w}{\partial y^4}\right) = q(x,y), \quad D = \frac{Et^3}{12(1-\nu^2)}$$

Where w(x,y) = transverse deflection, D = flexural rigidity, Ξ½ = Poisson's ratio.

Plate Setup:

Parameter Value
Length L 1.0 m
Width b 1.0 m
Thickness t 0.005 m
Material Aluminum
Support Fixed at all edges
Load Central point load (Gaussian)

ANSYS Result:

2D ANSYS Directional Deformation (Z Axis)

PINN Results:

2D PINN Deflection Heatmap 2D PINN vs ANSYS Validation

Validation Metrics:

Metric Value
Validation MSE 4.09e-08
Validation RΒ² Score 0.94691

Case 3 β€” 3D Elastic Beam (Navier–Cauchy Equations)

Governing Equation:

$$\mu \nabla^2 \mathbf{u} + (\lambda + \mu)\nabla(\nabla \cdot \mathbf{u}) + \mathbf{f} = 0$$

With sinusoidal transverse body force: $f_z = F_0 \sin\left(\frac{\pi x}{L}\right)$

Beam Setup:

Parameter Symbol Value
Length L 1.0 m
Width W 0.2 m
Height H 0.2 m
First LamΓ© constant Ξ» 1.0 Pa
Shear modulus ΞΌ 1.0 Pa
Force amplitude Fβ‚€ 1.0 N/mΒ³
Support β€” Fixed at x=0 and x=L

PINN Results:

3D Displacement Field (Quiver) 3D XY Plane Slice


🧠 Neural Network Architecture

Input  β†’  [x] or [x, y] or [x, y, z]    (1–3 neurons)
          ↓
Hidden β†’  4 Γ— 32 neurons  (tanh activation, Glorot normal init)
          ↓
Output β†’  w(x) or w(x,y) or [u, v, w]
Case Input Output Optimizer Epochs
1D Beam x w Adam + L-BFGS-B 8000+
2D Plate x, y w Adam + L-BFGS-B 8000+
3D Beam x, y, z u, v, w Adam 10,000

πŸ“ Repository Structure

beam-elasticity-pinn/
β”‚
β”œβ”€β”€ 1d_beam/
β”‚   └── simulation_1d.py          # 1D Euler-Bernoulli PINN
β”‚
β”œβ”€β”€ 2d_plate/
β”‚   └── simulation_2d.py          # 2D Kirchhoff plate PINN
β”‚
β”œβ”€β”€ 3d_beam/
β”‚   └── simulation_3d.py          # 3D Navier-Cauchy PINN
β”‚
β”œβ”€β”€ results/                       # Generated PINN output plots
β”‚   β”œβ”€β”€ 1d_pinn_deflection.png
β”‚   β”œβ”€β”€ 1d_pinn_vs_ansys.png
β”‚   β”œβ”€β”€ 1d_loss_history.png
β”‚   β”œβ”€β”€ 2d_pinn_deflection.png
β”‚   β”œβ”€β”€ 2d_pinn_vs_ansys.png
β”‚   β”œβ”€β”€ 3d_displacement_3d.png
β”‚   └── 3d_displacement_xy.png
β”‚
β”œβ”€β”€ ansys/                         # ANSYS validation screenshots
β”‚   β”œβ”€β”€ 1d_ansys_deformation.png
β”‚   β”œβ”€β”€ 2d_ansys_deformation.png
β”‚   └── comparison_notes.md
β”‚
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ .gitignore
└── README.md

πŸš€ Getting Started

1. Clone the Repository

git clone https://github.com/sasmxtha/beam-elasticity-pinn.git
cd beam-elasticity-pinn

2. Create and Activate Virtual Environment

python -m venv venv
source venv/bin/activate        # Linux / macOS
venv\Scripts\activate           # Windows

3. Install Dependencies

pip install -r requirements.txt

4. Run Each Case

# Case 1 β€” 1D Aluminum Beam
python 1d_beam/simulation_1d.py

# Case 2 β€” 2D Aluminum Plate
python 2d_plate/simulation_2d.py

# Case 3 β€” 3D Elastic Beam
python 3d_beam/simulation_3d.py

βœ… GPU is automatically detected and used if available via TensorFlow.


πŸ“Š Key Results Summary

Case PINN Max Deflection ANSYS Max Deflection RΒ² Score
1D Beam ~βˆ’0.035 m βˆ’0.034985 m ~0.99
2D Plate βˆ’0.01727 m 0.0026818 m (Z-dir) 0.947
3D Beam Full field (u,v,w) β€” β€”

πŸ“š References

  1. Raissi, M., Perdikaris, P., & Karniadakis, G. E. (2019). Physics-informed neural networks. Journal of Computational Physics, 378, 686–707.
  2. Lu, L., et al. (2021). DeepXDE: A deep learning library for solving differential equations. SIAM Review, 63(1), 208–228.
  3. ANSYS Mechanical 2025 R1, Student Edition.

πŸ› οΈ Tech Stack

Python TensorFlow DeepXDE ANSYS NumPy Matplotlib


πŸ“„ License

This project is licensed under the MIT License.

About

Solving 1D beam, 2D plate, and 3D solid mechanics problems using Physics-Informed Neural Networks (PINNs) with DeepXDE and TensorFlow. Results validated against ANSYS Mechanical 2025 R1. 2nd sem project

Topics

ansys-fluentdeepxdeeuler-bernoullikirchhoff-thin-platenavier-stokes-equationspinnsscientific-mlsolid-mechanicstensorflow

Resources

Readme
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.