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

GroovyBC again

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 16, 2011, 12:57
Default GroovyBC again
  #1
Senior Member
 
Rickard
Join Date: May 2010
Location: Lund, Skåne, Sweden
Posts: 143
Rep Power: 6
Rickard.Solsjo is on a distinguished road
Hi again. Still some groovy problems.
Does anyone know what this problem may be due to?

[15] Parser Error at "1.0-5" :"field Uinlet not existing or of wrong type"
"Uinlet=Uz*cos(theta)*vector(0,0,1)+Uz*sin(theta)* vector(0,1,0)+Uz*sin(theta)*vector(1,0,0)"
"^^^^^^ "
[15]
[15] From function parsingValue
[15] in file PatchValueExpressionDriver.C at line 192.
[15]
FOAM parallel run exiting

jet
{
type groovyBC;

variables "Uz=150;rmax=0.0005;r=sqrt(pow(pos().x,2)+pow(pos( ).y,2));thetaMax=10.75*pi/180;theta=(thetaMax*r)/rmax;";
valueExpression "Uinlet=Uz*cos(theta)*vector(0,0,1)+Uz*sin(theta)* vector(0,1,0)+Uz*sin(theta)*vector(1,0,0)";
fractionExpression "(r<=0.5) ? U=Uinlet : U=vector(0,0,0)";
}
Rickard.Solsjo is offline   Reply With Quote

Old   February 16, 2011, 19:04
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,905
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Rickard.Solsjo View Post
Hi again. Still some groovy problems.
Does anyone know what this problem may be due to?

[15] Parser Error at "1.0-5" :"field Uinlet not existing or of wrong type"
"Uinlet=Uz*cos(theta)*vector(0,0,1)+Uz*sin(theta)* vector(0,1,0)+Uz*sin(theta)*vector(1,0,0)"
"^^^^^^ "
[15]
[15] From function parsingValue
[15] in file PatchValueExpressionDriver.C at line 192.
[15]
FOAM parallel run exiting

jet
{
type groovyBC;

variables "Uz=150;rmax=0.0005;r=sqrt(pow(pos().x,2)+pow(pos( ).y,2));thetaMax=10.75*pi/180;theta=(thetaMax*r)/rmax;";
valueExpression "Uinlet=Uz*cos(theta)*vector(0,0,1)+Uz*sin(theta)* vector(0,1,0)+Uz*sin(theta)*vector(1,0,0)";
fractionExpression "(r<=0.5) ? U=Uinlet : U=vector(0,0,0)";
}
You can't have an assignment inside of valueExpression (that is what variables is for). valueExpression IS an assignment
gschaider is offline   Reply With Quote

Old   June 16, 2011, 16:58
Default groovyBC error
  #3
New Member
 
Ulisses
Join Date: Mar 2009
Location: Brazil
Posts: 24
Rep Power: 8
ulisses is on a distinguished road
Hi guys,

I am trying to generate a parabolic profile using groovyBC:

inlet
{

type groovyBC;
variables "dirx=vector (1,0,0);dirz=vector (0,0,1);Umin=22;hx=mag(pos()*dirx);hz=mag(pos()*di rz);a=hx*hx+hz*hz;speed=Umin*a";
valueExpression "vector (0, speed, 0)";
}

But I've got the following error:

PHP Code:
    Cannot find 'value' entry on patch entrada of field Ub in file "/home/ulisses/OpenFOAM/ulisses-1.6/run/leitodejorroGroovy/0/Ub"
    
which is required to set the values of the generic patch field.
    (
Actual type groovyBC)

    
Please add the 'value' entry to the write function of the user-defined boundary-condition
    
or link the boundary-condition into libfoamUtil.so

file
: /home/ulisses/OpenFOAM/ulisses-1.6/run/leitodejorroGroovy/0/Ub::entrada from line 36 to line 39.

    From 
function genericFvPatchField<Type>::genericFvPatchField(const fvPatch&, const Field<Type>&, const dictionary&)
    
in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 72.

FOAM exiting 
Do you have any suggestion?

Thanks
ulisses is offline   Reply With Quote

Old   June 16, 2011, 17:28
Default
  #4
New Member
 
Ulisses
Join Date: Mar 2009
Location: Brazil
Posts: 24
Rep Power: 8
ulisses is on a distinguished road
I already discovery my mistake.
I wrote in the wrong place in system/controlDict:
libs ("libgroovyBC.so")
ulisses is offline   Reply With Quote

Reply

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
groovyBC and funkySetFields married and got a kid named swak4Foam gschaider OpenFOAM 164 January 13, 2015 03:52
Wall heat transfer using groovyBC (XiFoam solver) usergk OpenFOAM 7 February 4, 2011 14:36
Non-normal inflow with groovyBC bjr OpenFOAM 9 January 17, 2011 11:35
Scale discrete inlet velocity profile with groovyBC cboss OpenFOAM 1 June 20, 2010 13:02
groovyBC tamsilian OpenFOAM Programming & Development 1 May 27, 2010 03:15


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