How to see geometry edge numbers that are crowded for multilayered geometries with layers of significantly different thicknesses
5 ビュー (過去 30 日間)
古いコメントを表示
I have defined a geometry for a heat transfer problem using pde modeling. The geometry is a multi-layered configuration. Code below
I need to identify the edges so that I can assign appropriate boundary conditions. The problem that I have is that the thicknesses of the layers differ dramatically. Therefore when I use the pdeplot with labels on, I get some parts of the geometry where the edge numbers are all crowded together. I tried to use axis commands and the daspect command to “zoom in” on the thinnest layers so as to see the edge definitions clearly. I have not been successful. Is there a way to see these bunched up edge numbers?
Thanks
thermalmodel = createpde("thermal","transient");
% Top coverslip
Rtcs= [3,4,[-5.55,5.55,5.55,-5.55,0.012,0.012,0.177,0.177]/1000]';
% Specimen
Rspec= [3,4,[-5.55,5.55,5.55,-5.55,0,0,0.012,0.012]/1000]';
% Bottom coverslip
Rbcs= [3,4,[-5.55,5.55,5.55,-5.55,-0.165,-0.165,0,0]/1000]';
% Thin film heater left OFF area
Rtfh= [3,4,[-5.55,-3.18,-3.18,-5.55-0.166,-0.166,-0.165,-0.165]/1000]';
% Thin film heater ON area
Rtfh= [3,4,[-3.18,3.18,3.18,-3.18,-0.166,-0.166,-0.165,-0.165]/1000]';
% Thin film heater right OFF area
Rtfh= [3,4,[3.18,5.55,5.55,3.18,-0.166,-0.166,-0.165,-0.165]/1000]';
% Left manifold
Rlman= [3,4,[-5.55,-1.14,-1.14,-5.55,-0.673,-0.673,-0.166,-0.166]/1000]';
% Right manifold
Rrman= [3,4,[1.14, 5.55, 5.55, 1.14, -0.673, -0.673, -0.166, -0.166]/1000]';
gdm =[Rtcs Rspec Rbcs Rtfh Rlman Rrman];
ns = char('Rtcs','Rspec','Rbcs','Rtfh','Rlman','Rrman');
g = decsg(gdm,'Rtcs + Rspec + Rbcs + Rtfh + Rlman + Rrman',ns');
geometryFromEdges(thermalmodel,g);
figure
pdegplot(thermalmodel,"EdgeLabels","on","FaceLabels","off")
%xlim([-0.007 0.007]) %Overall view
%ylim([-0.0007 0.0002])
%xlim([-0.007 0.007]) %Top half of system
%ylim([-0.0002 0.0002])
%xlim([-0.007 0.007])
%ylim([-0.0002 0.00017])
xlim([-0.007 0.007])
ylim([-0.1659e-3- 0.1662e-3])
%xlim([-0.007 0.007]) % Htr area-somewhat useful but not magnified %enough
%ylim([-0.00015 0.00017])
%xlim([-0.007 0.007])
%ylim([-0.0002 0.0002])
%xlim([-0.007 0.007]) %squished- not very useful
%ylim([-0.001 0.001])
%axis equal
daspect([50 1 1])
0 件のコメント
採用された回答
Shishir Reddy
2024 年 8 月 29 日
Hi John
It appears that the variable Rtfh has been overwritten in the code. It should be ensured that each part of the geometry, such as Rtfh1, Rtfh2, and Rtfh3, should be defined uniquely to prevent overwriting issues.
Due to the significant variation in layer thickness, it is challenging to view all the layers simultaneously. The outer layers may obscure the inner layers in a complete plot.
1. If the priority is to view the larger portion of the plot, xlim, ylim, daspect can be set as follows
%% Create a thermal model for transient analysis
thermalmodel = createpde("thermal","transient");
% Define the geometry components
Rtcs = [3,4,[-5.55,5.55,5.55,-5.55,0.012,0.012,0.177,0.177]/1000]';
Rspec = [3,4,[-5.55,5.55,5.55,-5.55,0,0,0.012,0.012]/1000]';
Rbcs = [3,4,[-5.55,5.55,5.55,-5.55,-0.165,-0.165,0,0]/1000]';
Rtfh1 = [3,4,[-5.55,-3.18,-3.18,-5.55,-0.166,-0.166,-0.165,-0.165]/1000]';
Rtfh2 = [3,4,[-3.18,3.18,3.18,-3.18,-0.166,-0.166,-0.165,-0.165]/1000]';
Rtfh3 = [3,4,[3.18,5.55,5.55,3.18,-0.166,-0.166,-0.165,-0.165]/1000]';
Rlman = [3,4,[-5.55,-1.14,-1.14,-5.55,-0.673,-0.673,-0.166,-0.166]/1000]';
Rrman = [3,4,[1.14,5.55,5.55,1.14,-0.673,-0.673,-0.166,-0.166]/1000]';
% Combine the geometry data
gdm = [Rtcs Rspec Rbcs Rtfh1 Rtfh2 Rtfh3 Rlman Rrman];
ns = char('Rtcs','Rspec','Rbcs','Rtfh1','Rtfh2','Rtfh3','Rlman','Rrman');
g = decsg(gdm, 'Rtcs + Rspec + Rbcs + Rtfh1 + Rtfh2 + Rtfh3 + Rlman + Rrman', ns');
% Create geometry from edges
geometryFromEdges(thermalmodel, g);
% Create a larger figure window
figure('Position', [100, 100, 1200, 800]);
% Plot with edge labels
pdegplot(thermalmodel, "EdgeLabels", "on", "FaceLabels", "off");
% Adjust limits and aspect ratio for better visibility
xlim([-0.007 0.007]);
ylim([-0.00017 0.00017])
daspect([50 1 1]);
2.Likewise, to examine the innermost layer, xlim, ylim, daspect can be set as follows
%% Create a thermal model for transient analysis
thermalmodel = createpde("thermal","transient");
% Define the geometry components
Rtcs = [3,4,[-5.55,5.55,5.55,-5.55,0.012,0.012,0.177,0.177]/1000]';
Rspec = [3,4,[-5.55,5.55,5.55,-5.55,0,0,0.012,0.012]/1000]';
Rbcs = [3,4,[-5.55,5.55,5.55,-5.55,-0.165,-0.165,0,0]/1000]';
Rtfh1 = [3,4,[-5.55,-3.18,-3.18,-5.55,-0.166,-0.166,-0.165,-0.165]/1000]';
Rtfh2 = [3,4,[-3.18,3.18,3.18,-3.18,-0.166,-0.166,-0.165,-0.165]/1000]';
Rtfh3 = [3,4,[3.18,5.55,5.55,3.18,-0.166,-0.166,-0.165,-0.165]/1000]';
Rlman = [3,4,[-5.55,-1.14,-1.14,-5.55,-0.673,-0.673,-0.166,-0.166]/1000]';
Rrman = [3,4,[1.14,5.55,5.55,1.14,-0.673,-0.673,-0.166,-0.166]/1000]';
% Combine the geometry data
gdm = [Rtcs Rspec Rbcs Rtfh1 Rtfh2 Rtfh3 Rlman Rrman];
ns = char('Rtcs','Rspec','Rbcs','Rtfh1','Rtfh2','Rtfh3','Rlman','Rrman');
g = decsg(gdm, 'Rtcs + Rspec + Rbcs + Rtfh1 + Rtfh2 + Rtfh3 + Rlman + Rrman', ns');
% Create geometry from edges
geometryFromEdges(thermalmodel, g);
% Create a larger figure window
figure('Position', [100, 100, 1200, 800]);
% Plot with edge labels
pdegplot(thermalmodel, "EdgeLabels", "on", "FaceLabels", "off");
% Adjust limits and aspect ratio for better visibility
xlim([-0.007 0.007]);
ylim([-0.00017 -0.00016])
daspect([500 1 1]
In both these cases, zoom and pan can be used to navigate through the complete geometry of the plot.
I hope this helps.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Geometry and Mesh についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!