CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Poiseuille's inlet velocity profile (https://www.cfd-online.com/Forums/openfoam/70700-poiseuilles-inlet-velocity-profile.html)

swahono December 10, 2010 02:26

Good day, Alberto!

I have just built OF 1.7.1 on my machine, and run unmodified simpleFoam on the case. The exact same thing happened - crashed on the 2nd iter - exact same error msg.

I'm using gcc 4.4.3.

Actually, does the error msg look meaningful to you?
Can we decipher this error message?

Code:

#0  Foam::error::printStack(Foam::Ostream&) in "/home/stefano/OpenFOAM/OpenFOAM-1.7.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#1  Foam::sigFpe::sigFpeHandler(int) in "/home/stefano/OpenFOAM/OpenFOAM-1.7.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#2  Uninterpreted:
#3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/home/stefano/OpenFOAM/OpenFOAM-1.7.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#4  void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/stefano/OpenFOAM/OpenFOAM-1.7.1/lib/linuxGccDPOpt/libincompressibleRASModels.so"

Does it perhaps got to do with my groovyBC? :confused:
If it's not too much of a hassle for you, could you please email me your groovyBC source code. I may have a corrupted version?

Thank you, Alberto! :)

I very much appreciate it.

Kind Regards,
Stefano

alberto December 10, 2010 10:14

Quote:

Originally Posted by swahono (Post 286834)
Actually, does the error msg look meaningful to you?
Can we decipher this error message?

It looks like a division by zero in the turbulence model...

I used this version:

Best,
Alberto

swahono December 13, 2010 19:06

Thank you, Alberto.

Unfortunately I can't use SVN at work computer due to a proxy. I downloaded the groovyBC source code through the web portal.
I'll try downloading it later.

Thanks again for all your help.

Kind Regards,
Stefano

alberto December 13, 2010 23:38

Quote:

Originally Posted by swahono (Post 287300)
Thank you, Alberto.

Unfortunately I can't use SVN at work computer due to a proxy.

You find it here:

http://dl.dropbox.com/u/659842/groovyBC.tar.gz

Notice that you might have to run wclean before wmake, since it was built on my machine.

Where do I send the bill? :D

Best,

swahono December 14, 2010 00:29

Quote:

Originally Posted by alberto (Post 287308)
You find it here:

http://dl.dropbox.com/u/659842/groovyBC.tar.gz

Notice that you might have to run wclean before wmake, since it was built on my machine.

Wow.. that's very kind of you! I was going to use my home machine to get the code using SVN.

Quote:

Originally Posted by alberto (Post 287308)
Where do I send the bill? :D

What is your hourly rate?
You can send it to the Australian Govt (my employer) :D
What I can do to repay you is to pass everything I've learned about OF on to other people who are in the same position as me - struggling with OpenFOAM.

Ok, I have re-made your groovyBC
wclean
wmake libso

It returned errors (see error msg below), but I think it still compiled the library.
- I may have gotten the same error message before, but ignored it because the library and BC type is still recognized by OpenFOAM despite the compilation error msg. -

I checked both the GCC version and bison version installed on my machine is as required by groovyBC
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
bison (GNU Bison) 2.4.1

The simulation still crashed on the second iteration using your copy of the newly compiled groovyBC. :(

Just wondering if you had the same error msg (-See below) as me when you compiled the groovyBC on your machine?

Thanks, Alberto! :)

Kind Regards,
Stefano

The compilation error msg:
Code:

$ wmake libso
Making dependency list for source file PatchValueExpressionParser.yy
Making dependency list for source file PatchResult.C
Making dependency list for source file PatchValueExpressionLexer.ll
Making dependency list for source file PatchValueExpressionDriver.C
Making dependency list for source file groovyBCFvPatchFields.C
could not open file PatchValueExpressionParser.tab.hh for source file PatchValueExpressionDriver.C
could not open file PatchValueExpressionParser.tab.hh for source file PatchValueExpressionParser.yy
could not open file PatchValueExpressionParser.tab.hh for source file PatchValueExpressionLexer.ll
Making dependency list for source file groovyBCPointPatchFields.C
could not open file MixedPointPatchField.H for source file groovyBCPointPatchFields.C
could not open file PatchValueExpressionParser.tab.hh for source file groovyBCFvPatchFields.C
could not open file PatchValueExpressionParser.tab.hh for source file groovyBCPointPatchFields.C
could not open file PointPatchFieldMapper.H for source file groovyBCPointPatchFields.C
SOURCE=PatchResult.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-40 -IMake/linuxGccDPOpt              -I/home/stefano/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude  -IlnInclude -I. -I/home/stefano/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/home/stefano/OpenFOAM/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linuxGccDPOpt/PatchResult.o
SOURCE=PatchValueExpressionLexer.ll ; rm Make/linuxGccDPOpt/PatchValueExpressionLexer.C ; flex -f $SOURCE ; mv *.c Make/linuxGccDPOpt/PatchValueExpressionLexer.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-40 -IMake/linuxGccDPOpt              -I/home/stefano/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude  -IlnInclude -I. -I/home/stefano/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/home/stefano/OpenFOAM/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude  -fPIC -c Make/linuxGccDPOpt/PatchValueExpressionLexer.C -o Make/linuxGccDPOpt/PatchValueExpressionLexer.o
SOURCE=PatchValueExpressionParser.yy ; rm -f Make/linuxGccDPOpt/PatchValueExpressionParser.C Make/linuxGccDPOpt/PatchValueExpressionParser.tab.hh; bison -ra -v  -d $SOURCE ;  mv *.tab.cc Make/linuxGccDPOpt/PatchValueExpressionParser.C ; mv *.tab.hh Make/linuxGccDPOpt/PatchValueExpressionParser.tab.hh ; mv *.hh Make/linuxGccDPOpt ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-40 -IMake/linuxGccDPOpt              -I/home/stefano/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude  -IlnInclude -I. -I/home/stefano/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/home/stefano/OpenFOAM/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude  -fPIC -c  Make/linuxGccDPOpt/PatchValueExpressionParser.C -o Make/linuxGccDPOpt/PatchValueExpressionParser.o
SOURCE=PatchValueExpressionDriver.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-40 -IMake/linuxGccDPOpt              -I/home/stefano/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude  -IlnInclude -I. -I/home/stefano/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/home/stefano/OpenFOAM/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linuxGccDPOpt/PatchValueExpressionDriver.o
rm: cannot remove `Make/linuxGccDPOpt/PatchValueExpressionLexer.C': No such file or directory
In file included from PatchValueExpressionDriver.H:59,
                from PatchValueExpressionDriver.C:34:
PatchValueExpressionParser.tab.hh:44:20: error: stack.hh: No such file or directory
lex.ve.c:372: warning: use of old-style cast
lex.ve.c:442: warning: use of old-style cast
lex.ve.c:442: warning: use of old-style cast
PatchResult.C: In member function ‘void Foam::PatchResult::uglyDelete()’:
PatchResult.C:95: warning: deleting ‘void*’ is undefined
In file included from location.hh:44,
                from PatchValueExpressionParser.tab.hh:65,
                from PatchValueExpressionDriver.H:59,
                from PatchValueExpressionDriver.C:34:
position.hh: In function ‘bool pve::operator==(const pve::position&, const pve::position&)’:
position.hh:136: warning: suggest parentheses around ‘&&’ within ‘||’
In file included from PatchValueExpressionDriver.H:59,
                from PatchValueExpressionDriver.C:34:
PatchValueExpressionParser.tab.hh: At global scope:
PatchValueExpressionParser.tab.hh:309: error: ISO C++ forbids declaration of ‘stack’ with no type
PatchValueExpressionParser.tab.hh:309: error: expected ‘;’ before ‘<’ token
PatchValueExpressionParser.tab.hh:311: error: ISO C++ forbids declaration of ‘stack’ with no type
PatchValueExpressionParser.tab.hh:311: error: expected ‘;’ before ‘<’ token
PatchValueExpressionParser.tab.hh:313: error: ISO C++ forbids declaration of ‘stack’ with no type
PatchValueExpressionParser.tab.hh:313: error: expected ‘;’ before ‘<’ token
PatchValueExpressionParser.tab.hh:316: error: ‘state_stack_type’ does not name a type
PatchValueExpressionParser.tab.hh:318: error: ‘semantic_stack_type’ does not name a type
PatchValueExpressionParser.tab.hh:320: error: ‘location_stack_type’ does not name a type
In file included from Make/linuxGccDPOpt/location.hh:44,
                from PatchValueExpressionParser.tab.hh:65,
                from PatchValueExpressionParser.tab.cc:61:
position.hh: In function ‘bool pve::operator==(const pve::position&, const pve::position&)’:
position.hh:136: warning: suggest parentheses around ‘&&’ within ‘||’
In file included from Make/linuxGccDPOpt/location.hh:44,
                from PatchValueExpressionParser.tab.hh:65,
                from lnInclude/PatchValueExpressionDriver.H:59,
                from PatchValueExpressionLexer.ll:3:
position.hh: In function ‘bool pve::operator==(const pve::position&, const pve::position&)’:
position.hh:136: warning: suggest parentheses around ‘&&’ within ‘||’
lex.ve.c: In function ‘int pvelex(pve::PatchValueExpressionParser::semantic_type*, pve::location*, Foam::PatchValueExpressionDriver&)’:
lex.ve.c:9465: warning: use of old-style cast
lex.ve.c:9465: warning: use of old-style cast
lex.ve.c:9482: warning: use of old-style cast
lex.ve.c:9495: warning: use of old-style cast
lex.ve.c:9962: warning: use of old-style cast
lex.ve.c: In function ‘int yy_get_next_buffer()’:
lex.ve.c:10141: warning: use of old-style cast
lex.ve.c:10164: warning: use of old-style cast
lex.ve.c:10177: warning: use of old-style cast
lex.ve.c:10177: warning: use of old-style cast
lex.ve.c:10198: warning: use of old-style cast
lex.ve.c:10198: warning: use of old-style cast
lex.ve.c:10223: warning: use of old-style cast
lex.ve.c:10226: warning: use of old-style cast
lex.ve.c:10226: warning: use of old-style cast
lex.ve.c: In function ‘yy_state_type yy_get_previous_state()’:
lex.ve.c:10261: warning: use of old-style cast
lex.ve.c:10261: warning: use of old-style cast
lex.ve.c: In function ‘int yyinput()’:
lex.ve.c:10379: warning: use of old-style cast
lex.ve.c: In function ‘yy_buffer_state* ve_create_buffer(FILE*, int)’:
lex.ve.c:10478: warning: use of old-style cast
lex.ve.c:10487: warning: use of old-style cast
lex.ve.c: In function ‘void ve_delete_buffer(yy_buffer_state*)’:
lex.ve.c:10513: warning: use of old-style cast
lex.ve.c:10516: warning: use of old-style cast
lex.ve.c:10518: warning: use of old-style cast
lex.ve.c: In function ‘void veensure_buffer_stack()’:
lex.ve.c:10685: warning: use of old-style cast
lex.ve.c:10705: warning: use of old-style cast
lex.ve.c: In function ‘yy_buffer_state* ve_scan_buffer(char*, yy_size_t)’:
lex.ve.c:10733: warning: use of old-style cast
lex.ve.c: In function ‘yy_buffer_state* ve_scan_bytes(const char*, int)’:
lex.ve.c:10786: warning: use of old-style cast
lex.ve.c: In function ‘void yy_push_state(int)’:
lex.ve.c:10822: warning: use of old-style cast
lex.ve.c:10825: warning: use of old-style cast
lex.ve.c:10825: warning: use of old-style cast
lex.ve.c: In function ‘int yy_init_globals()’:
lex.ve.c:10992: warning: use of old-style cast
lex.ve.c:11005: warning: use of old-style cast
lex.ve.c:11006: warning: use of old-style cast
lex.ve.c: In function ‘void* vealloc(yy_size_t)’:
lex.ve.c:11072: warning: use of old-style cast
lex.ve.c: In function ‘void* verealloc(void*, yy_size_t)’:
lex.ve.c:11084: warning: use of old-style cast
lex.ve.c:11084: warning: use of old-style cast
lex.ve.c: In function ‘void vefree(void*)’:
lex.ve.c:11089: warning: use of old-style cast
SOURCE=groovyBCFvPatchFields.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-40 -IMake/linuxGccDPOpt              -I/home/stefano/OpenFOAM/OpenFOAM-1.7.1/src/finiteVolume/lnInclude  -IlnInclude -I. -I/home/stefano/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude -I/home/stefano/OpenFOAM/OpenFOAM-1.7.1/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linuxGccDPOpt/groovyBCFvPatchFields.o
make: *** [Make/linuxGccDPOpt/PatchValueExpressionDriver.o] Error 1
make: *** Waiting for unfinished jobs....
PatchValueExpressionParser.tab.cc: In member function ‘unsigned char pve::PatchValueExpressionParser::yytranslate_(int)’:
PatchValueExpressionParser.tab.cc:4941: warning: use of old-style cast
In file included from Make/linuxGccDPOpt/location.hh:44,
                from PatchValueExpressionParser.tab.hh:65,
                from PatchValueExpressionDriver.H:59,
                from groovyBCFvPatchField.H:48,
                from groovyBCFvPatchFields.H:37,
                from groovyBCFvPatchFields.C:36:
position.hh: In function ‘bool pve::operator==(const pve::position&, const pve::position&)’:
position.hh:136: warning: suggest parentheses around ‘&&’ within ‘||’
lex.ve.c: At global scope:
lex.ve.c:10809: warning: ‘void yy_push_state(int)’ defined but not used
lex.ve.c:10837: warning: ‘void yy_pop_state()’ defined but not used
lex.ve.c:10849: warning: ‘int yy_top_state()’ defined but not used


alberto December 14, 2010 02:11

Quote:

Originally Posted by swahono (Post 287313)
What is your hourly rate?
You can send it to the Australian Govt (my employer) :D
What I can do to repay you is to pass everything I've learned about OF on to other people who are in the same position as me - struggling with OpenFOAM.

I was just joking! :D

We all struggle with OpenFOAM because "documentation is not important!". A lost battle of years... :mad:

Quote:

Ok, I have re-made your groovyBC
wclean
wmake libso

It returned errors (see error msg below), but I think it still compiled the library.
- I may have gotten the same error message before, but ignored it because the library and BC type is still recognized by OpenFOAM despite the compilation error msg. -

I checked both the GCC version and bison version installed on my machine is as required by groovyBC
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
bison (GNU Bison) 2.4.1

The simulation still crashed on the second iteration using your copy of the newly compiled groovyBC. :(

Just wondering if you had the same error msg (-See below) as me when you compiled the groovyBC on your machine?
Yes, I have quite some message too. But it seems to work properly. I have gcc 4.5.0 (openSUSE), and bison 2.4.1.

Best,


All times are GMT -4. The time now is 13:42.