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 Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
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

Old   March 12, 2014, 17:51
Default Zone phase volumes
  #2
New Member
 
Chethan Mohan Kumar
Join Date: Mar 2014
Posts: 2
Rep Power: 0
Chethan is on a distinguished road
Hi,
You are right. You can access the zone phase volumes. In fact it is automatically displayed onto your log during run time. The only pre- requisite is that, you need to have defined cell zones in your mesh.

You can define it in your blockMeshDict when you define your block. You can verify the existence of your zones in the poly mesh directory after running blockMesh.

Another hint for tracking cell zone based values would be through the use of libsofunctionobjects in controlDict, again a cell zone must be defined while creating the mesh.


Hope this helps.

Regards,
Chethan
Chethan is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 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 13:55.