p_laplacian, a FENICS script which uses the finite element method to solve a version of the p-Laplacian equation over the unit square.
Solve the nonlinear PDE:
- div gamma(u) grad u = f in Omega = [0,1]x[0,1] u = 0 on dOmegawhere: gamma(u) = ( epsilon^2 + |grad u|^2) ) ^ ( (p-2)/2 ) = ( epsilon^2 + wx^2 + wy^2 ) ^ ( (p-2)/2 ) epsilon = 1.0E-05 f(x,y) = 2*pi*pi*sin(pi*x) * sin(pi*y) The parameter epsilon artificially keeps gamma(u) bounded above 0, guaranteeing that the power (p-2)/2 is meaningful, and the equation is solvable.
Note that I have installed FENICS using Docker, and so to run this script I issue the commands:
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.