フィルターのクリア

How can I Identify Boundary Labels when writing a PDE code (not with the pdetool)?

5 ビュー (過去 30 日間)
d
d 2017 年 3 月 8 日
コメント済み: d 2017 年 3 月 8 日
I want to solve the Laplace equation using MATLAB, without using the PDE app. I first created a geometry which includes several rectangles, depending on user choise. Now I need to identify the labels of each boundary to determine the boundary conditions (applyBoundaryCondition). Is there another way besides manually plotting the geometry (pdegplot(model,'EdgeLabels','on')), to know the labels of each boundary? Some automatic code that will determine which boundary is which?
Thanks in advance
  1 件のコメント
d
d 2017 年 3 月 8 日
Following this question, is there a possibility to define different boundary conditions for the same edge?
For example:
I created a 2D rectangle with corner-coordinates as follows:
(0,0),(0,a),(a,b),(a,0).
Now, on one edge [between (0,0)->(0,a)] I need different boundary conditions in different places. (0,0)->(0,a/3): Neumann boundary condition (Insulated du/dx=0) (0,0)->(a/3,2a/3): Dirichlet boundary condition (u=0) (0,0)->(2a/3,a): Neumann boundary condition (Insulated du/dx=0)
Is there a way to write this boundary all together? or I must divide my geometry to three rectangles and define them separately?

サインインしてコメントする。

採用された回答

Alan Weiss
Alan Weiss 2017 年 3 月 8 日
Check out how to create geometry using a geometry function. You have complete control over the geometry labels.
And to have different boundary conditions on the same edge, yes, you must divide the edge by placing edges that divide it into sections. You could fake this by having a condition that depends on the location, but that would not be as exact, as things could go one way or another near the dividing point depending on the mesh.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
  3 件のコメント
Alan Weiss
Alan Weiss 2017 年 3 月 8 日
Yes, you need to place new edges in the geometry function, which divide the real edges where you like. You can ignore the new edges in your coefficient functions, but be aware that the mesh will respect the new edges as real.
Alan Weiss
MATLAB mathematical toolbox documentation
d
d 2017 年 3 月 8 日
Ok, thank you very much

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeBoundary Conditions についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by