From 48c96a955a9391adcc238f6084346e1fdf6eab9f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Jasi=C5=84ski?= <daniel.jasinski@gmail.com>
Date: Thu, 29 Oct 2015 13:45:41 +0100
Subject: [PATCH] Added radiative heat flux to wallHeatFlux utility

---
 .../wall/wallHeatFlux/createFields.H               | 16 ++++++++++++++++
 .../wall/wallHeatFlux/wallHeatFlux.C               | 22 ++++++++++++++--------
 2 files changed, 30 insertions(+), 8 deletions(-)

diff --git a/applications/utilities/postProcessing/wall/wallHeatFlux/createFields.H b/applications/utilities/postProcessing/wall/wallHeatFlux/createFields.H
index da7585b..02043ef 100644
--- a/applications/utilities/postProcessing/wall/wallHeatFlux/createFields.H
+++ b/applications/utilities/postProcessing/wall/wallHeatFlux/createFields.H
@@ -54,3 +54,19 @@ if (isA<fluidThermo>(thermo()))
         refCast<const fluidThermo>(thermo())
     );
 }
+
+//Read radiative heat flux if available
+volScalarField Qr
+(
+    IOobject
+    (
+        "Qr",
+        runTime.timeName(),
+        mesh,
+        IOobject::READ_IF_PRESENT,
+        IOobject::NO_WRITE
+    ),
+    mesh,
+    dimensionedScalar("Qr", dimMass/pow3(dimTime), 0.0)
+);
+
diff --git a/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C b/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C
index 8c80f0c..876affa 100644
--- a/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C
+++ b/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C
@@ -70,19 +70,25 @@ int main(int argc, char *argv[])
         const surfaceScalarField::GeometricBoundaryField& patchHeatFlux =
             heatFlux.boundaryField();
 
+        const volScalarField::GeometricBoundaryField& patchRadHeatFlux =
+            Qr.boundaryField();
+
+        const surfaceScalarField::GeometricBoundaryField& magSf =
+            mesh.magSf().boundaryField();
+
         Info<< "\nWall heat fluxes [W]" << endl;
         forAll(patchHeatFlux, patchi)
         {
             if (isA<wallFvPatch>(mesh.boundary()[patchi]))
             {
-                Info<< mesh.boundary()[patchi].name()
-                    << " "
-                    << gSum
-                       (
-                           mesh.magSf().boundaryField()[patchi]
-                          *patchHeatFlux[patchi]
-                       )
-                    << endl;
+                scalar convFlux = gSum(magSf[patchi]*patchHeatFlux[patchi]);
+
+                scalar radFlux = gSum(magSf[patchi]*patchRadHeatFlux[patchi]);
+
+                Info<< mesh.boundary()[patchi].name() << endl
+                    << "    convective: " << convFlux << endl
+                    << "    radiative:  " << radFlux << endl
+                    << "    total:      " << convFlux + radFlux << endl;
             }
         }
         Info<< endl;
-- 
1.9.1

