CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 (https://www.cfd-online.com/Forums/su2/)
-   -   Problems while exporting .cgns mesh files from Salome (https://www.cfd-online.com/Forums/su2/245522-problems-while-exporting-cgns-mesh-files-salome.html)

CleverBoy October 11, 2022 07:03

Problems while exporting .cgns mesh files from Salome
 
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.
https://www.cfd-online.com/Forums/su...-mesh-su2.html


How can I export a mesh file from Salome?

jaywee October 11, 2022 08:38

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.

CleverBoy October 11, 2022 08:56

Quote:

Originally Posted by jaywee (Post 837277)
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

jaywee October 11, 2022 14:00

Quote:

Originally Posted by CleverBoy (Post 837279)
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.

CleverBoy October 11, 2022 15:30

2 Attachment(s)
Quote:

Originally Posted by jaywee (Post 837299)
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?

jaywee October 12, 2022 08:43

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 October 12, 2022 08:44

Quote:

Originally Posted by CleverBoy (Post 837304)
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.

CleverBoy October 12, 2022 10:04

Quote:

Originally Posted by jaywee (Post 837351)
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 (Post 837352)
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 October 13, 2022 09:17

Quote:

Originally Posted by jaywee (Post 837277)
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 October 13, 2022 09:53

Quote:

Originally Posted by CleverBoy (Post 837432)
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.

jaywee October 13, 2022 10:37

too busy period.... I will try to investigate later today or tomorrow....

bigfootedrockmidget October 13, 2022 16:39

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.

CleverBoy October 13, 2022 17:37

2 Attachment(s)
Quote:

Originally Posted by bigfootedrockmidget (Post 837472)
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?

bigfootedrockmidget October 14, 2022 04:54

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

CleverBoy October 15, 2022 09:12

Quote:

Originally Posted by bigfootedrockmidget (Post 837513)
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.

bigfootedrockmidget October 15, 2022 09:16

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.

CleverBoy October 15, 2022 09:42

1 Attachment(s)
Quote:

Originally Posted by bigfootedrockmidget (Post 837578)
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.

CleverBoy October 15, 2022 10:58

Solution
 
Quote:

Originally Posted by jaywee (Post 837446)
too busy period.... I will try to investigate later today or tomorrow....

Quote:

Originally Posted by bigfootedrockmidget (Post 837578)
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 :)

bigfootedrockmidget October 15, 2022 11:16

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.

giovanni.medici November 21, 2022 15:32

Quote:

Originally Posted by CleverBoy (Post 837580)
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


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