represents a Neumann boundary value val, specified on the part of the boundary of the region given to NDSolve and related functions where pred is True.


  • NeumannValue is used within partial differential equations to specify boundary values in functions such as DSolve and NDSolve.
  • In NDSolve[eqns,{u1,u2,},{x1,x2,}Ω], xi are the independent variables, uj are the dependent variables, and Ω is the region with boundary Ω.
  • Locations where Neumann values might be specified are shown in green. They appear on the boundary Ω of the region Ω and specify a flux across those edges in the direction of the outward normal.
  • ·(-c u-α u+γ)+=f+NeumannValue[g-q u,pred] is used to specify the flux over the part of the boundary Ω where pred is true, such that ·(c u+α u-γ)=g-q u holds. The coefficients c, α, and γ in ·(c u+α u-γ)=g-q u are defined implicitly through the PDE given by ·(-c u-α u+γ)+β·u+a u=f+NeumannValue[g-q u,pred]. is the outward-facing unit normal of Ω. The coefficients g and q can depend on any of the independent variables {x1,x2,}.
  • For finite element approximations, the PDE is multiplied with a test function and integrated over
    Integration by parts gives . The integrand in the boundary integral is replaced with the NeumannValue and yields the equation .
  • In finite element approximations, Neumann values are enforced as integrated conditions over each boundary element in the discretization of Ω where pred is True. Boundary elements are points in 1D, edges in 2D, and faces in 3D.
  • When no boundary condition is specified on a part of the boundary Ω, then the flux term ·(-c u-α u+γ)+ over that part is taken to be f=f+0=f+NeumannValue[0,], so not specifying a boundary condition at all is equivalent to specifying a Neumann 0 condition.
  • Any logical combination of equalities and inequalities in the independent variables x1, may be used for the predicate pred.
  • NeumannValue can be used to specify both Neumann and Robin boundary conditions:
  • ·(c u+α u-γ)=0
  • natural (Neumann 0) no conditions specified or NeumannValue[0,pred]
  • ·(c u+α u-γ)=g
  • NeumannNeumannValue[g,pred]
  • ·(c u+α u-γ)=g-q u
  • Robin (generalized Neumann)NeumannValue[g-q u,pred]
  • For systems, ·j(-cjuj-αjuj+γ)+f+NeumannValue[g-jqjuj]+ corresponds to the condition being satisfied on the parts of the region boundary where pred is True.
  • For time-dependent equations, both val and pred may depend on time.
  • Neumann boundary conditions can be used to enforce boundary loads in structural mechanics settings.


open allclose all

Basic Examples  (1)

Solve a Laplace equation over a disk with Dirichlet and Neumann conditions for and for :

Click for copyable input
Click for copyable input

Applications  (12)

Possible Issues  (3)

See Also

DirichletCondition  ImplicitRegion  NDSolve  NDSolveValue  ParametricNDSolve  NDEigensystem  NDEigenvalues  DSolve  DSolveValue  DEigensystem  DEigenvalues

Introduced in 2014