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 " 154 radiativeIntensityRay& ray =
155 const_cast<radiativeIntensityRay&
>(dom.IRay(rayId));
159 ray.qr().boundaryFieldRef()[patchi] += Iw*nAve;
163 dom.blackBody().bLambda(lambdaId).boundaryField()[patchi]
166 const boundaryRadiationProperties& boundaryRadiation =
170 const auto& Tp =
radiation.T().boundaryField()[patchi];
172 const tmp<scalarField> temissivity
174 boundaryRadiation.emissivity(patchi, lambdaId,
nullptr, &Tp)
178 const tmp<scalarField> ttransmissivity
180 boundaryRadiation.transmissivity(patchi, lambdaId,
nullptr, &Tp)
182 const scalarField& transmissivity = ttransmissivity();
184 scalarField& qem = ray.qem().boundaryFieldRef()[patchi];
185 scalarField& qin = ray.qin().boundaryFieldRef()[patchi];
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)
215 word qSecName = dom.relfectedFluxName_ +
"_" +
name(lambdaId);
217 if (this->db().foundObject<volScalarField>(qSecName))
228 if (dom.useExternalBeam())
230 const vector sunDir = dom.solarCalc().direction();
231 const scalar directSolarRad =
232 dom.solarCalc().directSolarRad()
233 *dom.spectralDistribution()[lambdaId];
237 scalar maxSunRay = -GREAT;
240 for (label rayI=0; rayI < dom.nRay(); rayI++)
242 const vector& iD = dom.IRay(rayI).d();
243 scalar dir = sunDir & iD;
251 if (rayId == SunRayId)
256 Iexternal[faceI] = directSolarRad/
mag(dom.IRay(rayId).dAve());
263 const vector& d = dom.IRay(rayId).d();
265 if ((-
n[facei] & d) > 0.0)
268 refGrad()[facei] = 0.0;
269 valueFraction()[facei] = 1.0;
271 Iexternal[facei]*transmissivity[facei]
273 Ir[facei]*(1.0 - emissivity[facei])
274 + emissivity[facei]*Eb[facei]
278 qem[facei] += refValue()[facei]*nAve[facei];
283 valueFraction()[facei] = 0.0;
284 refGrad()[facei] = 0.0;
285 refValue()[facei] = 0.0;
288 qin[facei] += Iw[facei]*nAve[facei];
294 mixedFvPatchScalarField::updateCoeffs();
Different types of constants.
makePatchTypeField(fvPatchScalarField, greyDiffusiveRadiationMixedFvPatchScalarField)
errorManipArg< error, int > exit(error &err, const int errNo=1)
static int incrMsgType(int val=1) noexcept
Increment the message tag for standard messages.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static const boundaryRadiationProperties & New(const fvMesh &mesh, Args &&... args)
Get existing or create MeshObject registered with typeName.
constexpr char nl
The newline '\n' character (0x0a)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
static int & msgType() noexcept
Message tag of standard messages.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
A FieldMapper for finite-volume patch fields.
constexpr scalar pi(M_PI)
Top level model for radiation modelling.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void write(Ostream &) const
Write.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
This boundary condition provides a wide-band, diffusive radiation condition, where the patch temperat...
virtual void operator=(const UList< scalar > &)
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const std::string patch
OpenFOAM patch number as a std::string.
Field< vector > vectorField
Specialisation of Field<T> for vector.
virtual void write(Ostream &) const
Write.
Finite Volume Discrete Ordinates Method. Solves the RTE equation for n directions in a participating ...
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
wideBandDiffusiveRadiationMixedFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
autoPtr< radiation::radiationModel > radiation(radiation::radiationModel::New(T))
static constexpr const zero Zero
Global zero (0)