|
[Sponsors] |
multiphaseEulerFoam: method iter() and calculation of phase fractions |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 2, 2013, 09:22 |
multiphaseEulerFoam: method iter() and calculation of phase fractions
|
#1 |
Senior Member
Join Date: Jan 2012
Posts: 166
Rep Power: 14 |
hi,
I have a few questions about the multiphaseEuler solver: 1. Within the main method of the solvers .C file there is the file "createFields.H" included. Within this file can be found Code:
forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) { phaseModel& phase = iter(); const volScalarField& alpha = phase; U += alpha*phase.U(); phi += fvc::interpolate(alpha)*phase.phi(); } Code:
inline Foam::label Foam::cloudSolution::iter() const //Return const access to the current //cloud iteration. { return iter_; //label iter_; //- Current cloud iteration } Furthermore alpha is a reference to iter() which means a reference to the variable iter_ . But, what is iter_ exactly? 2. After the solvers loop is started later in the main method with "while (runTime.run())" at which point are the phase fractions calculated and saved? greetings maybee |
|
July 22, 2020, 09:20 |
|
#2 |
New Member
Elol
Join Date: Feb 2020
Posts: 16
Rep Power: 6 |
Hi Foamers,
I have almost the same question as I don't fully unterstand what is the iter(). I have the following piece of code which I am trying to understand Code:
void Foam::multiphaseDriftMixture::calcAlphas() { alphas_ == 0.0; forAllIter(PtrDictionary<phaseDrift>, phasesk_, iter) //Iterate across all elments in the Phasesk_ (transport prorties) which is type from PtrDictionary<phaseDrift> { alphas_ += iter(); // alphas_ = alphas_ + iter() } } what is the iter()? |
|
|
|