CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   incompatible dimension for operation means?? (https://www.cfd-online.com/Forums/openfoam/90077-incompatible-dimension-operation-means.html)

Tushar@cfd June 30, 2011 04:04

incompatible dimension for operation means??
 
Hello,

I made a new solver and ran it successfully without any error.


Afterwards, when I tried to run my case I got an error. What could be the reason behind this error???
Do I need to re-check my solver? Is it the error of solver?


Error is shown below:

Calculating face flux


Starting time loop
Time = 0.0005

Courant Number mean: 0 max: 0.0349808
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0


incompatible dimensions for operation
[U[0 1 -2 0 0 0 0] ] - [convection(phiB,((2*DBU)*B))[1 -2 -2 0 0 0 0] ]#0 Foam::error::printStack(Foam::Ostream&) in "/home/iitgn/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/iitgn/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 void Foam::checkMethod<Foam::Vector<double> >(Foam::fvMatrix<Foam::Vector<double> > const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, char const*) in "/home/iitgn/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/plrFoam"
#3 Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > > Foam::operator-<Foam::Vector<double> >(Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > > const&, Foam::tmp<Foam::GeometricField<Foam::Vector<double >, Foam::fvPatchField, Foam::volMesh> > const&) in "/home/iitgn/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/plrFoam"
#4
in "/home/iitgn/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/plrFoam"
#5 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#6
in "/home/iitgn/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxGccDPOpt/plrFoam"


From function checkMethod(const fvMatrix<Type>&, const GeometricField<Type, fvPatchField, volMesh>&)
in file /home/iitgn/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/fvMatrix.C at line 1219.

FOAM aborting

Aborted

nimasam June 30, 2011 04:43

openFOAM check the dimension of operator before execute it so look the dimension of ur equation!

joel.lehikoinen June 30, 2011 04:54

Quote:

Originally Posted by Tushar_Mtechcfd (Post 314175)
Hello,

I made a new solver and ran it successfully without any error.

What do you mean by this? Do you mean that you compiled it without any errors, or did you actually run a case with it?

Quote:

Originally Posted by Tushar_Mtechcfd (Post 314175)
Afterwards, when I tried to run my case I got an error. What could be the reason behind this error???
Do I need to re-check my solver? Is it the error of solver?


Error is shown below:

Calculating face flux


Starting time loop
Time = 0.0005

Courant Number mean: 0 max: 0.0349808
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0


incompatible dimensions for operation
[U[0 1 -2 0 0 0 0] ] - [convection(phiB,((2*DBU)*B))[1 -2 -2 0 0 0 0] ...

Looks to me that one of the terms should be multiplied or divided by density rho (the dimensions are off by kg/m^3). Either there is an error in the equation your solver is solving, in which case you should correct the equation and recompile your solver. The other possibility is that a field in your case has the wrong dimensions; the field in question being most probably the field phi. If you have a file called phi (it could come from you copying a 0/-directory of an existing case) in your <case>/0/ -directory, try deleting it and then rerunning the case. The dimensions of phi are different for incompressible and compressible cases.

Tushar@cfd June 30, 2011 05:08

Hello Joel,
 
"
Hello,

I made a new solver and ran it successfully without any error.
"

By the above line. I mean to say I did a successful compilation of the new solver that I wrote.

In the second part of the question

It looks to me the first mentioned suggestion is right. I wrote an equation in the solver from there this error continued. Anyways thanks a lot..

Tushar@cfd June 30, 2011 05:13

Hello nimasam,
 
The problem actually came from the "dimension of operator" as you have mentioned. I rechecked my solver.

Thanks a lot....


All times are GMT -4. The time now is 21:36.