diff --git a/book/SUMMARY.md b/book/SUMMARY.md index 3b27668..dac4d0a 100644 --- a/book/SUMMARY.md +++ b/book/SUMMARY.md @@ -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) diff --git a/book/theory/general.md b/book/theory/general.md new file mode 100644 index 0000000..0c8a639 --- /dev/null +++ b/book/theory/general.md @@ -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. \ No newline at end of file diff --git a/book/theory/solid_mechanics.md b/book/theory/solid_mechanics.md new file mode 100644 index 0000000..58a4834 --- /dev/null +++ b/book/theory/solid_mechanics.md @@ -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} +$$ diff --git a/book/theory/theory.md b/book/theory/theory.md new file mode 100644 index 0000000..1f40b76 --- /dev/null +++ b/book/theory/theory.md @@ -0,0 +1,2 @@ +# Theory +In this section, basic theory behind PDEs of interest when using pancax are summarized. \ No newline at end of file