diff --git a/src/thermophysicalModels/radiation/radiationModel/fvDOM/fvDOM/fvDOM.C b/src/thermophysicalModels/radiation/radiationModel/fvDOM/fvDOM/fvDOM.C index faf1153467d3bbbfd9a1d9825d61fb693b1373ed..4b57942cb7723456b2928f8dc2ea48bea907bc68 100644 --- a/src/thermophysicalModels/radiation/radiationModel/fvDOM/fvDOM/fvDOM.C +++ b/src/thermophysicalModels/radiation/radiationModel/fvDOM/fvDOM/fvDOM.C @@ -157,12 +157,13 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T) i, new radiativeIntensityRay ( + *this, + mesh_, phii, thetai, deltaPhi, deltaTheta, nLambda_, - mesh_, absorptionEmission_, blackBody_ ) @@ -189,12 +190,13 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T) i, new radiativeIntensityRay ( + *this, + mesh_, phii, thetai, deltaPhi, deltaTheta, nLambda_, - mesh_, absorptionEmission_, blackBody_ ) @@ -218,12 +220,13 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T) i, new radiativeIntensityRay ( + *this, + mesh_, phii, thetai, deltaPhi, deltaTheta, nLambda_, - mesh_, absorptionEmission_, blackBody_ ) @@ -304,7 +307,7 @@ void Foam::radiation::fvDOM::correct() forAll(IRay_, rayI) { maxResidual = 0.0; - scalar maxBandResidual = IRay_[rayI].correct(this); + scalar maxBandResidual = IRay_[rayI].correct(); maxResidual = max(maxBandResidual, maxResidual); } diff --git a/src/thermophysicalModels/radiation/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C b/src/thermophysicalModels/radiation/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C index b9c405126eb4c34720f9a3bcb964a7bbeadd88ab..b90835db5670a02155fd8980b0a6f17f02f909c3 100644 --- a/src/thermophysicalModels/radiation/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C +++ b/src/thermophysicalModels/radiation/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C @@ -44,18 +44,20 @@ Foam::label Foam::radiation::radiativeIntensityRay::rayId = 0; Foam::radiation::radiativeIntensityRay::radiativeIntensityRay ( + const fvDOM& dom, + const fvMesh& mesh, const scalar phi, const scalar theta, const scalar deltaPhi, const scalar deltaTheta, const label nLambda, - const fvMesh& mesh, const absorptionEmissionModel& absEmmModel, const blackBodyEmission& blackBody ) : - absEmmModel_(absEmmModel), + dom_(dom), mesh_(mesh), + absEmmModel_(absEmmModel), blackBody_(blackBody), I_ ( @@ -165,10 +167,7 @@ Foam::radiation::radiativeIntensityRay::~radiativeIntensityRay() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::scalar Foam::radiation::radiativeIntensityRay::correct -( - fvDOM* DomPtr -) +Foam::scalar Foam::radiation::radiativeIntensityRay::correct() { // reset boundary heat flux to zero Qr_ = dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0); @@ -177,7 +176,7 @@ Foam::scalar Foam::radiation::radiativeIntensityRay::correct forAll(IWave_, lambdaI) { - volScalarField k = DomPtr->aj(lambdaI); + const volScalarField& k = dom_.aj(lambdaI); volScalarField E = absEmmModel_.ECont(lambdaI)/Foam::mathematicalConstant::pi; diff --git a/src/thermophysicalModels/radiation/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.H b/src/thermophysicalModels/radiation/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.H index d959f45f8fd5eb26de7fc59dc4f8d75866314901..3ce665517b3231e4420eb7c45b424eb8b7e184aa 100644 --- a/src/thermophysicalModels/radiation/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.H +++ b/src/thermophysicalModels/radiation/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.H @@ -57,12 +57,15 @@ class radiativeIntensityRay { // Private data - //- Absorption/emission model - const absorptionEmissionModel& absEmmModel_; + //- Refence to the owner fvDOM object + const fvDOM& dom_; //- Reference to the mesh const fvMesh& mesh_; + //- Absorption/emission model + const absorptionEmissionModel& absEmmModel_; + //- Black body const blackBodyEmission& blackBody_; @@ -115,12 +118,13 @@ public: //- Construct form components radiativeIntensityRay ( + const fvDOM& dom, + const fvMesh& mesh, const scalar phi, const scalar theta, const scalar deltaPhi, const scalar deltaTheta, const label lambda, - const fvMesh& mesh_, const absorptionEmissionModel& absEmmModel_, const blackBodyEmission& blackBody ); @@ -135,7 +139,7 @@ public: // Edit //- Update radiative intensity on i direction - scalar correct(fvDOM*); + scalar correct(); //- Initialise the ray in i direction void init diff --git a/src/thermophysicalModels/radiation/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRayI.H b/src/thermophysicalModels/radiation/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRayI.H new file mode 100644 index 0000000000000000000000000000000000000000..782b1fc422ef7a1f573dd4f5d57ee0ebceeea3aa --- /dev/null +++ b/src/thermophysicalModels/radiation/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRayI.H @@ -0,0 +1,90 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +inline const Foam::volScalarField& Foam::radiation::radiativeIntensityRay::I() const +{ + return I_; +} + + +inline const Foam::volScalarField& Foam::radiation::radiativeIntensityRay::Qr() const +{ + return Qr_; +} + + +inline Foam::volScalarField& Foam::radiation::radiativeIntensityRay::Qr() +{ + return Qr_; +} + + +inline const Foam::vector& Foam::radiation::radiativeIntensityRay::d() const +{ + return d_; +} + + +inline const Foam::vector& Foam::radiation::radiativeIntensityRay::dAve() const +{ + return dAve_; +} + + +inline Foam::scalar Foam::radiation::radiativeIntensityRay::nLambda() const +{ + return nLambda_; +} + + +inline Foam::scalar Foam::radiation::radiativeIntensityRay::phi() const +{ + return phi_; +} + + +inline Foam::scalar Foam::radiation::radiativeIntensityRay::theta() const +{ + return theta_; +} + + +inline Foam::scalar Foam::radiation::radiativeIntensityRay::omega() const +{ + return omega_; +} + + +inline const Foam::volScalarField& Foam::radiation::radiativeIntensityRay::IWave +( + const label lambdaI +) const +{ + return IWave_[lambdaI]; +} + + +// ************************************************************************* //