Removed unneeded lib dependency from mdInitialise
[foam-extend-3.2.git] / applications / solvers / multiphase / porousInterFoam / createPorousZones.H
bloba386cec4f6e5359eff73f6b1e10bd83b0e6700d2
1     porousZones pZones(mesh);
3     // Creates the porosity field for MULES
4     volScalarField porosity
5     (
6         IOobject
7         (
8             "porosity",
9             runTime.timeName(),
10             mesh,
11             IOobject::NO_READ,
12             IOobject::NO_WRITE
13         ),
14         mesh,
15         dimensionedScalar("NULL", dimless, 1.0),
16         "zeroGradient"
17     );
19     forAll( pZones, zoneI )
20     {
21         const label & zoneId( pZones[zoneI].zoneId() );
23         const labelList & cells(mesh.cellZones()[zoneId]);
25         const scalar & zonePorosity( pZones[zoneI].porosity() );
27         forAll( cells, cellI )
28         {
29             porosity[cells[cellI]] = zonePorosity;
30         }
31     }
33     porosity.write();