CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Open Source Meshers: Gmsh, Netgen, CGNS, ...

Gmsh units?

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

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

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CAD -> gMsh -> enGrid -> OpenFOAM Problem AlGates OpenFOAM 7 August 6, 2010 12:46
Character expressions in gmsh? ericnutsch Open Source Meshers: Gmsh, Netgen, CGNS, ... 0 January 22, 2010 00:21
How does Gmsh deal with overlap boundaries? yuhai Open Source Meshers: Gmsh, Netgen, CGNS, ... 1 April 24, 2009 13:34
Mass transfer units in fluent nite_surfer FLUENT 0 July 12, 2007 12:51
To dimensionalize or not to dimensionalize !! tolani owosina Main CFD Forum 8 November 13, 1999 14:45


All times are GMT -4. The time now is 14:04.