Documentation |
Solve nonlinear PDE problem
[u,res] = pdenonlin(b,p,e,t,c,a,f) [u,res] = pdenonlin(b,p,e,t,c,a,f,'PropertyName','PropertyValue',...)
[u,res] = pdenonlin(b,p,e,t,c,a,f) solves the nonlinear scalar PDE problem
–∇ · (c∇u) + au = f on Ω
or the nonlinear system PDE problem
$$-\nabla \cdot (c\otimes \nabla u)+au=f\text{on}\Omega $$
where the coefficients c, a, and f can depend on the solution u. The algorithm solves the equation by using damped Newton iteration with the Armijo-Goldstein line search strategy.
The solution u is represented as the solution vector u. For details on the representation of the solution vector, see assempde. res is the norm of the Newton step residuals.
The triangular mesh of the PDE problem is given by the mesh data p, e, and t. For details on the mesh data representation, see initmesh.
b describes the boundary conditions of the PDE problem. For the recommended way of specifying boundary conditions, see Steps to Specify a Boundary Conditions Object. For all methods of specifying boundary conditions, see Boundary Condition Specification.
For the general call to pdebound, the boundary conditions can also depend on u. A fixed-point iteration strategy is employed to solve for the nonlinear boundary conditions.
The coefficients c, a, f of the PDE problem can be given in a wide variety of ways. In the context of pdenonlin the coefficients can depend on u. The coefficients cannot depend on t, the time. For a complete listing of all format options, see Scalar PDE Coefficients and Coefficients for Systems of PDEs.
The solver can be fine-tuned by setting some of the options described next.
Property Name | Property Value | Default | Description |
---|---|---|---|
Jacobian | fixed|lumped|full | Approximation of Jacobian | |
U0 | string or numeric | Initial solution guess — Use the syntax of Initial Conditions | |
Tol | positive scalar | Residual size at termination | |
MaxIter | positive integer | 25 | Maximum Gauss-Newton iterations |
MinStep | positive scalar | 1/2^16 | Minimum damping of search direction |
Report | on|off | off | Print convergence information |
Norm | string or numeric | Inf | Residual norm |
There are three methods currently implemented to compute the Jacobian:
Numerical evaluation of the full Jacobian based on the sparse version of the function numjac
A "lumped" approximation described in Nonlinear Equations based on the numerical differentiation of the coefficients
A fixed-point iteration matrix where the Jacobian is approximated by the stiffness matrix
Select the desired method by setting the Jacobian property to full, lumped, or fixed, bearing in mind that the more precise methods are computationally more expensive.
U0 is the starting guess that can be given as an expression, a generic scalar, or a vector. By default it is set to 0, but this is useless in problems such as ∇ · (1/u∇u) = 0 with Dirichlet boundary conditions u = e^{x+y}. Tol fixes the exit criterion from the Gauss-Newton iteration, i.e., the iterations are terminated when the residual norm is less than Tol. The norm in which the residual is computed is selected through Norm. This can be any admissible MATLAB^{®} vector norm or energy for the energy norm.
MaxIter and MinStep are safeguards against infinite Gauss-Newton loops and they bound the number of iterations and the step size used in each iteration. Setting Report to on forces printing of convergence information.
If the Newton iteration does not converge, the error message Too many iterations or Stepsize too small is displayed. If the initial guess produces matrices containing NaN or Inf elements, the error message Unsuitable initial guess U0 (default: U0 = 0) is printed.