CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   modified solver gives this message: "incompatible dimensions for operation" (https://www.cfd-online.com/Forums/openfoam-programming-development/143650-modified-solver-gives-message-incompatible-dimensions-operation.html)

sajad6 October 30, 2014 06:18

modified solver gives this message: "incompatible dimensions for operation"
 
1 Attachment(s)
I add enetgy equation to icoFoam and build icoHeatFoam. after I make blockMesh and boundrycondition I face with this error:
Code:

ajad@sajad-pc:~/Desktop/heatedCavity$ icoHeatFoam
/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.1.0-0bc225064152
Exec  : icoHeatFoam
Date  : Oct 30 2014
Time  : 14:44:14
Host  : "sajad-pc"
PID    : 5810
Case  : /home/sajad/Desktop/heatedCavity
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading transportProperties

Reading field p

Reading field T

Reading field U

Reading/calculating face flux field phi


Starting time loop

Time = 0.005

Courant Number mean: 0.0001875 max: 0.005


--> FOAM FATAL ERROR:
incompatible dimensions for operation
    [U[0 1 -2 0 0 0 0] ] == [-grad(p)[1 -2 -2 0 0 0 0] ]

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

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/opt/openfoam210/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 
 in "/home/sajad/OpenFOAM/sajad-2.1.0/platforms/linuxGccDPOpt/bin/icoHeatFoam"
#3 
 in "/home/sajad/OpenFOAM/sajad-2.1.0/platforms/linuxGccDPOpt/bin/icoHeatFoam"
#4 
 in "/home/sajad/OpenFOAM/sajad-2.1.0/platforms/linuxGccDPOpt/bin/icoHeatFoam"
#5  __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#6 
 in "/home/sajad/OpenFOAM/sajad-2.1.0/platforms/linuxGccDPOpt/bin/icoHeatFoam"
Aborted

what does this error mean and how can I debug it?
tnx for any help(I attached my case)

ybapat October 30, 2014 06:22

Hello,

As given in error message this is due to dimension mismatch
"
incompatible dimensions for operation
[U[0 1 -2 0 0 0 0] ] == [-grad(p)[1 -2 -2 0 0 0 0] ]". Dimensions on both side of == operator should match.

Regards,
-Yogesh

sajad6 October 30, 2014 06:31

I corrected it.
but after that I faced with this error:
Code:

sajad@sajad-pc:~/Desktop/heatedCavity$ icoHeatFoam
/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.1.0-0bc225064152
Exec  : icoHeatFoam
Date  : Oct 30 2014
Time  : 15:03:54
Host  : "sajad-pc"
PID    : 6130
Case  : /home/sajad/Desktop/heatedCavity
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading transportProperties

Reading field p

Reading field T

Reading field U

Reading/calculating face flux field phi


Starting time loop

Time = 0.005

Courant Number mean: 0.0001875 max: 0.005
DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 5.92928e-10, No Iterations 2
DILUPBiCG:  Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG:  Solving for T, Initial residual = 1, Final residual = 1.47998e-08, No Iterations 4


--> FOAM FATAL ERROR:
Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow.
Total flux              : 0.00059703
Specified mass inflow  : 0.06
Specified mass outflow  : 0
Adjustable mass outflow : 1.08799e-70


    From function adjustPhi(surfaceScalarField& phi, const volVectorField& U,const volScalarField& p
    in file cfdTools/general/adjustPhi/adjustPhi.C at line 118.

FOAM exiting

How can I consider continuity in my case?What should my boundrycondition to consider continuity?

ssss October 30, 2014 07:02

With out your case and your BC we can do little.

Are you sure or scalar equation is right implemented?


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