# How to calculate free-surface distance,velocity,etc...

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

 November 22, 2011, 00:23 How to calculate free-surface distance,velocity,etc... #1 New Member   Lidia Join Date: Oct 2011 Posts: 13 Rep Power: 5 Hi, I'm triyng simulate droplet formation through a t-junction (using interFoam), but now i have to compute the average inter-drop distance, drops velocity and their lenght. For the lenght i have found a temporary solution using paraFoam contour->clip->slice, for the plot alpha1 vs time I use probe in controlDict and for others measurements the sample utility but for the inter-drop distance or drops velocity i have no idea. Thanks in advance. droplet.png

 November 22, 2011, 03:19 #2 Senior Member   Bernhard Join Date: Sep 2009 Location: Delft Posts: 790 Rep Power: 12 Maybe you can sample the value of alpha1 over the centerline of the channel. Then you need to write a small script to process the [x, alpha1] data, but I suppose you get the point.

May 30, 2012, 06:22
#3
New Member

A Sharma
Join Date: Mar 2012
Location: Germany
Posts: 14
Rep Power: 5
Hello OpenFoam User,

I am a new to openFoam and currently interested in simulating droplet formation through a T Junction. The image you posted for droplet formation looks really nice. It will be of great help if you can suggest me how to proceed with interFoam to study droplet formation.

Sincerely,

as

Quote:
 Originally Posted by deifobe Hi, I'm triyng simulate droplet formation through a t-junction (using interFoam), but now i have to compute the average inter-drop distance, drops velocity and their lenght. For the lenght i have found a temporary solution using paraFoam contour->clip->slice, for the plot alpha1 vs time I use probe in controlDict and for others measurements the sample utility but for the inter-drop distance or drops velocity i have no idea. Thanks in advance. Attachment 10169

 May 30, 2012, 20:50 #4 New Member   Lidia Join Date: Oct 2011 Posts: 13 Rep Power: 5 yes, i have hardly worked on this and i'm happy that may be useful for someone. what are your problems? boundary conditions, geometry, results analysis....?

May 31, 2012, 03:04
#5
New Member

A Sharma
Join Date: Mar 2012
Location: Germany
Posts: 14
Rep Power: 5
Hello deifobe,

Many thanks for your response. I am using the example "damBreak" to create my system. So I created a T Junction Geometry, uses the similar files for "system" as in the damBreak example (I hope they are correct for this). I think the major problem I get is in defining the boundary conditions for two phase flow. It will be of great help if you can explain how you have defined the boundary conditions for two inlets and one outlet or if possible you may give me a demo file for them.

Thanks a lot,

as

Quote:
 Originally Posted by deifobe yes, i have hardly worked on this and i'm happy that may be useful for someone. what are your problems? boundary conditions, geometry, results analysis....?

 May 31, 2012, 17:43 #6 New Member   Lidia Join Date: Oct 2011 Posts: 13 Rep Power: 5 T.tar.gz This is an exemplary case, remember to use setFields command, if don't understand something ask me

June 5, 2012, 09:38
#7
New Member

A Sharma
Join Date: Mar 2012
Location: Germany
Posts: 14
Rep Power: 5
Hello,

Thanks you very much for such a useful file. I was trying to improve the geometry but I stuck with a problem. For Eg:

If I try to change some variables of your file :

InletOil -> InletA
InletWater -> InletB,

I make the changes at the following places :-

1) blockMeshDict
2) alpha1.org
3) alpha
4) p_rgh
5) U

and then I tried :

blockMesh
setFields
interFoam,

simulation starts fine but min(alpha1) in my simulation goes negative. And I observe something different in paraFoam. What is the expected problem or some important point I am missing ?

Please have a look at the attached file.

Thanking You,

Sincerely,

as
Attached Files
 T3.tar.gz (3.3 KB, 3 views)

 June 5, 2012, 09:55 #8 New Member   Lidia Join Date: Oct 2011 Posts: 13 Rep Power: 5 Hi guy, it's ok that min(alpha1) is negative, what you observe different in paraFoam? Please, post a n image of your result.

June 5, 2012, 10:10
#9
New Member

A Sharma
Join Date: Mar 2012
Location: Germany
Posts: 14
Rep Power: 5
Hello,

Here is the Image after first time step. I am surprised as in your case minAlpha is approx zero (even negative but almost zero). And, just by changing the variable names, I get different values (negative that too increases with time). I think I am doing some blunder while defining the initial conditions.

Thanx

as

Quote:
 Originally Posted by deifobe Hi guy, it's ok that min(alpha1) is negative, what you observe different in paraFoam? Please, post a n image of your result.
Attached Images
 image.jpg (7.4 KB, 18 views)

 June 5, 2012, 10:45 #10 New Member   Lidia Join Date: Oct 2011 Posts: 13 Rep Power: 5 the inlet in which you set alpha1=1 (from alpha1 file: inletA { type fixedValue; value uniform 1; }) is the the inlet of the dispersed (droplet) phase (e.g. water). Then you are wrong in the blockMeshDict file, you must exchange in this file inletA with inletB, to understand this you can draw the geometry on a paper with vertices numbers.

June 11, 2012, 12:53
Small Time Step
#11
New Member

A Sharma
Join Date: Mar 2012
Location: Germany
Posts: 14
Rep Power: 5
Hello deifobe,

Thanks for pointing out my mistake. I used your file to create little bit complex setup (as shown in fig. attached). In this case when I run the same, deltaT becomes very small of the order of 1e-11. Is this usual or problematic ? Please let me know if you have encountered this type of problem. I expect this due to mesh I created, which effects the Courant number. It will be be great help if you can suggest me how to solve this problem ?

A. Sharma

Quote:
 Originally Posted by deifobe the inlet in which you set alpha1=1 (from alpha1 file: inletA { type fixedValue; value uniform 1; }) is the the inlet of the dispersed (droplet) phase (e.g. water). Then you are wrong in the blockMeshDict file, you must exchange in this file inletA with inletB, to understand this you can draw the geometry on a paper with vertices numbers.
Attached Images
 Filea.0000.jpg (19.8 KB, 16 views)
Attached Files
 tmp.tar.gz (5.6 KB, 3 views)

 April 20, 2013, 13:04 #12 Member   Join Date: Mar 2013 Posts: 86 Rep Power: 4 Hi to all I have a similar problem. My geometry is an horizontal pipe completely filled with liquid. At initial time the air can enter into the pipe and form a bubble that move forward into the pipe. I want to calculate the velocity and the position of the front of the bubbles over pipe channel length and the height of the bubble over time. You have any suggestion? Thanks a lot

 April 20, 2013, 15:02 #13 New Member   Lidia Join Date: Oct 2011 Posts: 13 Rep Power: 5 Hello, you can use the probes for U and alpha1 in controlDict file choosing a line that passes through the middle of your channel. After, you can elaborate the output probe file for alpha1 by octave or matlab to find the positions of the front of the bubble vs time finding the points in which the value of alpha1 is about 1 (has a maximum). I hope this will help.

 April 21, 2013, 17:57 #14 Member   Join Date: Mar 2013 Posts: 86 Rep Power: 4 thank you for your reply. I already completed simulations so I look for a way to post-process without restart their. Moreover I don't know the position of the bubble front so I don't know where place probes...

 April 23, 2013, 06:35 #15 New Member   Lidia Join Date: Oct 2011 Posts: 13 Rep Power: 5 You can use the sample utility but you will obtain, the values of alpha1 and U split in time directories, in my opinion in this manner is more complicated to extract the data that you need. This is an example of sampleDict: interpolationScheme cell; setFormat gnuplot; sets ( centerPatch { type uniform; axis xyz; //line in the middle of horizontal channel start (-0.00046 5e-05 25e-06); end (0.00041 5e-05 25e-06); nPoints 100; } ); surfaces (); fields ( alpha1 ); I suggest you to use the probes choosing a set of equally spaced points on the line in the middle of horizontal channel.

 April 23, 2013, 07:10 #16 Member   Join Date: Mar 2013 Posts: 86 Rep Power: 4 thank you,I'll try it. but in this way I calculate alpha and U in middle of channel?I need U of the front of bubble that isn't in pipeline center. I tried this procedure: -contour of alpha=0.5 -slice normal to x at 0,0,0 -slice normal to y at 0,0.0175,0 -plot selection over time the result are ok but the problem is the follow: the front bubble is not at a constant y but vary between 0.015 and 0.0175 so I must view manually when the y bubble front change and merge two graphics. After set contour of alpha=0.5 there is a way to choose the minimum value of a coordinates (z in my case)? In this way would be all automatic

April 23, 2013, 19:56
#17
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
Quote:
 Originally Posted by giack thank you,I'll try it. but in this way I calculate alpha and U in middle of channel?I need U of the front of bubble that isn't in pipeline center. I tried this procedure: -contour of alpha=0.5 -slice normal to x at 0,0,0 -slice normal to y at 0,0.0175,0 -plot selection over time the result are ok but the problem is the follow: the front bubble is not at a constant y but vary between 0.015 and 0.0175 so I must view manually when the y bubble front change and merge two graphics. After set contour of alpha=0.5 there is a way to choose the minimum value of a coordinates (z in my case)? In this way would be all automatic
I'd suggest swak4Foam (as I usually do): you can do calculations on sampledSurfaces and there is a isoSurface-sampledSurface. In your case if I gather you correctly the expression you want is "min(pos().z)". The capillaryRise in the Examples is doing something similar. For doing these calculations in postprocessing you can use funkyDoCalc (although I must admit that I haven't used it yet with an isosurface)
__________________
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

 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 zakifoam OpenFOAM Running, Solving & CFD 6 August 24, 2014 03:24 samwh CFX 7 August 30, 2009 07:14 Luis CFX 8 May 29, 2007 18:13 Ryan Main CFD Forum 1 August 7, 2001 16:14 Elliot Schwartz Main CFD Forum 5 August 25, 1998 21:03

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