Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,5 @@ forumat.for
build
bin
__pycache__
*.dat
*.dat
.DS_Store
484 changes: 484 additions & 0 deletions EXAMPLES/PINN_vs_FEM_example/PINN_vs_FEM.ipynb

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions EXAMPLES/PINN_vs_FEM_example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# PINN vs FEM Example

This example compares a classical Finite Element Method (FEM) structural dynamics solution using OpenSeesPy against a Physics-Informed Neural Network (PINN) approximation implemented in PyTorch.

## Features

- **SDOF dynamic system**: Modeling a single-degree-of-freedom oscillator.
- **Harmonic excitation**: Application of sinusoidal force to observe frequency response.
- **FEM transient response**: Numerical integration using the OpenSeesPy framework.
- **PINN approximation**: Neural network training constrained by the governing differential equations.
- **Response comparison plots**: Visual validation of the neural network's accuracy against the FEM baseline.

## Requirements

The following libraries are required to run the comparison:

- `openseespy`
- `torch` (PyTorch)
- `numpy`
- `matplotlib`

## Project Structure

- `main.py`: Primary script to run both simulations and generate plots.
- `models/`: Contains the PINN architecture and training logic.
- `fem/`: OpenSeesPy model definitions and solver settings.