Extract element list from genereted mesh by matlab

3 次查看(过去 30 天)
Hi,
I had generated the mesh in photo, i need to extract and put in a vector the name of each elements that are displayed, how can i do?
The mesh was generated with this command:
generateMesh(model,'GeometricOrder','linear')
thak you :)Elements_name.jpg
  3 个评论
Guillaume
Guillaume 2019-11-5
Luca Raffaelli's comment originally posted as an answer moved here:
I need to generet a vector (1,N) in wich will be insert the numbers of each edge of the rectangualer elements, I need this becuse this vector will be used in a boundary condition fo a navier-stokes problem.
thank you
Ganesh Regoti
Ganesh Regoti 2019-12-12
Hi,
May I know how you are adding the geometry to the model?
The edge names are assigned in the same order as of the points in geometry. So if you have geometry information, you can create the edge-name vectors directly from it.

请先登录,再进行评论。

采纳的回答

Luca Raffaelli
Luca Raffaelli 2019-12-12
编辑:Luca Raffaelli 2019-12-12
SOLUTION FOUND!
when i generate the mesh each node in the p matrix have an id (his position in vector), so if I have the id of 2 nodes i can find the combination of both 2 in the t matrix.
Beside that, if somelse just want to have all the IDs of the edges of the structure inside the box, it's sufficient to just identify the 4 point of the outside box and after that their IDs. One this is done, from all the IDs of the t matrix is only need to remove those four and you have an array with listed all the IDs of the edge inside the box.
To perform all this operation the PDE toolbox is needed!

更多回答(0 个)

类别

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