Merge branch 'feature-radiation-ft' into 'develop'
Radiation modelling updates See merge request Development/openfoam!685
This commit is contained in:
commit
755d354f69
@ -39,6 +39,8 @@ systemCall/systemCall.C
|
||||
|
||||
timeActivatedFileUpdate/timeActivatedFileUpdate.C
|
||||
|
||||
viewFactorHeatFlux/viewFactorHeatFlux.C
|
||||
|
||||
writeDictionary/writeDictionary.C
|
||||
|
||||
writeObjects/writeObjects.C
|
||||
|
@ -0,0 +1,372 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "viewFactorHeatFlux.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "volFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace functionObjects
|
||||
{
|
||||
defineTypeNameAndDebug(viewFactorHeatFlux, 0);
|
||||
addToRunTimeSelectionTable(functionObject, viewFactorHeatFlux, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::functionObjects::viewFactorHeatFlux::initialise()
|
||||
{
|
||||
const auto& pbm = mesh_.boundaryMesh();
|
||||
const labelList selectedPatches = pbm.indices("viewFactorWall");
|
||||
|
||||
|
||||
// Initialise output file
|
||||
|
||||
auto& os = file();
|
||||
|
||||
writeHeader(os, "Radiation heat flux");
|
||||
writeCommented(os, "Time");
|
||||
|
||||
for (const label patchi : selectedPatches)
|
||||
{
|
||||
writeTabbed(os, pbm[patchi].name());
|
||||
}
|
||||
|
||||
os << endl;
|
||||
|
||||
|
||||
// Create compact patch addressing
|
||||
|
||||
label nFace = 0;
|
||||
forAll(selectedPatches, i)
|
||||
{
|
||||
const label patchi = selectedPatches[i];
|
||||
auto slice = compactPatchID_.slice(nFace, pbm[patchi].size());
|
||||
slice = i;
|
||||
nFace += slice.size();
|
||||
}
|
||||
|
||||
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
mapDistPtr_.reset
|
||||
(
|
||||
new IOmapDistribute
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"mapDist",
|
||||
mesh_.facesInstance(),
|
||||
mesh_,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
auto& mapDist = mapDistPtr_();
|
||||
|
||||
mapDist.distribute(compactPatchID_);
|
||||
|
||||
|
||||
// Convert global addressing into compact form
|
||||
|
||||
labelList compactGlobalIds(mapDist.constructSize(), Zero);
|
||||
|
||||
globalIndex gi(nFace);
|
||||
|
||||
SubList<label>(compactGlobalIds, nFace) = identity(gi.range());
|
||||
|
||||
mapDist.distribute(compactGlobalIds);
|
||||
|
||||
const label nTotalFaces = returnReduce(nFace, sumOp<label>());
|
||||
|
||||
const labelList globalToCompact(invert(nTotalFaces, compactGlobalIds));
|
||||
|
||||
for (labelList& visibleFaces : faceFaces_)
|
||||
{
|
||||
for (label& globalFacei : visibleFaces)
|
||||
{
|
||||
globalFacei = globalToCompact[globalFacei];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::functionObjects::viewFactorHeatFlux::viewFactorHeatFlux
|
||||
(
|
||||
const word& name,
|
||||
const Time& runTime,
|
||||
const dictionary& dict,
|
||||
const bool readFields
|
||||
)
|
||||
:
|
||||
fvMeshFunctionObject(name, runTime, dict),
|
||||
writeFile(mesh_, name, typeName, dict),
|
||||
qrName_(dict.getOrDefault<word>("qr", "qr")),
|
||||
mapDistPtr_(nullptr),
|
||||
faceFaces_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"globalFaceFaces",
|
||||
mesh_.facesInstance(),
|
||||
mesh_,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
)
|
||||
),
|
||||
Fij_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"F",
|
||||
mesh_.facesInstance(),
|
||||
mesh_,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
)
|
||||
),
|
||||
compactPatchID_(faceFaces_.size(), Zero)
|
||||
{
|
||||
initialise();
|
||||
}
|
||||
|
||||
|
||||
Foam::functionObjects::viewFactorHeatFlux::viewFactorHeatFlux
|
||||
(
|
||||
const word& name,
|
||||
const objectRegistry& obr,
|
||||
const dictionary& dict,
|
||||
const bool readFields
|
||||
)
|
||||
:
|
||||
fvMeshFunctionObject(name, obr, dict),
|
||||
writeFile(mesh_, name, typeName, dict),
|
||||
qrName_(dict.getOrDefault<word>("qr", "qr")),
|
||||
mapDistPtr_(nullptr),
|
||||
faceFaces_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"globalFaceFaces",
|
||||
mesh_.facesInstance(),
|
||||
mesh_,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
)
|
||||
),
|
||||
Fij_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"F",
|
||||
mesh_.facesInstance(),
|
||||
mesh_,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
)
|
||||
),
|
||||
compactPatchID_(faceFaces_.size(), Zero)
|
||||
{
|
||||
initialise();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::functionObjects::viewFactorHeatFlux::read(const dictionary& dict)
|
||||
{
|
||||
if (fvMeshFunctionObject::read(dict))
|
||||
{
|
||||
dict.readIfPresent("qr", qrName_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionObjects::viewFactorHeatFlux::execute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::functionObjects::viewFactorHeatFlux::write()
|
||||
{
|
||||
Log << type() << " " << name() << " write:" << nl;
|
||||
|
||||
// Retrieve radiative heat flux field from the mesh database
|
||||
|
||||
const auto* qrPtr = mesh_.cfindObject<volScalarField>(qrName_);
|
||||
|
||||
if (qrPtr)
|
||||
{
|
||||
const auto& qr = *qrPtr;
|
||||
|
||||
// const labelList selectedPatches =
|
||||
// mesh_.boundaryMesh().indices
|
||||
// (
|
||||
// radiation::viewFactor::viewFactorWalls
|
||||
// );
|
||||
const labelList selectedPatches =
|
||||
mesh_.boundaryMesh().indices("viewFactorWall");
|
||||
|
||||
const auto& pbm = mesh_.boundaryMesh();
|
||||
const label nPatch = selectedPatches.size();
|
||||
|
||||
// Accumulate qr per patch, and
|
||||
// assemble qr contributions in compact addressing
|
||||
scalarList qrPatch(nPatch, Zero);
|
||||
scalarList compactQr(faceFaces_.size());
|
||||
|
||||
label compacti = 0;
|
||||
forAll(selectedPatches, i)
|
||||
{
|
||||
const label patchi = selectedPatches[i];
|
||||
const auto& qrp = qr.boundaryField()[patchi];
|
||||
forAll(qrp, facei)
|
||||
{
|
||||
compactQr[compacti] = qrp[facei];
|
||||
qrPatch[i] += qrp[facei];
|
||||
++compacti;
|
||||
}
|
||||
}
|
||||
|
||||
reduce(qrPatch, sumOp<scalarList>());
|
||||
|
||||
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
mapDistPtr_->distribute(compactQr);
|
||||
}
|
||||
|
||||
// Populate view factor radiation heat flux matrix
|
||||
scalarSquareMatrix qrVf(nPatch, Zero);
|
||||
|
||||
forAll(Fij_, startFacei)
|
||||
{
|
||||
const scalar qr = compactQr[startFacei];
|
||||
const labelList& visibleSlots = faceFaces_[startFacei];
|
||||
const label i = compactPatchID_[startFacei];
|
||||
|
||||
forAll(visibleSlots, visSloti)
|
||||
{
|
||||
const label sloti = visibleSlots[visSloti];
|
||||
const label j = compactPatchID_[sloti];
|
||||
|
||||
qrVf[i][j] += Fij_[startFacei][visSloti]*qr;
|
||||
}
|
||||
}
|
||||
|
||||
reduce(qrVf, sumOp<scalarSquareMatrix>());
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
Log << " Writing patch totals to " << file().name()
|
||||
<< nl;
|
||||
|
||||
// Write patch sums as time history
|
||||
writeCurrentTime(file());
|
||||
|
||||
for (const auto& qrp : qrPatch)
|
||||
{
|
||||
file() << tab << qrp;
|
||||
}
|
||||
|
||||
file() << endl;
|
||||
|
||||
|
||||
// Write view factor breakdown as matrix per write time
|
||||
auto osPtr = newFileAtTime("viewFactorQr", mesh_.time().value());
|
||||
auto& os = osPtr();
|
||||
|
||||
Log << " Writing view factor breakdown to " << os.name()
|
||||
<< nl;
|
||||
|
||||
|
||||
forAll(selectedPatches, i)
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
for (const label patchj : selectedPatches)
|
||||
{
|
||||
os << tab << pbm[patchj].name();
|
||||
}
|
||||
os << nl;
|
||||
}
|
||||
|
||||
const label patchi = selectedPatches[i];
|
||||
|
||||
os << pbm[patchi].name();;
|
||||
|
||||
forAll(selectedPatches, j)
|
||||
{
|
||||
os << tab << qrVf[i][j];
|
||||
}
|
||||
|
||||
os << nl;
|
||||
}
|
||||
|
||||
os << endl;
|
||||
}
|
||||
}
|
||||
|
||||
Log << endl;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void Foam::functionObjects::viewFactorHeatFlux::updateMesh(const mapPolyMesh&)
|
||||
{
|
||||
NotImplemented;
|
||||
}
|
||||
|
||||
|
||||
void Foam::functionObjects::viewFactorHeatFlux::movePoints(const polyMesh&)
|
||||
{
|
||||
NotImplemented;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,181 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::functionObjects::viewFactorHeatFlux
|
||||
|
||||
Description
|
||||
Determines radiation heat flux between patches when using the viewFactor
|
||||
radiation model.
|
||||
|
||||
Usage
|
||||
Minimal example by using \c system/controlDict.functions:
|
||||
\verbatim
|
||||
viewFactorHeatFlux1
|
||||
{
|
||||
// Mandatory entries (unmodifiable)
|
||||
type viewFactorHeatFlux;
|
||||
libs (utilityFunctionObjects);
|
||||
|
||||
// Optional entries (runtime modifiable)
|
||||
qr qr;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
where the entries mean:
|
||||
\table
|
||||
Property | Description | Type | Req'd | Dflt
|
||||
type | Type name: viewFactorHeatFlux | word | yes | -
|
||||
libs | Library name: fieldFunctionObjects | word | yes | -
|
||||
qr | Name of radiation heat flux field | word | no | qr
|
||||
\endtable
|
||||
|
||||
See also
|
||||
- Foam::radiation::viewFactor
|
||||
|
||||
SourceFiles
|
||||
fvMeshFunctionObject.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Foam_functionObjects_viewFactorHeatFlux
|
||||
#define Foam_functionObjects_viewFactorHeatFlux
|
||||
|
||||
#include "fvMeshFunctionObject.H"
|
||||
#include "writeFile.H"
|
||||
#include "IOmapDistribute.H"
|
||||
#include "labelListIOList.H"
|
||||
#include "scalarListIOList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
namespace functionObjects
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class viewFactorHeatFlux Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class viewFactorHeatFlux
|
||||
:
|
||||
public fvMeshFunctionObject,
|
||||
public writeFile
|
||||
{
|
||||
// Private Data
|
||||
|
||||
// Name of radiation heat flux field; default = qr
|
||||
word qrName_;
|
||||
|
||||
|
||||
// Fields generated by viewFactorsGen utility
|
||||
|
||||
//- Map
|
||||
autoPtr<IOmapDistribute> mapDistPtr_;
|
||||
|
||||
//- Face addressing
|
||||
labelListIOList faceFaces_;
|
||||
|
||||
//- View factors
|
||||
scalarListIOList Fij_;
|
||||
|
||||
//- Patch indicies in compact addressing
|
||||
scalarList compactPatchID_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Initialise
|
||||
void initialise();
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("viewFactorHeatFlux");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from Time and dictionary
|
||||
viewFactorHeatFlux
|
||||
(
|
||||
const word& name,
|
||||
const Time& runTime,
|
||||
const dictionary& dict,
|
||||
const bool readFields = true
|
||||
);
|
||||
|
||||
//- Construct from objectRegistry and dictionary
|
||||
viewFactorHeatFlux
|
||||
(
|
||||
const word& name,
|
||||
const objectRegistry& obr,
|
||||
const dictionary& dict,
|
||||
const bool readFields = true
|
||||
);
|
||||
|
||||
//- No copy construct
|
||||
viewFactorHeatFlux(const viewFactorHeatFlux&) = delete;
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const viewFactorHeatFlux&) = delete;
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~viewFactorHeatFlux() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Read the viewFactorHeatFlux data
|
||||
virtual bool read(const dictionary&);
|
||||
|
||||
//- No-op - all operations performed during the call to write()
|
||||
virtual bool execute();
|
||||
|
||||
//- Write the viewFactorHeatFlux per patch
|
||||
virtual bool write();
|
||||
|
||||
//- Update for changes of mesh
|
||||
virtual void updateMesh(const mapPolyMesh&);
|
||||
|
||||
//- Update for mesh point-motion
|
||||
virtual void movePoints(const polyMesh&);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace functionObjects
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -139,7 +139,7 @@ void Foam::radiation::MarshakRadiationFvPatchScalarField::updateCoeffs()
|
||||
|
||||
const tmp<scalarField> temissivity
|
||||
(
|
||||
boundaryRadiation.emissivity(patch().index())
|
||||
boundaryRadiation.emissivity(patch().index(), 0, nullptr, &Tp)
|
||||
);
|
||||
|
||||
const scalarField& emissivity = temissivity();
|
||||
|
@ -178,14 +178,14 @@ updateCoeffs()
|
||||
|
||||
const tmp<scalarField> temissivity
|
||||
(
|
||||
boundaryRadiation.emissivity(patch().index())
|
||||
boundaryRadiation.emissivity(patch().index(), 0, nullptr, &Tp)
|
||||
);
|
||||
|
||||
const scalarField& emissivity = temissivity();
|
||||
|
||||
const tmp<scalarField> ttransmissivity
|
||||
(
|
||||
boundaryRadiation.transmissivity(patch().index())
|
||||
boundaryRadiation.transmissivity(patch().index(), 0, nullptr, &Tp)
|
||||
);
|
||||
|
||||
const scalarField& transmissivity = ttransmissivity();
|
||||
|
@ -167,15 +167,17 @@ updateCoeffs()
|
||||
boundaryRadiationProperties::New(internalField().mesh());
|
||||
|
||||
|
||||
const auto& Tp = radiation.T().boundaryField()[patchi];
|
||||
|
||||
const tmp<scalarField> temissivity
|
||||
(
|
||||
boundaryRadiation.emissivity(patch().index(), lambdaId)
|
||||
boundaryRadiation.emissivity(patchi, lambdaId, nullptr, &Tp)
|
||||
);
|
||||
const scalarField& emissivity = temissivity();
|
||||
|
||||
const tmp<scalarField> ttransmissivity
|
||||
(
|
||||
boundaryRadiation.transmissivity(patch().index(), lambdaId)
|
||||
boundaryRadiation.transmissivity(patchi, lambdaId, nullptr, &Tp)
|
||||
);
|
||||
const scalarField& transmissivity = ttransmissivity();
|
||||
|
||||
@ -217,7 +219,7 @@ updateCoeffs()
|
||||
const volScalarField& qSec =
|
||||
this->db().lookupObject<volScalarField>(qSecName);
|
||||
|
||||
Ir += qSec.boundaryField()[patch().index()];
|
||||
Ir += qSec.boundaryField()[patchi];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -240,6 +240,9 @@ public:
|
||||
return radiation_;
|
||||
}
|
||||
|
||||
//- Return access to the temperature field
|
||||
const volScalarField& T() const noexcept { return T_; }
|
||||
|
||||
//- Source term component (for power of T^4)
|
||||
virtual tmp<volScalarField> Rp() const = 0;
|
||||
|
||||
|
@ -738,14 +738,14 @@ void Foam::radiation::viewFactor::calculate()
|
||||
|
||||
fvPatchScalarField& qrPatch = qrBf[patchID];
|
||||
|
||||
greyDiffusiveViewFactorFixedValueFvPatchScalarField& qrp =
|
||||
auto& qrp =
|
||||
refCast
|
||||
<
|
||||
greyDiffusiveViewFactorFixedValueFvPatchScalarField
|
||||
>(qrPatch);
|
||||
|
||||
const tmp<scalarField> teb =
|
||||
boundaryRadiation.emissivity(patchID, bandI);
|
||||
boundaryRadiation.emissivity(patchID, bandI, nullptr, &Tp);
|
||||
|
||||
const scalarField& eb = teb();
|
||||
|
||||
|
@ -185,8 +185,8 @@ Foam::radiation::boundaryRadiationProperties::emissivity
|
||||
(
|
||||
const label patchi,
|
||||
const label bandi,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
if (radBoundaryPropertiesPtrList_.set(patchi))
|
||||
@ -244,8 +244,8 @@ Foam::radiation::boundaryRadiationProperties::absorptivity
|
||||
(
|
||||
const label patchi,
|
||||
const label bandi,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
if (radBoundaryPropertiesPtrList_.set(patchi))
|
||||
@ -303,8 +303,8 @@ Foam::radiation::boundaryRadiationProperties::transmissivity
|
||||
(
|
||||
const label patchi,
|
||||
const label bandi,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
if (radBoundaryPropertiesPtrList_.set(patchi))
|
||||
@ -399,8 +399,8 @@ Foam::radiation::boundaryRadiationProperties::diffReflectivity
|
||||
(
|
||||
const label patchi,
|
||||
const label bandi,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
if (radBoundaryPropertiesPtrList_.set(patchi))
|
||||
@ -458,8 +458,8 @@ Foam::radiation::boundaryRadiationProperties::specReflectivity
|
||||
(
|
||||
const label patchi,
|
||||
const label bandi,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
if (radBoundaryPropertiesPtrList_.set(patchi))
|
||||
|
@ -120,8 +120,8 @@ public:
|
||||
(
|
||||
const label patchI,
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const;
|
||||
|
||||
//- Access boundary emissivity on face
|
||||
@ -139,8 +139,8 @@ public:
|
||||
(
|
||||
const label patchI,
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const;
|
||||
|
||||
//- Access boundary absorptivity on face
|
||||
@ -158,8 +158,8 @@ public:
|
||||
(
|
||||
const label patchI,
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const;
|
||||
|
||||
//- Access boundary transmissivity on face
|
||||
@ -191,8 +191,8 @@ public:
|
||||
(
|
||||
const label patchI,
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const;
|
||||
|
||||
//- Access boundary diffuse reflectivity on face
|
||||
@ -210,8 +210,8 @@ public:
|
||||
(
|
||||
const label patchI,
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const;
|
||||
|
||||
//- Access boundary specular reflectivity on face
|
||||
|
@ -33,8 +33,8 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef boundaryRadiationPropertiesPatch_H
|
||||
#define boundaryRadiationPropertiesPatch_H
|
||||
#ifndef Foam_radiation_boundaryRadiationPropertiesPatch_H
|
||||
#define Foam_radiation_boundaryRadiationPropertiesPatch_H
|
||||
|
||||
#include "scalarField.H"
|
||||
#include "Enum.H"
|
||||
@ -138,8 +138,8 @@ public:
|
||||
virtual tmp<scalarField> e
|
||||
(
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const = 0;
|
||||
|
||||
//- Return emissivity on face
|
||||
@ -155,8 +155,8 @@ public:
|
||||
virtual tmp<scalarField> a
|
||||
(
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const = 0;
|
||||
|
||||
//- Return absorptivity on face
|
||||
@ -172,8 +172,8 @@ public:
|
||||
virtual tmp<scalarField> t
|
||||
(
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const = 0;
|
||||
|
||||
//- Return transmissivity on face
|
||||
@ -189,8 +189,8 @@ public:
|
||||
virtual tmp<scalarField> rSpec
|
||||
(
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const = 0;
|
||||
|
||||
//- Return specular reflectivity on face
|
||||
@ -206,8 +206,8 @@ public:
|
||||
virtual tmp<scalarField> rDiff
|
||||
(
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const = 0;
|
||||
|
||||
//- Return diffusive reflectivity on face
|
||||
|
@ -64,8 +64,8 @@ Foam::radiation::lookup::lookup
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::lookup::e
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* dir,
|
||||
scalarField* T
|
||||
const vectorField* dir,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>::New
|
||||
@ -88,12 +88,11 @@ Foam::scalar Foam::radiation::lookup::e
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::radiation::lookup::a
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::lookup::a
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* dir,
|
||||
scalarField* T
|
||||
const vectorField* dir,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>::New
|
||||
@ -119,8 +118,8 @@ Foam::scalar Foam::radiation::lookup::a
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::lookup::t
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* dir,
|
||||
scalarField* T
|
||||
const vectorField* dir,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>::New
|
||||
@ -143,12 +142,11 @@ Foam::scalar Foam::radiation::lookup::t
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::radiation::lookup::rSpec
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::lookup::rSpec
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* dir,
|
||||
scalarField* T
|
||||
const vectorField* dir,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>::New(pp_.size(), Zero);
|
||||
@ -167,12 +165,11 @@ Foam::scalar Foam::radiation::lookup::rSpec
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::radiation::lookup::rDiff
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::lookup::rDiff
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* dir,
|
||||
scalarField* T
|
||||
const vectorField* dir,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>::New(pp_.size(), Zero);
|
||||
|
@ -45,8 +45,8 @@ Usage
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef lookup_H
|
||||
#define lookup_H
|
||||
#ifndef Foam_radiation_lookup_H
|
||||
#define Foam_radiation_lookup_H
|
||||
|
||||
#include "boundaryRadiationPropertiesPatch.H"
|
||||
|
||||
@ -97,8 +97,8 @@ public:
|
||||
virtual tmp<scalarField> e
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const;
|
||||
|
||||
//- Return emissivity on face
|
||||
@ -114,8 +114,8 @@ public:
|
||||
virtual tmp<scalarField> a
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const;
|
||||
|
||||
//- Return absorptivity on face
|
||||
@ -131,8 +131,8 @@ public:
|
||||
virtual tmp<scalarField> t
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const;
|
||||
|
||||
//- Return transmissivity on face (default: 0)
|
||||
@ -148,8 +148,8 @@ public:
|
||||
virtual tmp<scalarField> rSpec
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const;
|
||||
|
||||
//- Return specular reflectivity on face
|
||||
@ -165,8 +165,8 @@ public:
|
||||
virtual tmp<scalarField> rDiff
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const;
|
||||
|
||||
//- Return diffusive reflectivity on face
|
||||
|
@ -71,8 +71,8 @@ Foam::radiation::opaqueDiffusive::opaqueDiffusive
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::opaqueDiffusive::e
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* dir,
|
||||
scalarField* T
|
||||
const vectorField* dir,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return(absorptionEmission_->e(bandI, dir, T));
|
||||
@ -91,12 +91,11 @@ Foam::scalar Foam::radiation::opaqueDiffusive::e
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::radiation::opaqueDiffusive::a
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::opaqueDiffusive::a
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* dir,
|
||||
scalarField* T
|
||||
const vectorField* dir,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return(absorptionEmission_->a(bandI, dir, T));
|
||||
@ -118,8 +117,8 @@ Foam::scalar Foam::radiation::opaqueDiffusive::a
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::opaqueDiffusive::t
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* dir,
|
||||
scalarField* T
|
||||
const vectorField* dir,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>::New(pp_.size(), 0.0);
|
||||
@ -138,12 +137,11 @@ Foam::scalar Foam::radiation::opaqueDiffusive::t
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::radiation::opaqueDiffusive::rSpec
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::opaqueDiffusive::rSpec
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* dir,
|
||||
scalarField* T
|
||||
const vectorField* dir,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>::New(pp_.size(), Zero);
|
||||
@ -165,8 +163,8 @@ Foam::scalar Foam::radiation::opaqueDiffusive::rSpec
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::opaqueDiffusive::rDiff
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* dir,
|
||||
scalarField* T
|
||||
const vectorField* dir,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>::New(pp_.size(), Zero);
|
||||
|
@ -46,8 +46,8 @@ Usage
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef opaqueDiffusive_H
|
||||
#define opaqueDiffusive_H
|
||||
#ifndef Foam_radiation_opaqueDiffusive_H
|
||||
#define Foam_radiation_opaqueDiffusive_H
|
||||
|
||||
#include "boundaryRadiationPropertiesPatch.H"
|
||||
|
||||
@ -96,8 +96,8 @@ public:
|
||||
virtual tmp<scalarField> e
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const;
|
||||
|
||||
//- Return emissivity on face
|
||||
@ -113,8 +113,8 @@ public:
|
||||
virtual tmp<scalarField> a
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const;
|
||||
|
||||
//- Return absorptivity on face
|
||||
@ -130,8 +130,8 @@ public:
|
||||
virtual tmp<scalarField> t
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const;
|
||||
|
||||
//- Return transmissivity on face
|
||||
@ -147,8 +147,8 @@ public:
|
||||
virtual tmp<scalarField> rSpec
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const;
|
||||
|
||||
//- Return specular reflectivity on face
|
||||
@ -164,8 +164,8 @@ public:
|
||||
virtual tmp<scalarField> rDiff
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection ,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const;
|
||||
|
||||
//- Return diffusive reflectivity on face
|
||||
|
@ -72,8 +72,8 @@ Foam::radiation::opaqueReflective::opaqueReflective
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::opaqueReflective::e
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* dir,
|
||||
scalarField* T
|
||||
const vectorField* dir,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return(absorptionEmission_->e(bandI, dir, T));
|
||||
@ -92,12 +92,11 @@ Foam::scalar Foam::radiation::opaqueReflective::e
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::radiation::opaqueReflective::a
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::opaqueReflective::a
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* dir,
|
||||
scalarField* T
|
||||
const vectorField* dir,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return(absorptionEmission_->a(bandI, dir, T));
|
||||
@ -119,8 +118,8 @@ Foam::scalar Foam::radiation::opaqueReflective::a
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::opaqueReflective::t
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* dir,
|
||||
scalarField* T
|
||||
const vectorField* dir,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>::New(pp_.size(), Zero);
|
||||
@ -139,12 +138,11 @@ Foam::scalar Foam::radiation::opaqueReflective::t
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::radiation::opaqueReflective::rSpec
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::opaqueReflective::rSpec
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* dir,
|
||||
scalarField* T
|
||||
const vectorField* dir,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return (1.0 - fd_)*(1.0 - a(bandI, dir, T));
|
||||
@ -163,12 +161,11 @@ Foam::scalar Foam::radiation::opaqueReflective::rSpec
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::radiation::opaqueReflective::rDiff
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::opaqueReflective::rDiff
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* dir,
|
||||
scalarField* T
|
||||
const vectorField* dir,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return fd_*(1.0 - a(bandI, dir, T));
|
||||
|
@ -54,8 +54,8 @@ Usage
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef opaqueReflective_H
|
||||
#define opaqueReflective_H
|
||||
#ifndef Foam_radiation_opaqueReflective_H
|
||||
#define Foam_radiation_opaqueReflective_H
|
||||
|
||||
#include "boundaryRadiationPropertiesPatch.H"
|
||||
|
||||
@ -106,8 +106,8 @@ public:
|
||||
virtual tmp<scalarField> e
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const;
|
||||
|
||||
//- Return emissivity on face
|
||||
@ -123,8 +123,8 @@ public:
|
||||
virtual tmp<scalarField> a
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const;
|
||||
|
||||
//- Return absorptivity on face
|
||||
@ -140,8 +140,8 @@ public:
|
||||
virtual tmp<scalarField> t
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const;
|
||||
|
||||
//- Return transmissivity on face
|
||||
@ -157,8 +157,8 @@ public:
|
||||
virtual tmp<scalarField> rSpec
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const;
|
||||
|
||||
//- Return specular reflectivity on face
|
||||
@ -174,8 +174,8 @@ public:
|
||||
virtual tmp<scalarField> rDiff
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection ,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const;
|
||||
|
||||
//- Return diffusive reflectivity on face
|
||||
|
@ -72,8 +72,8 @@ Foam::radiation::transparent::transparent
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::transparent::e
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* dir,
|
||||
scalarField* T
|
||||
const vectorField* dir,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return(absorptionEmission_->e(bandI, dir, T));
|
||||
@ -92,12 +92,11 @@ Foam::scalar Foam::radiation::transparent::e
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::radiation::transparent::a
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::transparent::a
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* dir,
|
||||
scalarField* T
|
||||
const vectorField* dir,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return(absorptionEmission_->a(bandI, dir, T));
|
||||
@ -119,8 +118,8 @@ Foam::scalar Foam::radiation::transparent::a
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::transparent::t
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* dir,
|
||||
scalarField* T
|
||||
const vectorField* dir,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>::New(pp_.size(), 1.0);
|
||||
@ -139,12 +138,11 @@ Foam::scalar Foam::radiation::transparent::t
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::radiation::transparent::rSpec
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::transparent::rSpec
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* dir,
|
||||
scalarField* T
|
||||
const vectorField* dir,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>::New(pp_.size(), Zero);
|
||||
@ -163,12 +161,11 @@ Foam::scalar Foam::radiation::transparent::rSpec
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::radiation::transparent::rDiff
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::transparent::rDiff
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* dir,
|
||||
scalarField* T
|
||||
const vectorField* dir,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>::New(pp_.size(), Zero);
|
||||
|
@ -46,8 +46,8 @@ Usage
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef transparent_H
|
||||
#define transparent_H
|
||||
#ifndef Foam_radiation_transparent_H
|
||||
#define Foam_radiation_transparent_H
|
||||
|
||||
#include "boundaryRadiationPropertiesPatch.H"
|
||||
|
||||
@ -96,8 +96,8 @@ public:
|
||||
virtual tmp<scalarField> e
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const;
|
||||
|
||||
//- Return emissivity on face
|
||||
@ -113,8 +113,8 @@ public:
|
||||
virtual tmp<scalarField> a
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const;
|
||||
|
||||
//- Return absorptivity on face
|
||||
@ -130,8 +130,8 @@ public:
|
||||
virtual tmp<scalarField> t
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const;
|
||||
|
||||
//- Return transmissivity on face
|
||||
@ -147,8 +147,8 @@ public:
|
||||
virtual tmp<scalarField> rSpec
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const;
|
||||
|
||||
//- Return specular reflectivity on face
|
||||
@ -164,8 +164,8 @@ public:
|
||||
virtual tmp<scalarField> rDiff
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection ,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const;
|
||||
|
||||
//- Return diffusive reflectivity on face
|
||||
|
@ -37,8 +37,8 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef radiation_noScatter_H
|
||||
#define radiation_noScatter_H
|
||||
#ifndef Foam_radiation_noScatter_H
|
||||
#define Foam_radiation_noScatter_H
|
||||
|
||||
#include "scatterModel.H"
|
||||
|
||||
|
@ -31,8 +31,8 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef scatterModel_H
|
||||
#define scatterModel_H
|
||||
#ifndef Foam_radiation_scatterModel_H
|
||||
#define Foam_radiation_scatterModel_H
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "autoPtr.H"
|
||||
|
@ -27,12 +27,12 @@ Class
|
||||
Foam::radiation::sootModel
|
||||
|
||||
Description
|
||||
Base class for soor models
|
||||
Base class for soot models
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef radiation_sootModel_H
|
||||
#define radiation_sootModel_H
|
||||
#ifndef Foam_radiation_sootModel_H
|
||||
#define Foam_radiation_sootModel_H
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "autoPtr.H"
|
||||
|
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2015-2018 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2018, 2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -56,8 +56,8 @@ Foam::radiation::constantAbsorption::constantAbsorption
|
||||
:
|
||||
wallAbsorptionEmissionModel(dict, pp),
|
||||
coeffsDict_(dict),
|
||||
a_(coeffsDict_.get<scalar>("absorptivity")),
|
||||
e_(coeffsDict_.get<scalar>("emissivity"))
|
||||
a_(Function1<scalar>::New("absorptivity", coeffsDict_)),
|
||||
e_(Function1<scalar>::New("emissivity", coeffsDict_))
|
||||
{}
|
||||
|
||||
|
||||
@ -66,11 +66,27 @@ Foam::radiation::constantAbsorption::constantAbsorption
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::constantAbsorption::a
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>::New(pp_.size(), a_);
|
||||
if (a_->constant())
|
||||
{
|
||||
// Use arbitrary argument for a_
|
||||
return tmp<scalarField>::New(pp_.size(), a_->value(0));
|
||||
}
|
||||
|
||||
if (T)
|
||||
{
|
||||
return a_->value(*T);
|
||||
}
|
||||
|
||||
FatalErrorInFunction
|
||||
<< "Attempted to set 'a' using a non-uniform function of Temperature, "
|
||||
<< "but temperature field is unavailable"
|
||||
<< abort(FatalError);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@ -82,18 +98,34 @@ Foam::scalar Foam::radiation::constantAbsorption::a
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return a_;
|
||||
return a_->value(T);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::constantAbsorption::e
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>::New(pp_.size(), e_);
|
||||
if (e_->constant())
|
||||
{
|
||||
// Use arbitrary argument for e_
|
||||
return tmp<scalarField>::New(pp_.size(), e_->value(0));
|
||||
}
|
||||
|
||||
if (T)
|
||||
{
|
||||
return e_->value(*T);
|
||||
}
|
||||
|
||||
FatalErrorInFunction
|
||||
<< "Attempted to set 'e' using a non-uniform function of Temperature, "
|
||||
<< "but temperature field is unavailable"
|
||||
<< abort(FatalError);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@ -105,7 +137,7 @@ Foam::scalar Foam::radiation::constantAbsorption::e
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return e_;
|
||||
return e_->value(T);
|
||||
}
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018 OpenCFD Ltd.
|
||||
Copyright (C) 2018, 2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -37,10 +37,11 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef radiation_constantAbsorption_H
|
||||
#define radiation_constantAbsorption_H
|
||||
#ifndef Foam_radiation_constantAbsorption_H
|
||||
#define Foam_radiation_constantAbsorption_H
|
||||
|
||||
#include "wallAbsorptionEmissionModel.H"
|
||||
#include "Function1.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -64,10 +65,10 @@ class constantAbsorption
|
||||
dictionary coeffsDict_;
|
||||
|
||||
//- Absorptivity coefficient
|
||||
scalar a_;
|
||||
autoPtr<Function1<scalar>> a_;
|
||||
|
||||
//- Emissivity coefficient
|
||||
scalar e_;
|
||||
autoPtr<Function1<scalar>> e_;
|
||||
|
||||
|
||||
public:
|
||||
@ -92,8 +93,8 @@ public:
|
||||
tmp<scalarField> a
|
||||
(
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const;
|
||||
|
||||
//- Return absorptivity on face
|
||||
@ -109,8 +110,8 @@ public:
|
||||
tmp<scalarField> e
|
||||
(
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const;
|
||||
|
||||
//- Return emission coefficient
|
||||
|
@ -78,8 +78,8 @@ Foam::tmp<Foam::scalarField>
|
||||
Foam::radiation::multiBandAbsorption::a
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>::New(pp_.size(), aCoeffs_[bandI]);
|
||||
@ -100,8 +100,8 @@ Foam::scalar Foam::radiation::multiBandAbsorption::a
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::multiBandAbsorption::e
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>::New(pp_.size(), eCoeffs_[bandI]);
|
||||
|
@ -49,8 +49,8 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef multiBandAbsorption_H
|
||||
#define multiBandAbsorption_H
|
||||
#ifndef Foam_radiation_multiBandAbsorption_H
|
||||
#define Foam_radiation_multiBandAbsorption_H
|
||||
|
||||
#include "wallAbsorptionEmissionModel.H"
|
||||
|
||||
@ -122,8 +122,8 @@ public:
|
||||
tmp<scalarField> a
|
||||
(
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const;
|
||||
|
||||
//- Return absorptivity on face
|
||||
@ -138,9 +138,9 @@ public:
|
||||
//- Return emission coefficient
|
||||
tmp<scalarField> e
|
||||
(
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const label bandI = 0,
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const;
|
||||
|
||||
//- Return emission coefficient
|
||||
|
@ -97,8 +97,8 @@ Foam::radiation::solidAbsorption::~solidAbsorption()
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::solidAbsorption::a
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
// Since we're inside initEvaluate/evaluate there might be processor
|
||||
@ -148,8 +148,8 @@ Foam::scalar Foam::radiation::solidAbsorption::a
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::solidAbsorption::e
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
|
||||
|
@ -26,7 +26,6 @@ License
|
||||
Class
|
||||
Foam::radiation::solidAbsorption
|
||||
|
||||
|
||||
Description
|
||||
Radiation absorptivity-emissivity model to be used on walls on
|
||||
inter-region patches when the solid opaque radiation model is used
|
||||
@ -48,8 +47,8 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef radiation_solidAbsorption_H
|
||||
#define radiation_solidAbsorption_H
|
||||
#ifndef Foam_radiation_solidAbsorption_H
|
||||
#define Foam_radiation_solidAbsorption_H
|
||||
|
||||
#include "wallAbsorptionEmissionModel.H"
|
||||
#include "fvMesh.H"
|
||||
@ -100,8 +99,8 @@ public:
|
||||
tmp<scalarField> a
|
||||
(
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const;
|
||||
|
||||
//- Return absorptivity on face
|
||||
@ -117,8 +116,8 @@ public:
|
||||
tmp<scalarField> e
|
||||
(
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const;
|
||||
|
||||
//- Return emission coefficient
|
||||
|
@ -31,8 +31,8 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef wallAbsorptionEmissionModel_H
|
||||
#define wallAbsorptionEmissionModel_H
|
||||
#ifndef Foam_radiation_wallAbsorptionEmissionModel_H
|
||||
#define Foam_radiation_wallAbsorptionEmissionModel_H
|
||||
|
||||
#include "dictionary.H"
|
||||
#include "autoPtr.H"
|
||||
@ -47,7 +47,7 @@ namespace radiation
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class wallAbsorptionEmissionModel Declaration
|
||||
Class wallAbsorptionEmissionModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class wallAbsorptionEmissionModel
|
||||
@ -108,8 +108,8 @@ public:
|
||||
virtual tmp<scalarField> e
|
||||
(
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const = 0;
|
||||
|
||||
|
||||
@ -127,8 +127,8 @@ public:
|
||||
virtual tmp<scalarField> a
|
||||
(
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const = 0;
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2015-2018 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2018, 2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -56,21 +56,36 @@ Foam::radiation::constantTransmissivity::constantTransmissivity
|
||||
:
|
||||
wallTransmissivityModel(dict, pp),
|
||||
coeffsDict_(dict),
|
||||
tau_(coeffsDict_.get<scalar>("transmissivity"))
|
||||
tau_(Function1<scalar>::New("transmissivity", coeffsDict_))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::radiation::constantTransmissivity::t
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::constantTransmissivity::t
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>::New(pp_.size(), tau_);
|
||||
if (tau_->constant())
|
||||
{
|
||||
// Use arbitrary argument for a_
|
||||
return tmp<scalarField>::New(pp_.size(), tau_->value(0));
|
||||
}
|
||||
|
||||
if (T)
|
||||
{
|
||||
return tau_->value(*T);
|
||||
}
|
||||
|
||||
FatalErrorInFunction
|
||||
<< "Attempted to set 't' using a non-uniform function of Temperature, "
|
||||
<< "but temperature field is unavailable"
|
||||
<< abort(FatalError);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@ -82,7 +97,7 @@ Foam::scalar Foam::radiation::constantTransmissivity::t
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return tau_;
|
||||
return tau_->value(T);
|
||||
}
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2015-2018 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2018, 2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -37,10 +37,11 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef radiation_constantTransmissivity_H
|
||||
#define radiation_constantTransmissivity_H
|
||||
#ifndef Foam_radiation_constantTransmissivity_H
|
||||
#define Foam_radiation_constantTransmissivity_H
|
||||
|
||||
#include "wallTransmissivityModel.H"
|
||||
#include "Function1.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -64,7 +65,7 @@ class constantTransmissivity
|
||||
dictionary coeffsDict_;
|
||||
|
||||
//- Transmissivity coefficient
|
||||
scalar tau_;
|
||||
autoPtr<Function1<scalar>> tau_;
|
||||
|
||||
|
||||
public:
|
||||
@ -89,8 +90,8 @@ public:
|
||||
tmp<scalarField> t
|
||||
(
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const;
|
||||
|
||||
//- Return transmissivity on facw
|
||||
|
@ -70,8 +70,8 @@ Foam::tmp<Foam::scalarField>
|
||||
Foam::radiation::multiBandTransmissivity::t
|
||||
(
|
||||
const label bandI,
|
||||
vectorField* incomingDirection,
|
||||
scalarField* T
|
||||
const vectorField* incomingDirection,
|
||||
const scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>::New(pp_.size(), tauCoeffs_[bandI]);
|
||||
|
@ -48,8 +48,8 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef multiBandTransmissivity_H
|
||||
#define multiBandTransmissivity_H
|
||||
#ifndef Foam_radiation_multiBandTransmissivity_H
|
||||
#define Foam_radiation_multiBandTransmissivity_H
|
||||
|
||||
#include "wallTransmissivityModel.H"
|
||||
|
||||
@ -118,8 +118,8 @@ public:
|
||||
tmp<scalarField> t
|
||||
(
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const;
|
||||
|
||||
//- Return transmissivity on face
|
||||
|
@ -31,8 +31,8 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef wallTransmissivityModel_H
|
||||
#define wallTransmissivityModel_H
|
||||
#ifndef Foam_radiation_wallTransmissivityModel_H
|
||||
#define Foam_radiation_wallTransmissivityModel_H
|
||||
|
||||
#include "dictionary.H"
|
||||
#include "autoPtr.H"
|
||||
@ -106,8 +106,8 @@ public:
|
||||
virtual tmp<scalarField> t
|
||||
(
|
||||
const label bandI = 0,
|
||||
vectorField* incomingDirection = nullptr,
|
||||
scalarField* T = nullptr
|
||||
const vectorField* incomingDirection = nullptr,
|
||||
const scalarField* T = nullptr
|
||||
) const = 0;
|
||||
|
||||
//- Return transmissivity on face
|
||||
|
Loading…
Reference in New Issue
Block a user