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

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

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 21, 2011, 23:23
Default How to calculate free-surface distance,velocity,etc...
  #1
New Member
 
Lidia
Join Date: Oct 2011
Posts: 13
Rep Power: 14
deifobe is on a distinguished road
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
deifobe is offline   Reply With Quote

Old   November 22, 2011, 02:19
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
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.
Bernhard is offline   Reply With Quote

Old   May 30, 2012, 06:22
Default
  #3
New Member
 
A Sharma
Join Date: Mar 2012
Location: Germany
Posts: 14
Rep Power: 14
stealth is on a distinguished road
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 View Post
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
stealth is offline   Reply With Quote

Old   May 30, 2012, 20:50
Default
  #4
New Member
 
Lidia
Join Date: Oct 2011
Posts: 13
Rep Power: 14
deifobe is on a distinguished road
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....?
deifobe is offline   Reply With Quote

Old   May 31, 2012, 03:04
Default
  #5
New Member
 
A Sharma
Join Date: Mar 2012
Location: Germany
Posts: 14
Rep Power: 14
stealth is on a distinguished road
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 View Post
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....?
stealth is offline   Reply With Quote

Old   May 31, 2012, 17:43
Default
  #6
New Member
 
Lidia
Join Date: Oct 2011
Posts: 13
Rep Power: 14
deifobe is on a distinguished road
T.tar.gz
This is an exemplary case, remember to use setFields command, if don't understand something ask me
deifobe is offline   Reply With Quote

Old   June 5, 2012, 09:38
Default
  #7
New Member
 
A Sharma
Join Date: Mar 2012
Location: Germany
Posts: 14
Rep Power: 14
stealth is on a distinguished road
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
File Type: gz T3.tar.gz (3.3 KB, 12 views)
stealth is offline   Reply With Quote

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

Old   June 5, 2012, 10:10
Default
  #9
New Member
 
A Sharma
Join Date: Mar 2012
Location: Germany
Posts: 14
Rep Power: 14
stealth is on a distinguished road
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 View Post
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
File Type: jpg image.jpg (7.4 KB, 43 views)
stealth is offline   Reply With Quote

Old   June 5, 2012, 10:45
Default
  #10
New Member
 
Lidia
Join Date: Oct 2011
Posts: 13
Rep Power: 14
deifobe is on a distinguished road
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.
deifobe is offline   Reply With Quote

Old   June 11, 2012, 12:53
Default Small Time Step
  #11
New Member
 
A Sharma
Join Date: Mar 2012
Location: Germany
Posts: 14
Rep Power: 14
stealth is on a distinguished road
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 ?

Many thanks for your help.

A. Sharma









Quote:
Originally Posted by deifobe View Post
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
File Type: jpg Filea.0000.jpg (19.8 KB, 25 views)
Attached Files
File Type: gz tmp.tar.gz (5.6 KB, 6 views)
stealth is offline   Reply With Quote

Old   April 20, 2013, 13:04
Default
  #12
Member
 
Join Date: Mar 2013
Posts: 98
Rep Power: 13
giack is on a distinguished road
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
giack is offline   Reply With Quote

Old   April 20, 2013, 15:02
Default
  #13
New Member
 
Lidia
Join Date: Oct 2011
Posts: 13
Rep Power: 14
deifobe is on a distinguished road
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.
deifobe is offline   Reply With Quote

Old   April 21, 2013, 17:57
Default
  #14
Member
 
Join Date: Mar 2013
Posts: 98
Rep Power: 13
giack is on a distinguished road
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...
giack is offline   Reply With Quote

Old   April 23, 2013, 06:35
Default
  #15
New Member
 
Lidia
Join Date: Oct 2011
Posts: 13
Rep Power: 14
deifobe is on a distinguished road
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.

deifobe is offline   Reply With Quote

Old   April 23, 2013, 07:10
Default
  #16
Member
 
Join Date: Mar 2013
Posts: 98
Rep Power: 13
giack is on a distinguished road
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
giack is offline   Reply With Quote

Old   April 23, 2013, 19:56
Default
  #17
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by giack View Post
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
gschaider is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Thermocapillary free surface flow zakifoam OpenFOAM Running, Solving & CFD 10 December 12, 2016 11:44
Submarine Free Surface samwh CFX 7 August 30, 2009 07:14
Multiphase flow. Dispersed and free surface model Luis CFX 8 May 29, 2007 18:13
Equilibrium of a free surface under surface tensio Ryan Main CFD Forum 1 August 7, 2001 16:14
Modeling Free Surface Flows Elliot Schwartz Main CFD Forum 5 August 25, 1998 21:03


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