|
[Sponsors] |
March 12, 2014, 04:43 |
calcAlphas() of multiphaseSystem
|
#1 |
Senior Member
Join Date: Jan 2012
Posts: 166
Rep Power: 14 |
hi,
I don`t understand method calcAlphas() of multiphaseSystem Code:
void Foam::multiphaseSystem::calcAlphas() 48 { 49 scalar level = 0.0; 50 alphas_ == 0.0; 51 52 forAllIter(PtrDictionary<phaseModel>, phases_, iter) 53 { 54 alphas_ += level*iter(); //volScalarField alphas_ 55 level += 1.0; 56 } 57 58 alphas_.correctBoundaryConditions(); 59 } If this is right I don`t understand what is calculated with this procedure. As far as I understand line 54 would technically mean the following Code:
volScalarField alphas_ = phasefraction1*0 + phasefraction2*1 + phasefraction3*2 ... What is calculated here? greetings maybee |
|
March 12, 2014, 04:50 |
|
#2 |
Senior Member
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28 |
The sum of the volume fractions of all phases must be 1. There is little information in field that is 1 throughout the domain.
The intention behind alphas is to provide one field to visualize all phases. If you have a water-oil-air system, you have three volume fraction fields. Three fields are hard to visualize in one image. This is where alphas comes to the rescue. In the alphas field 0 means water, 1 means oil and 2 means air. This way you can depict all phases at once. |
|
March 12, 2014, 05:05 |
|
#3 |
Senior Member
Join Date: Jan 2012
Posts: 166
Rep Power: 14 |
Thx, nice idea, but I am thinking about the following now:
Let s assume we have initial water-oil-air alpha fields like Code:
water ( 1 1 1 1 0 0 0 ) oil ( 0 0 0 0 0.3 0.5 0.7 ) air ( 0 0 0 0 0.7 0.5 0.3 ) Code:
alphas_ ( 0 0 0 0 1*0.3 + 2*0.7 = 1.7 1*0,5 + 2*0.5 = 1.5 1*0.7 + 2*0.3 = 1.3 ) Isn`t this some kind of limitating at least the intitial conditions of the cells if only 0 or 1 for each phase in a cell were possible? |
|
March 12, 2014, 05:32 |
|
#4 |
Senior Member
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28 |
Yes, you can have values in between. I attached the alphas field from the damBreak4phase tutorial case of multiphaseEulerFoam.
The phases are water-oil-mercury-air. If you have any doubts or ideas. Play with the tutorial case. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
multiphaseEulerFoam: PtrDictionary<phaseModel> phases_ of multiphasesystem fluid | maybee | OpenFOAM Programming & Development | 9 | January 27, 2014 06:24 |
method solve() of class multiphasesystem | maybee | OpenFOAM Programming & Development | 2 | December 14, 2013 11:55 |