Skip to content

Commit

Permalink
Merge pull request #26 from sandialabs/book/theory-initial
Browse files Browse the repository at this point in the history
adding an initial theory section.
  • Loading branch information
cmhamel authored Jan 20, 2025
2 parents 42e64d9 + 9973fac commit 4530c1a
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
3 changes: 3 additions & 0 deletions book/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
Welcome to the pancax book

- [Introduction](./introduction.md)
- [Theory](./theory/theory.md)
- [General](./theory/general.md)
- [Solid Mechanics](./theory/solid_mechanics.md)
- [API Documentation](./api/pancax.md)
29 changes: 29 additions & 0 deletions book/theory/general.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# General PDEs
Consider a general PDE defined in the strong form as follows
$$
\mathbf{A}\frac{\partial^2 \mathbf{u}}{\partial t^2} + \mathbf{B}\frac{\partial \mathbf{u}}{\partial t} + \mathcal{L}\left[\mathbf{u}\left(\mathbf{x}, t\right)\right] = 0,
$$
where $\mathbf{u}$ is an arbitrary solution field (potentially vector or tensor valued) and $\mathcal{L}$ is a differential operator. To fully close an initial boundary value problem (IBVP) we also need appropriate initial and boundary conditions. We can write this generally as
$$
\mathbf{u}\left(\mathbf{x}, 0\right) = f\left(\mathbf{x}\right),
$$
$$
\dot{\mathbf{u}}\left(\mathbf{x}, 0\right) = g\left(\mathbf{x}\right),
$$
$$
\mathbf{u}\left(\mathbf{x}, t\right) = h\left(\mathbf{x}\right) \quad\text{for}\quad\mathbf{x}\in\partial\Omega_\mathbf{u},
$$
$$
a\mathbf{u}\left(\mathbf{x}, t\right) + b\nabla\cdot\mathbf{u}\left(\mathbf{x}, t\right) = h\left(\mathbf{x}\right) \quad\text{for}\quad\mathbf{x}\in\partial\Omega_\mathbf{u},
$$
where the above represent general initial conditions on the solution field and time derivative and general boundary conditions on the the solution field in the form of general Dirichlet BCs and general Robin/Neumann BCs.

Our goal in pancax is to seek approximate solutions to the above general equation via physics informed neural networks (PINNs). We can do this in a number of ways, but the simplest and most classical is the following approach. We approximate the solution field with a multi-layer perceptron (MLP)
$$
\mathbf{u}\left(\mathbf{x}, t\right) \approx \mathcal{N}\left(\mathbf{x}, t\right).
$$
With this in hand, we can now take derivatives with respect to $\mathbf{x}$ or $t$ to obtain the necessary derivatives in our operator. For example
$$
\frac{\partial \mathbf{u}}{\partial t} \approx \frac{\partial \mathcal{N}\left(\mathbf{x}, t\right)}{\partial t},
$$
which put another way is saying to differentiate the outputs of the neural network with respect to a subset of some of it's inputs. This can be achieved in any standard modern neural network library through automatic differentiation. However, this is not always an optimal approach in terms of both runtime and numerical accuracy, especially when it comes to nested differentiation.
14 changes: 14 additions & 0 deletions book/theory/solid_mechanics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Solid Mechanics
The original motivator for writing pancax was for applications in solid mechanics, specifically for leveraging digital image correlation data in inverse problems in PINNs.

The best approach to work with solid mechanics is to build off of an approach known in the PINNs community as the "Deep Energy Method" (DEM) which is really just a variational principle in solid mechanics with neural network approximations for the solution field.

We can write this variational principle as follows

$$
\Pi\left(\mathbf{u}, \nabla\mathbf{u}\right) = \int_\Omega\psi\left(\nabla\mathbf{u}\right)d\Omega - \int_{\partial\Omega}\mathbf{t}\cdot\mathbf{u}dS - \int_\Omega\mathbf{b}\cdot\mathbf{u}d\Omega.
$$
The first variation of this gives rise to the principle of virtual work
$$
\delta\Pi = \frac{\partial\Pi}{\partial\mathbf{u}}\cdot\delta\mathbf{u} + \frac{\partial\Pi}{\partial\nabla\mathbf{u}}\cdot\delta\nabla\mathbf{u}
$$
2 changes: 2 additions & 0 deletions book/theory/theory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Theory
In this section, basic theory behind PDEs of interest when using pancax are summarized.

0 comments on commit 4530c1a

Please sign in to comment.