# wired result of initialization water phase with funkySetFields

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

April 7, 2013, 15:15
wired result of initialization water phase with funkySetFields
#1
Member

Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 8
Dear Foamers,

What I want to do is to initialize a cylinder mesh with half water and half air. My cylinder is 0.04 m in height and with a radius of 0.1.

I use
Quote:
 funkySetFields -time 0 -keepPatches -field alphawater -expression 1 -condition "pow(pos().x,2)+pow(pos().z,2)<=0.1 && pos().y<=0.02"
The result is quite suprizingk, the lower part of the cylinder is water with red color as showed with air phase formed in the center in which part I use a different way of mesh for structured mesh result.

Can anyone explain why this can happens if possible?

Regards,
Attached Images
 Screenshot from 2013-04-07 14:59:58.jpg (39.3 KB, 35 views) Screenshot from 2013-04-07 14:59:37.jpg (35.5 KB, 26 views) Screenshot from 2013-04-07 15:05:27.jpg (52.4 KB, 26 views)

April 7, 2013, 17:17
#2
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,013
Rep Power: 43
Quote:
 Originally Posted by liguifan Dear Foamers, What I want to do is to initialize a cylinder mesh with half water and half air. My cylinder is 0.04 m in height and with a radius of 0.1. I use The result is quite suprizingk, the lower part of the cylinder is water with red color as showed with air phase formed in the center in which part I use a different way of mesh for structured mesh result. Can anyone explain why this can happens if possible? Regards,
This is for the multiphaseInterFoam, right? (information like this is alway quite interesting, as the others don't have to guess what the fields in your example means)

Your funkySetFields-expression only set the fraction of the water phase but doesn't touch alphas at all (how should it know about the physical connection between alphawater and alphas: it is even more slow-witted than I am and doesn't even try to GUESS what the physical meaning of the fields is).

Where the concrete values of alphas in your pictures come from I have no idea: probably values you somehow set before
__________________
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

April 7, 2013, 17:57
#3
Member

Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 8
Thanks for the reply, I am currently using multiphaseEulerFoam. I am not sure what alphas plays in the multiphase simulation and that why I don't know how to deal with alphas. In this simulation, there are three phases, water, air and oil. Could you please suggest me what is alphas and what do you mean by physical connection?

How does the alphas relate to the physical connection?

Sorry for the slow-witted question and look forward to hearing from you.

Regards,

Quote:
 Originally Posted by gschaider This is for the multiphaseInterFoam, right? (information like this is alway quite interesting, as the others don't have to guess what the fields in your example means) Your funkySetFields-expression only set the fraction of the water phase but doesn't touch alphas at all (how should it know about the physical connection between alphawater and alphas: it is even more slow-witted than I am and doesn't even try to GUESS what the physical meaning of the fields is). Where the concrete values of alphas in your pictures come from I have no idea: probably values you somehow set before

April 8, 2013, 04:34
#4
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,013
Rep Power: 43
Quote:
 Originally Posted by liguifan Thanks for the reply, I am currently using multiphaseEulerFoam. I am not sure what alphas plays in the multiphase simulation and that why I don't know how to deal with alphas. In this simulation, there are three phases, water, air and oil. Could you please suggest me what is alphas and what do you mean by physical connection? How does the alphas relate to the physical connection? Sorry for the slow-witted question and look forward to hearing from you. Regards,
No idea what alphas is (guess the sum of the alphas). Look at the source or run the tutorial and check the values to find out.

Concerning your pictures: it's hard to tell what is actually going on without knowing what values blue and red refer to: always add colorbars. Also: to check results always use the cell values. Point values are only for "pretty pictures"

General: best strategy will probably be to set the fractions of N-1 phases and then calculate the fraction of the last phase with "1-alphawater-alphaX ..."
__________________
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

 April 30, 2013, 15:28 #5 Senior Member   Kent Wardle Join Date: Mar 2009 Location: Illinois, USA Posts: 218 Rep Power: 14 alphas is simply the sum of the individual phases to give you a simple way to visualize and color all the phases at once. It will have a value in the range of 0 to Nphases-1. For example, if you have three phases water, oil, and air (defined this order in transportProperties). Then alpha = 0 is water, alpha = 1 is oil, and alpha = 2 is air. This field is calculated by the solver and you do not need to have this file in your 0 directory or do anything to get it. Bernhard is right--you are considering only alphawater, but multiphaseEulerFoam is set up for an arbitrary number of phases and so it does not assume on its own that if you specify only two phases and give a volume fraction for one of them, then the other is 1-alphawater. So you need to explicitly initialize the volume fraction for each phase in this case. -Kent

 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 Kushagra CFX 2 July 8, 2008 21:14 moas CFX 3 February 17, 2008 06:19 hdj CFX 1 November 27, 2005 08:15 CFDflying CFX 1 February 18, 2004 05:10 youngan CFX 0 July 1, 2003 23:32

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