keeping/changing dimensions in imported meshes
I was just wondering, when I load an STL into netgen and then mesh it, export the mesh in neutral format and then import it into OF, is there a way to check or change the dimensions? At which step should it be done (STL formation, netgen import, meshing, netgen export or OF import)?
I know in blockMesh the dictionary contains a convertToMeters command to be able to set the mesh in mm or m etc. Is there a netgenNeutralToFoam dictionary with this option or is it a parameter you have to specify.
A Good Morning to you!
When using STL geometry, Netgen does not make any automatic changes to the point co-ordinates, and the entire meshing is performed without any "unit awareness".... the co-ordinates are assumed to be dimensionless....
You can change the dimensions of your mesh (basically multiply all the co-ordinates by a conversion factor) after importing the mesh into OpenFOAM by using the utility: transformPoints
Internally OpenFOAM works with SI units... hence you should convert your mesh into "metre" (m).
For example, using the following command within the case folder converts a mesh whose co-ordinates are defined in "mm" to "m"...:
transformPoints -scale (0.001 0.001 0.001)
This command multiplies all co-ordinates by the factor "0.001".
Have a nice day!
ok, thanks, I'll give it a try. So when checkMesh gives a report showing the complete volume as something like (0.1 -0.5 0) (0.5 0.5 3.0), then those units are in metres. A block that is 0.4m x 1m x 3m. But what I actually want is that the mesh is 0.4mm x 1mm x 3mm, then I should transformPoints - scale (0.001 0.001 0.001). Seems simple enough.
|All times are GMT -4. The time now is 14:42.|