problem with funkySetFields
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().x-4*(10,-2))+sqr(pos().y-16*(10,-3))+(sqr(pos().z-5*(10,-3))) <= 0.005" is true --> FOAM FATAL ERROR: Parser Error at "1.23" :"syntax error, unexpected ','" "sqrt(sqr(pos().x-4*(10,-2))+sqr(pos().y-16*(10,-3))+(sqr(pos().z-5*(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 |
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().x-4*(10,-2))+sqr(pos().y-16*(10,-3))+(sqr(pos().z-5*(10,-3))) <= 0.005"; } a2 { field alpha1; expression_r "1"; condition "sqrt(sqr(pos().x-2*(10,-2))+sqr(pos().y-16*(10,-3))+(sqr(pos().z-5*(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 |
Quote:
|
Quote:
|
Problem regarding funkySetFields
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 |
Quote:
Probably you didn't set "keepPatches" http://openfoamwiki.net/index.php/Co...ctionary_usage |
All times are GMT -4. The time now is 04:31. |