CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Pre-Processing

Dynamic bc

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 9, 2013, 13:33
Default Dynamic bc
  #1
New Member
 
Join Date: Oct 2012
Posts: 14
Rep Power: 4
andreas is on a distinguished road
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
andreas is offline   Reply With Quote

Old   February 10, 2013, 04:10
Default
  #2
Member
 
Duong A. Hoang
Join Date: Apr 2009
Location: Delft, Netherlands
Posts: 92
Rep Power: 8
duongquaphim is on a distinguished road
Send a message via Yahoo to duongquaphim
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
duongquaphim is offline   Reply With Quote

Old   February 10, 2013, 11:25
Default
  #3
New Member
 
Join Date: Oct 2012
Posts: 14
Rep Power: 4
andreas is on a distinguished road
Thank you for your reply,

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
File Type: jpg cfd.jpg (23.9 KB, 17 views)
andreas is offline   Reply With Quote

Old   February 10, 2013, 13:11
Default
  #4
New Member
 
Join Date: Oct 2012
Posts: 14
Rep Power: 4
andreas is on a distinguished road
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
File Type: png GroovyBC.png (89.4 KB, 10 views)
andreas is offline   Reply With Quote

Old   February 11, 2013, 07:54
Default
  #5
Member
 
Duong A. Hoang
Join Date: Apr 2009
Location: Delft, Netherlands
Posts: 92
Rep Power: 8
duongquaphim is on a distinguished road
Send a message via Yahoo to duongquaphim
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
duongquaphim is offline   Reply With Quote

Old   February 11, 2013, 11:01
Default
  #6
New Member
 
Join Date: Oct 2012
Posts: 14
Rep Power: 4
andreas is on a distinguished road
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.
andreas is offline   Reply With Quote

Old   February 13, 2013, 09:24
Default
  #7
Member
 
Duong A. Hoang
Join Date: Apr 2009
Location: Delft, Netherlands
Posts: 92
Rep Power: 8
duongquaphim is on a distinguished road
Send a message via Yahoo to duongquaphim
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
duongquaphim is offline   Reply With Quote

Reply

Thread Tools
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
Regarding Negative volume detected in Dynamic mesh Vinay Morabad FLUENT 9 April 10, 2015 23:00
Dynamic Mesh on Pintle type injector. herntan FLUENT 15 January 4, 2012 04:31
Dynamic Mesh moving interface help akash.iitb FLUENT 0 August 23, 2010 23:53
Dynamic Mesh Problem. Tom Clark FLUENT 9 July 7, 2010 07:56
Dynamic mesh + grid adapt = Crash! (Files included BillH FLUENT 4 July 24, 2007 15:31


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