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

More
3 years 3 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
3 years 3 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
3 years 3 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
3 years 2 months ago #3932 by _lucasm
Thank you! it worked perfectly for what I need
Time to create page: 0.115 seconds