# Dynamic bc

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 February 9, 2013, 13:33 Dynamic bc #1 New Member   Join Date: Oct 2012 Posts: 14 Rep Power: 4 Dear foamers, I am quite a beginner in OF and CFD, that's why I need your help :-) My problem is as follow: I have a multiphase flow. And I want to impose the pressure on a plane depending on the phase fraction which is in touch with the plane. It would be like this: PressureBC = x1*p1 +x2*p2 with x1 and x2 the linear fraction (I work in 2D) of both phases on the patch. p1 and p2 would be the two pressures I want to impose. e.g. if there is only air on the patch, the pressure would be 1atm. If there is only water, the pressure would be inferior so the fluid would get away. Thank you all for your help, Regards, Andreas

 February 10, 2013, 04:10 #2 Member   Duong A. Hoang Join Date: Apr 2009 Location: Delft, Netherlands Posts: 92 Rep Power: 8 In your formulation, are x1 and x2 the cell coordinate or the volume fraction? Anyway, I think groovyBC is definitely worth for a try. Look at this http://openfoamwiki.net/index.php/Contrib_groovyBC and you might have a solution. Regards, Duong

February 10, 2013, 11:25
#3
New Member

Join Date: Oct 2012
Posts: 14
Rep Power: 4

x1 and x2 are the volume fraction of both phases on the boundary patch.
Here is an image of the simulation for a better understanding.

The pressure on the inlet is fixed, p=1atm. Only air can come in from the inlet. And the pressure on the outlet would depend on the phase fraction on the patch.
If there is only air, p=1atm and so there no flow anymore. If it is water on the patch, p<1atm and so the flow would expel the fluid.

I think groovyBC or swak4foam are good solutions for my problem.

But I don't know how to express the surface fraction of both phases on the outlet patch.

Thanks for any advice,
Regards,
Andreas
Attached Images
 cfd.jpg (23.9 KB, 17 views)

February 10, 2013, 13:11
#4
New Member

Join Date: Oct 2012
Posts: 14
Rep Power: 4
The boundary conditions would be like this:

Code:
```        type            groovyBC;
valueExpression	"x1*100000 + x2*88229";
variables	"x1 = 1-alpha1; x2 = alpha1";
value		uniform 88229;```
-> When alpha1 = 1, there is water and I want p = 88229 [Pa]
-> When alpha1 = 0, there is only air and p = 100000 [Pa]

Can somebody tell me how can I do to do this calculation only on the outlet patch? I could deduce the alpha1 average on the patch too.

Thanks for the help,
Regards,
Andreas
Attached Images
 GroovyBC.png (89.4 KB, 10 views)

 February 11, 2013, 07:54 #5 Member   Duong A. Hoang Join Date: Apr 2009 Location: Delft, Netherlands Posts: 92 Rep Power: 8 Hi Andreas, Looking at your geometry, I think the easiest way is to create a mesh with four blocks: - top left: with outlet - top right: with inlet - bottom left and right: box In that sense, you also can specify the wall at the patch between two blocks (top right and left). And with that mesh, you can easily apply that BC to the outlet only. Duong

 February 11, 2013, 11:01 #6 New Member   Join Date: Oct 2012 Posts: 14 Rep Power: 4 Thank you for your quick response, I did a patch for the outlet, inlet and walls. I can impose a value (let's say pressure or velocity), but don't know how to extract information (let's say phase fraction) for a given patch. Alpha1 is a folder containing numbers between 0 and 1 for all the "pixels" in the mesh. I don't know how to collect information only for a part of the geometry; outlet patch in this case… Thanks for any advice, Andreas Last edited by andreas; February 11, 2013 at 11:20.

 February 13, 2013, 09:24 #7 Member   Duong A. Hoang Join Date: Apr 2009 Location: Delft, Netherlands Posts: 92 Rep Power: 8 Hi Andreas, I think if you use the BC as shown in the picture for the outlet patch, it will certainly take the value for that patch (outlet in this case). I do not think you have to do anything else. Duong

 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 Vinay Morabad FLUENT 9 April 10, 2015 23:00 herntan FLUENT 15 January 4, 2012 04:31 akash.iitb FLUENT 0 August 23, 2010 23:53 Tom Clark FLUENT 9 July 7, 2010 07:56 BillH FLUENT 4 July 24, 2007 15:31

All times are GMT -4. The time now is 02:50.

 Contact Us - CFD Online - Top