Commit b4229841 authored by Andrew Heather's avatar Andrew Heather
Browse files

BUG: Extension of commit d16f1312

parent d16f1312
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -142,7 +142,7 @@ Foam::radiation::P1::P1(const dictionary& dict, const volScalarField& T)
"qr",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh_,
......@@ -190,12 +190,6 @@ Foam::radiation::P1::P1(const dictionary& dict, const volScalarField& T)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::radiation::P1::~P1()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::radiation::P1::read()
......@@ -240,19 +234,19 @@ void Foam::radiation::P1::calculate()
fvm::laplacian(gamma, G_)
- fvm::Sp(a_, G_)
==
- 4.0*(e_*physicoChemical::sigma*pow4(T_) ) - E_
- 4.0*(e_*physicoChemical::sigma*pow4(T_)) - E_
);
// Calculate radiative heat flux on boundaries.
volScalarField::Boundary& qrBf = qr_.boundaryFieldRef();
const volScalarField::Boundary& GBf = G_.boundaryField();
const volScalarField::Boundary& gammaBf = gamma.boundaryField();
// Calculate radiative heat flux on boundaries.
forAll(mesh_.boundaryMesh(), patchi)
{
if (!G_.boundaryField()[patchi].coupled())
if (!GBf[patchi].coupled())
{
qrBf[patchi] =
-gamma.boundaryField()[patchi]
*G_.boundaryField()[patchi].snGrad();
qrBf[patchi] = -gammaBf[patchi]*GBf[patchi].snGrad();
}
}
}
......@@ -282,12 +276,9 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::P1::Rp() const
Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
Foam::radiation::P1::Ru() const
{
const volScalarField::Internal& G =
G_();
const volScalarField::Internal E =
absorptionEmission_->ECont()()();
const volScalarField::Internal a =
absorptionEmission_->aCont()()();
const volScalarField::Internal& G = G_();
const volScalarField::Internal E = absorptionEmission_->ECont()()();
const volScalarField::Internal a = absorptionEmission_->aCont()()();
return a*G - E;
}
......@@ -298,4 +289,5 @@ Foam::label Foam::radiation::P1::nBands() const
return absorptionEmission_->nBands();
}
// ************************************************************************* //
......@@ -107,7 +107,7 @@ public:
//- Destructor
virtual ~P1();
virtual ~P1() = default;
// Member functions
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment