Filter löschen
Filter löschen

PDE Toolbox: How do I prevent two 2D geometries from merging together within the creation of my model?

3 Ansichten (letzte 30 Tage)
Good morning everyone,
This topic was already discussed within another request, which I will link below. Unfortunately, the problem was never solved. This is also the reason why I post this again. https://nl.mathworks.com/matlabcentral/answers/372544-stacked-multi-cuboid-geometries-with-pde-toolbox-for-thermal-analysis?s_tid=srchtitle
I am trying to define a model with multiple 2D geometries. Most of the geometries are sharing one boundary condition with each other. If I am now adding multiple geometries, MATLAB starts merging the geometries which are touching each other into one larger geometry. The small section of the structure that I want to obtain is represented in the following picture. I achieved this result by creating all the geometries by themself and plot them into one graph.
As it can be seen, in the upper left-hand corner are multiple geometries touching. The blue highlighted geometry is the outer wall of the container. The red highlighted area (under E1) is representing the insulation on the inside of the wall. The orange highlighted geometry is representing the area in which the air can circulate inside the room. Hoverer, If I am trying to implement all these geometries within one single model, I get the following result:
As it is clearly visible, the geometry does not consist of multiple separated areas.
For creating the blue wall (first picture), I was adding two rectangles with the desired shape in such a way, that the surfaces are fusing, and I end up with one geometry. I was doing the same approach with the area of the gas (first picture). The code that I used for doing so is displayed below:
% Wall (blue, first picture)
R_os_o = [3,4, -r_os_i, -r_os_o, -r_os_o, -r_os_i, h_os_i, h_os_i, 0, 0]';
R_os_i = [3,4, 0, -r_os_o, -r_os_o, 0, h_os_o, h_os_o, h_os_i, h_os_i]';
% Gas (orange, first picture)
R_fg_o = [3,4, -r_ic_o, -r_iw_i, -r_iw_i, -r_ic_o, h_ic_o, h_ic_o, 0, 0]';
R_fg_i = [3,4, 0, -r_iw_i, -r_iw_i, 0, h_os_i, h_os_i, h_ic_o, h_ic_o]';
% Insulation (red, first picture)
R_iw = [3,4, -r_iw_i, -r_iw_o, -r_iw_o, -r_iw_i, h_iw, h_iw, 0, 0]';
After describing the 3 geometries, I am adding them into one Matrix:
gd_os = [R_os_o, R_os_i, R_fg_o, R_fg_i, R_iw];
Then I create name tags for the different shapes:
ns_os = char('R_os_o','R_os_i','R_fg_o','R_fg_i','R_iw');
ns_os = ns_os';
Afterwards, I create the formula which is describing my overall shape:
sf_os = '(R_os_o + R_os_i)+ R_iw +(R_fg_o + R_fg_i)';
This is where it gets interesting/problematic. The first bracket is used for creating the fused geometry for the outside wall (blue, first picture). The second bracket is used to create the shape of the fused gas area (orange, first picture). This step is necessary because they do not have a rectangular shape and cannot be created through a single rectangle. The part in between (R_iw) is describing the shape of the insulation (red, first picture).
By implementing the two '+' signs, MATLAB is actually fusing all of the interconnecting areas to one whole common area. If I try to implement the code without the '+' signs or try to replace them with '-' signs, the code does not work anymore.
For completion, in the final step I decompose the matrix and plot the results (with and without the boundary conditions displayed)
% create geometrys and remove face boundaries
[dl_os,bt_os] = decsg(gd_os,sf_os,ns_os);
% geometry with face boundaries
figure('Name', 'Boundary conditions included')
pdegplot(dl_os,'EdgeLabels','on','FaceLabels','on')
xlim([-3.5,0])
ylim([-2.5,6])
% geometrie without face boundaries
[dl_os_2,bt_os_2] = csgdel(dl_os,bt_os); % removes face boundaries
figure('Name', 'Boundary conditions removed')
pdegplot(dl_os_2,'EdgeLabels','on','FaceLabels','on')
xlim([-3.5,0])
ylim([-2.5,6])
I tried a work around by creating all the different shapes only by themself and include them later in my final model. However, this was unfortunately not working. It seems that its only possible to assign one single geometry to the model of the thermal analyse.
For creating the model I was using the code "geometryFromEdges(model,g)" under "Point 3" of the following web-page: https://nl.mathworks.com/help/pde/ug/solve-problems-using-pdemodel-objects.html
Another method that I was trying was implementing multiple "geometryFromEdges(model,g)" models within the thermal analyse. Unfortunately, this was not possible. At the moment they do only support implementing a single model in the thermal analysing toolbox.
So far, I do not have any other ideas how I could resolve this issue. The only "solution" that I can think of is implementing tiny gaps between the different shapes. However, this will result in not foreseeable influences of the thermal analyse and will cause too much uncertainty in the final result.
I appreciate any idea and new input in order to resolve this issue.
Best regards,
Erebros

Antworten (0)

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by