Mesh problems for large aspect ratio object

6 ビュー (過去 30 日間)
John McGrath
John McGrath 2024 年 9 月 3 日
回答済み: Abhas 2024 年 9 月 3 日
I want to produce a thermal model for a thin film heater. The thin film is 1.11 cm wide and I have modeled it as being 1 um thick [which is thicker than it actually is], so the aspect ratio is approximately 10,000 to 1. When I try to run the code below it comes back with this message:
Unable to compute geometry-mesh associativity because the geometry is invalid or the mesh size is insufficient for capturing all geometric details. Try adjusting Hmax and Hmin.
I have tried to play around with Hmax and Hmin but I don't know what the guiding principles should be. Any help would be appreciated.
thank you
thermalmodel = createpde("thermal","steadystate");
% Define the geometry components
Rtfh2 = [3,4,[-1.19,1.19,1.19,-1.19,-0.166,-0.166,-0.165,-0.165]/1000]'; % Active heating volume
% Combine the geometry data
gdm = [Rtfh2];
ns = char('Rtfh2');
g = decsg(gdm, 'Rtfh2', 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", "on");
% Adjust limits and aspect ratio for better visibility
% Smaller region around thin film heater
%xlim([-0.007 0.007]);
xlim([-0.002 0.002]);
ylim([-0.00017 -0.00016])
daspect([500 1 1]);
% Properties assigned assuming corresponding order as per above
% Thin film heater- metal- use SS properties
thermalProperties(thermalmodel,"ThermalConductivity",14);
% Boundary conditions
% Edge 1 is bottom edge of active thin film heater- adiabatic
thermalBC(thermalmodel,"Edge",1,"HeatFlux",0);
% Edge 2 is right side of active thin film heater- convection to ambient
thermalBC(thermalmodel,"Edge",2,...
"ConvectionCoefficient",hambient,...
"AmbientTemperature",20)
% Edge 3 is top edge of active then film heater- adiabatic
thermalBC(thermalmodel,"Edge",3,"HeatFlux",0);
% Edge 4 is left side of active thin film heater- convection to ambient
thermalBC(thermalmodel,"Edge",4,...
"ConvectionCoefficient",hambient,...
"AmbientTemperature",20)
Heatgenerationpervolumerate= 1.7e11;
Volume= (2.38e-3)*(1.11e-2)*(0.001e-3)
generateMesh(thermalmodel);
figure
%pdemesh(thermalmodel)
pdemesh(thermalmodel,'Hmax',1e-7);
title("Mesh with Quadratic Triangular Elements")

採用された回答

Abhas
Abhas 2024 年 9 月 3 日
Hi John,
When dealing with thermal modeling of a thin film heater, especially with high aspect ratios, ensuring that the mesh is fine enough to capture the geometry accurately is crucial. Here are some guiding principles and suggestions to help you resolve the issue:
  1. Mesh Size Adjustment: Use a smaller "Hmax" (e.g., 5e-8 or smaller) and ensure "Hmin" is significantly less than the film thickness (e.g., 5e-9).
  2. Geometry and Aspect Ratio: Verify that the geometry dimensions are accurate and consider using a refined mesh near thin regions, possibly using adaptive meshing strategies.
  3. Mesh Refinement and Visualization: Use "generateMesh(thermalmodel, 'Hmax', 5e-8, 'Hmin', 5e-9)" and visualize with pdemesh to ensure the mesh captures the geometry correctly.
Here's the MATLAB code with adjustments to help address the mesh generation issue for your thin film heater model:
% Create a thermal model for steady-state analysis
thermalmodel = createpde("thermal", "steadystate");
% Define the geometry components for the thin film heater
Rtfh2 = [3, 4, [-1.19, 1.19, 1.19, -1.19, -0.166, -0.166, -0.165, -0.165] / 1000]';
% Combine the geometry data
gdm = [Rtfh2];
ns = char('Rtfh2');
g = decsg(gdm, 'Rtfh2', ns');
% Create geometry from edges
geometryFromEdges(thermalmodel, g);
% Create a larger figure window for visualization
figure('Position', [100, 100, 1200, 800]);
% Plot with edge and face labels for verification
pdegplot(thermalmodel, "EdgeLabels", "on", "FaceLabels", "on");
% Adjust limits and aspect ratio for better visibility
xlim([-0.002 0.002]);
ylim([-0.00017 -0.00016]);
daspect([500 1 1]);
% Assign thermal properties to the thin film heater
thermalProperties(thermalmodel, "ThermalConductivity", 14);
% Boundary conditions
% Edge 1: Bottom edge of active thin film heater - adiabatic
thermalBC(thermalmodel, "Edge", 1, "HeatFlux", 0);
% Edge 2: Right side of active thin film heater - convection to ambient
hambient = 10; % Example convection coefficient, adjust as needed
thermalBC(thermalmodel, "Edge", 2, ...
"ConvectionCoefficient", hambient, ...
"AmbientTemperature", 20);
% Edge 3: Top edge of active thin film heater - adiabatic
thermalBC(thermalmodel, "Edge", 3, "HeatFlux", 0);
% Edge 4: Left side of active thin film heater - convection to ambient
thermalBC(thermalmodel, "Edge", 4, ...
"ConvectionCoefficient", hambient, ...
"AmbientTemperature", 20);
% Define internal heat generation rate
Heatgenerationpervolumerate = 1.7e11;
internalHeatSource(thermalmodel, Heatgenerationpervolumerate, "Face", 1);
% Calculate volume (for reference)
Volume = (2.38e-3) * (1.11e-2) * (0.001e-3);
generateMesh(thermalmodel, 'Hmax', 5e-8, 'Hmin', 5e-9);
% Visualize the generated mesh
figure;
pdemesh(thermalmodel);
title("Mesh with Refined Elements");
You may refer to the following MathWorks documentation links to have a better understanding on "generateMesh" and "pdmesh":
  1. https://www.mathworks.com/help/pde/ug/pde.pdemodel.generatemesh.html
  2. https://www.mathworks.com/help/pde/ug/femodel.pdemesh.html

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeometry and Mesh についてさらに検索

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by