42 Foam::radiation::radiativeIntensityRay::radiativeIntensityRay
48 const scalar deltaPhi,
49 const scalar deltaTheta,
58 absorptionEmission_(absorptionEmission),
59 blackBody_(blackBody),
126 omega_ = 2.0*sinTheta*
Foam::sin(deltaTheta/2.0)*deltaPhi;
127 d_ =
vector(sinTheta*sinPhi, sinTheta*
cosPhi, cosTheta);
150 for (
direction cmpt=0; cmpt<vector::nComponents; cmpt++)
162 dAve_ = coordRot & dAve_;
174 for (
direction cmpt=0; cmpt<vector::nComponents; cmpt++)
184 dAve_ = (dAve_ & normal)*meshDir;
185 d_ = (d_ & normal)*meshDir;
188 autoPtr<volScalarField> IDefaultPtr;
233 IOobject noReadHeader(IHeader);
257 qr_.boundaryFieldRef() = 0.0;
258 qem_.boundaryFieldRef() = 0.0;
259 qin_.boundaryFieldRef() = 0.0;
261 scalar maxResidual = -GREAT;
271 fvm::div(Ji, ILambda_[lambdaI],
"div(Ji,Ii_h)")
272 +
fvm::Sp(
k*omega_, ILambda_[lambdaI])
276 (
k - absorptionEmission_.aDisp(lambdaI))
277 *blackBody_.bLambda(lambdaI)
279 + absorptionEmission_.E(lambdaI)/4
291 const scalar initialRes =
294 maxResidual =
max(initialRes, maxResidual);
307 I_ += ILambda_[lambdaI];
Different types of constants.
Class black body emission.
static const word intensityPrefix
SolverPerformance< Type > solve(faMatrix< Type > &, const dictionary &)
Solve returning the solution statistics given convergence tolerance.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
~radiativeIntensityRay()
Destructor.
label k
Boltzmann constant.
Ignore writing from objectRegistry::writeObject()
const Time & time() const
Return the top-level database.
tensor rotationTensor(const vector &n1, const vector &n2)
Rotational transformation tensor from vector n1 to n2.
Model to supply absorption and emission coefficients for radiation modelling.
#define forAll(list, i)
Loop across all elements in list.
const Vector< label > & geometricD() const
Return the vector of geometric directions in mesh.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
scalar correct()
Update radiative intensity on i direction.
dimensionedScalar cos(const dimensionedScalar &ds)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
scalar phi() const
Return the phi angle.
A class for handling words, derived from Foam::string.
constexpr scalar pi(M_PI)
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
dimensionedScalar sin(const dimensionedScalar &ds)
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
static word timeName(const scalar t, const int precision=precision_)
Return time name of given scalar time formatted with the given precision.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
void addIntensity()
Add radiative intensities from all the bands.
label nSolutionD() const
Return the number of valid solved-for dimensions in the mesh.
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Mesh data needed to do the Finite Volume discretisation.
Automatically write from objectRegistry::writeObject()
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
vector meshOrientation() const
Return meshOrientation.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
Defines the attributes of an object for which implicit objectRegistry management is supported...
Finite Volume Discrete Ordinates Method. Solves the RTE equation for n directions in a participating ...
scalar theta() const
Return the theta angle.
static constexpr const zero Zero
Global zero (0)