
[Sponsors] 
November 6, 2011, 01:11 
problem with funkySetFields

#1 
Member
jack
Join Date: Jul 2011
Posts: 52
Rep Power: 7 
hi everyone
I need to set an initial field.but when i run the funkysetFields, i met the problem: Create mesh for time = 0 Time = 0 Using funkySetFieldsDict Part: a1 Putting "0" into field alpha1 at t = "0" if condition "sqrt(sqr(pos().x4*(10,2))+sqr(pos().y16*(10,3))+(sqr(pos().z5*(10,3))) <= 0.005" is true > FOAM FATAL ERROR: Parser Error at "1.23" :"syntax error, unexpected ','" "sqrt(sqr(pos().x4*(10,2))+sqr(pos().y16*(10,3))+(sqr(pos().z5*(10,3))) <= 0.005" " ^ " From function parsingValue in file lnInclude/CommonValueExpressionDriverI.H at line 718. I don't kown how to deal with it? Thank you for your help Best regards. lg88 

November 6, 2011, 08:13 

#2 
Member
jack
Join Date: Jul 2011
Posts: 52
Rep Power: 7 
This is my funkySetFieldsDict.
/** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.0.1   \\ / A nd  Web: www.OpenFOAM.com   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object funkySetFieldsDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // expressions ( a1 { field alpha1; expression_r "0"; condition "sqrt(sqr(pos().x4*(10,2))+sqr(pos().y16*(10,3))+(sqr(pos().z5*(10,3))) <= 0.005"; } a2 { field alpha1; expression_r "1"; condition "sqrt(sqr(pos().x2*(10,2))+sqr(pos().y16*(10,3))+(sqr(pos().z5*(10,3))) > 0.005"; } ); // ************************************************** *********************** // now when i input the command :funkySetFieldsDict time 0 ,the problem is different with the former one.The new one is : > FOAM FATAL IO ERROR: keyword expression is undefined in dictionary "::a1" file: ::a1 from line 22 to line 24. From function dictionary::lookupEntry(const word&, bool, bool) const in file db/dictionary/dictionary.C at line 400. FOAM exiting what is the problem? Can you help me ? Thank you very much Best regards lg88 

November 7, 2011, 09:11 

#3  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,931
Rep Power: 41 
Quote:


November 7, 2011, 09:14 

#4  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,931
Rep Power: 41 
Quote:


February 5, 2013, 07:37 
Problem regarding funkySetFields

#5 
Member
Anant Diwakar
Join Date: Jan 2013
Posts: 68
Rep Power: 5 
Hi
I am using funkySetFields for initializing a exponential pressure distribution. But when I am running the command "funkySetFields time 0", the domain is getting initialized correctly but the boundary conditions in the 0/p file is getting changed on its own. Can anyone tell why is this happening ? Thanks Anant 

February 5, 2013, 13:33 

#6  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,931
Rep Power: 41 
Quote:
Probably you didn't set "keepPatches" http://openfoamwiki.net/index.php/Co...ctionary_usage
__________________
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 

Tags 
funkysetfields 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
UDF compiling problem  Wouter  Fluent UDF and Scheme Programming  6  June 6, 2012 04:43 
Gambit  meshing over airfoil wrapping (?) problem  JFDC  FLUENT  1  July 11, 2011 05:59 
natural convection problem for a CHT problem  SeHee  CFX  2  June 10, 2007 06:29 
Adiabatic and Rotating wall (Convection problem)  ParodDav  CFX  5  April 29, 2007 19:13 
Is this problem well posed?  Thomas P. Abraham  Main CFD Forum  5  September 8, 1999 14:52 