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

wired result of initialization water phase with funkySetFields

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 7, 2013, 15:15
Default 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: 6
liguifan is on a distinguished road
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
File Type: jpg Screenshot from 2013-04-07 14:59:58.jpg (39.3 KB, 20 views)
File Type: jpg Screenshot from 2013-04-07 14:59:37.jpg (35.5 KB, 16 views)
File Type: jpg Screenshot from 2013-04-07 15:05:27.jpg (52.4 KB, 19 views)
liguifan is offline   Reply With Quote

Old   April 7, 2013, 17:17
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by liguifan View Post
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
gschaider is offline   Reply With Quote

Old   April 7, 2013, 17:57
Default
  #3
Member
 
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 6
liguifan is on a distinguished road
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 View Post
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
liguifan is offline   Reply With Quote

Old   April 8, 2013, 04:34
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by liguifan View Post
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
gschaider is offline   Reply With Quote

Old   April 30, 2013, 15:28
Default
  #5
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 201
Rep Power: 11
kwardle is on a distinguished road
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
kwardle 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
Single phase result file for multiphase simulation Kushagra CFX 2 July 8, 2008 21:14
Domain Initialization in 2 phase flow using VOF moas CFX 3 February 17, 2008 06:19
Water vapour condensation in CFX-5.7.1 hdj CFX 1 November 27, 2005 08:15
thermal phase change question CFDflying CFX 1 February 18, 2004 05:10
compressible two phase flow in CFX4.4 youngan CFX 0 July 1, 2003 23:32


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