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

[Gmsh] Gmsh units?

Register Blogs Community New Posts Updated Threads Search

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 2, 2010, 12:04
Default Gmsh units?
  #1
New Member
 
Benedikt Goeppner
Join Date: Jan 2010
Posts: 15
Rep Power: 16
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...

Thanks,
Ben
sourav90 likes this.
bgoeppner is offline   Reply With Quote

Old   February 17, 2010, 15:14
Default Dimensionless or Meters
  #2
Senior Member
 
Eric Nutsch
Join Date: Sep 2009
Location: Eugene, Oregon USA
Posts: 113
Rep Power: 17
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)
http://www.cfd-online.com/Forums/openfoam-meshing-gmsh/61881-gmshtofoam-gmsh2tofoam-amp-gmsh-sudden-disappear.html#post204111

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, 18:02
Thumbs up
  #3
New Member
 
Benedikt Goeppner
Join Date: Jan 2010
Posts: 15
Rep Power: 16
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
Code:
gmshToFoam <name.msh>
. After that use the
Code:
transformPoints
util to get your desired unit:
Code:
# cd $TO_YOUR_FOAM_CASE
# gmshToFoam untitled.msh
# transformPoints -scale '(0.001 0.001 0.001)'
Second options changes the default-settings of gmsh by
Code:
Mesh.ScalingFactor=0.001
. 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, 09:09
Default [Gmsh] Gmsh units?Reply to Thread
  #4
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

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


All times are GMT -4. The time now is 21:09.