CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

GMSH and SU2 NPOIN/NELEM Errors

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 21, 2020, 16:27
Default GMSH and SU2 NPOIN/NELEM Errors
  #1
New Member
 
djpicho's Avatar
 
Join Date: Dec 2020
Posts: 3
Rep Power: 6
djpicho is on a distinguished road
Hello All,

I have been working to mesh a "crazy" airfoil I have made in GMSH but when inputting into SU2, SU2 generates the error:

"Mismatch between NPOIN and number of points listed in mesh file. Please check the mesh file for correctness."

For 3 days I have been trying to figure out what could possibly be going wrong but I'm stumped at this point. I have made new scripts after new scripts and learned a lot in the process but I seem to be getting nowhere. I have attached my .geo file in a text format for anyone who is willing to help me to take a look at. The common errors from what I have seen is not specifying volumes or surfaces correctly but I am 95% sure I have. Another common error is when hitting "Save all elements" on the export. I have avoided that. Even if I do "Save all elements" and error generates. The mesh generates in GMSH how I would want it to but SU2 refuses to accept it. The mesh file is too large to attach in here according to CFD Online. Again, I would greatly appreciate the help and the learning experience from this. Any thought out explanation would greatly help me learn more.

Thank you.
Attached Files
File Type: txt GeoFile.txt (1.4 KB, 19 views)
djpicho is offline   Reply With Quote

Old   January 20, 2021, 09:43
Default
  #2
New Member
 
Leonid
Join Date: Jan 2021
Posts: 1
Rep Power: 0
leonid-as is on a distinguished road
hi, I uploaded your grid, I got this picture.
Best regads
Attached Images
File Type: jpg pict.jpg (134.8 KB, 36 views)
leonid-as is offline   Reply With Quote

Old   January 20, 2021, 10:59
Default
  #3
New Member
 
djpicho's Avatar
 
Join Date: Dec 2020
Posts: 3
Rep Power: 6
djpicho is on a distinguished road
Hi,
Unfortunately when I try to upload the CAD file on here if gives me errors. Essentially a wing is supposed to stick out the center of that in the stream. GMSH doesn't mesh the geometry properly and SU2 gives out the error I am talking about when trying to run a simulation.

Thanks.
djpicho is offline   Reply With Quote

Old   January 26, 2021, 13:49
Default
  #4
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 679
Rep Power: 21
bigfootedrockmidget is on a distinguished road
This is usually because additional supporting points are saved that were used for e.g. defining circles.

The solution is to put the entire mesh surface (2D) or mesh volume (3D) into a physical group and then when saving you have to unselect the 'save all elements' option.

here is a piece of python code that you can use to check if you have unused points in your point list. You can copy-paste this into a jupyter labs session.

Code:
filename="bend.su2"
 def getnpoints():
    npoints=0
    with open(filename) as f:
        
        for line in f:
            l=line[0:4]
            if l=="NPOI":
                npoints=line.split()[1]
                print(npoints)
                break
    f.close()
    return (npoints)



# now loop over elements and check which points are used in the mesh
def getunusedpoints():
    numberarray=list(range(0,npoints))
    print("len=",len(numberarray))
    print(numberarray[1:4])
    nelems=0
    with open(filename) as f:
        line = f.readline()
        line = f.readline()
        if line[0:4]=="NELE":
            nelems=int(line.split()[1])
            print("number of elements=",nelems)
            
        counter=0
        for line in f:
            l = line.split()
            for i in range(1,len(l)-1):
                try:
                    numberarray[int(l[i])]=-1 
                except:
                    # do nothing
                    numberarray
                    
            if counter==nelems:
                break
            counter=counter+1
    
    unusedpointsarray=[]
    for i in numberarray:
        if i != -1:
            unusedpointsarray.append(i)            
    return(unusedpointsarray)


npoints = int(getnpoints())
print("number of points =",npoints)
 p = getunusedpoints()
bigfootedrockmidget is offline   Reply With Quote

Old   January 26, 2021, 14:00
Default
  #5
New Member
 
djpicho's Avatar
 
Join Date: Dec 2020
Posts: 3
Rep Power: 6
djpicho is on a distinguished road
I'll take a look at this and try to solve it. Thank you!
djpicho is offline   Reply With Quote

Old   March 9, 2021, 16:12
Default
  #6
Member
 
na
Join Date: Jul 2018
Posts: 90
Rep Power: 8
TKatt is on a distinguished road
Hi,
Can you try using the Coherence feature https://gmsh.info/doc/texinfo/gmsh.h...metry-commands ? I dont use the openCascade kernel so i don't know how that interacts


Cheers, Tobi
TKatt is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gmsh to SU2: NPOIN mhollander SU2 3 May 17, 2023 08:13
Gmsh does not ouput SU2 markers from physical surfaces stewels SU2 4 May 17, 2023 06:15
trouble running SU2 mesh made in gmsh hdavidcogollo SU2 1 November 29, 2020 01:00
Issue exporting su2 format from gmsh Gaetano03 SU2 6 September 21, 2018 12:18
Gmsh mesh to SU2 error : "corrupted size vs. prev_size" Cmac22 SU2 10 August 9, 2017 13:19


All times are GMT -4. The time now is 12:40.