From 53103a815dd2611202ff7f531aef4fd085d51d1a Mon Sep 17 00:00:00 2001 From: Henrik Rusche Date: Wed, 26 Jan 2011 20:18:05 +0100 Subject: [PATCH] sync P1 model with vanilla --- .../radiation/radiationModel/P1/P1.C | 20 +++++++++++++++++++ .../radiation/radiationModel/P1/P1.H | 3 +++ 2 files changed, 23 insertions(+) diff --git a/src/thermophysicalModels/radiation/radiationModel/P1/P1.C b/src/thermophysicalModels/radiation/radiationModel/P1/P1.C index cec6eca56..28260716a 100644 --- a/src/thermophysicalModels/radiation/radiationModel/P1/P1.C +++ b/src/thermophysicalModels/radiation/radiationModel/P1/P1.C @@ -68,6 +68,19 @@ Foam::radiation::P1::P1(const volScalarField& T) ), mesh_ ), + Qr_ + ( + IOobject + ( + "Qr", + mesh_.time().timeName(), + mesh_, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh_, + dimensionedScalar("Qr", dimMass/pow3(dimTime), 0.0) + ), a_ ( IOobject @@ -162,6 +175,13 @@ void Foam::radiation::P1::calculate() == - 4.0*(e_*radiation::sigmaSB*pow4(T_) + E_) ); + + // Calculate radiative heat flux on boundaries. + forAll(mesh_.boundaryMesh(), patchI) + { + Qr_.boundaryField()[patchI] = + -gamma.boundaryField()[patchI]*G_.boundaryField()[patchI].snGrad(); + } } diff --git a/src/thermophysicalModels/radiation/radiationModel/P1/P1.H b/src/thermophysicalModels/radiation/radiationModel/P1/P1.H index 46b9398a3..6fc6ae8cd 100644 --- a/src/thermophysicalModels/radiation/radiationModel/P1/P1.H +++ b/src/thermophysicalModels/radiation/radiationModel/P1/P1.H @@ -64,6 +64,9 @@ class P1 //- Incident radiation / [W/m2] volScalarField G_; + //- Total radiative heat flux [W/m2] + volScalarField Qr_; + //- Absorption coefficient volScalarField a_;