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

[swak4Foam] wired result of initialization water phase with funkySetFields

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 7, 2013, 16: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: 15
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, 41 views)
File Type: jpg Screenshot from 2013-04-07 14:59:37.jpg (35.5 KB, 31 views)
File Type: jpg Screenshot from 2013-04-07 15:05:27.jpg (52.4 KB, 29 views)
liguifan is offline   Reply With Quote

Old   April 7, 2013, 18:17
Default
  #2
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 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, 18:57
Default
  #3
Member
 
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 15
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, 05:34
Default
  #4
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 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, 16:28
Default
  #5
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 219
Rep Power: 21
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


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
Weird appearance of water phase in cells when using InterFoam madfan123 OpenFOAM Running, Solving & CFD 1 January 24, 2021 10:51
phase change of water to water vapor by hot gas flow dhiraj.pachpande CFX 3 December 8, 2014 02:55
Single phase result file for multiphase simulation Kushagra CFX 2 July 8, 2008 22:14
Water vapour condensation in CFX-5.7.1 hdj CFX 1 November 27, 2005 08:15
compressible two phase flow in CFX4.4 youngan CFX 0 July 2, 2003 00:32


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