51 mixedFvPatchScalarField(
p, iF)
55 valueFraction() = 1.0;
68 mixedFvPatchScalarField(ptf,
p, iF, mapper)
82 if (this->readMixedEntries(
dict))
91 valueFraction() = 1.0;
104 mixedFvPatchScalarField(ptf)
115 mixedFvPatchScalarField(ptf, iF)
140 dom.setRayIdLambdaId(internalField().
name(), rayId, lambdaId);
142 const label patchi = patch().index();
144 if (dom.nLambda() == 0)
147 <<
" a non-grey boundary condition is used with a grey "
163 dom.blackBody().bLambda(lambdaId).boundaryField()[patchi]
170 const auto& Tp =
radiation.T().boundaryField()[patchi];
174 boundaryRadiation.
emissivity(patchi, lambdaId,
nullptr, &Tp)
182 const scalarField& transmissivity = ttransmissivity();
191 for (label rayi=0; rayi < dom.nRay(); rayi++)
193 const vector& d = dom.IRay(rayi).d();
195 if ((-
n[facei] & d) < 0.0)
199 dom.IRay(rayi).ILambda(lambdaId).boundaryField()[patchi];
201 const vector& rayDave = dom.IRay(rayi).dAve();
202 Ir[facei] += IFace[facei]*(
n[facei] & rayDave);
207 if (dom.useSolarLoad())
212 dom.primaryFluxName_ +
"_" +
name(lambdaId)
218 =
patch().cfindPatchField<volScalarField>
220 dom.relfectedFluxName_ +
"_" +
name(lambdaId)
230 if (dom.useExternalBeam())
232 const vector sunDir = dom.solarCalc().direction();
233 const scalar directSolarRad =
234 dom.solarCalc().directSolarRad()
235 *dom.spectralDistribution()[lambdaId];
239 scalar maxSunRay = -GREAT;
242 for (label rayI=0; rayI < dom.nRay(); rayI++)
244 const vector& iD = dom.IRay(rayI).d();
245 scalar dir = sunDir & iD;
253 if (rayId == SunRayId)
258 Iexternal[faceI] = directSolarRad/
mag(dom.IRay(rayId).dAve());
265 const vector& d = dom.IRay(rayId).d();
267 if ((-
n[facei] & d) > 0.0)
270 refGrad()[facei] = 0.0;
271 valueFraction()[facei] = 1.0;
273 Iexternal[facei]*transmissivity[facei]
275 Ir[facei]*(1.0 - emissivity[facei])
276 + emissivity[facei]*Eb[facei]
280 qem[facei] += refValue()[facei]*nAve[facei];
285 valueFraction()[facei] = 0.0;
286 refGrad()[facei] = 0.0;
287 refValue()[facei] = 0.0;
290 qin[facei] += Iw[facei]*nAve[facei];
296 mixedFvPatchScalarField::updateCoeffs();
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
@ MUST_READ
Reading required.
static FOAM_NO_DANGLING_REFERENCE const boundaryRadiationProperties & New(const fvMesh &mesh, Args &&... args)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static int & msgType() noexcept
Message tag of standard messages.
static int incrMsgType(int val=1) noexcept
Increment the message tag for standard messages.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A FieldMapper for finite-volume patch fields.
virtual void operator=(const UList< scalar > &)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual void write(Ostream &) const
Write.
Boundary radiation properties holder.
tmp< scalarField > transmissivity(const label patchI, const label bandI=0, const vectorField *incomingDirection=nullptr, const scalarField *T=nullptr) const
Access boundary transmissivity on patch.
tmp< scalarField > emissivity(const label patchI, const label bandI=0, const vectorField *incomingDirection=nullptr, const scalarField *T=nullptr) const
Access boundary emissivity on patch.
Finite Volume Discrete Ordinates Method. Solves the RTE equation for n directions in a participating ...
Top level model for radiation modelling.
Radiation intensity for a ray in a given direction.
const vector & dAve() const
Return the average vector inside the solid angle.
const volScalarField & qr() const
Return const access to the boundary heat flux.
volScalarField & qin()
Return non-const access to the boundary incident heat flux.
volScalarField & qem()
Return non-const access to the boundary emitted heat flux.
This boundary condition provides a wide-band, diffusive radiation condition, where the patch temperat...
wideBandDiffusiveRadiationMixedFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void write(Ostream &) const
Write.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A class for managing temporary objects.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
Define a concrete fvPatchField type and add to run-time tables Example, (fvPatchScalarField,...
constexpr scalar pi(M_PI)
Different types of constants.
const std::string patch
OpenFOAM patch number as a std::string.
Namespace for radiation modelling.
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Field< vector > vectorField
Specialisation of Field<T> for vector.
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
fvPatchField< scalar > fvPatchScalarField
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.