|
[Sponsors] |
March 19, 2010, 17:20 |
Incompatible dimensions....
|
#1 |
Member
Join Date: Mar 2009
Posts: 36
Rep Power: 17 |
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! |
|
March 20, 2010, 07:17 |
|
#2 |
Member
Join Date: Mar 2009
Posts: 36
Rep Power: 17 |
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. |
|
March 20, 2010, 08:06 |
|
#3 |
Member
Join Date: Mar 2009
Posts: 36
Rep Power: 17 |
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. |
|
March 20, 2010, 22:25 |
|
#4 |
Senior Member
Cean
Join Date: Feb 2010
Posts: 128
Rep Power: 16 |
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. |
|
March 21, 2010, 06:24 |
|
#5 | |
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18 |
Quote:
__________________
Regards, Gijs |
||
March 21, 2010, 07:19 |
|
#6 |
Member
Join Date: Mar 2009
Posts: 36
Rep Power: 17 |
Ahh, thanks folks.
|
|
January 19, 2011, 05:21 |
one question
|
#7 | |
New Member
Tao Zhu
Join Date: Dec 2010
Location: Munich
Posts: 5
Rep Power: 15 |
Quote:
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 |
||
January 19, 2011, 05:52 |
|
#8 |
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18 |
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 |
|
January 20, 2011, 05:45 |
|
#9 |
Member
Frederic Collonval
Join Date: Apr 2009
Location: Technische Universitaet Munich - Lehrstuhl fuer Thermodynamik
Posts: 53
Rep Power: 17 |
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 |
|
July 7, 2011, 05:20 |
|
#10 |
Senior Member
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 17 |
Hi,
is there a way to get the dimension of a vol/surfaceScalarField? Last edited by linch; July 7, 2011 at 05:56. |
|
July 7, 2011, 05:50 |
|
#11 |
Member
Frederic Collonval
Join Date: Apr 2009
Location: Technische Universitaet Munich - Lehrstuhl fuer Thermodynamik
Posts: 53
Rep Power: 17 |
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. |
|
July 7, 2011, 06:06 |
|
#12 |
Senior Member
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 17 |
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) ); but when I build the divergence Code:
volScalarField Test = fvc::div(DN2Rhof) 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? |
|
July 11, 2011, 06:27 |
|
#13 |
Member
Frederic Collonval
Join Date: Apr 2009
Location: Technische Universitaet Munich - Lehrstuhl fuer Thermodynamik
Posts: 53
Rep Power: 17 |
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
__________________
Frederic Collonval Technische Universität München Thermodynamics Dpt. |
|
June 1, 2012, 08:20 |
SimpleFoam or potentialFoam
|
#14 |
Senior Member
Sören
Join Date: Mar 2012
Posts: 102
Rep Power: 14 |
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 |
|
Tags |
incompatible dimensions, simplefoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Incompatible dimensions for operation | pramodopen4foam | OpenFOAM | 10 | January 4, 2024 05:51 |
Different dimensions for FATAL ERROR | retech | OpenFOAM Running, Solving & CFD | 2 | August 14, 2007 11:17 |
Confused by dimensions of Presure | jack2000 | OpenFOAM Running, Solving & CFD | 3 | June 5, 2007 11:24 |
Dimensions of laplacian in PISO loop | kumar2 | OpenFOAM Running, Solving & CFD | 2 | July 3, 2006 15:34 |
Fluent: changing dimensions of a geometry genetaed | Madhukar Rapaka | FLUENT | 3 | October 12, 2005 12:40 |