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

Programming of fluctuating two-component inlet

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 3, 2010, 10:39
Default Programming of fluctuating two-component inlet
  #1
Member
 
Join Date: Jul 2010
Posts: 37
Rep Power: 16
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, 12:15
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22
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, 16:37
Default
  #3
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
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, 18:20
Default
  #4
Member
 
Join Date: Jul 2010
Posts: 37
Rep Power: 16
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, 18:35
Default
  #5
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
{
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, 19:05
Talking
  #6
Member
 
Join Date: Jul 2010
Posts: 37
Rep Power: 16
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, 13:21
Default
  #7
Member
 
Join Date: Jul 2010
Posts: 37
Rep Power: 16
steph79 is on a distinguished road
It worked great, thanks again!
steph79 is offline   Reply With Quote

Old   January 26, 2012, 09:19
Default
  #8
Member
 
Join Date: Jul 2010
Posts: 37
Rep Power: 16
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


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


All times are GMT -4. The time now is 09:25.