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.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- 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)