CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Gmsh] How to create one solid per surface when exporting STL files?

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By Reptider
  • 3 Post By saladbowl

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 22, 2021, 07:59
Default How to create one solid per surface when exporting STL files?
  #1
New Member
 
Join Date: Sep 2020
Posts: 28
Rep Power: 5
Reptider is on a distinguished road
Hello!
I create physical surfaces for using them in OpenFOAM later in .geo thanks to:
Code:
Merge "fisrt.stl";
Surface Loop(1) = {1};  // first surface*
Physical Surface("firstWall") = {1};

Merge "second.stl";
Surface Loop(2) = {2};  // second surface*
Physical Surface("secondWall") = {2};

Volume(1) = {1,2};
Physical Volume("Volume") = {1};
I can create a stl file using Export -> ASCII + per physical surfaces and receive nessecary results in stl file like:
Code:
solid firstWall
... 
endsolid firstWall
solid secondWall
...
endsolid secondWall
However, when I use in the terminal this command: "gmsh -2 name.geo -o name.stl:, I get a single solid:
Code:
solid Created by Gmsh
...
endsolid Created by Gmsh
How can I do this operation using only the terminal?
Thanks!
saladbowl likes this.
Reptider is offline   Reply With Quote

Old   May 17, 2021, 20:44
Default
  #2
New Member
 
Juan Salazar
Join Date: Jun 2019
Posts: 19
Rep Power: 6
saladbowl is on a distinguished road
I figured a way to do this by changing some default options in gmsh. I am using version 4.8.1. Open the GUI, then

Help --> Current Options and Workspace

Then search for the option Mesh.StlOneSolidPerSurface and set it to 2;

Mesh.StlOneSolidPerSurface = 2;

Click Update (lower right corner)

Before closing gmsh, go to Menu "Tools", select "Options", select "Advanced Tab" and check the option "Save options on exit".

Now when meshing and exporting from the command line you should get the desired behaviour.
keitaro7_14, Reptider and qwertyus like this.
saladbowl 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] Problem with Gmsh nishant_hull OpenFOAM Meshing & Mesh Conversion 23 August 5, 2015 02:09
[snappyHexMesh] Add additional boundary layers to complex stl surface tobijingles OpenFOAM Meshing & Mesh Conversion 1 October 26, 2011 10:45
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 03:01
solid edge problem....can you help? cindy Main CFD Forum 3 April 5, 2004 13:43
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19


All times are GMT -4. The time now is 20:57.