|
[Sponsors] |
August 1, 2007, 05:49 |
hi all,
i just have compiled
|
#1 |
New Member
D.Y.Xu
Join Date: Mar 2009
Posts: 7
Rep Power: 17 |
hi all,
i just have compiled icoLagangianFoam using wmaked,but how can i add it to FoamX as a solver ,so that it will appear in the solvers list when i create a new case just like icoFoam ? |
|
August 1, 2007, 10:31 |
As a start have a look at:
ht
|
#2 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
As a start have a look at:
http://openfoamwiki.net/index.php/Ho...olver_to_foamX As icoLagrangianFoam is derived from icoFoam (the name is a hint ;) ) the icoFoam-stuff is a good start. The fun part is "Adapt the configuration file and the dictionaries to your needs", you'll have to add the lagrangian-specific stuff. An option would be to just "change /Make/files to match your application name" and edit the lagrange-stuff by hand.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
August 4, 2007, 22:29 |
thank u Bernhard
|
#3 |
New Member
D.Y.Xu
Join Date: Mar 2009
Posts: 7
Rep Power: 17 |
thank u Bernhard
|
|
May 27, 2008, 06:07 |
Hi, all,
I would like to sh
|
#4 |
Senior Member
|
Hi, all,
I would like to show what I have done: 1.install svn software using package manager 2.zhou@wsfoam:~$ svn checkout https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Breede r/solvers/other/IcoLagrangianFoam/ 3.I find the directory "icoLagrangianFoam" is in "zhou" directory automatically. 4.I copy it into "$WM_PROJECT_USER_DIR/applications/solvers" 5../Allwmake After I compile the icoLagrangianFoam solver, I get the error: /home/zhou/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libtriSurface.so: undefined reference to `yyFlexLexer::yywrap()' collect2: ld returned 1 exit status make: *** [/home/zhou/OpenFOAM/zhou-1.4.1/applications/bin/linuxGccDPOpt/icoLagrangianFoam ] Error 1 I copy the file "FoamX" (from "The solver" in http://openfoamwiki.net/index.php/Co...LagrangianFoam) into /home/zhou/OpenFOAM/zhou-1.4.1/applications/solvers/icoLagrangianFoam/icoLagrang ianFoam. Change the name icoFoam.cfg into icoLagrangianFoam.cfg. Is there any one who could tell me what's wrong with my steps. Thank you |
|
May 28, 2008, 03:10 |
There are 2 ways to solve this
|
#5 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
There are 2 ways to solve this.
I think there are 4 flex files that you will have to fix. In your case it is this one. OpenFOAM/OpenFOAM-1.4.1/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L solution 1. find the line extern "C" int yywrap() and replace it with extern "C" int yyFlexLexer::yywrap() solution 2. find the line %option stack under this add the following %option noyywrap since yywrap always return 1 I think the 2 solutions produce the same result |
|
May 28, 2008, 03:11 |
I forgot to add that you of co
|
#6 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
I forgot to add that you of course need to recompile the trisurface lib also
|
|
May 28, 2008, 14:00 |
Hi, Dear NLklas,
Thank you
|
#7 |
Senior Member
|
Hi, Dear NLklas,
Thank you for your reply. I follow both of your method, but it is not ok. When I follow method 2, %option stack %option noyywrap /* zhoubin add: %option noyywrap*/ %x readSolidName When I recompile using: zhou@wsfoam:~/OpenFOAM/OpenFOAM-1.4.1/src$ wmake libso triSurface I get the error: triSurface/interfaces/STL/readSTLASCII.L:54: error: expected unqualified-id before numeric constant lex.yy.cc: In member function 'int STLLexer::lex()': lex.yy.cc:5498: warning: use of old-style cast lex.yy.cc:5498: warning: use of old-style cast lex.yy.cc:5514: warning: use of old-style cast lex.yy.cc:5728: warning: use of old-style cast triSurface/interfaces/STL/readSTLASCII.L:208: warning: unused variable 'endPtr' lex.yy.cc: In member function 'int yyFlexLexer::yy_get_next_buffer()': lex.yy.cc:5977: warning: use of old-style cast lex.yy.cc:6004: warning: use of old-style cast lex.yy.cc:6017: warning: use of old-style cast lex.yy.cc:6018: warning: use of old-style cast lex.yy.cc:6039: warning: use of old-style cast lex.yy.cc: In member function 'yy_state_type yyFlexLexer::yy_get_previous_state()': lex.yy.cc:6087: warning: use of old-style cast lex.yy.cc:6087: warning: use of old-style cast lex.yy.cc: In member function 'void yyFlexLexer::yyunput(int, char*)': lex.yy.cc:6148: warning: use of old-style cast lex.yy.cc:6149: warning: use of old-style cast lex.yy.cc:6157: warning: use of old-style cast lex.yy.cc: In member function 'int yyFlexLexer::yyinput()': lex.yy.cc:6226: warning: use of old-style cast lex.yy.cc: In member function 'virtual yy_buffer_state* yyFlexLexer::yy_create_buffer(std::istream*, int)': lex.yy.cc:6283: warning: use of old-style cast lex.yy.cc:6292: warning: use of old-style cast lex.yy.cc: In member function 'virtual void yyFlexLexer::yy_delete_buffer(yy_buffer_state*)': lex.yy.cc:6310: warning: use of old-style cast lex.yy.cc:6313: warning: use of old-style cast lex.yy.cc:6315: warning: use of old-style cast lex.yy.cc: In member function 'void yyFlexLexer::yy_push_state(int)': lex.yy.cc:6378: warning: use of old-style cast lex.yy.cc:6382: warning: use of old-style cast lex.yy.cc:6382: warning: use of old-style cast lex.yy.cc: In function 'void* yy_flex_alloc(yy_size_t)': lex.yy.cc:6484: warning: use of old-style cast lex.yy.cc: In function 'void* yy_flex_realloc(void*, yy_size_t)': lex.yy.cc:6502: warning: use of old-style cast lex.yy.cc:6502: warning: use of old-style cast lex.yy.cc: At global scope: lex.yy.cc:5317: warning: 'yy_start_stack_ptr' defined but not used lex.yy.cc:5318: warning: 'yy_start_stack_depth' defined but not used lex.yy.cc:5319: warning: 'yy_start_stack' defined but not used lex.yy.cc:5321: warning: 'void yy_push_state(int)' declared 'static' but never defined lex.yy.cc:5324: warning: 'void yy_pop_state()' declared 'static' but never defined lex.yy.cc:5327: warning: 'int yy_top_state()' declared 'static' but never defined make: *** [Make/linuxGccDPOpt/readSTLASCII.o] Error 1 Sorry for my deeper problem. Thank you for helping me. Best regards, Bin |
|
May 29, 2008, 03:11 |
thats because your flex is too
|
#8 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
thats because your flex is too old.
go to http://flex.sourceforge.net/ and compile and install 2.5.35 to the linux (or linux64 or whatever architecture you're using). Be sure to edit the FLEX_HOME enviroment variable in OpenFOAM-1.4.1/.bashrc to point to your new flex make sure you link flex++ to the new flex and copy the new FlexLexer.h file to OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude that will solve it |
|
June 5, 2008, 11:15 |
Thank you, the problem is solv
|
#9 |
Senior Member
|
Thank you, the problem is solved and I am studying icoLagrangianFoam case.
Best regards, Bin |
|
June 11, 2008, 09:42 |
Hello Bernhard Gschaider and o
|
#10 |
Senior Member
|
Hello Bernhard Gschaider and other friends,
Could I ask any of you several questions: 1) in the case of cavityLagrange, we could see that in the file "controDict" it uses icoFoam solver, not icoLagrangianFoam solver, could you tell me why? 2) If we change "icoFoam" into "icoLagrangianFoam", we have an error, saying that "transportModel" not found??? 3) since we could see that in the case "cavityLagrange", there is a file named "cloudProperties",however, after we open that case with OpenFOAM, we could not set for the particles? Thank you very much for your patience. Best regards, Zhou Bin |
|
June 11, 2008, 10:53 |
Hi yhoubin!
I never tried t
|
#11 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Hi yhoubin!
I never tried to run icoLagrangianFoam on FoamX and I havn't used FoamX for a long time (I somehow broke it and I'm to lazy to fix it - I prefer working with a text editor) @1: this entry is ONLY for the benefit of FoamX - if you're not using that it can be missing or have any value - the solvers don't care @2: FoamX has that error? Can't help you there, sorry @3: You mean you can't edit any particle-stuff in FoamX? You have to edit some "case definition files" (basically something like DTD-files for XML-files, if you know that kind of stuff) for FoamX to be able to work with new dictionaries. Have a look at the stuff that resides in ~/OpenFOAM/OpenFOAM-1.4.1/.OpenFOAM-1.4.1/apps/FoamX/ for examples. There may be some tars floating around of icoLaFo that have a FoamX-directory and for that reason FoamX seems to recognize it, but that was only a copy of the original icoFoam-FoamX-stuff. It has been removed from the latest version (the one on the svn). Should anyone have the time and produce FoamX-support for icoLaFo he/she is welcome to add it to the version on the SVN Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
IcoLagrangianFoam and particle forces | davidpalko | OpenFOAM Running, Solving & CFD | 33 | December 2, 2013 03:39 |
About FoamX | ivanyao | OpenFOAM Installation | 2 | September 21, 2008 22:24 |
IcoLagrangianFoam problem in contiuation run amp field reading from input stream | gschaider | OpenFOAM Running, Solving & CFD | 2 | May 27, 2008 04:45 |
Add icoLagrangianFoam to FoamX | dyxu | OpenFOAM Pre-Processing | 1 | August 13, 2007 05:21 |
FoamX | ianz8802 | OpenFOAM Installation | 2 | March 9, 2007 00:45 |