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
$$\nabla \cdot (c\nabla u)+au=f\text{on}\Omega $$
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 ArmijoGoldstein line search strategy.
The geometry, mesh, and boundary conditions are in model
,
a PDEModel
object. See Solve Problems Using PDEModel Objects.
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 coefficients c
, a
,
and f
of the PDE problem can be given in a variety
of ways. The coefficients can depend on u
, the
solution, and on the components of the gradient of u
,
namely ux
, uy
, and, for 3D
geometry, 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 fixedpoint
iteration strategy is employed to solve for the nonlinear boundary
conditions.
[u,res] = pdenonlin(model,c,a,f,Name,Value)
alters
the solution process using Name,Value
pairs.
[u,res] = pdenonlin(b,p,e,t,c,a,f)
solves
the problem using a mesh described by p
, e
,
and t
, with boundary conditions given by b
.
The mesh of the PDE problem is given by the mesh data p
, e
,
and 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 finetuned by setting some of the options described next.
Property Name  Property Value  Default  Description 



 Approximation of Jacobian 3D geometries
accept only 
 string or numeric 
 Initial solution guess — Use the syntax of Initial Conditions 
 positive scalar 
 Residual size at termination 
 positive integer 
 Maximum GaussNewton iterations 
 positive scalar 
 Minimum damping of search direction 


 Print convergence information 
 string or numeric 
 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 fixedpoint 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 GaussNewton 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 GaussNewton 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.
Solve a minimal surface problem. Because this
problem has a nonlinear c coefficient, use pdenonlin
to
solve it.
Create a model and include circular geometry using the
builtin circleg
function.
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 x^{2}.
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 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.