Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

18 Commits

Folders and files

Repository files navigation

SciML for Nanofluid Boundary Layer Modeling using PINN and SINDy

A modular Scientific Machine Learning framework for physics-informed modeling, equation discovery, and uncertainty-aware prediction of nanofluid transport phenomena.

Python License Status


Overview

Nanofluid boundary layer systems are governed by nonlinear differential equations representing:

  • Momentum transport
  • Heat transfer
  • Mass diffusion

Traditional methods like CFD are computationally expensive, while purely data-driven ML models often violate physical laws and fail to generalize.

This repository implements a Scientific Machine Learning (SciML) framework integrating:

  • Physics-Informed Neural Networks (PINNs)
  • Sparse Identification of Nonlinear Dynamical Systems (SINDy)
  • Data-driven baseline (XGBoost)
  • Noise robustness analysis
  • Generalization testing
  • Uncertainty quantification

The framework enables physically consistent, interpretable, and robust modeling.


System Architecture

flowchart TD

A[Raw Dataset] --> B[Preprocessing & Normalization]

B --> C1[Data-Driven Model<br/>XGBoost]
B --> C2[Physics-Informed Model<br/>PINN]
B --> C3[Sparse Identification<br/>SINDy]

C2 --> D1[Automatic Differentiation]
D1 --> D2[Physics Residuals]
D2 --> D3[Physics Loss]

C2 --> D4[Data Loss]
D3 --> E[Total Loss Optimization]
D4 --> E

E --> F[Trained PINN]

C3 --> G[Discovered Equations]

F --> H[Evaluation Framework]
C1 --> H
G --> H

H --> I1[Noise Injection Test]
H --> I2[Domain Generalization]

F --> I3[Uncertainty Estimation<br/>MC Dropout]

I1 --> J[Performance Metrics]
I2 --> J
I3 --> J
Loading

Applications

  • Computational Fluid Dynamics acceleration
  • Nanofluid heat transfer modeling
  • Scientific Machine Learning research
  • Physics-informed AI systems
  • Equation discovery

Mathematical Formulation

This work models a steady, laminar nanofluid boundary layer flow governed by a system of nonlinear ordinary differential equations obtained via similarity transformation.


Governing Equations

The dimensionless equations describing momentum, energy, and concentration transport are:

Momentum Equation

$$ f'''(\eta) + f(\eta),f''(\eta) - \left(f'(\eta)\right)^2 = 0 $$

Energy Equation

$$ \theta''(\eta) + f(\eta),\theta'(\eta) = 0 $$

Concentration Equation

$$ \phi''(\eta) + f(\eta),\phi'(\eta) = 0 $$


Boundary Conditions

The system satisfies the following boundary conditions:

At the wall ($\eta = 0$):

$$ f(0) = 0, \quad f'(0) = 0, \quad \theta(0) = 1, \quad \phi(0) = 1 $$

As $\eta \to \infty$:

$$ f'(\infty) = 1, \quad \theta(\infty) = 0, \quad \phi(\infty) = 0 $$


Similarity Transformation

The governing PDEs are reduced to ODEs using a similarity variable:

$$ \eta = \frac{y}{\sqrt{\nu x / U}} $$

where:

  • $y$ = normal coordinate
  • $x$ = streamwise coordinate
  • $\nu$ = kinematic viscosity
  • $U$ = free-stream velocity

Physics-Informed Neural Network (PINN)

A neural network approximates the solution:

$$ \hat{u}(\eta; \theta) = [f(\eta), \theta(\eta), \phi(\eta)] $$

where $\theta$ represents network parameters.


Automatic Differentiation

Derivatives are computed using automatic differentiation:

$$ f' = \frac{d f}{d \eta}, \quad f'' = \frac{d^2 f}{d \eta^2}, \quad f''' = \frac{d^3 f}{d \eta^3} $$

Similarly:

$$ \theta', \theta'', \quad \phi', \phi'' $$


Residual Functions

The physics residuals are defined as:

$$ R_m(\eta) = f''' + f f'' - (f')^2 $$

$$ R_e(\eta) = \theta'' + f \theta' $$

$$ R_c(\eta) = \phi'' + f \phi' $$


Loss Function

The total loss function is composed of:

$$ \mathcal{L} = \mathcal{L}_{data} + \lambda_p \mathcal{L}_{physics} + \lambda_b \mathcal{L}_{boundary} $$


Data Loss

$$ \mathcal{L}_{data} = \frac{1}{N} \sum_{i=1}^{N} \left| \hat{u}(\eta_i) - u_i^{data} \right|^2 $$


Physics Loss

$$ \mathcal{L}_{physics} = \frac{1}{N} \sum_{i=1}^{N} \left( R_m^2 + R_e^2 + R_c^2 \right) $$


Boundary Loss

$$ \mathcal{L}_{boundary} = |f(0)|^2 + |f'(0)|^2 + |\theta(0) - 1|^2 + |\phi(0) - 1|^2+ |f'(\eta_{\infty}) - 1|^2 + |\theta(\eta_{\infty})|^2 + |\phi(\eta_{\infty})|^2 $$


Optimization Problem

The training objective is:

$$ \theta^* = \arg\min_{\theta} \mathcal{L} $$


Sparse Identification (SINDy)

The system dynamics are approximated as:

$$ \dot{X} = \Theta(X),\Xi $$

where:

  • $X = [f, \theta, \phi]$
  • $\Theta(X)$ = library of candidate functions (polynomials, nonlinear terms)
  • $\Xi$ = sparse coefficient matrix

The optimization is:

$$ \min_{\Xi} | \dot{X} - \Theta(X)\Xi |_2^2 + \lambda |\Xi|_1 $$


Uncertainty Quantification

Using Monte Carlo Dropout, predictions are:

$$ \hat{y} = \frac{1}{T} \sum_{t=1}^{T} y^{(t)} $$

$$ \sigma^2 = \frac{1}{T} \sum_{t=1}^{T} \left(y^{(t)} - \hat{y}\right)^2 $$

Final prediction:

$$ y = \hat{y} \pm \sigma $$


Key Properties

  • Nonlinearity due to convective terms
  • Coupling between momentum, heat, and mass transfer
  • Stiffness near boundary layer region
  • High sensitivity to boundary conditions

Future Roadmap

  • 2D / 3D PDE PINNs
  • Turbulence modeling
  • Reinforcement learning integration
  • Multi-physics systems
  • Real-time scientific AI

Contributing

Contributions are welcome!

You can contribute by:

  • Improving PINNs
  • Extending SINDy
  • Adding new physics
  • Improving evaluation

Open an issue or submit a pull request 🚀


Citation

@software{sciml_nanofluid_pinn_sindy,
  title = {SciML for Nanofluid Boundary Layer Modeling using PINN and SINDy},
  author = {SciML Research Lab},
  year = {2026},
  url = {https://github.com/your-repo/sciml-nanofluid-pinn-sindy}
}

License

MIT License


Acknowledgements

Inspired by research in:

  • Scientific Machine Learning
  • Physics-Informed Neural Networks
  • Sparse System Identification
  • Computational Fluid Dynamics

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages