|
[Sponsors] |
March 12, 2014, 06:53 |
zonePhaseVolumes.H in multiphaseEulerFOAM
|
#1 |
Senior Member
Join Date: Jan 2012
Posts: 166
Rep Power: 14 |
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 } 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 |
|
March 12, 2014, 17:51 |
Zone phase volumes
|
#2 |
New Member
Chethan Mohan Kumar
Join Date: Mar 2014
Posts: 2
Rep Power: 0 |
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 |
|
|
|
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 |