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

Programming of fluctuating two-component inlet

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 3, 2010, 09:39
Default Programming of fluctuating two-component inlet
  #1
Member
 
Adam James
Join Date: Jul 2010
Posts: 34
Rep Power: 6
steph79 is on a distinguished road
Hi,

I want to specify an inlet with two (u and v) fluctuating components. I've tried to use the groovyBC utility but as far as I can tell it's limited to produce a homogeneous/uniform inlet with respect to each time step, although please correct me if I'm wrong!!!

Assuming this is the case could someone advise me where to get started in terms of implementing this for myself and retrofitting the custom code to OpenFOAM? I'm using version 1.7.0.

Thanks! :-)
steph79 is offline   Reply With Quote

Old   August 3, 2010, 11:15
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 386
Rep Power: 10
marupio is on a distinguished road
I don't know what groovyBC is capable of... but I think it should be able to handle what you are asking for. If not, here's a crude guide on programming custom boundary conditions:

http://openfoamwiki.net/index.php/Ho...dary_condition

Good luck!
marupio is offline   Reply With Quote

Old   August 3, 2010, 15:37
Default
  #3
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,063
Blog Entries: 1
Rep Power: 13
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
you are wrong
with groovyBC, you can make a blend BC even fluctuating with time or position!!!
look at wiki and example,you will find more
nimasam is offline   Reply With Quote

Old   August 3, 2010, 17:20
Default
  #4
Member
 
Adam James
Join Date: Jul 2010
Posts: 34
Rep Power: 6
steph79 is on a distinguished road
Quote:
Originally Posted by nimasam View Post
you are wrong
with groovyBC, you can make a blend BC even fluctuating with time or position!!!
look at wiki and example,you will find more
For once I'm wrong!

Could you, or anyone else, help direct me to implement equations of this form in groovyBC?

u = 10 + sin((5*y + 2)*time)

v = cos((5*y+2)*time)

Another thing is, can I define global variables at the head of the program, as for Fluent UDF's? For example - #define UMEAN 10 ???

@David - thanks for the guide, I hadn't come across that before and it could come in handy!
steph79 is offline   Reply With Quote

Old   August 3, 2010, 17:35
Default
  #5
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,063
Blog Entries: 1
Rep Power: 13
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
{
type groovyBC;
valueExpression "vector(10+sin(a*time()),cos(a*time()),0)";
gradientExpression "vector(0,0,0)";
fractionExpression "1";
variables "a=5*pos().y+2;";
timelines ();
value uniform (0 0 0);
}
nimasam is offline   Reply With Quote

Old   August 3, 2010, 18:05
Talking
  #6
Member
 
Adam James
Join Date: Jul 2010
Posts: 34
Rep Power: 6
steph79 is on a distinguished road
Quote:
Originally Posted by nimasam View Post
{
type groovyBC;
valueExpression "vector(10+sin(a*time()),cos(a*time()),0)";
gradientExpression "vector(0,0,0)";
fractionExpression "1";
variables "a=5*pos().y+2;";
timelines ();
value uniform (0 0 0);
}
That was very kind, thank you for your help and I'll let you know how I get on tomorrow!!!
steph79 is offline   Reply With Quote

Old   August 4, 2010, 12:21
Default
  #7
Member
 
Adam James
Join Date: Jul 2010
Posts: 34
Rep Power: 6
steph79 is on a distinguished road
It worked great, thanks again!
steph79 is offline   Reply With Quote

Old   January 26, 2012, 08:19
Default
  #8
Member
 
Adam James
Join Date: Jul 2010
Posts: 34
Rep Power: 6
steph79 is on a distinguished road
Hi,

Having disappeared from the OpenFOAM world for over a year now I recently installed version 2 and discovered that groovybc is no longer supported. I had this boundary condition working fine with 1.7.

Could someone quickly tell me how to transfer this exact same boundary condition over to swak4foam?

Thanks.
steph79 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
RSM value of fluctuating component of velocity Kushagra CFX 5 April 10, 2008 15:20
Gravity component and inlet velocity Vidya FLUENT 8 July 31, 2006 08:28
HOW to GET FLUCTUATING VELOCITY COMPONENT at FLUEN Seyfettin FLUENT 2 December 1, 2005 03:51
Diffusion component at inlet Balaji FLUENT 2 August 8, 2005 07:37
how to get fluctuating component l.g.patil FLUENT 0 February 9, 2002 11:57


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