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

mixed boundary condition with GroovyBC

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

Like Tree2Likes
  • 1 Post By gschaider
  • 1 Post By Pavithra

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 11, 2019, 09:19
Default mixed boundary condition with GroovyBC
  #1
Member
 
Join Date: Apr 2019
Location: India
Posts: 52
Rep Power: 2
Pavithra is on a distinguished road
Hello Everyone,

I want to implement the following boundary condition on a horizontal wall.

Normal component of velocity

u_y = 0


Tangential component of velocity

\frac{du_x}{dy} = 3u_x

I have tried to use groovyBC as follows:

Code:
    floor
    {
        type                         groovyBC;
        valueExpression        0; 
        gradientExpression    3.0*U.component(0);
        value                        uniform (0 1 0);    
    }
But, I am unsuccessful.

1) How can we differentiate tangential and normal components of velocity as we do in directionMixed boundary condition.

2) I want to use value '0' for normal component of velocity and 'gradientExpression' for tangential component of velocity.

Kindly please give me some directions to implement this boundary condition.

Thank You.

With Thanks
Pavithra.

Last edited by Pavithra; October 13, 2019 at 03:01.
Pavithra is offline   Reply With Quote

Old   October 15, 2019, 16:39
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,124
Rep Power: 45
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Pavithra View Post
Hello Everyone,

I want to implement the following boundary condition on a horizontal wall.

Normal component of velocity

u_y = 0


Tangential component of velocity

\frac{du_x}{dy} = 3u_x

I have tried to use groovyBC as follows:

Code:
    floor
    {
        type                         groovyBC;
        valueExpression        0; 
        gradientExpression    3.0*U.component(0);
        value                        uniform (0 1 0);    
    }
But, I am unsuccessful.

1) How can we differentiate tangential and normal components of velocity as we do in directionMixed boundary condition.

2) I want to use value '0' for normal component of velocity and 'gradientExpression' for tangential component of velocity.

Kindly please give me some directions to implement this boundary condition.

Thank You.

With Thanks
Pavithra.

In the same library as groovyBC there is a boundary condition groovyBCDirection that is based on directionMixed
Pavithra likes this.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   October 19, 2019, 08:13
Default
  #3
Member
 
Join Date: Apr 2019
Location: India
Posts: 52
Rep Power: 2
Pavithra is on a distinguished road
Quote:
Originally Posted by gschaider View Post
In the same library as groovyBC there is a boundary condition groovyBCDirection that is based on directionMixed

Respected Sir,

Thank you so much for your guidance. I was able to achieve my requirement using groovyBCDirection.

Following is what I have done. (May be useful for someone else in future)

Code:
floor
    {
        type                            groovyBCDirection;
        valueFraction               uniform (0 0 0 1 0 0);
        gradientExpression        "vector((3.0*Ux),0,0)";
        valueExpression            "vector(0,0,0)";
    }
The normal vector to my wall is n = (0 ~1 ~0). Hence, n*n = (0~ 0~ 0 ~1 ~0 ~0). To set the normal component to fixed value and two tangential components to fixed gradients valueFraction = n*n = (0 ~0 ~0 ~1 ~0 ~0).

I have defined Ux=U.component(vector::X); somewhere inside my solver code.

I was not able to directly use U.component(vector::X) inside the gradient expression. Hence, I defined it as a scalarField and then used it in the boundary condition.

@gschaider Sir, Kindly please let me know if I have made any mistake.

Thank you once again for your kind help.

With Thanks,
Pavithra.
Kummi likes this.

Last edited by Pavithra; October 19, 2019 at 10:45.
Pavithra is offline   Reply With Quote

Reply

Tags
groovybcjump, swak4foam, velocity boundary

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Constant mass flow rate boundary condition sahm OpenFOAM 0 June 20, 2018 22:45
[swak4Foam] Temperature Jump boundary condition in groovyBC hoseinhd OpenFOAM Community Contributions 2 January 13, 2016 00:52
Problem in setting Boundary Condition Madhatter92 CFX 12 January 12, 2016 04:39
External Radiation Boundary Condition for Grid Interface CFD XUE FLUENT 0 July 9, 2010 02:53
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 04:05


All times are GMT -4. The time now is 08:47.