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

gmshToFoam unit conversion

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By MartinB

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 9, 2011, 16:00
Default gmshToFoam unit conversion
  #1
Member
 
William
Join Date: Feb 2011
Location: Minnesota USA
Posts: 33
Rep Power: 15
billynoe is on a distinguished road
Anybody know how to convert a gmsh model in inches to meters for OpenFoam
billynoe is offline   Reply With Quote

Old   February 9, 2011, 18:46
Default
  #2
New Member
 
kalyan
Join Date: Oct 2010
Posts: 19
Rep Power: 16
hardykalyan is on a distinguished road
Use the following command in the .geo file and give a try

Mesh.ScalingFactor=0.0254;
hardykalyan is offline   Reply With Quote

Old   February 10, 2011, 01:39
Default
  #3
Member
 
William
Join Date: Feb 2011
Location: Minnesota USA
Posts: 33
Rep Power: 15
billynoe is on a distinguished road
No luck with that. I got an error when I opened the .geo in gmsh. I also tried putting it in the .msh file but gmshToFoam didn't like that either. Does it have to be in a specific location?
billynoe is offline   Reply With Quote

Old   February 10, 2011, 04:33
Default
  #4
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 22
MartinB will become famous soon enough
Hi William,

you might try the transformPoints utility:
Convert your mesh to OpenFOAM. Than call
Code:
transformPoints -scale "(0.0254 0.0254 0.0254)"
Martin
MartinB is offline   Reply With Quote

Old   February 10, 2011, 13:18
Default
  #5
New Member
 
kalyan
Join Date: Oct 2010
Posts: 19
Rep Power: 16
hardykalyan is on a distinguished road
Quote:
Originally Posted by billynoe View Post
No luck with that. I got an error when I opened the .geo in gmsh. I also tried putting it in the .msh file but gmshToFoam didn't like that either. Does it have to be in a specific location?
I don't have any problems if i add it in my .geo file. Try adding it to the first line of your .geo file code and then remesh and save the mesh.

You will find the converted mesh. But the .geo file doesn't change its coordinates.

You can also try what Mr.Martin said. Even that works well
hardykalyan is offline   Reply With Quote

Old   February 10, 2011, 15:05
Default
  #6
Member
 
William
Join Date: Feb 2011
Location: Minnesota USA
Posts: 33
Rep Power: 15
billynoe is on a distinguished road
Thanks Guys both methods worked.
billynoe 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
unit conversion of pre-exponential factor A of chemkin mechanism in Fluent newbie FLUENT 5 November 14, 2010 06:44
[snappyHexMesh] Unit conversion in Snappy prapanj OpenFOAM Meshing & Mesh Conversion 3 March 12, 2009 23:09
unit conversion Topu Phoenics 2 July 19, 2007 11:11
Unit conversion from 3-d to 2-d Raj Main CFD Forum 6 January 24, 2005 05:56
Unit Conversion Problem lambuhere CFX 0 August 20, 2004 05:49


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