Guide to PETSc Tutorial Examples, by Physics¶
Below we list examples which simulate particular physics problems so that users interested in a particular set of governing equations can easily locate a relevant example. Often PETSc will have several examples looking at the same physics using different numerical tools, such as different discretizations, meshing strategy, closure model, or parameter regime.
Poisson¶
The Poisson equation
is used to model electrostatics, steady-state diffusion, and other physical processes. Many PETSc examples solve this equation.
- Finite Difference
- 2D
- 3D
- Finite Element
Elastostatics¶
The equation for elastostatics balances body forces against stresses in the body
where \(\bm\sigma\) is the stress tensor. Linear, isotropic elasticity governing infinitesimal strains has the particular stress-strain relation
where the strain tensor \(\bm \varepsilon\) is given by
where \(\bm u\) is the infinitesimal displacement of the body.
- Finite Element
If we allow finite strains in the body, we can express the stress-strain relation in terms of the Jacobian of the deformation gradient
and the right Cauchy-Green deformation tensor
so that
In the example itself, everything can be expressed in terms of determinants and cofactors of \(F\).
- Finite Element
Stokes¶
The Stokes equations
describe slow flow of an incompressible fluid with velocity \(u\), pressure \(p\), and body force \(f\).
- Finite Element
See Guide to the Stokes Equations using Finite Elements in PETSc for more.
Euler¶
Heat equation¶
The heat equation
is used to model heat flow, time-dependent diffusion, and other physical processes.
- Finite Element
- 2D
- 3D