importGeometry pde not closed volume H I Beam Partial Differential Equation Toolbox
Afficher commentaires plus anciens
Hello everyone. I'd appreciate if you can give me a hand.
I'm creating a H beam STL file in matlab and trying to load it in pde tool but it says:
Error using pde.DiscreteGeometry
Failed to create geometry, the input does not form a closed volume.
This may be due to missing faces or gaps in the input.
The thing is that the stl file is for sure okay. I check the geometry with two different software (3d builder from windows) and AutodeskSimstudio Tools 2016 R3. Both shows a closed volume mesh (empty of course). Even Simstudio can create a full volume (not empty) thanks to the fact that the mesh is closed.
I attach some pictures of the STL and the STL itself (.zip).
Inside view:
Outside view: 

View from Autodesk (to take a look of the triangles) : 

The code I used here (I attach the other two functions to run it):
clc
clear all
close all
a1=2;
b1=1;
c1=2;
d1=0.5;
k=20;
a2=2;
b2=1;
c2=2;
d2=0.5;
nodes = [...
-a1/2 0 0; ...
-a1/2 0 b1; ...
-d1/2 0 b1; ...
-d1/2 0 b1+c1; ...
-a1/2 0 b1+c1; ...
-a1/2 0 b1+b1+c1; ...
a1/2 0 b1+b1+c1; ...
a1/2 0 b1+c1; ...
d1/2 0 b1+c1; ...
d1/2 0 b1; ...
a1/2 0 b1; ...
a1/2 0 0; ...
a2/2 k 0+(b1+c1/2-c2/2-b2); ...
a2/2 k b2+(b1+c1/2-c2/2-b2); ...
d2/2 k b2+(b1+c1/2-c2/2-b2); ...
d2/2 k b2+c2+(b1+c1/2-c2/2-b2); ...
a2/2 k b2+c2+(b1+c1/2-c2/2-b2); ...
a2/2 k b2+c2+b2+(b1+c1/2-c2/2-b2); ...
-a2/2 k b2+c2+b2+(b1+c1/2-c2/2-b2); ...
-a2/2 k b2+c2+(b1+c1/2-c2/2-b2); ...
-d2/2 k b2+c2+(b1+c1/2-c2/2-b2); ...
-d2/2 k b2+(b1+c1/2-c2/2-b2); ...
-a2/2 k b2+(b1+c1/2-c2/2-b2); ...
-a2/2 k 0+(b1+c1/2-c2/2-b2) ];
%edges = [1 2;2 3;3 4;4 5;5 6;6 7;7 8;8 9;9 10;10 11;11 12];
% faces are oriented such that normals point outwards
f1 = [1 12 11 2; 3 10 9 4; 5 8 7 6]; %root face
f2 = f1+12; %tip face
f3 = [12 13 14 11; 10 11 14 15; 9 10 15 16; 8 9 16 17; 7 8 17 18; 6 7 18 19; 5 6 19 20; 4 5 20 21; 3 4 21 22; 2 3 22 23 ; 1 2 23 24 ; 12 1 24 13];
faces = [f1;f2;f3];
tri = triangulateFaces(faces);
fv.faces = tri;
fv.vertices = nodes;
stlwrite('Hbeam.stl',fv);
smodel = createpde('structural','static-solid');
importGeometry(smodel, 'Hbeam.stl');
Thank you!
2 commentaires
Cris LaPierre
le 17 Jan 2022
Modifié(e) : Cris LaPierre
le 17 Jan 2022
What is the value of n?
fv.vertices = n;
Does n = nodes?
jose daniel hoyos giraldo
le 17 Jan 2022
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!










