Heat exchange between bodies
Afficher commentaires plus anciens
Hello to everyone, I'm having a problem modeling the thermal exchange betwwen different objects. I'm trying to use the PDE toolbox, and I've understood how to set up geometries and how to create meshes. My question is: given a cold rectangular mesh and two hot circular meshes, is it possible to place the circles on the rectangle and see the heat exchange effect? For clarity I'm attaching the code I wrote. As you can see, I can overlap the geometries and see the final effect, however my aim is to sum the models, that should have a well specified (constant) temperature.
rect1 = [3
4
-1
1
1
-1
0
0
-0.5
-0.5];
C1 = [1
0.7
-0.25
0.15];
C2 = [1
-.7
-0.25
0.15];
C1 = [C1;zeros(length(rect1) - length(C1),1)];
C2 = [C2;zeros(length(rect1) - length(C2),1)];
gd = [rect1,C1,C2];
ns = char('rect1','C1','C2');
ns = ns'
sf = 'rect1+ C1 + C2';
[dl,bt] = decsg(gd,sf,ns);
figure(1);
pdegplot(dl,"EdgeLabels","on","FaceLabels","on")
xlim([-1.5,1.5])
model2 = createpde()
[dl2,bt2] = csgdel(dl,bt);
figure(2)
pdegplot(dl2,"EdgeLabels","on","FaceLabels","on")
geometryFromEdges(model2,dl2);
specifyCoefficients(model2,m=0,d=0,c=1,a=0,f=1);
applyBoundaryCondition(model2,'dirichlet', ...
'Edge',1:model2.Geometry.NumEdges, ...
'u',10);
mesh = generateMesh(model2,'Hmax',0.25);
results = solvepde(model2)
figure(3)
axis equal
pdeplot(model2,'XYData',results.NodalSolution)
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Geometry and Mesh dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
