applyBoundaryCondition
R2026bAdd boundary condition to PDEModel container
Syntax
Description
applyBoundaryCondition(
adds a Dirichlet boundary condition to model,"dirichlet",RegionType=RegionID,Name=Value)model. The boundary
condition applies to boundary regions of type RegionType with
ID numbers in RegionID, and with arguments
r, h, u,
EquationIndex specified in the
Name=Value arguments. For Dirichlet boundary conditions,
specify either both arguments r and h, or
the argument u. When specifying u, you can
also use EquationIndex.
applyBoundaryCondition(
adds a Neumann boundary condition to model,"neumann",RegionType=RegionID,Name=Value)model. The boundary
condition applies to boundary regions of type RegionType with
ID numbers in RegionID, and with values g
and q specified in the Name=Value
arguments.
applyBoundaryCondition(
adds an individual boundary condition for each equation in a system of PDEs. The
boundary condition applies to boundary regions of type
model,"mixed",RegionType=RegionID,Name=Value)RegionType with ID numbers in
RegionID, and with values specified in the
Name,Value pairs. For mixed boundary conditions, you can use
Name=Value arguments from both Dirichlet and Neumann
boundary conditions as needed.
returns the boundary condition object.bc = applyBoundaryCondition(___)
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Tips
When there are multiple boundary condition assignments to the same geometric region, the toolbox uses the last applied setting.
To avoid assigning boundary conditions to a wrong region, ensure that you are using the correct geometric region IDs by plotting and visually inspecting the geometry.
If you do not specify a boundary condition for an edge or face, the default is the Neumann boundary condition with the zero values for
gandq.







