From a0fc2bc0f26a7e9a8898e82e41aa4e9510951cbe Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 2 May 2013 12:51:29 +0100 Subject: [PATCH] ENH: writeCellCentres: dump cell volume, patch face area --- .../writeCellCentres/writeCellCentres.C | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/applications/utilities/postProcessing/miscellaneous/writeCellCentres/writeCellCentres.C b/applications/utilities/postProcessing/miscellaneous/writeCellCentres/writeCellCentres.C index 6e4f009be2..ef8fe01b83 100644 --- a/applications/utilities/postProcessing/miscellaneous/writeCellCentres/writeCellCentres.C +++ b/applications/utilities/postProcessing/miscellaneous/writeCellCentres/writeCellCentres.C @@ -98,6 +98,7 @@ int main(int argc, char *argv[]) cci.write(); } + volScalarField V ( IOobject @@ -110,10 +111,19 @@ int main(int argc, char *argv[]) false ), mesh, - + dimensionedScalar("V", mesh.V().dimensions(), 0.0), + calculatedFvPatchField::typeName ); - mesh.V().setInstance(runTime.timeName()); - mesh.V().write(); + V.dimensionedInternalField() = mesh.V(); + forAll(V.boundaryField(), patchI) + { + V.boundaryField()[patchI] = + V.boundaryField()[patchI].patch().magSf(); + } + Info<< "Writing cellVolumes and patch faceAreas to " << V.name() + << " in " << runTime.timeName() << endl; + V.write(); + } Info<< "\nEnd\n" << endl;