refine mesh in PDEModel
22 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
d
el 25 de Ag. de 2015
Respondida: Ian Jentz
el 2 de Oct. de 2020
Hello, I'm trying to solve a laplace equation using PDEModel. I created the mesh object like this:
model=createpde;
msh=generateMesh(model,'Hmax',l/20);
But it looks like it is not good enough (there are no nodes in the bulk). Is there a way to refine the mesh in the PDEModel?
I also tried to refine it like this:
[p,e,t] = meshToPet(msh);
[p,e,t] = refinemesh(dl,p,e,t);
But I dont know how to convert the [p,e,t]-mesh into FEMesh and insert it to the PDEModel object. Is there an opposite function to the meshToPet maybe?
I attached to pictures of the mesh using "generateMesh" command and mesh using "refinemesh" command and
0 comentarios
Respuesta aceptada
Alan Weiss
el 27 de Ag. de 2015
You cannot refine a mesh using a PDEModel. You have to import the geometry (I assume that you did that before trying to create a mesh) and then call generateMesh using an appropriate value of Hmax. If you need more nodes, just call generateMesh again using a smaller value of Hmax.
Alan Weiss
MATLAB mathematical toolbox documentation
9 comentarios
shixiang zhao
el 10 de Feb. de 2017
Hello, I am thinking about this problem these days, I am dealing with plane stress problems and studying stresses of the edges of a hole in an plate. I understand that it's better to use 'assempde' to get the solves, because I want more nodes in edges of the hole (I need to refine mesh). But this way, I can only get solutions 'u' which means x-displacements in plane stress problems, while by using PDEmodel I can get 'result.NodalSolution' and 'result.XGradients','result.YGradients' which contains displacements and deformations. And the more important thing is in 'result.NodalSolution' I get a matrix (n-by-2,where n is quantity of all nodes) which means the x- and y-displacements. But 'u = assempde' give me only a vector which means x-displacement. Shortly speaking, I want to refine mesh to get more nodes in the edges of hole and at the same time I need to get a n-by-2 matrix at the output of my program. But I can't figure out how to get them both. Hoping that you can give me some advice and I will really appreciate that.
Mohamed NJH
el 1 de Dic. de 2019
Hello Shixiang,
I am facing the same problem as you. Were you able to refine mesh using PDEModel or evaluating the gradient of the solution using [p e t ] mesh? Thank you in advance
Más respuestas (1)
Ian Jentz
el 2 de Oct. de 2020
There is now a port of refinemesh() available for PDEModel. Like refinemesh(), it works for 2D linear triangular geometries only.
This is how you would run your problem:
model=createpde;
msh=generateMesh(model,'Hmax',l/20);
model = refinePDEMmesh(model);
0 comentarios
Ver también
Categorías
Más información sobre General PDEs en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!