findBoundaryConditions
Find boundary condition assignment for a geometric region
Description
returns boundary condition BCregion = findBoundaryConditions(BCs,RegionType,RegionID)BCregion assigned to the specified
region.
Examples
Create a PDE model and import a simple block geometry. Plot the geometry displaying the face labels.
model = createpde(3); importGeometry(model,"Block.stl"); pdegplot(model,"FaceLabels","on","FaceAlpha",0.5)

Set zero Dirichlet conditions on faces 1 and 2 for all equations.
applyBoundaryCondition(model,"dirichlet","Face",1:2,"u",[0,0,0]);
On face 3, set the Neumann boundary condition for equation 1 and Dirichlet boundary condition for equations 2 and 3.
h = [0 0 0;0 1 0;0 0 1]; r = [0;3;3]; q = [1 0 0;0 0 0;0 0 0]; g = [10;0;0]; applyBoundaryCondition(model,"mixed","Face",3,"h",h,"r",r,"g",g,"q",q);
Set Neumann boundary conditions with opposite signs on faces 5 and 6 for all equations.
applyBoundaryCondition(model,"neumann","Face",4:5,"g",[1;1;1]); applyBoundaryCondition(model,"neumann","Face",6,"g",[-1;-1;-1]);
Check the boundary condition specification on face 1.
findBoundaryConditions(model.BoundaryConditions,"Face",1)ans =
BoundaryCondition with properties:
BCType: 'dirichlet'
RegionType: 'Face'
RegionID: [1 2]
r: []
h: []
g: []
q: []
u: [0 0 0]
EquationIndex: []
Vectorized: 'off'
InternalBC: []
Check the boundary condition specification on face 3.
findBoundaryConditions(model.BoundaryConditions,"Face",3)ans =
BoundaryCondition with properties:
BCType: 'mixed'
RegionType: 'Face'
RegionID: 3
r: [3×1 double]
h: [3×3 double]
g: [3×1 double]
q: [3×3 double]
u: []
EquationIndex: []
Vectorized: 'off'
InternalBC: []
Check the boundary condition specification on face 5.
findBoundaryConditions(model.BoundaryConditions,"Face",5)ans =
BoundaryCondition with properties:
BCType: 'neumann'
RegionType: 'Face'
RegionID: [4 5]
r: []
h: []
g: [3×1 double]
q: []
u: []
EquationIndex: []
Vectorized: 'off'
InternalBC: []
Input Arguments
Boundary conditions of a PDE model, specified as the
BoundaryConditions property of
PDEModel.
Example: model.BoundaryConditions
Geometric region type, specified as "Face" for 3-D
geometry or "Edge" for 2-D geometry.
Example: findBoundaryConditions(model.BoundaryConditions,"Face",3)
Data Types: char | string
Geometric region ID, specified as a vector of positive integers. Find the
region IDs by using pdegplot with the
"FaceLabels" (3-D) or "EdgeLabels"
(2-D) value set to "on".
Example: findBoundaryConditions(model.BoundaryConditions,"Face",3)
Data Types: double
Output Arguments
Boundary condition for a particular region, returned as a
BoundaryCondition object.
Version History
Introduced in R2016b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)