CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

zonePhaseVolumes.H in multiphaseEulerFOAM

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   March 12, 2014, 06:53
Default zonePhaseVolumes.H in multiphaseEulerFOAM
  #1
Senior Member
 
Join Date: Jan 2012
Posts: 166
Rep Power: 14
maybee is on a distinguished road
hi, am I right that the following code of file "zonePhaseVolumes.H" calculates the phase volumes for each phase in each cell?
Code:
{
    2     const scalarField& V = mesh.V();
    3 
    4     forAll(mesh.cellZones(), czi)
    5     {
    6         const labelList& cellLabels = mesh.cellZones()[czi];
    7 
    8         forAllConstIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
    9         {
   10             const volScalarField& alpha = iter();
   11             scalar phaseVolume = 0;
   12 
   13             forAll(cellLabels, cli)
   14             {
   15                 label celli = cellLabels[cli];
   16                 phaseVolume += alpha[celli]*V[celli];
   17             }
   18 
   19             reduce(phaseVolume, sumOp<scalar>());
   20 
   21             Info<< alpha.name()
   22                 << " phase volume in zone " << mesh.cellZones()[czi].name()
   23                 << " = " << phaseVolume*1e6 << " ml " << endl;
   24         }
   25     }
   26 }
with reduce(...) see:

http://foam.sourceforge.net/docs/cpp...7e34b70aa75f91

I think sometimes a brief description of the content and especially the results of included files in solvers would be great. With results I mean what is calculated and where is it stored in the end...

greetings
maybee
maybee is offline   Reply With Quote

 


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
multiphaseEulerFoam + kineticTheoryProperties vasava OpenFOAM Running, Solving & CFD 5 May 20, 2020 10:35
How to tune up interfaceCompression and virtualMass in multiphaseEulerFoam? petr.f. OpenFOAM Running, Solving & CFD 4 October 28, 2015 05:37
query regarding deltaT in multiphaseEulerFoam bigboss.abhishek OpenFOAM Running, Solving & CFD 6 September 24, 2015 15:56
multiphaseEulerFoam: efficient way of implementing fields for all phases maybee OpenFOAM Programming & Development 0 January 23, 2014 04:16
multiphaseEulerFoam kwardle OpenFOAM 3 March 25, 2013 10:31


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