Determine subdomains for 3D models in the PDE toolbox

6 ビュー (過去 30 日間)
Zoi T.
Zoi T. 2016 年 12 月 14 日
回答済み: Alan Weiss 2016 年 12 月 14 日
Hello,
I am having some trouble with 3D examples in the PDE toolbox. I would like to have subdomains with different parameter values for a simple diffusion problem. However, I have not found a way to define my subdomains. I tried defining and .stl type format by
[x1,y1,z1] = meshgrid(-2:4:2);
[x2,y2,z2] = meshgrid(-1:2:1);
x1 = x1(:); y1 = y1(:); z1 = z1(:);
x2 = x2(:); y2 = y2(:); z2 = z2(:);
K1 = convhull(x1,y1,z1); K2 = convhull(x2,y2,z2);
nodes = [[x1; x2]';[y1; y2]';[z1; z2]'];
elements = [K1', K2'+size(x1,1)];
model = createpde();
geometryFromMesh(model,nodes,elements);
This should create two surfaces of two cubes one within the other. When I try to call the mesh generation function though, by
generateMesh(model,'Hmax',0.5,'Hmin',0.2);
MATLAB shuts down (Error message: "MATLAB has encountered an internal error and needs to close").
I am assuming that there is some problem with the tetrahedral mesh generation. But what could it be? Calling the function works fine if I have only one cube.
It looks like subdomain tags are supported, because if I check at the [p,e,t] matrices from by the function
[p,e,t] = meshToPet(model.Mesh);
the t matrix has an extra entry for subdomain tags (i.e. if my elements are linear each element has 4 entries with the node indices and a 5th entry set to 1).
Am I right to assume that if I import a tetrahedral mesh file file with predefined subdomains I can work with the PDE creation and specification functions as in the 2D cases?
Can I replace the FEMesh in my model by one created externally?
The only workaround I have found so far is this Previous question "How can I specify different PDE coefficients for different regions in a 3D geometry using PDE toolbox?" by determining coefficients in function form. However my subdomains correspond to isosurfaces for different material densities and cannot be geometrically described.
Thank you in advance.

採用された回答

Alan Weiss
Alan Weiss 2016 年 12 月 14 日
Sorry, but as it states in the previous question you linked to, subdomains are currently not supported for 3D.
Alan Weiss
MATLAB mathematical toolbox documentation

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by