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

Error in initializing a non uniform velocity field

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 7, 2015, 06: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, 07: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

Old   November 18, 2015, 14:43
Default
  #3
Member
 
Saurabh Tandon
Join Date: Nov 2015
Location: Austin
Posts: 43
Rep Power: 11
STutexas is on a distinguished road
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.
STutexas is offline   Reply With Quote

Reply

Tags
funkysetfields, non uniform velocity


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 Off
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 17:33
after 3 timesteps I always get "Floating Point Exception" knoedl1 OpenFOAM Running, Solving & CFD 18 January 25, 2015 12:56
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Meshing & Mesh Conversion 12 May 2, 2013 11:52
[swak4Foam] Air Conditioned room groovyBC Sebaj OpenFOAM Community Contributions 7 October 31, 2012 15:16
singularity? mihaipruna OpenFOAM Running, Solving & CFD 5 April 24, 2012 18:18


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