CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Pre-Processing

Error in initializing a non uniform velocity field

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 7, 2015, 05:10
Unhappy Error in initializing a non uniform velocity field
  #1
New Member
 
Vikas
Join Date: Oct 2013
Posts: 2
Rep Power: 0
Vikas is on a distinguished road
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
Vikas is offline   Reply With Quote

Old   July 8, 2015, 06:16
Default
  #2
New Member
 
Vikas
Join Date: Oct 2013
Posts: 2
Rep Power: 0
Vikas is on a distinguished road
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.
Vikas is offline   Reply With Quote

Reply

Tags
funkysetfields, non uniform velocity

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
Boundary Conditions MtnRunBeachBum OpenFOAM Pre-Processing 1 April 30, 2015 16:33
after 3 timesteps I always get "Floating Point Exception" knoedl1 OpenFOAM Running, Solving & CFD 18 January 25, 2015 12:56
fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 12 May 2, 2013 10:52
Air Conditioned room groovyBC Sebaj OpenFOAM 7 October 31, 2012 15:16
singularity? mihaipruna OpenFOAM Running, Solving & CFD 5 April 24, 2012 17:18


All times are GMT -4. The time now is 08:43.