Error in initializing a non uniform velocity field
Hi everyone,
I am trying to simulate 2d mixing layer problem in OF for which I have to initialize the velocity field with a known expression. I am trying to do it using SWAK4 FOAM. My U file and FSFdict file are given below. Here I have changed the expression, but Ux and Uy are simply fcn(X,Y) . When I ran funkySetFields -time 0, I got error message which is also given below. Senior members, plz help me !! __________________________________________________ __________________ funkySetFieldsDict FoamFile { version 2.0; format ascii; root "/home/vikas/Desktop/2d_mix1"; case "VJTC"; instance ""; local ""; class dictionary; object funkySetFieldsDict; } expressions ( SetVelocityField { field U; variables ( "Ux= pos().x* "Uy=pos().y" ); expression "vector(Ux Uy 0)"; condition "mag(pos().y)<1"; } ); __________________________________________________ _____________________ 0/U /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { top { type slip; } bottom { type slip; } left { type cyclic; } right { type cyclic; } frontAndBack { type empty; } } // ************************************************** *********************** //__________________________________________________ ______________________ Error message --> FOAM FATAL ERROR: Parser Error for driver FieldValueExpressionDriver at "1.11-12" :"syntax error, unexpected scalarID" "vector(Ux Uy 0)" Context of the error: - Driver constructed from scratch Evaluating expression "vector(Ux Uy 0)" From function parsingValue in file lnInclude/CommonValueExpressionDriverI.H at line 1189. FOAM exiting __________________________________________________ ___________________ Thank You |
Sorry friends... I have found my mistake (trivial one actually ). The 0/U file has internal field as uniform. I supplied a non uniform field and then fsf overwrote it as I wanted.
|
Hi Vikas
Interesting post. I am having a similar problem with funky set fields. Can you elaborate how you finally corrected the error. Thank you. |
All times are GMT -4. The time now is 11:56. |