Using a curve to contrutct a geometry for a model in pde toolbox
22 views (last 30 days)
Show older comments
Dear all,
How could I consctruct a geometry using a curve (x-y coordinates) for a model in the pde toolbox?
For example if I have a wing section, is it possible to 'extrude' it and transform the solid in a geometry for a model?
2 Comments
John D'Errico
on 12 Jan 2024
If all you will do is extrude it, thus extend it in the perpendicular direction, then you should not do so. Instead, reduce the problem, since all derivatives in that cross direction should be zero. (Look for the terms plane stress and plane strain. You should have learned about them in your studies.) This is a common practice in engineering, thus converting a 3-dimensional problem to a problem in only 2 dimensions.
Is that correct here? Probably not, since you don't really want to simply extrude it in that direction, but make a profile that will change with Z, thus the third dimension.
Answers (1)
Aastha
on 26 Nov 2024 at 11:13
I understand that you want to perform an extrusion operation using the x-y coordinates for a wing section model with the MATLAB PDE toolbox. To do this, you first need to create a 2D geometry from your x-y coordinates and then use the "extrude" function in MATLAB from the PDE toolbox to carry out the extrusion.
To create a 2D geometry from the x-y coordinates, you can use the “polyshape” function in MATLAB. An example on how to use to the “polyshape” function is mentioned below:
geometry = polyshape(xcoordinates, ycoordinates(:, 2));
plot(geometry);
tr_geometry = triangulation(geometry);
Create a PDE model, visualize the geometry and then plot it. The MATLAB code snippet below provides an example on how to do so:
pdem = createpde; % Create a PDE Model
pdem.GeometryFromMesh(tr_geometry.Points', tr_geometry.ConnectivityList');
pdegplot(pdem, 'VertexLabels', 'on');
For any further information on “extrude”, “pdeplot”, “triangulation” and “polyshape” function, you may refer to the links of MathWorks documentation mentioned below:
- extrude: https://www.mathworks.com/help/releases/R2023b/antenna/ref/extrude.html?s_tid=doc_ta
- pdegplot: https://www.mathworks.com/help/releases/R2023b/pde/ug/femodel.pdegplot.html?s_tid=doc_ta
- triangulation: https://www.mathworks.com/help/releases/R2023b/matlab/ref/triangulation.html?s_tid=doc_ta
- polyshape: https://www.mathworks.com/help/releases/R2023b/matlab/ref/polyshape.html?s_tid=doc_ta
You can use the "extrude" function to extrude the model along the z-axis as illustrated in the MATLAB code below:
extrusionHeight = 4; % specify the extrusion height here
extrude(pdem.Geometry, extrusionHeight);
I hope this helps!
0 Comments
See Also
Categories
Find more on Geometry and Mesh in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!