BoundaryUnitNormal[x,y,…]
represents an outward-pointing unit normal vector  on a region.
 on a region.
 
     
   BoundaryUnitNormal
BoundaryUnitNormal[x,y,…]
represents an outward-pointing unit normal vector  on a region.
 on a region.
Details and Options
- BoundaryUnitNormal can be used to construct partial differential equation boundary conditions that depend on the unit normal vector  of the boundary. of the boundary.
- BoundaryUnitNormal can be used with NeumannValue, DirichletCondition and NIntegrate.
- BoundaryUnitNormal can be generated by boundary conditions like AcousticAbsorbingValue, HeatFluxValue or MassOutflowValue.
- BoundaryUnitNormal can be used to specify a tangential on the boundary.
- BoundaryUnitNormal will evaluate to a vector of length of the embedding dimension of the region  when the boundary condition is discretized. when the boundary condition is discretized.
- Components of the boundary unit normal  can be accessed with Indexed. can be accessed with Indexed.
- For finite element approximations, the PDE is multiplied with a test function  and integrated over and integrated over . Integration by parts gives . Integration by parts gives . The integrand . The integrand in the boundary integral is replaced with the NeumannValue in the boundary integral is replaced with the NeumannValue . .
- When a PDE specifies the Neumann value as  , BoundaryUnitNormal can be used to model , BoundaryUnitNormal can be used to model instead by specifying the NeumannValue as instead by specifying the NeumannValue as . .
- Conversely, when a PDE specifies the Neumann value as  , BoundaryUnitNormal can be used to model , BoundaryUnitNormal can be used to model instead by specifying the NeumannValue as instead by specifying the NeumannValue as . .
- At internal boundaries of a region, the boundary unit normal is not uniquely defined.
- The value of the boundary unit normal  will be computed by solving will be computed by solving with a Dirichlet condition of with a Dirichlet condition of on all boundaries including internal boundaries over the entire region on all boundaries including internal boundaries over the entire region . The boundary unit normal is then the gradient of . The boundary unit normal is then the gradient of normalized with normalized with . .
 
     Examples
open all close allBasic Examples (1)
Solve a Poisson equation on a unit Disk:
Compute the total flux through the boundary of the region through a second-order approximation of the boundary region:
Scope (6)
Solve a Poisson equation on a unit Disk:
Compute the total flux through the outer boundary:
Compute the total flux through the boundary of the region through a second-order approximation of the boundary region:
Specify a differential equation and a region:
On the left, set up a NeumannValue with a boundary unit normal and solve the equation:
For this domain, the equivalent of the BoundaryUnitNormal at the left is  :
:
Show that the solutions are equal:
Create a tangential for a NeumannValue:
Make use of a Indexed component of a BoundaryUnitNormal to compute a NeumannValue:
Solve a Poisson equation on a geometry:
Compute the total flux through the boundary:
Set up a NeumannValue with a boundary normal:
Use a Neumann 0 boundary condition and solve the equation again:
Inspect how the solutions start to differ over time:
For this domain, the equivalent of the BoundaryUnitNormal at the left is  :
:
Applications (1)
The following example considers a Stokes flow with prescribed traction boundary conditions in an annulus region. On the outer edge, at  , there are no-slip boundary conditions. These set the fluid velocity in the
, there are no-slip boundary conditions. These set the fluid velocity in the  and
 and  directions to 0,
 directions to 0,  . On the inner boundary, at
. On the inner boundary, at  , a traction is prescribed. The traction with the stress vector
, a traction is prescribed. The traction with the stress vector  is given as:
 is given as:
Here,  is the radial unit vector given as
 is the radial unit vector given as  and
 and  is the tangent unit vector given as
 is the tangent unit vector given as  .
.  and
 and  are the Cartesian unit vectors in the
 are the Cartesian unit vectors in the  and
 and  directions, respectively. For this example, the traction is set in normal direction to
 directions, respectively. For this example, the traction is set in normal direction to  and the tangential traction is set to
 and the tangential traction is set to  . In other words, at the inner boundary the velocity is not specified, only the traction
. In other words, at the inner boundary the velocity is not specified, only the traction  is specified.
 is specified.
The fluid stress tensor  is given by:
 is given by:
Set up parameters, geometry and refined mesh:
Set up a Stokes flow operator:
Set up a no-slip condition on the outer boundary:
On the inner surface, you can compute the tangent unit normal from the outward-pointing unit normal  with a cross product. Use a cross product to compute the unit tangent from the unit normal vector
 with a cross product. Use a cross product to compute the unit tangent from the unit normal vector  :
: 
To extract the first and second components of the cross product for the  and
 and  directions, respectively, Indexed is used.
 directions, respectively, Indexed is used.
Set up the traction boundary conditions:
Equivalently, note that the tangent unit normal can also be given as  because the unit normal vector on the inner surface is
 because the unit normal vector on the inner surface is  and the unit tangent then is
 and the unit tangent then is  :
:
Without specifying a boundary condition for the pressure, the pressure value will be floating and NDSolve will give a warning that not enough boundary conditions are specified:
 
      Visualize the pressure solution and the velocity field:
 
      To verify that the traction boundary condition works, you can compute radial and tangential components of the velocities and plot them at  for all
 for all  . For the radial velocity, a solution proportional to
. For the radial velocity, a solution proportional to  is expected, and for the tangential velocity, a solution proportional to
 is expected, and for the tangential velocity, a solution proportional to  is expected.
 is expected.
Define a function to compute the radial and tangential components of the velocities:
Plot the radial component of the velocities and a function proportional to  :
:
Plot the tangential component of the velocities and a function proportional to  :
:
Next, compute the normal stress and the shear at the inner boundary and check that they match the prescribed traction boundary conditions. The stress tensor is given by:
The normal and tangential components of the traction vector can be computed by
Create a function to compute the stress tensor  :
:
Compute the unit normal vector:
Define a function for the tangent vector:
Define a function to compute the normal stress:
Define a function to compute the shear stress:
Visualize the computed normal and shear stress at  :
:
Visualize the difference of the normal and shear stress at  from the boundary conditions:
 from the boundary conditions:
Properties & Relations (2)
Compute the boundary unit normal field:
Visualize the boundary unit normal:
Visualize the boundary unit normal on the boundary only:
The boundary unit normal is computed by solving a Poisson equation over the region and specifying 0 Dirichlet conditions. Compute a Poisson equation over a unit Disk:
Compute the normalized gradient of the potential:
This is the same as computing the boundary unit normal of an ElementMesh:
Related Guides
Text
Wolfram Research (2023), BoundaryUnitNormal, Wolfram Language function, https://reference.wolfram.com/language/FEMDocumentation/ref/BoundaryUnitNormal.html.
CMS
Wolfram Language. 2023. "BoundaryUnitNormal." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/FEMDocumentation/ref/BoundaryUnitNormal.html.
APA
Wolfram Language. (2023). BoundaryUnitNormal. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/FEMDocumentation/ref/BoundaryUnitNormal.html
BibTeX
@misc{reference.wolfram_2025_boundaryunitnormal, author="Wolfram Research", title="{BoundaryUnitNormal}", year="2023", howpublished="\url{https://reference.wolfram.com/language/FEMDocumentation/ref/BoundaryUnitNormal.html}", note=[Accessed: 31-October-2025]}
BibLaTeX
@online{reference.wolfram_2025_boundaryunitnormal, organization={Wolfram Research}, title={BoundaryUnitNormal}, year={2023}, url={https://reference.wolfram.com/language/FEMDocumentation/ref/BoundaryUnitNormal.html}, note=[Accessed: 31-October-2025]}






