Remix.run Logo
semi-extrinsic 4 days ago

I will say that the OpenFOAM C++ library supports dimensions in a more user friendly way than this, with support for both vectors/matrices and for checking units when you take partial derivatives of your quantities.

There is even native support for reading dimensioned values from input files, so your user can specify "speed 12.7 [ft/s]" irrespective of what units you use internally in the code processing that input file. It just gets converted (or throws an error).

See e.g. this, from 4.2.6 onwards: https://doc.cfd.direct/openfoam/user-guide-v12/basic-file-fo...

cosmic_quanta 4 days ago | parent [-]

Interesting, I am intrigued by the support for partial derivatives with typed dimensions. I'll have to check out OpenFOAM