pdegplot(model, 'FaceLabels', 'on') does not show face labels

When I call pdegplot(model, 'FaceLabels', 'on') with 2D geometry to solve pde, it works fine.
But, when I made 3D geometry using extrude(g, z_height).
pdegplot(model, 'FaceLabels', 'on') does not show face labels,
so it is difficult to find specific face ID which I want to setup boundary conditions.

댓글 수: 2

What is the output when you run extrude(g, z_height)? How many faces does it say there are? Can you share what you use to create the 2D geometry?
model = createpde;
g = importGeometry(model,'PlateHolePlanar.stl');
extrude(g,5)
ans =
DiscreteGeometry with properties: NumCells: 1 NumFaces: 7 NumEdges: 15 NumVertices: 10 Vertices: [10×3 double]
Thanks Cris,
Here is my code, it is little bit complex structure.
After I used extrude to make 3D geometry, pdegplot(model, 'FaceLabels', 'on') does not show any labels.
----------------------------------------------------------------------------------------------------------------
clearvars;
cdmodel = createpde();
L0 = 200e-9;
L1 = L0;
w = 50e-9;
w2 = 2*w;
dx = 1.0e-9;
R0 = 100e-9;
R1 = 0.8*R0;
Lx_total = 2*(R0 + L0 + w);
Ly_total = 2*(R0 + L0 + w);
Npoint = ceil(Lx_total/dx);
dz = 5.0e-9;
dpad = 2.0*dz;
dvia = 50.0e-9;
InputA = [1 -(L0 + w) 0 R0]';
InputB = [1 0 -(L0 + w) R0]';
InputC = [1 0 (L0 + w) R0]';
theta0 = atan2(w, L1-L0);
L_bar = L0 - R0*cos(theta0);
barA = [2 4 -L_bar -w -w -L_bar -R1 -w w R1]';
barB = [2 4 -w -R1 R1 w -w -L_bar -L_bar -w]';
barC = [2 4 -w w R1 -R1 w w L_bar L_bar]';
barOutput = [2 4 w Lx_total/2 Lx_total/2 w -w -w w w]';
MGCenter = [2 4 -w w w -w -w -w w w]';
MGCenterEdge = [2 4 -2.5*w 0 2.5*w 0 0 -2.5*w 0 2.5*w]';
PadLayer1 = [2 4 -w 4*w 4*w -w -w -w w w]';
PadLayer2 = [2 4 2*w 4*w 4*w 2*w w w 4*w 4*w]';
Via = [2 4 2*w 4*w 4*w 2*w 2*w 2*w 4*w 4*w]';
InputA = [InputA; zeros(6,1)];
InputB = [InputB; zeros(6,1)];
InputC = [InputC; zeros(6,1)];
%xwire = [3 4 -Lx/2 Lx/2 Lx/2 -Lx/2 -w2/2 -w2/2 w2/2 w2/2];
%ywire = [3 4 -w2/2 w2/2 w2/2 -w2/2 -Ly/2 -Ly/2 Ly/2 Ly/2 ];
gdm = [InputA, InputB, InputC, barA, barB, barC, barOutput, MGCenter, PadLayer1, PadLayer2, Via];
ns = char('InputA', 'InputB', 'InputC', 'barA', 'barB', 'barC', 'barOutput', 'MGCenter', 'PadLayer1', 'PadLayer2', 'Via')';
sf = 'InputA + InputB + InputC + barA + barB + barC + barOutput + MGCenter + PadLayer1 + PadLayer2 + Via';
[dl,bt] = decsg(gdm, sf, ns);
pg = geometryFromEdges(cdmodel,dl);
% figure
pdegplot(pg,'EdgeLabels','on', 'FaceLabels', 'on');
cdmodel.Geometry = extrude(pg, dz);
hpg = pdegplot(cdmodel, 'CellLabels', 'on', 'FaceLabels', 'on');

댓글을 달려면 로그인하십시오.

 채택된 답변

It appears your values are too small for pdegplot to determine faces of your 3D model. If you use e-7 instead of e-9 the faces are labeled
cdmodel = createpde();
L0 = 200e-7;
L1 = L0;
w = 50e-7;
w2 = 2*w;
dx = 1.0e-7;
R0 = 100e-7;
R1 = 0.8*R0;
Lx_total = 2*(R0 + L0 + w);
Ly_total = 2*(R0 + L0 + w);
Npoint = ceil(Lx_total/dx);
dz = 5.0e-7;
dpad = 2.0*dz;
dvia = 50.0e-7;
InputA = [1 -(L0 + w) 0 R0]';
InputB = [1 0 -(L0 + w) R0]';
InputC = [1 0 (L0 + w) R0]';
theta0 = atan2(w, L1-L0);
L_bar = L0 - R0*cos(theta0);
barA = [2 4 -L_bar -w -w -L_bar -R1 -w w R1]';
barB = [2 4 -w -R1 R1 w -w -L_bar -L_bar -w]';
barC = [2 4 -w w R1 -R1 w w L_bar L_bar]';
barOutput = [2 4 w Lx_total/2 Lx_total/2 w -w -w w w]';
MGCenter = [2 4 -w w w -w -w -w w w]';
MGCenterEdge = [2 4 -2.5*w 0 2.5*w 0 0 -2.5*w 0 2.5*w]';
PadLayer1 = [2 4 -w 4*w 4*w -w -w -w w w]';
PadLayer2 = [2 4 2*w 4*w 4*w 2*w w w 4*w 4*w]';
Via = [2 4 2*w 4*w 4*w 2*w 2*w 2*w 4*w 4*w]';
InputA = [InputA; zeros(6,1)];
InputB = [InputB; zeros(6,1)];
InputC = [InputC; zeros(6,1)];
%xwire = [3 4 -Lx/2 Lx/2 Lx/2 -Lx/2 -w2/2 -w2/2 w2/2 w2/2];
%ywire = [3 4 -w2/2 w2/2 w2/2 -w2/2 -Ly/2 -Ly/2 Ly/2 Ly/2 ];
gdm = [InputA, InputB, InputC, barA, barB, barC, barOutput, MGCenter, PadLayer1, PadLayer2, Via];
ns = char('InputA', 'InputB', 'InputC', 'barA', 'barB', 'barC', 'barOutput', 'MGCenter', 'PadLayer1', 'PadLayer2', 'Via')';
sf = 'InputA + InputB + InputC + barA + barB + barC + barOutput + MGCenter + PadLayer1 + PadLayer2 + Via';
[dl,bt] = decsg(gdm, sf, ns);
pg = geometryFromEdges(cdmodel,dl);
% figure
pdegplot(pg,'EdgeLabels','on', 'FaceLabels', 'on');
cdmodel.Geometry = extrude(pg, dz);
hpg = pdegplot(cdmodel, 'CellLabels', 'on', 'FaceLabels', 'on');

추가 답변 (0개)

카테고리

제품

릴리스

R2021a

질문:

2021년 7월 9일

댓글:

2021년 7월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by