CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Incompatible dimensions....

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By linch
  • 1 Post By fcollonv

Reply
 
LinkBack Thread Tools Display Modes
Old   March 19, 2010, 17:20
Default Incompatible dimensions....
  #1
New Member
 
Brendan Sloan
Join Date: Mar 2009
Posts: 24
Rep Power: 8
Amiga500 is on a distinguished road
Hi all. A CFX and Fluent user having a go at OpenFOAM, and currently making a right hash of it!


OK, simply put, I'm trying to take the existing simpleFoam tutorial pitzDaily and use it on a different mesh (a NACA0012) to get me started. However, I keep getting the following error:

incompatible dimensions for operation

[U[0 1 -2 0 0 0 0] ] == [-grad(p)[0 -3 -2 0 0 0 0] ]


From function checkMethod(const fvMatrix<Type>&, const GeometricField<Type, fvPatchField, volMesh>&)
in file ..\..\src\finiteVolume\lnInclude/..\fvMatrices\fvMatrix\/fvMatrix.C at line 1208.


Obviously, I assumed it was inconsistent dimensions on by "boundary" files within the /0/ folder, however, the dimensions are correct, and are exactly the same as within the OpenFOAM tutorial folder.

After which, I have tried to check whether my mesh is at fault, but checkMesh comes back ok - but I suppose it will not be checking my boundary file within /constant/. I've tried various different mesh, including those available from Polito* for use with AeroFoam - modified for simpleFoam usage, with no success.



*http://www.aero.polimi.it/freecase/?...namic_problems


Anyone any ideas? Even just of where exactly I am being stupid!
Amiga500 is offline   Reply With Quote

Old   March 20, 2010, 07:17
Default
  #2
New Member
 
Brendan Sloan
Join Date: Mar 2009
Posts: 24
Rep Power: 8
Amiga500 is on a distinguished road
In addition to the above, I can obtain results using potentialFoam... where just U & p are required.

From that, I am guessing that the error lies in how I am relating my boundary conditions to the solver. Either within the /constant/ or /system/ directory, however none of the files within those directories leaps out at me as being the culprit.
Amiga500 is offline   Reply With Quote

Old   March 20, 2010, 08:06
Default
  #3
New Member
 
Brendan Sloan
Join Date: Mar 2009
Posts: 24
Rep Power: 8
Amiga500 is on a distinguished road
Another post.


Of course, the solver can be got running by screwing around with the dimensions of the input files... (icoFoam used below)


But is it expected to run at p (pressure?) dimensions of

[ 0 2 -2 0 0 0 0]

As as as I am aware, that is m^2/s^2 ?!?!

Whereas I would be expecting:

[ 1 -1 -2 0 0 0 0]

i.e. kg/m/s^2

Last edited by Amiga500; March 20, 2010 at 08:55.
Amiga500 is offline   Reply With Quote

Old   March 20, 2010, 22:25
Default
  #4
Senior Member
 
Cean
Join Date: Feb 2010
Posts: 128
Rep Power: 7
shirazbj is on a distinguished road
For airfoil, why not try the airFoil2d example under the same simpleFoam folder?

I thought p is p/density with that dimension. I have the same question about the cavity example under the potentialFoam.
shirazbj is offline   Reply With Quote

Old   March 21, 2010, 06:24
Default
  #5
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 382
Rep Power: 9
gwierink is on a distinguished road
Quote:
I thought p is p/density with that dimension.
Yes, indeed, both icoFoam and potentialFoam assume incompressible fluids and use the "density normalized" pressure, making the unit m²/s² instead of the unit of kg/ms² of "real" pressure.
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   March 21, 2010, 07:19
Default
  #6
New Member
 
Brendan Sloan
Join Date: Mar 2009
Posts: 24
Rep Power: 8
Amiga500 is on a distinguished road
Ahh, thanks folks.
Amiga500 is offline   Reply With Quote

Old   January 19, 2011, 05:21
Question one question
  #7
New Member
 
Tao Zhu
Join Date: Dec 2010
Location: Munich
Posts: 5
Rep Power: 6
kongfu is on a distinguished road
Quote:
Originally Posted by gwierink View Post
Yes, indeed, both icoFoam and potentialFoam assume incompressible fluids and use the "density normalized" pressure, making the unit m²/s² instead of the unit of kg/ms² of "real" pressure.

Hi gwierink,

I have one question on that. If I run my simulation with rhoSimpleFoam, based on the results of simpleFoam, i.e., I set my startTime to latestTime. Then I have to modify the pressure units. (From density normalized to normal pressure.) Do I also have to change the values of the field?

Thank you very much.

Tao
kongfu is offline   Reply With Quote

Old   January 19, 2011, 05:52
Default
  #8
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 382
Rep Power: 9
gwierink is on a distinguished road
Hi Tao,

I suppose yes, since the pressure used in simpleFoam is actually pressure divided by density (see also Section 3.1.2 of the OpenFOAM Wiki) (and this thread with followup).
__________________
Regards, Gijs
gwierink is offline   Reply With Quote

Old   January 20, 2011, 05:45
Default
  #9
Member
 
Frederic Collonval
Join Date: Apr 2009
Location: Technische Universitaet Munich - Lehrstuhl fuer Thermodynamik
Posts: 53
Rep Power: 8
fcollonv is on a distinguished road
Hi Tao,

As said by Gijs, you have to put the real value for the pressure. Indeed in a compressible solver an equation of state is used (usually the perfect gas law) and the density will be deduced from the temperature and the pressure using that law. In case of the perfect law:
rho = p/rT
In the code: http://foam.sourceforge.net/docs/cpp..._8H_source.php line 73

Regards,

Frederic
fcollonv is offline   Reply With Quote

Old   July 7, 2011, 04:20
Default
  #10
Senior Member
 
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 174
Rep Power: 7
linch is on a distinguished road
Hi,

is there a way to get the dimension of a vol/surfaceScalarField?

Last edited by linch; July 7, 2011 at 04:56.
linch is offline   Reply With Quote

Old   July 7, 2011, 04:50
Default
  #11
Member
 
Frederic Collonval
Join Date: Apr 2009
Location: Technische Universitaet Munich - Lehrstuhl fuer Thermodynamik
Posts: 53
Rep Power: 8
fcollonv is on a distinguished road
Hello Illya,

Yes, you have to call the functions dimensions. For example U.dimensions(). Or you can just write the field by calling the function write (e.g. p.write() ). Then the dimensions are explicitly appearing at the begin of the file (keyword dimensions).

Best regards,

Frederic Collonval
__________________
Frederic Collonval
Technische Universität München
Thermodynamics Dpt.
fcollonv is offline   Reply With Quote

Old   July 7, 2011, 05:06
Default
  #12
Senior Member
 
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 174
Rep Power: 7
linch is on a distinguished road
Thanks Frederic for the rapid answer!

Another question: I have a surface scalar field:
Code:
surfaceScalarField DN2Rhof
            (
                IOobject
                (
                    "DN2Rhof",
                    runTime.timeName(),
                    mesh,
                    IOobject::NO_READ,
                    IOobject::NO_WRITE
                ),
                mesh,
                dimensionedScalar("DN2Rho", dimensionSet(1,-1,-1,0,0,0,0), 0.0)
            );
so the dimensions are [1 -1 -1 0 0 0 0]

but when I build the divergence
Code:
volScalarField Test = fvc::div(DN2Rhof)
I get the dimensions [1 -4 -1 0 0 0 0].

I thought, the divergence operator has the dimension 1/m, so div(DN2Rhof) should be [1 -2 -1 0 0 0 0], but it doesn't.. Could someone please give me a hint?
mm.abdollahzadeh likes this.
linch is offline   Reply With Quote

Old   July 11, 2011, 05:27
Default
  #13
Member
 
Frederic Collonval
Join Date: Apr 2009
Location: Technische Universitaet Munich - Lehrstuhl fuer Thermodynamik
Posts: 53
Rep Power: 8
fcollonv is on a distinguished road
Hello Illya,

The surfaceField are presumed to be equal to field*Aface (have a look for example to phi in incompressible flow; phi = U*Aface [m^3/s]). So the div operator is simply the sum of surfaceField on each cell-surfaces finally divided by the mesh volume.

Best regards,

Frederic
mm.abdollahzadeh likes this.
__________________
Frederic Collonval
Technische Universität München
Thermodynamics Dpt.
fcollonv is offline   Reply With Quote

Old   June 1, 2012, 07:20
Default SimpleFoam or potentialFoam
  #14
Senior Member
 
Sören
Join Date: Mar 2012
Posts: 102
Rep Power: 5
despaired student is on a distinguished road
Hi,

I'm thinking about using potentialFoam instead of simpleFoam. In my case I have an incompressible, isothermal and slow (Re<10) flow. I've read somewhere that one can use for very slow and incompressible flows the "potetial theory" to calculate it.
Is this correct and does this mean that I can use potentialFoam to compute the flux in OpenFoam?


best regards
despaired student is offline   Reply With Quote

Reply

Tags
incompatible dimensions, simplefoam

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Incompatible dimensions for operation pramodopen4foam OpenFOAM 8 October 15, 2009 05:00
Different dimensions for FATAL ERROR retech OpenFOAM Running, Solving & CFD 2 August 14, 2007 10:17
Confused by dimensions of Presure jack2000 OpenFOAM Running, Solving & CFD 3 June 5, 2007 10:24
Dimensions of laplacian in PISO loop kumar2 OpenFOAM Running, Solving & CFD 2 July 3, 2006 14:34
Fluent: changing dimensions of a geometry genetaed Madhukar Rapaka FLUENT 3 October 12, 2005 11:40


All times are GMT -4. The time now is 03:37.