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

Creating log. velocity profile with groovyBC

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 14, 2012, 12:59
Default Creating log. velocity profile with groovyBC
  #1
New Member
 
Join Date: Feb 2012
Posts: 6
Rep Power: 5
krsp is on a distinguished road
Hi everyone,

I would like to create a logarithmic velocity profile at the inlet. I have tried with "groovyBC", however I keep getting the same error:

--> FOAM FATAL ERROR:
Parser Error at "1.8-9" :"field uf not existing or of wrong type"
"vector(uf/K*log(zp/z0), 0.0, 0.0)"
" ^^ "
From function parsingValue
in file PatchValueExpressionDriver.C at line 192.
FOAM exiting

In the 0/U-file, I have typed the following for my BC:
inlet
{
type groovyBC
variables "uf=0.002257;ks=0.0051;z0=ks/30;K=0.4;zp=pts().z;";
valueExpression "vector(uf/K*log(zp/z0), 0.0, 0.0)";
}

Can anyone tell me, what I have done wrong? (I use OpenFoam 1.6-ext)

Thanks in advance
krsp is offline   Reply With Quote

Old   March 14, 2012, 14:26
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,914
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by krsp View Post
Hi everyone,

I would like to create a logarithmic velocity profile at the inlet. I have tried with "groovyBC", however I keep getting the same error:

--> FOAM FATAL ERROR:
Parser Error at "1.8-9" :"field uf not existing or of wrong type"
"vector(uf/K*log(zp/z0), 0.0, 0.0)"
" ^^ "
From function parsingValue
in file PatchValueExpressionDriver.C at line 192.
FOAM exiting

In the 0/U-file, I have typed the following for my BC:
inlet
{
type groovyBC
variables "uf=0.002257;ks=0.0051;z0=ks/30;K=0.4;zp=pts().z;";
valueExpression "vector(uf/K*log(zp/z0), 0.0, 0.0)";
}

Can anyone tell me, what I have done wrong? (I use OpenFoam 1.6-ext)

Thanks in advance
Should work. Some questions:

- which version of groovyBC are you using? (To put it differently: is is a version that supports variables?)
- Have you tried deliberatly introducing a syntax error into the evaluation of uf (for instance "uf=nix*0.002257;") to see whether it is evaluated at all

Bernhard
gschaider is offline   Reply With Quote

Old   March 15, 2012, 07:37
Default
  #3
New Member
 
Join Date: Feb 2012
Posts: 6
Rep Power: 5
krsp is on a distinguished road
I think you were right, that I was using a wrong version of groovyBC.. Now I have downloaded swak4Foam (1.7), and I think it works

Thank you!
krsp is offline   Reply With Quote

Reply

Tags
groovybc, log. velocity-profile

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
[UDF] Relative coordinates in logarithmic velocity profile cfdworker Fluent UDF and Scheme Programming 24 February 23, 2015 05:33
UDF error - parabolic velocity profile - 3D turbine Zaqie Fluent UDF and Scheme Programming 8 May 11, 2014 08:34
[boundary condition] logarithmic velocity profile cfdworker FLUENT 2 April 17, 2009 23:36
Velocity Profile Jeff FLUENT 1 November 24, 2008 09:21
problem with velocity inlet profile file Duncan FLUENT 3 November 21, 2005 08:28


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