Solve nonlinear PDE problem
[u,res] = pdenonlin(model,c,a,f) [u,res] = pdenonlin(model,c,a,f,Name,Value) [u,res] = pdenonlin(b,p,e,t,c,a,f) [u,res] = pdenonlin(b,p,e,t,c,a,f,Name,Value)
[u,res] = pdenonlin(model,c,a,f) solves
the nonlinear scalar PDE problem
or the nonlinear system PDE problem
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
u. For details on the representation of
the solution vector, see
the norm of the Newton step residuals.
f of the PDE problem can be given in a variety
of ways. The coefficients can depend on
solution, and on the components of the gradient of
uy, and, for 3-D
uz. For a complete listing of all options,
see Scalar PDE Coefficients and Coefficients for Systems of PDEs.
Boundary conditions can depend on
u. A fixed-point
iteration strategy is employed to solve for the nonlinear boundary
[u,res] = pdenonlin(model,c,a,f,Name,Value) alters
the solution process using
[u,res] = pdenonlin(b,p,e,t,c,a,f) solves
the problem using a mesh described by
t, with boundary conditions given by
The mesh of the PDE problem is given by the mesh data
t. For details on the mesh data representation,
see Mesh Data.
b describes the boundary conditions of the
PDE problem. For the recommended way of specifying boundary conditions,
see Specify Boundary Conditions Objects. For all methods
of specifying boundary conditions, see Forms of Boundary Condition Specification.
The solver can be fine-tuned by setting some of the options described next.
|Property Name||Property Value||Default||Description|
Approximation of Jacobian
string or numeric
Initial solution guess — Use the syntax of Initial Conditions
Residual size at termination
Maximum Gauss-Newton iterations
Minimum damping of search direction
Print convergence information
string or numeric
There are three methods currently implemented to compute the Jacobian:
Numerical evaluation of the full Jacobian based on
the sparse version of the function
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
bearing in mind that the more precise methods are computationally
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 = ex+y.
the exit criterion from the Gauss-Newton iteration, i.e., the iterations
are terminated when the residual norm is less than
The norm in which the residual is computed is selected through
This can be any admissible MATLAB® vector norm or
the energy norm.
safeguards against infinite Gauss-Newton loops and they bound the
number of iterations and the step size used in each iteration. Setting
printing of convergence information.
Solve a minimal surface problem. Because this
problem has a nonlinear c coefficient, use
Create a model and include circular geometry using the
model = createpde; geometryFromEdges(model,@circleg);
Set the coefficients.
a = 0; f = 0; c = '1./sqrt(1+ux.^2+uy.^2)';
Set a Dirichlet boundary condition with value x2.
boundaryfun = @(region,state)region.x.^2; applyBoundaryCondition(model,'Edge',1:model.Geometry.NumEdges,... 'u',boundaryfun,'Vectorized','on');
Generate a mesh and solve the problem.
generateMesh(model,'Hmax',0.1); u = pdenonlin(model,c,a,f); pdeplot(model,'xydata',u,'zdata',u);
If the Newton iteration does not converge, the error message
many iterations or
Stepsize too small is
displayed. If the initial guess produces matrices containing
the error message
Unsuitable initial guess U0 (default: U0
= 0) is printed.