# mixed boundary condition with GroovyBC

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

 October 11, 2019, 09:19 mixed boundary condition with GroovyBC #1 Member   Join Date: Apr 2019 Location: India Posts: 79 Rep Power: 5 Hello Everyone, I want to implement the following boundary condition on a horizontal wall. Normal component of velocity Tangential component of velocity 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.

October 15, 2019, 16:39
#2
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,212
Rep Power: 49
Quote:
 Originally Posted by Pavithra Hello Everyone, I want to implement the following boundary condition on a horizontal wall. Normal component of velocity Tangential component of velocity 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
__________________
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

October 19, 2019, 08:13
#3
Member

Join Date: Apr 2019
Location: India
Posts: 79
Rep Power: 5
Quote:
 Originally Posted by gschaider 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);
valueExpression            "vector(0,0,0)";
}
The normal vector to my wall is . Hence, . To set the normal component to fixed value and two tangential components to fixed gradients .

I have defined 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.

Last edited by Pavithra; October 19, 2019 at 10:45.

 Tags groovybcjump, swak4foam, velocity boundary