Skip to content

pnkjsyngh/diffusionNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

$${\color{blue} \huge \textbf{ Solution of 1D transient diffusion PDE using Neural Networks}}$$


$${\color{red} \large \textbf{Problem defintion}}$$

The governing PDE for 1D diffusion is given by ,

$$\frac{\partial T}{\partial t} = D \frac{\partial^2 T}{\partial x^2} + s(x,t)$$

This PDE is valid for,

$$\forall \, x \in (0,l) \text{ and } 0 < t < t_{range}$$

The initial condition for this PDE is,

$$T(x, 0) = i(x) $$

The boundary conditions for this PDE are,

$$ \left.\frac{\partial T}{\partial x}\right\vert_{(0,t)} = a(x, t) \text{ and } \left. T \right\vert_{(l,t)} = b(x, t)$$

where,
$s(t)$ is the source term,
$i(x)$ is the initial temperature distribution on the domain,
$a(t)$ and $b(t)$ are time dependent boundary conditions terms at $x=0$ and $l$ respectively.


$${\color{red} \large \textbf{Numerical Solution}}$$

The numerical solution for this problem is obtained using py-pde for following set of system parameters,

  • $D = 0.1$
  • $l = 1$
  • $t_{range} = 2\pi$

The specified functions are as follows,

  • $s(x, t) = 0$
  • $i(x) = 0$
  • $a(t) = 0$
  • $b(t) = sin(t)$


$${\color{red} \large \textbf{Physics Informed Neural Networks (PINNs) with unweighted loss function}}$$

We define the fully physics based loss function as follows for training our neural network,

$$\mathcal{L} = \mathcal{L_{IC}} + \mathcal{L_{BC}} + \mathcal{L_{PDE}}$$

where,
$\mathcal{L}$ is the overall loss,
$\mathcal{L_{IC}}$ is the loss from initial conditions at $t=0$ over the domain,
$\mathcal{L_{BC}}$ is the loss from boundary conditions at boundaries ($x=0$ and $1$) over time,
$\mathcal{L_{PDE}}$ is the loss from PDE at collocation points.

As it can be noted, we have presented the loss as simple sum of losses coming from IC, BC and PDE. The implementation can be found in the PINNs unweighted loss folder.


$${\color{red} \textbf{Coming Soon}}$$

  • Constant weights for loss components
  • hyperparameter tuning
  • self adaptive weights
  • Curriculum learning
  • Seq2Seq learning

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published