Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Trying to geneterate a 2-D periodic Mesh with second order elements

More
2 years 8 months ago #3903 by _lucasm
Hello,

I’m trying to use NETGEN to generate a 2-D periodic Mesh.

I’m using Windows 10, and my idea is to upload a python file through “Solve/Load Python” from the menu and save the “vol” file I’ll next upload to my code on Matlab.

The problem is: I need second order elements, but I’m not getting how to set this. I made the python file attached to this post, but Netgen gives me the message “AttributeError: 'ngsolve.comp.Mesh' object has no attribute 'SecondOrder'”.

Thank you in advance for any idea that can help me on this.
Attachments:
More
2 years 7 months ago #3916 by _lucasm
Hello,

I’ve been reading the documentations and examples I found online, but I still couldn’t set netgen, using my python code, to generate the mesh with second order triangular element (TRIG6).

The python file I’m using is attached to this post.

Still, any help would be greatly appreciated.
More
2 years 7 months ago #3919 by mneunteufel
Hi,

the NGSolve-mesh does not have the SecondOrder method, but the underlying NETGEN mesh does, which can be accessed through the ngmesh attribute:
Code:
mesh = Mesh(periodic.GenerateMesh(maxh=0.1)) mesh.ngmesh.SecondOrder() Draw(mesh)

Best,
Michael
More
2 years 7 months ago #3932 by _lucasm
Thank you! it worked perfectly for what I need
Time to create page: 0.116 seconds