44Foam::radiation::wideBandDiffusiveRadiationMixedFvPatchScalarField::
45wideBandDiffusiveRadiationMixedFvPatchScalarField
51 mixedFvPatchScalarField(
p, iF)
55 valueFraction() = 1.0;
59Foam::radiation::wideBandDiffusiveRadiationMixedFvPatchScalarField::
60wideBandDiffusiveRadiationMixedFvPatchScalarField
68 mixedFvPatchScalarField(ptf,
p, iF, mapper)
72Foam::radiation::wideBandDiffusiveRadiationMixedFvPatchScalarField::
73wideBandDiffusiveRadiationMixedFvPatchScalarField
80 mixedFvPatchScalarField(
p, iF)
96 valueFraction() = 1.0;
103Foam::radiation::wideBandDiffusiveRadiationMixedFvPatchScalarField::
104wideBandDiffusiveRadiationMixedFvPatchScalarField
109 mixedFvPatchScalarField(ptf)
113Foam::radiation::wideBandDiffusiveRadiationMixedFvPatchScalarField::
114wideBandDiffusiveRadiationMixedFvPatchScalarField
120 mixedFvPatchScalarField(ptf, iF)
146 dom.setRayIdLambdaId(internalField().
name(), rayId, lambdaId);
148 const label patchi = patch().index();
150 if (dom.nLambda() == 0)
153 <<
" a non-grey boundary condition is used with a grey "
169 dom.blackBody().bLambda(lambdaId).boundaryField()[patchi]
178 boundaryRadiation.
emissivity(patch().index(), lambdaId)
186 const scalarField& transmissivity = ttransmissivity();
195 for (label rayi=0; rayi < dom.nRay(); rayi++)
197 const vector& d = dom.IRay(rayi).d();
199 if ((-
n[facei] & d) < 0.0)
203 dom.IRay(rayi).ILambda(lambdaId).boundaryField()[patchi];
205 const vector& rayDave = dom.IRay(rayi).dAve();
206 Ir[facei] += IFace[facei]*(
n[facei] & rayDave);
211 if (dom.useSolarLoad())
216 dom.primaryFluxName_ +
"_" +
name(lambdaId)
219 word qSecName = dom.relfectedFluxName_ +
"_" +
name(lambdaId);
221 if (this->db().foundObject<volScalarField>(qSecName))
232 if (dom.useExternalBeam())
234 const vector sunDir = dom.solarCalc().direction();
235 const scalar directSolarRad =
236 dom.solarCalc().directSolarRad()
237 *dom.spectralDistribution()[lambdaId];
241 scalar maxSunRay = -GREAT;
244 for (label rayI=0; rayI < dom.nRay(); rayI++)
246 const vector& iD = dom.IRay(rayI).d();
247 scalar dir = sunDir & iD;
255 if (rayId == SunRayId)
260 Iexternal[faceI] = directSolarRad/
mag(dom.IRay(rayId).dAve());
267 const vector& d = dom.IRay(rayId).d();
269 if ((-
n[facei] & d) > 0.0)
272 refGrad()[facei] = 0.0;
273 valueFraction()[facei] = 1.0;
275 Iexternal[facei]*transmissivity[facei]
277 Ir[facei]*(1.0 - emissivity[facei])
278 + emissivity[facei]*Eb[facei]
282 qem[facei] += refValue()[facei]*nAve[facei];
287 valueFraction()[facei] = 0.0;
288 refGrad()[facei] = 0.0;
289 refValue()[facei] = 0.0;
292 qin[facei] += Iw[facei]*nAve[facei];
299 mixedFvPatchScalarField::updateCoeffs();
308 mixedFvPatchScalarField::write(
os);
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.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
void size(const label n)
Older name for setAddressableSize.
static int & msgType() noexcept
Message tag of standard messages.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
virtual bool write()
Write the output fields.
A FieldMapper for finite-volume patch fields.
virtual void operator=(const UList< scalar > &)
friend Ostream & operator(Ostream &, const fvPatchField< scalar > &)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Boundary radiation properties holder.
tmp< scalarField > emissivity(const label patchI, const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const
Access boundary emissivity on patch.
tmp< scalarField > transmissivity(const label patchI, const label bandI=0, vectorField *incomingDirection=nullptr, scalarField *T=nullptr) const
Access boundary transmissivity 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...
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
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)
constexpr scalar pi(M_PI)
Different types of constants.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.