|
[Sponsors] |
December 13, 2014, 23:49 |
How to locate this bug?
|
#1 |
Member
BO WANG
Join Date: Sep 2014
Posts: 37
Rep Power: 12 |
Hi everyone,
While I am trying to test my own solver on a new case, following error appears: Code:
Reading/calculating face flux field phi Reading transportProperties --> FOAM FATAL ERROR: LHS and RHS of - have different dimensions dimensions : [0 0 0 0 0 0 0] - [1 -1 -1 0 0 0 0] From function operator-(const dimensionSet&, const dimensionSet&) in file dimensionSet/dimensionSet.C at line 499. FOAM aborting Code:
Info<< "Reading transportProperties\n" << endl; incompressibleTwoPhaseMixture twoPhaseProperties(U, phi/*, "Ybar"*/); const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); Info<< "Done Reading transportProperties\n" << endl; Many thanks. : ) |
|
December 14, 2014, 04:51 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings wang219910611,
My advice is to make sure that you're debugging the correct lines. Change that piece of code to this: Code:
Info<< "Reading transportProperties\n" << endl; Info<< "Got here 00" << endl; incompressibleTwoPhaseMixture twoPhaseProperties(U, phi/*, "Ybar"*/); Info<< "Got here 01" << endl; const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); Info<< "Got here 02" << endl; Info<< "Done Reading transportProperties\n" << endl; The other suggestion is to look at the dictionary files that are loaded by this piece of code. My guess is that there isn't only one file and that a bug might be present in any of those dictionary files. Beyond this: http://openfoamwiki.net/index.php/HowTo_debugging Best regards, Bruno |
|
December 18, 2014, 04:34 |
|
#3 |
New Member
BO
Join Date: Dec 2014
Posts: 21
Rep Power: 11 |
Hi Bruno, sorry for the late reply. I turned back to learn more about gdb and c++ these days, trying to fix the bug.
I think I have managed to locate the bugs to my visThermo. This is a new thermo type I tried to set up by copying the way of psiThermo. Here is what I got from gdb: Code:
Program received signal SIGSEGV, Segmentation fault. 0x00000000005219d8 in Foam::HashTable<Foam::autoPtr<Foam::visThermo> (*)(Foam::fvMesh const&, Foam::word const&), Foam::word, Foam::string::hash>::find ( this=0x0, key=...) at /home/bo/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/HashTable.C:143 143 if (nElmts_) (gdb) frame 0 #0 0x00000000005219d8 in Foam::HashTable<Foam::autoPtr<Foam::visThermo> (*)(Foam::fvMesh const&, Foam::word const&), Foam::word, Foam::string::hash>::find ( this=0x0, key=...) at /home/bo/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/HashTable.C:143 143 if (nElmts_) (gdb) frane 1 Undefined command: "frane". Try "help". (gdb) frame 1 #1 0x0000000000520ef0 in Foam::basicThermo::lookupThermo<Foam::visThermo, Foam::HashTable<Foam::autoPtr<Foam::visThermo> (*)(Foam::fvMesh const&, Foam::word const&), Foam::word, Foam::string::hash> > (thermoDict=..., tablePtr=0x0) at /home/bo/OpenFOAM/OpenFOAM-2.3.0/src/thermophysicalModels/basic/lnInclude/basicThermoTemplates.C:68 68 typename Table::iterator cstrIter = tablePtr->find(thermoTypeName); Code:
virtual const volScalarField& Ybar() const; virtual const scalarField& Ybar(const label patchi) const; virtual tmp<volScalarField> rho() const virtual tmp<scalarField> rho(const label patchi) const; virtual volScalarField& rho(); virtual const scalarField& mu1 const; virtual const scalarField& mu2 const; virtual const volScalarField& mu() const; virtual const scalarField& mu(const label patchi) const; virtual const volScalarField& Ybar() const; virtual const scalarField& Ybar(const label patchi) const; |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
dieselEngineFoam bug - OpenFOAM-1.6-ext | novakm | OpenFOAM Bugs | 1 | December 5, 2013 14:18 |
Serious bug in LES interface | fs82 | OpenFOAM Bugs | 21 | November 16, 2009 09:15 |
a cone injection,please help me!! | satum | FLUENT | 0 | July 2, 2008 03:38 |
Bug reports | Mattijs Janssens (Mattijs) | OpenFOAM | 0 | January 10, 2005 11:05 |
Forum y2k Bug | Jonas Larsson | Main CFD Forum | 1 | January 5, 2000 11:22 |