CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

Error while using my solver

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 12, 2012, 07:13
Default Error while using my solver
  #1
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 9
samiam1000 is on a distinguished road
Dear All,

I have compiled a new solver (according to the standard name it should be named buoyantPimpleDyMFoam) and when I try to use it, I get this error:

Code:
lab@lab-laptop:~/Documenti/cases_OF/OF_case19_closed_cabinet/baseBuoyant$ buoyantPimpleDyMFoam_SZ 
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  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   : buoyantPimpleDyMFoam_SZ
Date   : Jun 12 2012
Time   : 12:54:33
Host   : "lab-laptop"
PID    : 6865
Case   : /home/lab/Documenti/cases_OF/OF_case19_closed_cabinet/baseBuoyant
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

Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: displacementSBRStress
Selecting motion diffusion: exponential
Selecting motion diffusion: inverseFaceDistance

Reading g
Reading thermophysical properties

Selecting thermodynamics package hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
Reading field U

Reading/calculating face flux field phi

Reading field rAU if present

Creating turbulence model

Selecting turbulence model type RASModel
Selecting RAS turbulence model kEpsilon
--> Upgrading k to employ run-time selectable wall functions
    Backup original k to k.old
    Writing updated k
--> Upgrading epsilon to employ run-time selectable wall functions
    Backup original epsilon to epsilon.old
    Writing updated epsilon
--> Creating mut to employ run-time selectable wall functions
    Writing new mut
--> Creating alphat to employ run-time selectable wall functions
    Writing new alphat
kEpsilonCoeffs
{
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    C3              -0.33;
    sigmak          1;
    sigmaEps        1.3;
    Prt             1;
}

Calculating field g.h

Reading field p_rgh

Creating field dpdt

Creating field kinetic energy K

No field sources present

Courant Number mean: 0 max: 0

PIMPLE: no residual control data found. Calculations will employ 2 corrector loops


Starting time loop

Courant Number mean: 0 max: 0
deltaT = 0.01
Time = 0.01

GAMG:  Solving for cellDisplacementx, Initial residual = 0, Final residual = 0, No Iterations 0
GAMG:  Solving for cellDisplacementy, Initial residual = 0, Final residual = 0, No Iterations 0
GAMG:  Solving for cellDisplacementz, Initial residual = 0, Final residual = 0, No Iterations 0
GAMG:  Solving for pcorr, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0, global = 0, cumulative = 0


--> FOAM FATAL ERROR: 
Different dimensions for -=
     dimensions : [1 0 -1 0 0 0 0] = [0 3 -1 0 0 0 0]


    From function dimensionSet::operator-=(const dimensionSet&) const
    in file dimensionSet/dimensionSet.C at line 255.

FOAM aborting
Could anyone help in finding the problem? Attached, the solver.

Thanks a lot,
Samuele
Attached Files
File Type: gz buoyantPimpleFoam_SZ.tar.gz (4.1 KB, 9 views)
samiam1000 is offline   Reply With Quote

Old   June 12, 2012, 09:36
Default
  #2
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: Amherst, MA USA - San Diego, CA USA
Posts: 279
Rep Power: 9
kmooney is on a distinguished road
Your code is attempting to perform a subtraction operation between two fields of different units (Foam tracks the units of dimensioned fields on the fly). I believe there are details on the [x x x x x x x] format in the users guide. Looking at your error in particular, it appears that one of your fields has been divided by density while the other has not.
kmooney is offline   Reply With Quote

Old   June 12, 2012, 09:41
Default
  #3
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 9
samiam1000 is on a distinguished road
Dear Kyle,

thanks for answering.

I am trying to find out which is the `wrong' line.. Isn't there a method to discover it?

Also, do you have any experience/time to help me?

Thanks,

Samuele
samiam1000 is offline   Reply With Quote

Old   June 12, 2012, 09:45
Default
  #4
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: Amherst, MA USA - San Diego, CA USA
Posts: 279
Rep Power: 9
kmooney is on a distinguished road
Quote:
Originally Posted by samiam1000 View Post
Dear Kyle,

thanks for answering.

I am trying to find out which is the `wrong' line.. Isn't there a method to discover it?

Also, do you have any experience/time to help me?

Thanks,

Samuele
I walked someone though a debug process in this thread. You could give it a try:

Floating point exception

Its likely that other users have posted more thorough debugging guides on this forum if you search around.

~Kyle
kmooney is offline   Reply With Quote

Old   June 13, 2012, 04:24
Default
  #5
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 9
samiam1000 is on a distinguished road
Dear Kyle,

thanks for help.

Well, I think that I discovered which is the `key point'.. In the file correctPhi.H there are the following lines:
Code:
    while (pimple.correctNonOrthogonal())
    {
        fvScalarMatrix pcorrEqn
        (
            fvm::laplacian(rAU, pcorr) == fvc::div(phi)
        );

        pcorrEqn.setReference(pRefCell, pRefValue);
        pcorrEqn.solve();
So, could you help me in writing a good correctPhi.H file?

Thanks a lot,

Samuele

PS: attached you can find the solver. Thanks!
Attached Files
File Type: gz buoyantPimpleFoam_SZ.tar.gz (4.2 KB, 5 views)
samiam1000 is offline   Reply With Quote

Old   June 13, 2012, 08:49
Default
  #6
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: Amherst, MA USA - San Diego, CA USA
Posts: 279
Rep Power: 9
kmooney is on a distinguished road
Do you have a small test case set up that I would be able to use?

I'm not sure that your issue is in flux correction code you posted. The error you recieved:

Code:
--> FOAM FATAL ERROR:  Different dimensions for -=      dimensions : [1 0 -1 0 0 0 0] = [0 3 -1 0 0 0 0]
Is complaining about an attempted subtraction operation. I don't see an operation of that type in the code you posted.
kmooney is offline   Reply With Quote

Old   June 13, 2012, 08:53
Default
  #7
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 9
samiam1000 is on a distinguished road
Yes I have.

Could you give me your email and I'll send it to you? Write me at samuele.zampini@gmail.com and I'll get back to you, soon.

Also, I am now developing a different solver (starting from sonicDyMFoam instead of pimpleDyMFoam), but I can not make the mesh move.

Anyway, I'll write you soon and that would be easier, wouldn't it?

Thanks,
Samuele
samiam1000 is offline   Reply With Quote

Reply

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
thobois class engineTopoChangerMesh error Peter_600 OpenFOAM 4 August 2, 2014 09:52
A New Solver for Supersonic Combustion nakul OpenFOAM 6 March 30, 2014 03:00
A New Solver for Supersonic Combustion nakul OpenFOAM Announcements from Other Sources 18 February 19, 2013 08:48
Development of a Low mach PISO solver nishant_hull OpenFOAM Programming & Development 0 August 25, 2009 12:48
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 14:08


All times are GMT -4. The time now is 05:35.