# Using groovyBC to specify Open boundary conditions

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

 March 11, 2014, 10:54 Using groovyBC to specify Open boundary conditions #1 New Member   Join Date: Jan 2013 Location: U.S.A Posts: 10 Rep Power: 4 Hi Foamers, Please, is it possible to use the groovyBC to specify an open boundary condition. I am trying to simulate a die swell problem and need to specify a traction free surface on the lateral boundaries. Thanks in anticipation.

March 11, 2014, 17:58
#2
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
Quote:
 Originally Posted by banji Hi Foamers, Please, is it possible to use the groovyBC to specify an open boundary condition. I am trying to simulate a die swell problem and need to specify a traction free surface on the lateral boundaries. Thanks in anticipation.
You should be a BIT more specific about the mathematical formulation of "traction free", "lateral boundaries" etc. Never expect people to put more time into an answer than you obviously took to formulate the question
__________________
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

March 11, 2014, 18:28
#3
New Member

Join Date: Jan 2013
Location: U.S.A
Posts: 10
Rep Power: 4
Quote:
 Originally Posted by gschaider You should be a BIT more specific about the mathematical formulation of "traction free", "lateral boundaries" etc. Never expect people to put more time into an answer than you obviously took to formulate the question
Thanks Bernhard for the observation and reply.

Attached is a rough picture of the computational domain and some comments. In particular, what i would like to know is if i can specify the following bc in the attachment with groovybc.

'n' and 'm' denote the unit normal and tangent vectors to the surface and \tau is the total stress tensor.

Thanks.
Attached Images
 free_surface_stress_condition.jpg (27.7 KB, 57 views)

March 12, 2014, 18:12
#4
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
Quote:
 Originally Posted by banji Thanks Bernhard for the observation and reply. Attached is a rough picture of the computational domain and some comments. In particular, what i would like to know is if i can specify the following bc in the attachment with groovybc. 'n' and 'm' denote the unit normal and tangent vectors to the surface and \tau is the total stress tensor. Thanks.
OK. We're getting nearer. It's a multiphase problem. That wasn't really clear from your initial question. Which solver are you going to use?

Still the sketch confuses me: are you talking about the boundary condition where you've written "free surface" or of the BC on the free surface between liquid and air (the bulb in your sketch)?

Anyway: BC for the stress tensor can usually not be directly enforced but by enforcing a BC on the other fields that ensures that the stress is 0 (something like zeroGradient for U or so)
__________________
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

March 12, 2014, 18:20
#5
New Member

Join Date: Jan 2013
Location: U.S.A
Posts: 10
Rep Power: 4
Quote:
 Originally Posted by gschaider OK. We're getting nearer. It's a multiphase problem. That wasn't really clear from your initial question. Which solver are you going to use? Still the sketch confuses me: are you talking about the boundary condition where you've written "free surface" or of the BC on the free surface between liquid and air (the bulb in your sketch)? Anyway: BC for the stress tensor can usually not be directly enforced but by enforcing a BC on the other fields that ensures that the stress is 0 (something like zeroGradient for U or so)
I am using interFoam and neglecting surface tension effects. It's the free surface between liquid and air.

Is it possible to set a pde as a BC (in cases when it is difficult to obtain analytical solution of the variable on the remote field) and then groovyBC solves for the variable to be used as a BC?

March 13, 2014, 10:59
#6
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
Quote:
 Originally Posted by banji I am using interFoam and neglecting surface tension effects. It's the free surface between liquid and air. Is it possible to set a pde as a BC (in cases when it is difficult to obtain analytical solution of the variable on the remote field) and then groovyBC solves for the variable to be used as a BC?
For the free interface between liquid and air you can't set a BC with a VOF-solver. They can only be set on the boundaries of the grid (thus the name): where in your sketch you wrote "free surface". Your nomenclature confuses me more and more

I'm not sure what you mean with "set a PDE as a BC". But generally I'd say "no". Usually the BC can be expressed in terms of values and gradients
__________________
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

March 13, 2014, 12:14
#7
New Member

Join Date: Jan 2013
Location: U.S.A
Posts: 10
Rep Power: 4
Quote:
 Originally Posted by gschaider For the free interface between liquid and air you can't set a BC with a VOF-solver. They can only be set on the boundaries of the grid (thus the name): where in your sketch you wrote "free surface". Your nomenclature confuses me more and more I'm not sure what you mean with "set a PDE as a BC". But generally I'd say "no". Usually the BC can be expressed in terms of values and gradients
You are correct, Bernhard. Maybe the snapshots attached might make my problem clearer.

The flow domain -

Inlet and Outlet bc -
I had no problem with this one.

free surface stress condition -

simplified form of the stress condition -

Here is a link to the paper .

Thanks for the support for the fine utility.

Last edited by banji; March 14, 2014 at 20:57.

March 14, 2014, 20:49
#8
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
Quote:
 Originally Posted by banji You are correct, Bernhard. Maybe the snapshots attached might make my problem clearer. The flow domain - Inlet and Outlet bc - I had no problem with this one. free surface stress condition - simplified form of the stress condition - Here is a link to the paper . Thanks for the support for the fine utility.
3.3 is in interFoam not a boundary condition but modelled on the interior. You can't influence that in it.
__________________
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

 March 14, 2014, 20:59 #9 New Member   Join Date: Jan 2013 Location: U.S.A Posts: 10 Rep Power: 4 Thank you!

 April 7, 2014, 11:29 error when run model with groovyBC #10 New Member   ali Join Date: Feb 2013 Posts: 8 Rep Power: 4 Hi fomers i want to define U Field and T field in two rooms with BuoyantBoussinesqSimpleFoam solver when immplementation the BC and run model the error into log file has plesae Help me error is : Reading field T --> FOAM Warning : From function groovyBCFvPatchField::groovyBCFvPatchField(c onst fvPatch& p,const DimensionedField& iF,const dictionary& dict) in file groovyBCFvPatchField.C at line 131 No value defined for T on ceiling therefore using 160{0} Reading field p_rgh --> FOAM Warning : From function groovyBCFvPatchField::groovyBCFvPatchField(c onst fvPatch& p,const DimensionedField& iF,const dictionary& dict) in file groovyBCFvPatchField.C at line 131 No value defined for p_rgh on ceiling therefore using 160{0} --> FOAM Warning : From function groovyBCFvPatchField::groovyBCFvPatchField(c onst fvPatch& p,const DimensionedField& iF,const dictionary& dict) in file groovyBCFvPatchField.C at line 131 No value defined for p_rgh on TwallR therefore using 96{0} Reading field U --> FOAM Warning : From function groovyBCFvPatchField::groovyBCFvPatchField(c onst fvPatch& p,const DimensionedField& iF,const dictionary& dict) in file groovyBCFvPatchField.C at line 131 No value defined for U on ceiling therefore using 160{(0 0 0)} --> FOAM Warning : From function groovyBCFvPatchField::groovyBCFvPatchField(c onst fvPatch& p,const DimensionedField& iF,const dictionary& dict) in file groovyBCFvPatchField.C at line 131 No value defined for U on TwallR therefore using 96{(0 0 0)} Reading/calculating face flux field phi Selecting incompressible transport model Newtonian

April 7, 2014, 14:05
groovyBC
#11
New Member

ali
Join Date: Feb 2013
Posts: 8
Rep Power: 4
hi fomers
i want to attach file which immplemantaion into groovyBC
Attached Files
 Untitled Folder 2.zip (2.5 KB, 14 views)

April 8, 2014, 11:03
#12
Senior Member

Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
Quote:
 type groovyBC; valueExpression "vector(0,pos().x > 8 && pos().x < 10.2 && pos().y ==3.27 ? -5 : 0, 0)"; gradientExpression "vector(0, 0, 0)";// consider the rest of celing insulated fractionExpression "1"; value uniform (0 -0.05 0);//should be considered
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)

 April 8, 2014, 15:06 #13 New Member   ali Join Date: Feb 2013 Posts: 8 Rep Power: 4 thank a lot for note please let me to check it and tell you if error to be clean

May 27, 2015, 03:52
#14
New Member

seyyed
Join Date: Jun 2014
Posts: 2
Rep Power: 0
Quote:
 Originally Posted by nimasam you should add keyword value to your syntax

hi i have same problem

what i must do to fix this problem?

thanks
Attached Files
 0.zip (5.3 KB, 4 views)

 Tags bernhard, groovybc, gschaider, swak4foam

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Светлана CFX 0 October 25, 2013 01:23 subhas.hunasikatti@gmail. Fluent UDF and Scheme Programming 0 October 24, 2013 06:34 AB08 OpenFOAM 27 July 1, 2013 09:17 linnemann OpenFOAM Installation 68 April 22, 2013 11:03 surya FLUENT 0 March 5, 2007 01:06

All times are GMT -4. The time now is 14:11.