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

Problems while exporting .cgns mesh files from Salome

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree5Likes
  • 1 Post By jaywee
  • 2 Post By CleverBoy
  • 1 Post By bigfootedrockmidget
  • 1 Post By giovanni.medici

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 11, 2022, 08:03
Default Problems while exporting .cgns mesh files from Salome
  #1
Member
 
Ercan Umut
Join Date: Aug 2022
Posts: 51
Rep Power: 4
CleverBoy is on a distinguished road
Hello everybody,


I am trying to export mesh files from the Salome in .cgns format but I have some errors while running the simulation.



When I run SU2_CFD this error pops up:

Code:
The configuration file doesn't have any definition for marker BAR_21-1100

I also exported file as .unv and opened it in GMSH so I can export it as .su2 but this time error was:
Code:
Could not find the keyword "NMARK=".
Check the SU2 ASCII file format.
I tried to convert cgns file by "cgnsconvert -a" but the first error occured again.

I read this post as well but I guess plug-in doesn't work anymore.
Salome cgns format mesh to SU2


How can I export a mesh file from Salome?

Last edited by CleverBoy; October 16, 2022 at 09:21.
CleverBoy is offline   Reply With Quote

Old   October 11, 2022, 09:38
Default
  #2
New Member
 
Jay Wee
Join Date: Oct 2022
Posts: 6
Rep Power: 4
jaywee is on a distinguished road
Could you post the cgns mesh here? Because the cgnsconvert fails, it is possible that the cgns mesh is either broken or based on tool old cgns library, which is incompatible with the su2.
jaywee is offline   Reply With Quote

Old   October 11, 2022, 09:56
Default
  #3
Member
 
Ercan Umut
Join Date: Aug 2022
Posts: 51
Rep Power: 4
CleverBoy is on a distinguished road
Quote:
Originally Posted by jaywee View Post
Could you post the cgns mesh here? Because the cgnsconvert fails, it is possible that the cgns mesh is either broken or based on tool old cgns library, which is incompatible with the su2.

Yes of course. I added Salome file at the attachment too. I am using Salome 9.8.


https://1drv.ms/u/s!AhBDg13OQn2zhA4Z...Zr_tE?e=e4UrEH
CleverBoy is offline   Reply With Quote

Old   October 11, 2022, 15:00
Default
  #4
New Member
 
Jay Wee
Join Date: Oct 2022
Posts: 6
Rep Power: 4
jaywee is on a distinguished road
Quote:
Originally Posted by CleverBoy View Post
Yes of course. I added Salome file at the attachment too. I am using Salome 9.8.


https://1drv.ms/u/s!AhBDg13OQn2zhA4Z...Zr_tE?e=e4UrEH

I checked the Mesh1.cgns, which is built on v4.1 CGNS lib. I checked the latest master of SU2, which is built on v4.2 CGNS lib, so the mesh is not the problem. From your post, I see one boundary is missing in the configuration file, please check your config file.
jaywee is offline   Reply With Quote

Old   October 11, 2022, 16:30
Default
  #5
Member
 
Ercan Umut
Join Date: Aug 2022
Posts: 51
Rep Power: 4
CleverBoy is on a distinguished road
Quote:
Originally Posted by jaywee View Post
I checked the Mesh1.cgns, which is built on v4.1 CGNS lib. I checked the latest master of SU2, which is built on v4.2 CGNS lib, so the mesh is not the problem. From your post, I see one boundary is missing in the configuration file, please check your config file.

Thank you so much for validation. I checked my .cfg file but as far as I can see, there is no problem with boundary conditions. I am attaching .cfg file with a picture from Salome so you can check it as well.

Could it be exporting group names wrong?
Attached Images
File Type: jpeg Salome.jpeg (31.1 KB, 23 views)
Attached Files
File Type: txt fire_II.txt (7.3 KB, 4 views)
CleverBoy is offline   Reply With Quote

Old   October 12, 2022, 09:43
Default
  #6
New Member
 
Jay Wee
Join Date: Oct 2022
Posts: 6
Rep Power: 4
jaywee is on a distinguished road
Could you post following things here? I want to duplicate your error:

1. all input files to SU2: mesh file, configuration file, etc.
2. the command to generate the error you posted in the first thread: "The configuration file doesn't have any definition for marker BAR_21-1100"
jaywee is offline   Reply With Quote

Old   October 12, 2022, 09:44
Default
  #7
New Member
 
Jay Wee
Join Date: Oct 2022
Posts: 6
Rep Power: 4
jaywee is on a distinguished road
Quote:
Originally Posted by CleverBoy View Post
Thank you so much for validation. I checked my .cfg file but as far as I can see, there is no problem with boundary conditions. I am attaching .cfg file with a picture from Salome so you can check it as well.

Could it be exporting group names wrong?

The mesh looks good to me. The SU2 seems like fail to read the correct boundary conditions.
jaywee is offline   Reply With Quote

Old   October 12, 2022, 11:04
Default
  #8
Member
 
Ercan Umut
Join Date: Aug 2022
Posts: 51
Rep Power: 4
CleverBoy is on a distinguished road
Quote:
Originally Posted by jaywee View Post
Could you post following things here? I want to duplicate your error:

1. all input files to SU2: mesh file, configuration file, etc.
2. the command to generate the error you posted in the first thread: "The configuration file doesn't have any definition for marker BAR_21-1100"

Yes of course. https://1drv.ms/u/s!AhBDg13OQn2zhA-G...XAT37?e=NPc9ex

The code and output:
Code:
 
SU2_CFD fire_II.cfg  
.
.
.
.
Error in "short unsigned int CConfig::GetMarker_CfgFile_TagBound(std::string) const": 
-------------------------------------------------------------------------
The configuration file doesn't have any definition for marker BAR_21-1100
------------------------------ Error Exit -------------------------------


--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.
Quote:
Originally Posted by jaywee View Post
The mesh looks good to me. The SU2 seems like fail to read the correct boundary conditions.

I didn't put a lot of work on mesh because I am just trying the simulation to work.
CleverBoy is offline   Reply With Quote

Old   October 13, 2022, 10:17
Default
  #9
Member
 
Ercan Umut
Join Date: Aug 2022
Posts: 51
Rep Power: 4
CleverBoy is on a distinguished road
Quote:
Originally Posted by jaywee View Post
Could you post the cgns mesh here? Because the cgnsconvert fails, it is possible that the cgns mesh is either broken or based on tool old cgns library, which is incompatible with the su2.

I tried the .cgns Mesh file with a configuration file from the tutorials but the outcome is same. I tried a different geometry and a mesh with different cfg files but error was same with different marker numbers. Were you able to look at the files?
CleverBoy is offline   Reply With Quote

Old   October 13, 2022, 10:53
Default
  #10
Member
 
Ercan Umut
Join Date: Aug 2022
Posts: 51
Rep Power: 4
CleverBoy is on a distinguished road
Quote:
Originally Posted by CleverBoy View Post
I tried the .cgns Mesh file with a configuration file from the tutorials but the outcome is same. I tried a different geometry and a mesh with different cfg files but error was same with different marker numbers. Were you able to look at the files?

When I use the marker name in the Error in my cfg file for a boundary condition, it works. I can't say which boundary is it though, so it is not a solution for this problem.
CleverBoy is offline   Reply With Quote

Old   October 13, 2022, 11:37
Default
  #11
New Member
 
Jay Wee
Join Date: Oct 2022
Posts: 6
Rep Power: 4
jaywee is on a distinguished road
too busy period.... I will try to investigate later today or tomorrow....
CleverBoy likes this.
jaywee is offline   Reply With Quote

Old   October 13, 2022, 17:39
Default
  #12
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 672
Rep Power: 21
bigfootedrockmidget is on a distinguished road
Save your result after 1 iteration in su2 as a paraview multiblock file. You can then view the mesh and all the boundaries in paraview.
bigfootedrockmidget is offline   Reply With Quote

Old   October 13, 2022, 18:37
Default
  #13
Member
 
Ercan Umut
Join Date: Aug 2022
Posts: 51
Rep Power: 4
CleverBoy is on a distinguished road
Quote:
Originally Posted by bigfootedrockmidget View Post
Save your result after 1 iteration in su2 as a paraview multiblock file. You can then view the mesh and all the boundaries in paraview.

Yes, I did that. I guess Salome exports the BCs not the way I wanted. As you can see from the picture, all the edges of domain are selected as surface and groups I defined on Salome are not shown. I imported geometry to Salome as STEP at first. Could it be related with this?
Attached Images
File Type: jpg 1.jpg (56.6 KB, 13 views)
File Type: jpeg 2.jpeg (48.3 KB, 7 views)
CleverBoy is offline   Reply With Quote

Old   October 14, 2022, 05:54
Default
  #14
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 672
Rep Power: 21
bigfootedrockmidget is on a distinguished road
use this in su2:
Code:
OUTPUT_FILES= PARAVIEW_MULTIBLOCK
and then view the paraview vtm file. You can then individually visualize the boundaries and identify where the problem is. I guess salome does not export the boundaries correctly, or a boundary was not defined in salome and it was given some default name. From salome, the best is probably to export it to cgns, and then make sure that the cgns is in adf format. I think salome does not support cgns-adf format, so you have to convert it with
Code:
cgnsconvert
bigfootedrockmidget is offline   Reply With Quote

Old   October 15, 2022, 10:12
Default
  #15
Member
 
Ercan Umut
Join Date: Aug 2022
Posts: 51
Rep Power: 4
CleverBoy is on a distinguished road
Quote:
Originally Posted by bigfootedrockmidget View Post
use this in su2:
Code:
OUTPUT_FILES= PARAVIEW_MULTIBLOCK
and then view the paraview vtm file. You can then individually visualize the boundaries and identify where the problem is. I guess salome does not export the boundaries correctly, or a boundary was not defined in salome and it was given some default name. From salome, the best is probably to export it to cgns, and then make sure that the cgns is in adf format. I think salome does not support cgns-adf format, so you have to convert it with
Code:
cgnsconvert

Thank you for explanation. I tried "cgnsconvert" before as I mentioned above, output doesn't change.



I viewed the output in .vtm format and saw that there is only 1 boundary defined as "BAR_21-1100" and nothing else. It seems as the outer edge of the full domain. I guess I am doing something wrong or there is something wrong with Salome but I couldnt figured it out yet.
CleverBoy is offline   Reply With Quote

Old   October 15, 2022, 10:16
Default
  #16
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 672
Rep Power: 21
bigfootedrockmidget is on a distinguished road
Did you give the outer boundary a name in salome, like FarField or something? Is the outer boundary somehow taken into account twice in the mesh?

If it is just salome giving the outer boundary some default name, then everything should work as expected.
bigfootedrockmidget is offline   Reply With Quote

Old   October 15, 2022, 10:42
Default
  #17
Member
 
Ercan Umut
Join Date: Aug 2022
Posts: 51
Rep Power: 4
CleverBoy is on a distinguished road
Quote:
Originally Posted by bigfootedrockmidget View Post
Did you give the outer boundary a name in salome, like FarField or something? Is the outer boundary somehow taken into account twice in the mesh?

If it is just salome giving the outer boundary some default name, then everything should work as expected.

Yes, I named boundaries as farfield, symmetry and wall.


I guess Salome doesn't export boundaries as individuals but sees them as one and names it itself.


I uploaded the file if you'd like to check it out.
Attached Files
File Type: txt fire_II.vtm.txt (435 Bytes, 3 views)
CleverBoy is offline   Reply With Quote

Old   October 15, 2022, 11:58
Default Solution
  #18
Member
 
Ercan Umut
Join Date: Aug 2022
Posts: 51
Rep Power: 4
CleverBoy is on a distinguished road
Quote:
Originally Posted by jaywee View Post
too busy period.... I will try to investigate later today or tomorrow....
Quote:
Originally Posted by bigfootedrockmidget View Post
Did you give the outer boundary a name in salome, like FarField or something? Is the outer boundary somehow taken into account twice in the mesh?

If it is just salome giving the outer boundary some default name, then everything should work as expected.
I might have figured it out. In the Salome web page it says "Only MED format supports all types of elements that can be created in the module." https://docs.salome-platform.org/lat...ng-meshes-page

I guess it means when we create groups under the mesh module and export it in a format any other than MED, they don't include the groups that was either created or transferred from the geometry module.

I exported the mesh as MED, then opened it up with GMSH and exported it again as .su2 file. After these everything seem to worked out.

Thanks for your time and help! bigfootedrockmidget, jaywee

Last edited by CleverBoy; October 15, 2022 at 15:28.
CleverBoy is offline   Reply With Quote

Old   October 15, 2022, 12:16
Default
  #19
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 672
Rep Power: 21
bigfootedrockmidget is on a distinguished road
ok, after some googling it looks like it is a known export problem in salome.

It looks like the solution is indeed to export it to another format and then try to convert it to cgns or su2 with another tool.
CleverBoy likes this.
bigfootedrockmidget is offline   Reply With Quote

Old   November 21, 2022, 16:32
Default
  #20
Member
 
Giovanni Medici
Join Date: Mar 2014
Posts: 48
Rep Power: 12
giovanni.medici is on a distinguished road
Quote:
Originally Posted by CleverBoy View Post
I might have figured it out. In the Salome web page it says "Only MED format supports all types of elements that can be created in the module." https://docs.salome-platform.org/lat...ng-meshes-page

I guess it means when we create groups under the mesh module and export it in a format any other than MED, they don't include the groups that was either created or transferred from the geometry module.

I exported the mesh as MED, then opened it up with GMSH and exported it again as .su2 file. After these everything seem to worked out.

Thanks for your time and help! bigfootedrockmidget, jaywee
Dear @CleverBoy,
I'm happy to see that you found a way out, I'll definitely worth a try. As for now I've always used a small python routine that I found online and ad-hoc
modified, which natively exports in su2 from salome (ASCII).

You may give it a try here
CleverBoy likes this.
giovanni.medici is offline   Reply With Quote

Reply

Tags
cgns, mesh, salome

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 08:38
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 06:38
UDF issue MASOUD Fluent UDF and Scheme Programming 14 December 6, 2012 14:39
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 04:52
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 04:01


All times are GMT -4. The time now is 19:03.