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

[swak4Foam] Creating log. velocity profile with groovyBC

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread 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: 14
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: 4,225
Rep Power: 51
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: 14
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


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
[UDF] Relative coordinates in logarithmic velocity profile cfdworker Fluent UDF and Scheme Programming 25 July 13, 2017 04:44
UDF error - parabolic velocity profile - 3D turbine Zaqie Fluent UDF and Scheme Programming 9 June 25, 2016 20:08
[swak4Foam] Problem with fully developed velocity profile groovyBC in 2D axi-sym mesh harshad88 OpenFOAM Community Contributions 7 July 24, 2014 15:28
[swak4Foam] groovyBC error: velocity profile (2D) >> what's wrong? vitorspadeto OpenFOAM Community Contributions 4 June 19, 2014 16:31
[boundary condition] logarithmic velocity profile cfdworker FLUENT 2 April 18, 2009 00:36


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