CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Add icoLagrangianFoam to FoamX

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 1, 2007, 04:49
Default hi all, i just have compiled
  #1
New Member
 
D.Y.Xu
Join Date: Mar 2009
Posts: 7
Rep Power: 7
dyxu is on a distinguished road
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 ?
dyxu is offline   Reply With Quote

Old   August 1, 2007, 09:31
Default As a start have a look at: ht
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,752
Rep Power: 36
gschaider will become famous soon enoughgschaider will become famous soon enough
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
gschaider is offline   Reply With Quote

Old   August 4, 2007, 21:29
Default thank u Bernhard
  #3
New Member
 
D.Y.Xu
Join Date: Mar 2009
Posts: 7
Rep Power: 7
dyxu is on a distinguished road
thank u Bernhard
dyxu is offline   Reply With Quote

Old   May 27, 2008, 05:07
Default Hi, all, I would like to sh
  #4
Senior Member
 
ZHOU Bin
Join Date: Mar 2009
Location: Nanjing/Shanghai/Torino, Nanjing/Shanghai/Piemente, China/Italy
Posts: 164
Rep Power: 7
zhoubinwx is on a distinguished road
Send a message via ICQ to zhoubinwx Send a message via MSN to zhoubinwx Send a message via Skype™ to zhoubinwx
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
zhoubinwx is offline   Reply With Quote

Old   May 28, 2008, 02:10
Default There are 2 ways to solve this
  #5
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 691
Rep Power: 18
niklas will become famous soon enough
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
niklas is offline   Reply With Quote

Old   May 28, 2008, 02:11
Default I forgot to add that you of co
  #6
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 691
Rep Power: 18
niklas will become famous soon enough
I forgot to add that you of course need to recompile the trisurface lib also
niklas is offline   Reply With Quote

Old   May 28, 2008, 13:00
Default Hi, Dear NLklas, Thank you
  #7
Senior Member
 
ZHOU Bin
Join Date: Mar 2009
Location: Nanjing/Shanghai/Torino, Nanjing/Shanghai/Piemente, China/Italy
Posts: 164
Rep Power: 7
zhoubinwx is on a distinguished road
Send a message via ICQ to zhoubinwx Send a message via MSN to zhoubinwx Send a message via Skype™ to zhoubinwx
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
zhoubinwx is offline   Reply With Quote

Old   May 29, 2008, 02:11
Default thats because your flex is too
  #8
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 691
Rep Power: 18
niklas will become famous soon enough
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
niklas is offline   Reply With Quote

Old   June 5, 2008, 10:15
Default Thank you, the problem is solv
  #9
Senior Member
 
ZHOU Bin
Join Date: Mar 2009
Location: Nanjing/Shanghai/Torino, Nanjing/Shanghai/Piemente, China/Italy
Posts: 164
Rep Power: 7
zhoubinwx is on a distinguished road
Send a message via ICQ to zhoubinwx Send a message via MSN to zhoubinwx Send a message via Skype™ to zhoubinwx
Thank you, the problem is solved and I am studying icoLagrangianFoam case.
Best regards,
Bin
zhoubinwx is offline   Reply With Quote

Old   June 11, 2008, 08:42
Default Hello Bernhard Gschaider and o
  #10
Senior Member
 
ZHOU Bin
Join Date: Mar 2009
Location: Nanjing/Shanghai/Torino, Nanjing/Shanghai/Piemente, China/Italy
Posts: 164
Rep Power: 7
zhoubinwx is on a distinguished road
Send a message via ICQ to zhoubinwx Send a message via MSN to zhoubinwx Send a message via Skype™ to zhoubinwx
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
zhoubinwx is offline   Reply With Quote

Old   June 11, 2008, 09:53
Default Hi yhoubin! I never tried t
  #11
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,752
Rep Power: 36
gschaider will become famous soon enoughgschaider will become famous soon enough
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
gschaider 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
IcoLagrangianFoam and particle forces davidpalko OpenFOAM Running, Solving & CFD 33 December 2, 2013 02:39
About FoamX ivanyao OpenFOAM Installation 2 September 21, 2008 21:24
IcoLagrangianFoam problem in contiuation run amp field reading from input stream gschaider OpenFOAM Running, Solving & CFD 2 May 27, 2008 03:45
Add icoLagrangianFoam to FoamX dyxu OpenFOAM Pre-Processing 1 August 13, 2007 04:21
FoamX ianz8802 OpenFOAM Installation 2 March 8, 2007 23:45


All times are GMT -4. The time now is 15:19.