CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   gmshToFoam unit conversion (http://www.cfd-online.com/Forums/openfoam/84835-gmshtofoam-unit-conversion.html)

billynoe February 9, 2011 16:00

gmshToFoam unit conversion
 
Anybody know how to convert a gmsh model in inches to meters for OpenFoam

hardykalyan February 9, 2011 18:46

Use the following command in the .geo file and give a try

Mesh.ScalingFactor=0.0254;

billynoe February 10, 2011 01:39

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?

MartinB February 10, 2011 04:33

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

hardykalyan February 10, 2011 13:18

Quote:

Originally Posted by billynoe (Post 294574)
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 ;)

billynoe February 10, 2011 15:05

Thanks Guys both methods worked.


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