mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Adding greyMeanSolidAbsorptionEmission for radiative properties of
the solid
This commit is contained in:
@ -8,6 +8,7 @@ radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C
|
||||
radiationModel/fvDOM/blackBodyEmission/blackBodyEmission.C
|
||||
radiationModel/fvDOM/absorptionCoeffs/absorptionCoeffs.C
|
||||
radiationModel/viewFactor/viewFactor.C
|
||||
radiationModel/opaqueSolid/opaqueSolid.C
|
||||
|
||||
/* Scatter model */
|
||||
submodels/scatterModel/scatterModel/scatterModel.C
|
||||
@ -23,6 +24,7 @@ submodels/absorptionEmissionModel/constantAbsorptionEmission/constantAbsorptionE
|
||||
submodels/absorptionEmissionModel/binaryAbsorptionEmission/binaryAbsorptionEmission.C
|
||||
submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C
|
||||
submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C
|
||||
submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C
|
||||
|
||||
|
||||
/* Boundary conditions */
|
||||
|
||||
@ -29,7 +29,7 @@ License
|
||||
|
||||
#include "mappedPatchBase.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "solidThermo.H"
|
||||
#include "radiationModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * //
|
||||
|
||||
@ -143,10 +143,10 @@ Foam::scalarField Foam::radiationCoupledBase::emissivity() const
|
||||
|
||||
const polyMesh& nbrMesh = mpp.sampleMesh();
|
||||
|
||||
const solidThermo& thermo =
|
||||
nbrMesh.lookupObject<solidThermo>
|
||||
const radiation::radiationModel& radiation =
|
||||
nbrMesh.lookupObject<radiation::radiationModel>
|
||||
(
|
||||
"thermophysicalProperties"
|
||||
"radiationProperties"
|
||||
);
|
||||
|
||||
// Force recalculation of mapping and schedule
|
||||
@ -157,7 +157,13 @@ Foam::scalarField Foam::radiationCoupledBase::emissivity() const
|
||||
nbrMesh
|
||||
).boundary()[mpp.samplePolyPatch().index()];
|
||||
|
||||
scalarField emissivity(thermo.emissivity(nbrPatch.index()));
|
||||
scalarField emissivity
|
||||
(
|
||||
radiation.absorptionEmission().e()().boundaryField()
|
||||
[
|
||||
nbrPatch.index()
|
||||
]
|
||||
);
|
||||
distMap.distribute(emissivity);
|
||||
|
||||
return emissivity;
|
||||
|
||||
@ -0,0 +1,130 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\/ 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "opaqueSolid.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "physicoChemicalConstants.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace radiation
|
||||
{
|
||||
defineTypeNameAndDebug(opaqueSolid, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
radiationModel,
|
||||
opaqueSolid,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::radiation::opaqueSolid::opaqueSolid
|
||||
(
|
||||
const volScalarField& T
|
||||
)
|
||||
:
|
||||
radiationModel(typeName, T)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::radiation::opaqueSolid::~opaqueSolid()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::radiation::opaqueSolid::read()
|
||||
{
|
||||
return radiationModel::read();
|
||||
}
|
||||
|
||||
|
||||
void Foam::radiation::opaqueSolid::calculate()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::radiation::opaqueSolid::Rp() const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Rp",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
"Rp",
|
||||
constant::physicoChemical::sigma.dimensions()/dimLength,
|
||||
0.0
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
|
||||
Foam::radiation::opaqueSolid::Ru() const
|
||||
{
|
||||
return tmp<DimensionedField<scalar, volMesh> >
|
||||
(
|
||||
new DimensionedField<scalar, volMesh>
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Ru",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
"Ru", dimMass/dimLength/pow3(dimTime), 0.0
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,109 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\/ 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::radiation::opaqueSolid
|
||||
|
||||
Description
|
||||
Radiation for solid opaque solids - does nothing to energy equation source
|
||||
terms (returns zeros) but creates absorptionEmissionModel and
|
||||
scatterModel.
|
||||
|
||||
SourceFiles
|
||||
opaqueSolid.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef opaqueSolid_H
|
||||
#define opaqueSolid_H
|
||||
|
||||
#include "radiationModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace radiation
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class opaqueSolid Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class opaqueSolid
|
||||
:
|
||||
public radiationModel
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
opaqueSolid(const opaqueSolid&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const opaqueSolid&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("opaqueSolid");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
opaqueSolid(const volScalarField& T);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~opaqueSolid();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
// Edit
|
||||
|
||||
//- Solve radiation equation(s)
|
||||
void calculate();
|
||||
|
||||
//- Read radiationProperties dictionary
|
||||
bool read();
|
||||
|
||||
//- Source term component (for power of T^4)
|
||||
tmp<volScalarField> Rp() const;
|
||||
|
||||
//- Source term component (constant)
|
||||
tmp<DimensionedField<scalar, volMesh> > Ru() const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace radiation
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -89,7 +89,7 @@ Foam::radiation::radiationModel::radiationModel
|
||||
T_(T),
|
||||
radiation_(lookup("radiation")),
|
||||
coeffs_(subDict(type + "Coeffs")),
|
||||
solverFreq_(readLabel(lookup("solverFreq"))),
|
||||
solverFreq_(lookupOrDefault<label>("solverFreq", 1)),
|
||||
firstIter_(true),
|
||||
absorptionEmission_(absorptionEmissionModel::New(*this, mesh_)),
|
||||
scatter_(scatterModel::New(*this, mesh_))
|
||||
@ -158,4 +158,11 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::radiation::radiationModel::Sh
|
||||
}
|
||||
|
||||
|
||||
const Foam::radiation::absorptionEmissionModel&
|
||||
Foam::radiation::radiationModel::absorptionEmission() const
|
||||
{
|
||||
return absorptionEmission_();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -48,6 +48,7 @@ SourceFiles
|
||||
#include "fluidThermo.H"
|
||||
#include "fvMatrices.H"
|
||||
#include "blackBodyEmission.H"
|
||||
#include "absorptionEmissionModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -57,7 +58,6 @@ namespace radiation
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
class absorptionEmissionModel;
|
||||
class scatterModel;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
@ -178,6 +178,9 @@ public:
|
||||
|
||||
//- Energy source term
|
||||
virtual tmp<fvScalarMatrix> Sh(fluidThermo& thermo) const;
|
||||
|
||||
//- Access to absorptionEmissionModel
|
||||
const absorptionEmissionModel& absorptionEmission() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,256 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "greyMeanSolidAbsorptionEmission.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "unitConversion.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "basicMultiComponentMixture.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace radiation
|
||||
{
|
||||
defineTypeNameAndDebug(greyMeanSolidAbsorptionEmission, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
absorptionEmissionModel,
|
||||
greyMeanSolidAbsorptionEmission,
|
||||
dictionary
|
||||
);
|
||||
/*
|
||||
template<>
|
||||
const char* Foam::NamedEnum
|
||||
<
|
||||
Foam::radiation::greyMeanSolidAbsorptionEmission::
|
||||
radiativePropertiesNumbering,
|
||||
3
|
||||
>::names[] =
|
||||
{
|
||||
"absorptivity",
|
||||
"emissivity",
|
||||
"emission"
|
||||
};
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
const Foam::NamedEnum
|
||||
<
|
||||
Foam::radiation::greyMeanSolidAbsorptionEmission::
|
||||
radiativePropertiesNumbering,
|
||||
3
|
||||
>
|
||||
Foam::radiation::greyMeanSolidAbsorptionEmission::
|
||||
radiativePropertiesNumberingNames_;
|
||||
*/
|
||||
|
||||
// * * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::
|
||||
greyMeanSolidAbsorptionEmission::X
|
||||
(
|
||||
const volScalarField& Yj
|
||||
) const
|
||||
{
|
||||
const volScalarField& T = thermo_.T();
|
||||
const volScalarField& p = thermo_.p();
|
||||
|
||||
const basicMultiComponentMixture& mixture =
|
||||
dynamic_cast<const basicMultiComponentMixture&>(thermo_);
|
||||
|
||||
const label mySpecieI = mixture.species()[Yj.name()];
|
||||
|
||||
tmp<volScalarField> tXj
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Xj",
|
||||
mesh().time().timeName(),
|
||||
mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh(),
|
||||
dimensionedScalar("Xj", dimless, 0.0),
|
||||
zeroGradientFvPatchVectorField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& Xj = tXj().internalField();
|
||||
|
||||
tmp<scalarField> tRhoInv(Xj);
|
||||
scalarField& rhoInv = tRhoInv();
|
||||
|
||||
forAll(mixture.Y(), specieI)
|
||||
{
|
||||
const volScalarField& Yi = mixture.Y(specieI);
|
||||
|
||||
forAll(Xj, iCell)
|
||||
{
|
||||
rhoInv[iCell] +=
|
||||
Yi[iCell]/mixture.rho(specieI, p[iCell], T[iCell]);
|
||||
}
|
||||
}
|
||||
|
||||
forAll(Xj, iCell)
|
||||
{
|
||||
Xj[iCell] = Yj[iCell]/mixture.rho(mySpecieI, p[iCell], T[iCell]);
|
||||
}
|
||||
|
||||
return (Xj/rhoInv);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::radiation::greyMeanSolidAbsorptionEmission::
|
||||
greyMeanSolidAbsorptionEmission
|
||||
(
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
absorptionEmissionModel(dict, mesh),
|
||||
coeffsDict_((dict.subDict(typeName + "Coeffs"))),
|
||||
thermo_(mesh.lookupObject<fluidThermo>("thermophysicalProperties")),
|
||||
speciesNames_(0),
|
||||
solidData_
|
||||
(
|
||||
dynamic_cast
|
||||
<
|
||||
const basicMultiComponentMixture&
|
||||
>(thermo_).species().size()
|
||||
)
|
||||
{
|
||||
if (!isA<basicMultiComponentMixture>(thermo_))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"radiation::greyMeanSolidAbsorptionEmission::"
|
||||
"greyMeanSolidAbsorptionEmission"
|
||||
"("
|
||||
"const dictionary&, "
|
||||
"const fvMesh&"
|
||||
")"
|
||||
) << "Model requires a multi-component thermo package"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
label nFunc = 0;
|
||||
const dictionary& functionDicts = dict.subDict(typeName + "Coeffs");
|
||||
|
||||
forAllConstIter(dictionary, functionDicts, iter)
|
||||
{
|
||||
// safety:
|
||||
if (!iter().isDict())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
const word& key = iter().keyword();
|
||||
speciesNames_.insert(key, nFunc);
|
||||
const dictionary& dict = iter().dict();
|
||||
dict.lookup("a") >> solidData_[nFunc][absorptivity];
|
||||
dict.lookup("e") >> solidData_[nFunc][emissivity];
|
||||
|
||||
nFunc++;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::radiation::greyMeanSolidAbsorptionEmission::
|
||||
~greyMeanSolidAbsorptionEmission()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::radiation::greyMeanSolidAbsorptionEmission::
|
||||
calc(const label property) const
|
||||
{
|
||||
const basicMultiComponentMixture& mixture =
|
||||
dynamic_cast<const basicMultiComponentMixture&>(thermo_);
|
||||
|
||||
tmp<volScalarField> ta
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"a",
|
||||
mesh().time().timeName(),
|
||||
mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh(),
|
||||
dimensionedScalar("a", dimless/dimLength, 0.0),
|
||||
zeroGradientFvPatchVectorField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& a = ta().internalField();
|
||||
|
||||
forAllConstIter(HashTable<label>, speciesNames_, iter)
|
||||
{
|
||||
if (mixture.contains(iter.key()))
|
||||
{
|
||||
const volScalarField& Y = mixture.Y(iter.key());
|
||||
a += solidData_[iter()][property]*X(Y);
|
||||
}
|
||||
}
|
||||
|
||||
ta().correctBoundaryConditions();
|
||||
return ta;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::radiation::greyMeanSolidAbsorptionEmission::eCont
|
||||
(
|
||||
const label bandI
|
||||
) const
|
||||
{
|
||||
return calc(emissivity);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::radiation::greyMeanSolidAbsorptionEmission::aCont
|
||||
(
|
||||
const label bandI
|
||||
) const
|
||||
{
|
||||
return calc(absorptivity);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,158 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::radiation::greyMeanSolidAbsorptionEmission
|
||||
|
||||
Description
|
||||
greyMeanSolidAbsorptionEmission radiation absorption and emission
|
||||
coefficients for continuous phase
|
||||
|
||||
The coefficients for the species in the Look up table have to be specified
|
||||
for use in moles x P [atm], i.e. (k[i] = species[i]*p*9.869231e-6).
|
||||
|
||||
The coefficients for CO and soot or any other added are multiplied by the
|
||||
respective mass fraction being solved
|
||||
|
||||
All the species in the dictionary need either to be in the look-up table or
|
||||
being solved. Conversely, all the species solved do not need to be included
|
||||
in the calculation of the absorption coefficient
|
||||
|
||||
The names of the species in the absorption dictionary must match exactly the
|
||||
name in the look-up table or the name of the field being solved
|
||||
|
||||
SourceFiles
|
||||
greyMeanSolidAbsorptionEmission.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef greyMeanSolidAbsorptionEmission_H
|
||||
#define greyMeanSolidAbsorptionEmission_H
|
||||
|
||||
#include "absorptionEmissionModel.H"
|
||||
#include "fluidThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace radiation
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class greyMeanSolidAbsorptionEmission Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class greyMeanSolidAbsorptionEmission
|
||||
:
|
||||
public absorptionEmissionModel
|
||||
{
|
||||
|
||||
private:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Enumering of radiative properties
|
||||
enum radiativeProperties
|
||||
{
|
||||
absorptivity,
|
||||
emissivity
|
||||
};
|
||||
|
||||
//- Absorption model dictionary
|
||||
dictionary coeffsDict_;
|
||||
|
||||
//- SLG thermo package
|
||||
const fluidThermo& thermo_;
|
||||
|
||||
//- Hash table of species names
|
||||
HashTable<label> speciesNames_;
|
||||
|
||||
//- List of solid species data
|
||||
List<FixedList<scalar, 2> > solidData_;
|
||||
|
||||
|
||||
// Private member functions
|
||||
|
||||
//- Calculate the volumetric fraction of Yj
|
||||
tmp<scalarField> X(const volScalarField& Yj) const;
|
||||
|
||||
//- Calculate the property mixing
|
||||
tmp<volScalarField> calc(const label) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("greyMeanSolidAbsorptionEmission");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
greyMeanSolidAbsorptionEmission
|
||||
(
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~greyMeanSolidAbsorptionEmission();
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
// Access
|
||||
|
||||
// Absorption coefficient
|
||||
|
||||
//- Absorption coefficient for continuous phase
|
||||
tmp<volScalarField> aCont(const label bandI = 0) const;
|
||||
|
||||
|
||||
// Emission coefficient
|
||||
|
||||
//- Emission coefficient for continuous phase
|
||||
tmp<volScalarField> eCont(const label bandI = 0) const;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
inline bool isGrey() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace radiation
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -207,4 +207,16 @@ Foam::scalar Foam::SpecieMixture<MixtureType>::alphah
|
||||
}
|
||||
|
||||
|
||||
template<class MixtureType>
|
||||
Foam::scalar Foam::SpecieMixture<MixtureType>::rho
|
||||
(
|
||||
const label speciei,
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return this->getLocalThermo(speciei).rho(p, T);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -176,6 +176,14 @@ public:
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const;
|
||||
|
||||
//- Density [kg/m3]
|
||||
virtual scalar rho
|
||||
(
|
||||
const label specieI,
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -227,6 +227,14 @@ public:
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const = 0;
|
||||
|
||||
//- Density [kg/m3]
|
||||
virtual scalar rho
|
||||
(
|
||||
const label specieI,
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,70 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object radiationProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
radiation off;
|
||||
|
||||
radiationModel none;
|
||||
|
||||
noRadiation
|
||||
{
|
||||
}
|
||||
|
||||
P1Coeffs
|
||||
{
|
||||
}
|
||||
|
||||
fvDOMCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
// Number of flow iterations per radiation iteration
|
||||
solverFreq 10;
|
||||
|
||||
//absorptionEmissionModel constantAbsorptionEmission;
|
||||
absorptionEmissionModel greyMeanSolidAbsorptionEmission;
|
||||
|
||||
|
||||
greyMeanSolidAbsorptionEmissionCoeffs
|
||||
{
|
||||
|
||||
v
|
||||
{
|
||||
sigmaS 0.0;
|
||||
a 0.0; //opaque
|
||||
emissivity 0.17;
|
||||
}
|
||||
|
||||
char
|
||||
{
|
||||
sigmaS 0.0;
|
||||
a 0.0;
|
||||
emissivity 0.85;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
scatterModel constantScatter;
|
||||
|
||||
constantScatterCoeffs
|
||||
{
|
||||
sigma sigma [ 0 -1 0 0 0 0 0 ] 0;
|
||||
C C [ 0 0 0 0 0 0 0 ] 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user