CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   systematic dimension checking? (https://www.cfd-online.com/Forums/openfoam/100143-systematic-dimension-checking.html)

Farshad_Noravesh April 21, 2012 06:44

systematic dimension checking?
 
Hi ,

I am writing a code for premixed combustion based on flame surface density.
I have the following error that is related to dimension of my variables but i dont know firstly which variable does not have a correct dimension, and secondly :is multiplying by a fake variable is the only method to fix this kind of problem?
Time = 5.9988e-06

diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 1.10082e-06, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 1.23009e-06, No Iterations 1


--> FOAM FATAL ERROR:
incompatible dimensions for operation
[c[1 -3 -1 0 0 0 0] ] - [(((p*psiu)*0.2)*sigma)[1 -3 0 0 0 0 0] ]

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

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) in "/home/farshad/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/farshad/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 void Foam::checkMethod<double>(Foam::fvMatrix<double> const&, Foam::DimensionedField<double, Foam::volMesh> const&, char const*) in "/home/farshad/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/fsd1"
#3 Foam::tmp<Foam::fvMatrix<double> > Foam::operator-<double>(Foam::tmp<Foam::fvMatrix<double> > const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) in "/home/farshad/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/fsd1"
#4
in "/home/farshad/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/fsd1"
#5 __libc_start_main in "/lib64/libc.so.6"
#6
at /usr/src/packages/BUILD/glibc-2.11.3/csu/../sysdeps/x86_64/elf/start.S:116
Aborted
farshad@linux-0dde:~/OpenFOAM/farshad-1.7.1/run/flamesurfacedensity1>

Thanks alot,

Farshad

maysmech April 21, 2012 07:33

Quote:

Originally Posted by Farshad_Noravesh (Post 355966)
Hi ,

--> FOAM FATAL ERROR:
incompatible dimensions for operation
[c[1 -3 -1 0 0 0 0] ] - [(((p*psiu)*0.2)*sigma)[1 -3 0 0 0 0 0] ]

Farshad

Hi Farshad,
From above error, it can be understood that it has dimension problem in this operation. One parameter is kg/(m^3.s) the other is kg/m^3. I suggest you to check your equations again dimensionally.
Regards,

niaz April 22, 2012 03:50

Dear Farhad
in pressure equation you have 2 parantezes it seems that c and others have not the same dimension


All times are GMT -4. The time now is 20:10.