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

groovyBC synthax help

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 31, 2011, 22:08
Default groovyBC synthax help
  #1
New Member
 
Join Date: Mar 2009
Posts: 22
Rep Power: 8
Baldy is on a distinguished road
I'm trying to set a velocity profile at my inlet for a 2D laminar flow using 1.6-ext

The equation I'm trying to write is U(y)=3/2*U0*(1-(2*y^2)/b^2)

From looking at other threads this is the best I could come up with:

Code:
   inlet
    {
	type            groovyBC;
	value           uniform (0 0 0);
        variables 	  "U_0=2.17;b=0.01;profile=(3/2)*U_0*(1-((pos().y*2)^2)/b^2)";
	valueExpression	"vector (profile, 0, 0)";
    }
but I'm getting this error:


gradientInternalCoeffs cannot be called for a genericFvPatchField (actual type groovyBC)
on patch inlet of field U in file "/home/OpenFOAM/Simulation/test_1/0/U"
You are probably trying to solve for a field with a generic boundary condition.

From function genericFvPatchField<Type>::gradientInternalCoeffs( ) const
in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 782.
Baldy is offline   Reply With Quote

Old   November 1, 2011, 02:23
Default
  #2
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
Quote:
Originally Posted by Baldy View Post
I'm trying to set a velocity profile at my inlet for a 2D laminar flow using 1.6-ext

The equation I'm trying to write is U(y)=3/2*U0*(1-(2*y^2)/b^2)

From looking at other threads this is the best I could come up with:

Code:
   inlet
    {
    type            groovyBC;
    value           uniform (0 0 0);
        variables       "U_0=2.17;b=0.01;profile=(3/2)*U_0*(1-((pos().y*2)^2)/b^2)";
    valueExpression    "vector (profile, 0, 0)";
    }
but I'm getting this error:


gradientInternalCoeffs cannot be called for a genericFvPatchField (actual type groovyBC)
on patch inlet of field U in file "/home/OpenFOAM/Simulation/test_1/0/U"
You are probably trying to solve for a field with a generic boundary condition.

From function genericFvPatchField<Type>::gradientInternalCoeffs( ) const
in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 782.
you have two main obstacles
1) in syntacs why ^ use (2*pow(y,2)) for example for 2*y^2
2)you should add following sentence to the controlDict :
libs ("libOpenFOAM.so""libgroovyBC.so");
nimasam is offline   Reply With Quote

Old   November 13, 2011, 23:41
Default
  #3
New Member
 
Join Date: Mar 2009
Posts: 22
Rep Power: 8
Baldy is on a distinguished road
Works great. Thanks
Baldy is offline   Reply With Quote

Old   March 20, 2012, 09:39
Default
  #4
Senior Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 128
Rep Power: 5
Goutam is on a distinguished road
Dear Badly,

Sorry...

Last edited by Goutam; March 20, 2012 at 11:19.
Goutam is offline   Reply With Quote

Old   March 20, 2012, 10:03
Default
  #5
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,912
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Goutam View Post
Dear Badly,

where I will write libs("libOpenFOAM.so" "libgroovyBC.so"); ?
where is the location of controlDict?
I am using OF_2.1.0.

Thanks
controlDict has been in the same location since the beginning of mankind (OK. Almost. Since OF 1.0). Have a look at the user-guide, chapter 4 (in particular 4.3). But you must already have stumbled upon it when you were going through the first tutorial in the UG
gschaider is offline   Reply With Quote

Old   March 20, 2012, 11:18
Default
  #6
Senior Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 128
Rep Power: 5
Goutam is on a distinguished road
Quote:
Originally Posted by gschaider View Post
controlDict has been in the same location since the beginning of mankind (OK. Almost. Since OF 1.0). Have a look at the user-guide, chapter 4 (in particular 4.3). But you must already have stumbled upon it when you were going through the first tutorial in the UG
Sorry, actually I am using OF 2.1.0 and I want to use groovyBC, I didn't find this. I see the link in openfoamwiki but it does not work. I just missed what I want to ask. Sorry...
Goutam 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
groovyBC elevated inlet. pos() issue grjmell OpenFOAM 6 January 23, 2013 09:14
GroovyBC for 2D wave flume! Hisham OpenFOAM Running, Solving & CFD 13 January 20, 2012 06:04
groovyBC and Eqn.setReference() benk OpenFOAM 3 June 2, 2011 08:49
Wall heat transfer using groovyBC (XiFoam solver) usergk OpenFOAM 7 February 4, 2011 14:36


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