# mesh spatial dimension in OpenFOAM

My default mesh geometry length is in 80 mm. For OpenFoam, I scaled the mesh in meters as 0.008 m. Once I import the mesh in OpenFOAM, it is a collection of point coordinates. Now, the location of these points and spatial difference between different points will be the same either if they are in mm or m. I feel spatial unit is arbitrary here?

I want to understand when do I have to scale the geometry in Openfoam and when not?

In your problem description, note that $80\text{mm} \neq 0.008 \text{m}$.

That said, every quantity in a computer program is just a number. It's up to you to interpret it. So of course you can run a simulation where the domain has an edge length of 80 or 0.08 -- they refer to the same domain, after all. But depending on what you use as your base unit, you have to scale material constants as well. For example, at room temperature, the viscosity of air is $15.68\cdot 10^{-6}$ when expressed in meters (with units $m^2/s$ in this case), but $15.68$ when expressed in millimeters (with units $mm^2/s$ in that case). In other words, depending on what unit you choose as a base, your material parameters will be different.

• In other words, if the base unit is in meters then material constant are converted. what about domain unit? 80 mm or 0.08 m? Sep 23 '13 at 17:23
• What I'm saying is that you enter things into computers only as numbers, typically without explicit units. Given that, it is your job to make sure everything is consistent. Sep 23 '13 at 19:48

I would like to answer "when to scale".

I say keep your geometry .stl , .3ds etc unscaled,in blockMesh give the bounding cuboid points in same units you have in your geometry, keep

convertToMeters 1;


when the entire meshing is done (including baffle and patch creation).

transformPoints -scale ('x' 'y' 'z')