GenerateMesh not working in matlab 2016
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
0 개 추천
I can't use generatemesh in my 2016 matlab. Is there a problem with it or is the version too old for this funciton? Is there any way to do the genereatemesh with a function created by me? We need to make a study where we use finite element method ans Gauss. For that we need to use nodes in a specific form and calculate the heat flux for each one. So in this generatemesh eah node has to have information for itself.
채택된 답변
Steven Lord
2018년 4월 26일
0 개 추천
The item at the end of the documentation page for generateMesh indicates it was introduced in release R2015a. There are a couple different potential reasons why you would not be able to successfully use this function.
- It is part of Partial Differential Equations Toolbox, so you will need to have that product installed and licensed to use this function. You can check the ver function to determine if you have it installed.
- This function requires its first input to be a PDEModel created with createpde. You cannot simply call it with a matrix or array as the first input.
If neither of those issues apply to your attempted use of this function, please show us what happens (with a SMALL section of code, ideally) when you try to use it. If you receive a warning or error message when you try to run that code, show the full text (everything in orange or red) of the warning or error message.
댓글 수: 7
Thank's for the help, I do have the toolbox instaled, but i still got a problem. The purpose of the project is to create a model of heat transfer for a specific form. The "createpde" already gives information that has to be made by me. I just wanted the "generatemesh" to make the mesh with a number of nodes that i could choose and that each nodde could contain information for the final plot
Ravi Kumar
2018년 4월 27일
Are you saying "createpde" works on your installation of MATLAB and "generateMesh" doesn't? That would be unusual and is not an expected behavior.
As Steve said, providing a code example along with the error/warning that you are encountering would help us understand the issue you are facing.
This is what I've got. Thanks for the help.
Steven Lord
2018년 4월 27일
On line 11 of your bloco code, you create g using decsg. That function returns the "Decomposed geometry matrix, returned as a matrix of double-precision numbers."
As per the second bullet point in my answer, generateMesh requires its first input to be a PDEModel object, not a numeric matrix.
I believe what your code is missing is a call to geometryFromEdges. I think the first example on that documentation page can serve as a model for your code. When I ran that code then called generateMesh(model) and pdemesh(model) I saw the mesh.
Thanks for the help Steven. You helped me a lot. Meanwhile another problem appeared. When trying to make the quadratic mesh, I only get triangules instead of regular rectangules. How can I fix this?
The documentation for generateMesh starts off with the description "Create triangular or tetrahedral mesh". I wouldn't expect it to try to mesh with rectangles. In the "More About" section on that page it describes that triangles representing quadratic elements have nodes at the triangle corners and edge centers, and that matches what I see when I update the graphics to include markers for the nodes. [I'm using release R2018a to run this code, but I think I'm not using anything newer than your release.]
>> model = createpde;
>> r1 = [3 4 -0.5 0.5 0.5 -0.5 -0.8 -0.8 0.8 0.8];
>> r2 = [3 4 -0.05 0.05 0.05 -0.05 -0.4 -0.4 0.4 0.4];
>> gdm = [r1; r2]';
>> g = decsg(gdm, 'R1-R2', ['R1'; 'R2']');
>> geometryFromEdges(model, g);
>> generateMesh(model, 'GeometricOrder', 'quadratic');
>> h = pdemesh(model);
>> h(1).Marker = 'o';
>> h(2).Marker = '^';
So I don't think you can "fix" this; I don't think anything's wrong, unless I'm misunderstanding your concern.
Thanks again Steven. I didn't tell you my problem clearly. For that I'm sorry for waisting your time. Now I know that for my project I can't use this function because i need the nodes to be in especific positions with a certain lenght between them. Nevertheless thanks for your help. I'll probabily ask something here in the future. I'll look for your answer ;^) Take care.
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Geometry and Mesh에 대해 자세히 알아보기
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
