Does the Matlab 2023a allow to solve 3D partial differential equations?

33 次查看(过去 30 天)
I need to get a stationary heat field in a 3D object with heat source and convection. Does current Matlab version allow it?
Thanks
  5 个评论
Fyodor Tatarinov
Fyodor Tatarinov 2024-10-25,15:40
I looked in the examples. Most of examples (https://www.mathworks.com/help/pde/examples.html?category=geometry-and-mesh&s_tid=CRUX_topnav) are about importing the geometry from the files, which is not the case, as I need to create it myself.
Really I need a thin cylinder (needle) incerted RADIALLY in a big cylinder down to a certain depth (in the first approximation I can take a cube, assuming that outer cylinder is big enough). There are options as multicuboid and multicylinder, but I did not find the options of shift (there is only Zoffset, but not X- and Y-offset) and rotation, so, as I understood, multicylinder function can create only cylinders with the same axis.
It is also possible to create a meshgrid and then determine a volume inside it by some conditions (as in the example "Sphere in cube" in the helper, but in my case the regular rectangular grid will be either too rough inside th needle or too fine outside, I need a tetraeder grid with changing size, as it is generated in 2D.
Torsten
Torsten 2024-10-25,17:57
I don't have experience in creating geometries and meshes using the PDE Toolbox, sorry.

请先登录,再进行评论。

回答(2 个)

Pavl M.
Pavl M. 2024-10-18
Of course OK.

Ravi Kumar
Ravi Kumar 2024-10-25,21:48
编辑:Ravi Kumar 2024-10-26,1:01
Hi Fyodor,
You can create the geometry that you describe in PDE Toolbox. Here is an example. Adjust the dimensions as per your problem:
First create a 2-D geometry with two concentric circles. We will extrude this 2-D geometry to get the desired 3-D shape.
C1 = [1;0;0;0.5];
C2 = [1;0;0;1];
sf = 'C1+C2';
ns = char('C1', 'C2');
gd = [C1,C2];
gm2D = fegeometry(decsg(gd,sf,ns'));
pdegplot(gm2D)
Next, extrude the geometry for two heights to get a stack of concentric cylinders.
gm3D = extrude(gm2D,[0.5,0.5]);
pdegplot(gm3D,'FaceLabels','on')
Then you can extrude only the inner face at the top.
gm3D = extrude(gm3D,6,0.5);
pdegplot(gm3D,'CellLabels','on','FaceAlpha',0.5)
By now, you have the geometry you need. We can do some cleanup to remove unwanted cells using mergeCells() function.
gm3D = mergeCells(gm3D,[1,2]);
pdegplot(gm3D,'CellLabels','on','FaceAlpha',0.5)
gm3D = mergeCells(gm3D,[1,2]);
pdegplot(gm3D,'CellLabels','on','FaceAlpha',0.5)
gm3D = mergeCells(gm3D,[2,3]);
pdegplot(gm3D,'CellLabels','on','FaceAlpha',0.5)
I would also suggest you consider performing an axisymmetric analysis, that would reduce the problem size drastically. Please see this example.
  3 个评论
Fyodor Tatarinov
Fyodor Tatarinov 2024-10-26,11:28
Hi Ravi,
Thank you for your detailed answer. Unfortunately it is not my case, because I have not coaxial, but perpendicular cylinders (really a needle inserted into tree trunc), and I did not find the option to rotate cylinders.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Geometry and Mesh 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by