CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Gmsh] Gmsh units?

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

Like Tree8Likes
  • 1 Post By bgoeppner
  • 1 Post By ericnutsch
  • 6 Post By bgoeppner

LinkBack Thread Tools Search this Thread Display Modes
Old   February 2, 2010, 11:04
Default Gmsh units?
New Member
Benedikt Goeppner
Join Date: Jan 2010
Posts: 15
Rep Power: 15
bgoeppner is on a distinguished road
Hi guys,

can you tell me which units gmsh is using? I couldn't find any information about this... Would be nice if I could tell gmsh to set mm as default unit...

sourav90 likes this.
bgoeppner is offline   Reply With Quote

Old   February 17, 2010, 14:14
Default Dimensionless or Meters
Senior Member
Eric Nutsch
Join Date: Sep 2009
Location: Eugene, Oregon USA
Posts: 113
Rep Power: 15
ericnutsch is on a distinguished road
Send a message via Skype™ to ericnutsch
I believe its units are non-dimensional and depend on what your solver loads it as. For the sake of dimensional sanity, I believe most every solver uses meters. I always just use meters from the beginning, but there are some utilities to help scale your already present numbers.

For scaling inside of gmsh: (have not used)
Dilate { { expression-list }, expression } { transform-list }

In OpenFOAM you might look into transformPoints(have not used)

In OpenFOAM's blockmesh the convertToMeters function will preform scaling.

Hope that helps!
Ramzy1990 likes this.
ericnutsch is offline   Reply With Quote

Old   March 10, 2010, 17:02
Thumbs up
New Member
Benedikt Goeppner
Join Date: Jan 2010
Posts: 15
Rep Power: 15
bgoeppner is on a distinguished road
Just in case someone runs into the same problem: The Gmsh-default unit seems to be meters. I found two ways solving my problem to change this default-unit for usage with OpenFoam:

First option uses the Gmsh default-settings. Create your geometry, mesh everything and save the mesh. Import that mesh into your foam-case by
gmshToFoam <name.msh>
. After that use the
util to get your desired unit:
# gmshToFoam untitled.msh
# transformPoints -scale '(0.001 0.001 0.001)'
Second options changes the default-settings of gmsh by
. As I found this option, this is what I prefer as I do not have to execute two commands, just import mesh...

Hope that helps.
bgoeppner is offline   Reply With Quote

Old   May 18, 2022, 08:09
Default [Gmsh] Gmsh units?Reply to Thread
New Member
Jacques Berthellemy
Join Date: May 2022
Posts: 1
Rep Power: 0
J_Berthellemy is on a distinguished road
Hi !
I always thought I was alone responsable for choosing a coherent set of units :
USI for example
J_Berthellemy is offline   Reply With Quote


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
Thermophysical Property Units johanz OpenFOAM Pre-Processing 2 December 16, 2018 10:08
[Gmsh] Converting gmsh to OpenFoam Friendly OpenFOAM Meshing & Mesh Conversion 3 June 26, 2018 05:46
[Gmsh] Insatlling gmsh from the source code-issue? CFD-Lover OpenFOAM Meshing & Mesh Conversion 20 June 12, 2018 06:39
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 03:52
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 10:56

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