CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Dimensionless equations, variables, mesh etc (

bhh July 10, 2009 09:56

Dimensionless equations, variables, mesh etc

All my equations, variables and coordinates etc. are dimensionless. OF require dimensions on all variables, coordinates etc.. How can I do my modelling in OF without dimensions?



titio July 10, 2009 11:33


Even with normalized dimensions, you still have the points relative position. From there you create the mesh. Concerning the variables, it is a question of defining dimensioned scalar, or volVectorField, or equivalent, in the createFields.H fil.



bhh July 12, 2009 23:56


How and where may I turn off the dimension checking?


isabel July 13, 2009 04:14

I need to turn off the dimension checking. Does anybody know how to do it in OpenFOAM?

henrik July 13, 2009 09:22

Dear All,

google("dimension checking openfoam") yields

as the first hit - not that I think it's a good idea to switch it off!


bhh July 13, 2009 10:41


Thanks for the info!

I agree that the dimension checking should generally not be turned off. However, when doing a non-dimensional problem it should be OK, or?


henrik July 13, 2009 11:31

Dear Bjorn,

Why do you want to implement the equation set in dimensionless-form in the first place? You loose one of the best features of OpenFOAM while you need it most, i.e. while implementing a new set of equations and solution algorithmn.

Without knowing you and your skills, my bet is that you will make mistakes which could have been easily flagged through dimension checking. I cannot tell you how much I hated the void fraction for being dimensionless, but that one cannot be helped ;-)

I would rather read the dimensionless parameters from dictionary and set the properties in the code. Post-processing can do the reverse and everybody is happy.


sven August 5, 2009 12:21

Hey henrik,

where can I set dimensions, when I implement new equations, that means in which file can I set the dimensions of constants that come with the implementation of a new equation? Thank you!

henrik August 5, 2009 12:41

Dear Sven,

the only dimensions that are not read in from file are those that arise from the discretisation (fvc::* and fvm::* methods). Those can not be changed - only the errors can be switched off.

Not sure this answers your question ...


sven August 5, 2009 13:09

Hey Henrik,

thanks for your answer. If I understand you right, you say that the dimensions of constants (for example Cmu in some turbulence models) are read in from file. I agree with that. But in the files where these constants are defined, there is no information about the dimensions of these constants. Thus, I guess there must be another file in which the dimensions of these constants are set.
I also tried to switch of the dimensions checking of OF. Unfortunately I can not find the controlDict file. According to the user Guide it should be located in $WM_PROJECT_DIR/OpenFOAM-1.5/.OpenFOAM-1.5. But in WM_PROJECT_DIR/OpenFOAM-1.5 there is no hidden folder named .OpenFOAM-1.5.
Thanks for your help!

henrik August 5, 2009 14:01


Cmu, C1, C2, alphaEps are dimensionless.

The guide is outdated: The controlDict is now in $WM_PROJECT_DIR/etc

Please file a bug on this or make a note on the Wiki.


6863523 December 10, 2016 12:25

How to use the dimensionless N-S equations in OpenFOAM
Dear All,
I wonder if you guys have found a solution to this problem?
I also want to use the dimentionless equations in OpenFOAM. I have copied the controlDict out and changed the dimensionSet from 1 to 0, since I have no priviledge to modify the original file. But there is still dimension checking. It seems that the dimension chekcing was not turned off at all.
I wonder if there is any other solution, or did I miss something? Details could be been at
Thank you in advance.
Best Regards,

All times are GMT -4. The time now is 17:35.