0
$\begingroup$

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?

$\endgroup$
4
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ 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? $\endgroup$
    – Thomas
    Sep 23 '13 at 17:23
  • $\begingroup$ 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. $\endgroup$ Sep 23 '13 at 19:48
0
$\begingroup$

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).

scale your geometry using

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

x y z being factors by which each point in the mesh to multiplied, so if you want to scale uniformly 1/1000 , x=y=z=0.001.

this way you can keep the most accurate data of geometry while meshing and also scale to appropriate units without getting confused. there is cost though as mentioned by @Wolfgang Bangerth

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.