CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Dimensional issues with dimensionless scalar

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 22, 2012, 04:54
Default Dimensional issues with dimensionless scalar
  #1
Member
 
Cameron
Join Date: Jul 2012
Posts: 33
Rep Power: 14
c_dowd is on a distinguished road
Hi all
I have a feeling there is a very obvious solution to this, but I can't seem to find it for the life of me, i must not be searching for the right thing. I'm adding a new dimensionless scalar into the buoyantPimpleFoam solver, which uses a generic scalar transport equation. I've added it as a volScalarField just as shown in the examples here and here. In particular, the transport equation is:

{
fvScalarMatrix zfEqn
(
fvm::ddt(zf)
+ fvm::div(phi, zf)
- fvm::laplacian(alphaz, zf)
);
zfEqn.solve();
}

The issue is that every time I try to run the solver, I get an error saying that the dimensions don't agree (in particular the first section where [0 0 -1 0 0 0 0] + [1 -3 -1 0 0 0 0], i can change the dimensions of alphaz to make the second bit work no problems). I can clearly see that they don't, yet I can't work out how to make sure that they do. I can't just change the dimensions of zf as it is used in other equations where it is important that it is dimensionless. I tried adding another scalar variable to make phi dimensionless, but I kept having issues implementing it and thought there had to be a better way.

Last edited by c_dowd; September 22, 2012 at 05:15.
c_dowd is offline   Reply With Quote

Old   September 22, 2012, 08:02
Default
  #2
Member
 
Florian
Join Date: Nov 2009
Posts: 59
Rep Power: 17
Horus is on a distinguished road
You can turn off dimensions checking though it is not recommended. Set in your controlDict:

dimensionSet 0;
Horus is offline   Reply With Quote

Old   September 23, 2012, 02:03
Default
  #3
Member
 
Cameron
Join Date: Jul 2012
Posts: 33
Rep Power: 14
c_dowd is on a distinguished road
Ah thanks a lot. In fact I ended up just putting a new constant in the ddt part to make the dimensions equal but that's good to know.
c_dowd is offline   Reply With Quote

Old   September 23, 2012, 14:52
Default
  #4
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
Quote:
Originally Posted by c_dowd View Post
Ah thanks a lot. In fact I ended up just putting a new constant in the ddt part to make the dimensions equal but that's good to know.
The dimension of alphaz should be m^2/s, because it is a diffusion parameter.
Bernhard is offline   Reply With Quote

Old   July 7, 2020, 20:42
Default
  #5
New Member
 
Join Date: May 2020
Location: India
Posts: 4
Rep Power: 6
Action.Kamen is on a distinguished road
Quote:
Originally Posted by Horus View Post
You can turn off dimensions checking though it is not recommended. Set in your controlDict:

dimensionSet 0;
I was using OpenFOAM v1912 and dimensionSet 0; was not working so a quick update
this works for now(to turn off dimension checking)


DebugSwitches
{
dimensionSet 0;
}


Add above in the controlDict
Action.Kamen is offline   Reply With Quote

Reply

Tags
dimension, scalar transport


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
dieselFoam problem!! trying to introduce a new heat transfer model vivek070176 OpenFOAM Programming & Development 10 December 24, 2014 00:48
compressible flow in turbocharger riesotto OpenFOAM 50 May 26, 2014 02:47
dimensional or dimensionless? amin66 OpenFOAM 6 August 1, 2012 09:20
rhoCentralFoam boundary issues with custom local time stepping laurensvd OpenFOAM Running, Solving & CFD 0 February 20, 2012 11:15
Climbing inlet pressure with simpleFoam and directMappedPatches chegdan OpenFOAM Running, Solving & CFD 1 January 2, 2012 20:35


All times are GMT -4. The time now is 16:12.