Export triangle values of vertex and color after solve() is used to make a finite element analisys
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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?
0 Commenti
Risposte (1)
Poorna
il 31 Mar 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!
Vedere anche
Categorie
Scopri di più su Geometry and Mesh in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!