Export triangle values of vertex and color after solve() is used to make a finite element analisys

1 visualización (últimos 30 días)
Say we have an stl model imported, using importGeometry, later meshed with generateMesh, setting some structural properties and using solve to make an analysis, th is OK, then we use the command pdeplot3D and we get a colored version of the model showing stress, etc.
What we need is to get all values of the vertex of all triangles and also the color of each vertex and stress values so can be printed in a table or exported to a .csv file.
Already done or an example available?

Respuestas (1)

Poorna
Poorna el 31 de Mzo. de 2024
Hi alberto,
I see you want to get the traingle vertices of the mesh generated by "generateMesh" function. Those values are part of the mesh properties. Specifically, the Elements property within the FEMesh Properties holds the indices corresponding to the nodes of each triangle generated by the mesh.
model = createpde;
importGeometry(model,"Block.stl");
mesh = generateMesh(model,'GeometricOrder', 'linear');
processMesh(mesh.Elements); %define your own processMesh function to export the values.
To retrieve the actual vertex values, you can look into the NodalSolution property found in the results returned by the "solvepde" function. This property provides the solution values at the mesh nodes
Later, you can use "writeMatrix" or 'writeTable" functions to export the values to .csv files.
To know more about FEMesh properties refer to the following documentation:
To know more about the NodalSolution property refer to the below documentation:
Hope this Helps!
  1 comentario
alberto roman
alberto roman el 31 de Mzo. de 2024
The code in your answer (first half) is what we already have, we `d need the code to extract those values. Thanks anyway!!!

Iniciar sesión para comentar.

Etiquetas

Productos


Versión

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by