it's possible to update nodes value in a mesh that was created with pde toolbox?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Gabriel Pereira
am 22 Nov. 2018
Kommentiert: Gabriel Pereira
am 30 Nov. 2018
Hello,
i'm trying to update my mesh nodes values with the result of a simulation. What i like to do is something like this:
results = solvepde(model);
u = results.NodalSolutions;
mesh.Nodes = mesh.Nodes + u;
i know that this last line is wrong, but exist a function that do this?
0 Kommentare
Akzeptierte Antwort
Ravi Kumar
am 27 Nov. 2018
Hello Gabriel,
You can achieve this using geometryFromMesh function. Following your example:
results = solvepde(model);
u = results.NodalSolutions;
oldNodes = model.Mesh.Nodes;
newNodes = oldNodes + u';
elements = model.Mesh.Elements;
% Delete the geometry. As you will create new geometry with deformed mesh.
model.Geometry = []
newMesh = geometryFromMesh(model,newNodes,elements);
Regards,
Ravi
3 Kommentare
Ravi Kumar
am 30 Nov. 2018
Hi Gabriel,
Use the two LHS arguments to retain the same mesh as defined by newNodes and elements.
[geom, msh] = geometryFromMesh(model,newNodes,elements);
Regards,
Ravi
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Geometry and Mesh finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!