필터 지우기
필터 지우기

refine mesh in PDEModel

조회 수: 11 (최근 30일)
d
d 2015년 8월 25일
답변: Ian Jentz 2020년 10월 2일
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

채택된 답변

Alan Weiss
Alan Weiss 2015년 8월 27일
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
shixiang zhao
shixiang zhao 2017년 2월 10일
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
Mohamed NJH 2019년 12월 1일
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

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Ian Jentz
Ian Jentz 2020년 10월 2일
There is now a port of refinemesh() available for PDEModel. Like refinemesh(), it works for 2D linear triangular geometries only.
The new PDEModel compatible function is refinePDEMmesh().
This is how you would run your problem:
model=createpde;
msh=generateMesh(model,'Hmax',l/20);
model = refinePDEMmesh(model);

카테고리

Help CenterFile Exchange에서 General PDEs에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by