mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-dev-OpenCFD into develop
This commit is contained in:
@ -23,21 +23,6 @@ dict.add
|
|||||||
);
|
);
|
||||||
dict.add("mergeDistance", SMALL);
|
dict.add("mergeDistance", SMALL);
|
||||||
|
|
||||||
labelHashSet includePatches;
|
|
||||||
forAll(patches, patchI)
|
|
||||||
{
|
|
||||||
const polyPatch& pp = patches[patchI];
|
|
||||||
if
|
|
||||||
(
|
|
||||||
!pp.coupled()
|
|
||||||
&& !isA<cyclicAMIPolyPatch>(pp)
|
|
||||||
&& !isA<emptyPolyPatch>(pp)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
includePatches.insert(patchI);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
labelList triSurfaceToAgglom(5*nFineFaces);
|
labelList triSurfaceToAgglom(5*nFineFaces);
|
||||||
|
|
||||||
const triSurface localSurface = triangulate
|
const triSurface localSurface = triangulate
|
||||||
@ -69,6 +54,4 @@ distributedTriSurfaceMesh surfacesMesh
|
|||||||
|
|
||||||
triSurfaceToAgglom.resize(surfacesMesh.size());
|
triSurfaceToAgglom.resize(surfacesMesh.size());
|
||||||
|
|
||||||
//surfacesMesh.searchableSurface::write();
|
|
||||||
|
|
||||||
surfacesMesh.setField(triSurfaceToAgglom);
|
surfacesMesh.setField(triSurfaceToAgglom);
|
||||||
|
|||||||
@ -87,8 +87,8 @@ for (label procI = 0; procI < Pstream::nProcs(); procI++)
|
|||||||
|
|
||||||
DynamicList<label> dRayIs;
|
DynamicList<label> dRayIs;
|
||||||
|
|
||||||
// Collect the rays which has not hit obstacle inbetween rayStartFace
|
// Collect the rays which have no obstacle in between rayStartFace
|
||||||
// and rayEndFace. If the ray hit itself get stored in dRayIs
|
// and rayEndFace. If the ray hit itself, it gets stored in dRayIs
|
||||||
forAll(hitInfo, rayI)
|
forAll(hitInfo, rayI)
|
||||||
{
|
{
|
||||||
if (!hitInfo[rayI].hit())
|
if (!hitInfo[rayI].hit())
|
||||||
|
|||||||
@ -29,33 +29,42 @@ Description
|
|||||||
(finalAgglom generated by faceAgglomerate utility).
|
(finalAgglom generated by faceAgglomerate utility).
|
||||||
|
|
||||||
Each view factor between the agglomerated faces i and j (Fij) is calculated
|
Each view factor between the agglomerated faces i and j (Fij) is calculated
|
||||||
using a double integral of the sub-areas composing the agglomaration.
|
using a double integral of the sub-areas composing the agglomeration.
|
||||||
|
|
||||||
The patches involved in the view factor calculation are taken from the Qr
|
The patches involved in the view factor calculation are taken from the
|
||||||
volScalarField (radiative flux) when is greyDiffusiveRadiationViewFactor
|
boundary file and should be part on the group viewFactorWall. ie.:
|
||||||
otherwise they are not included.
|
|
||||||
|
floor
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
inGroups 2(wall viewFactorWall);
|
||||||
|
nFaces 100;
|
||||||
|
startFace 3100;
|
||||||
|
}
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "Time.H"
|
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "singleCellFvMesh.H"
|
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "surfaceFields.H"
|
#include "surfaceFields.H"
|
||||||
#include "fixedValueFvPatchFields.H"
|
|
||||||
#include "distributedTriSurfaceMesh.H"
|
#include "distributedTriSurfaceMesh.H"
|
||||||
#include "cyclicAMIPolyPatch.H"
|
|
||||||
#include "mapDistribute.H"
|
|
||||||
#include "meshTools.H"
|
#include "meshTools.H"
|
||||||
|
|
||||||
#include "uindirectPrimitivePatch.H"
|
#include "uindirectPrimitivePatch.H"
|
||||||
#include "DynamicField.H"
|
#include "DynamicField.H"
|
||||||
|
#include "unitConversion.H"
|
||||||
|
|
||||||
#include "scalarMatrices.H"
|
#include "scalarMatrices.H"
|
||||||
|
#include "labelListIOList.H"
|
||||||
#include "scalarListIOList.H"
|
#include "scalarListIOList.H"
|
||||||
|
|
||||||
|
#include "singleCellFvMesh.H"
|
||||||
|
|
||||||
|
#include "IOmapDistribute.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
triSurface triangulate
|
triSurface triangulate
|
||||||
(
|
(
|
||||||
@ -116,7 +125,7 @@ triSurface triangulate
|
|||||||
newPatchI++;
|
newPatchI++;
|
||||||
}
|
}
|
||||||
|
|
||||||
triSurfaceToAgglom.resize(localTriFaceI);
|
//striSurfaceToAgglom.resize(localTriFaceI-1);
|
||||||
|
|
||||||
triangles.shrink();
|
triangles.shrink();
|
||||||
|
|
||||||
@ -264,6 +273,8 @@ int main(int argc, char *argv[])
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const word viewFactorWall("viewFactorWall");
|
||||||
|
|
||||||
const bool writeViewFactors =
|
const bool writeViewFactors =
|
||||||
viewFactorDict.lookupOrDefault<bool>("writeViewFactorMatrix", false);
|
viewFactorDict.lookupOrDefault<bool>("writeViewFactorMatrix", false);
|
||||||
|
|
||||||
@ -272,19 +283,6 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
const label debug = viewFactorDict.lookupOrDefault<label>("debug", 0);
|
const label debug = viewFactorDict.lookupOrDefault<label>("debug", 0);
|
||||||
|
|
||||||
volScalarField Qr
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"Qr",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
// Read agglomeration map
|
// Read agglomeration map
|
||||||
labelListIOList finalAgglom
|
labelListIOList finalAgglom
|
||||||
(
|
(
|
||||||
@ -336,26 +334,13 @@ int main(int argc, char *argv[])
|
|||||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||||
const polyBoundaryMesh& coarsePatches = coarseMesh.boundaryMesh();
|
const polyBoundaryMesh& coarsePatches = coarseMesh.boundaryMesh();
|
||||||
|
|
||||||
labelList viewFactorsPatches(patches.size());
|
labelList viewFactorsPatches(patches.findIndices(viewFactorWall));
|
||||||
|
forAll (viewFactorsPatches, i)
|
||||||
const volScalarField::GeometricBoundaryField& Qrb = Qr.boundaryField();
|
|
||||||
|
|
||||||
label count = 0;
|
|
||||||
forAll(Qrb, patchI)
|
|
||||||
{
|
{
|
||||||
const polyPatch& pp = patches[patchI];
|
label patchI = viewFactorsPatches[i];
|
||||||
const fvPatchScalarField& QrpI = Qrb[patchI];
|
|
||||||
|
|
||||||
if ((isA<fixedValueFvPatchScalarField>(QrpI)) && (pp.size() > 0))
|
|
||||||
{
|
|
||||||
viewFactorsPatches[count] = QrpI.patch().index();
|
|
||||||
nCoarseFaces += coarsePatches[patchI].size();
|
nCoarseFaces += coarsePatches[patchI].size();
|
||||||
nFineFaces += patches[patchI].size();
|
nFineFaces += patches[patchI].size();
|
||||||
count ++;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
viewFactorsPatches.resize(count);
|
|
||||||
|
|
||||||
// total number of coarse faces
|
// total number of coarse faces
|
||||||
label totalNCoarseFaces = nCoarseFaces;
|
label totalNCoarseFaces = nCoarseFaces;
|
||||||
@ -381,21 +366,27 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
DynamicList<label> localAgg(nCoarseFaces);
|
DynamicList<label> localAgg(nCoarseFaces);
|
||||||
|
|
||||||
forAll (viewFactorsPatches, i)
|
labelHashSet includePatches;
|
||||||
|
forAll(viewFactorsPatches, i)
|
||||||
{
|
{
|
||||||
const label patchID = viewFactorsPatches[i];
|
const label patchID = viewFactorsPatches[i];
|
||||||
|
|
||||||
const polyPatch& pp = patches[patchID];
|
const polyPatch& pp = patches[patchID];
|
||||||
const labelList& agglom = finalAgglom[patchID];
|
const labelList& agglom = finalAgglom[patchID];
|
||||||
|
|
||||||
|
includePatches.insert(patchID);
|
||||||
|
|
||||||
|
if (agglom.size() > 0)
|
||||||
|
{
|
||||||
label nAgglom = max(agglom)+1;
|
label nAgglom = max(agglom)+1;
|
||||||
labelListList coarseToFine(invertOneToMany(nAgglom, agglom));
|
labelListList coarseToFine(invertOneToMany(nAgglom, agglom));
|
||||||
const labelList& coarsePatchFace = coarseMesh.patchFaceMap()[patchID];
|
const labelList& coarsePatchFace =
|
||||||
|
coarseMesh.patchFaceMap()[patchID];
|
||||||
|
|
||||||
const pointField& coarseCf = coarseMesh.Cf().boundaryField()[patchID];
|
const pointField& coarseCf =
|
||||||
const pointField& coarseSf = coarseMesh.Sf().boundaryField()[patchID];
|
coarseMesh.Cf().boundaryField()[patchID];
|
||||||
|
const pointField& coarseSf =
|
||||||
labelHashSet includePatches;
|
coarseMesh.Sf().boundaryField()[patchID];
|
||||||
includePatches.insert(patchID);
|
|
||||||
|
|
||||||
forAll(coarseCf, faceI)
|
forAll(coarseCf, faceI)
|
||||||
{
|
{
|
||||||
@ -449,9 +440,10 @@ int main(int argc, char *argv[])
|
|||||||
localCoarseCf.append(cf);
|
localCoarseCf.append(cf);
|
||||||
localCoarseSf.append(sf);
|
localCoarseSf.append(sf);
|
||||||
localAgg.append(agglomI);
|
localAgg.append(agglomI);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Distribute local coarse Cf and Sf for shooting rays
|
// Distribute local coarse Cf and Sf for shooting rays
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -478,7 +470,6 @@ int main(int argc, char *argv[])
|
|||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
#include "searchingEngine.H"
|
#include "searchingEngine.H"
|
||||||
|
|
||||||
|
|
||||||
// Determine rays between coarse face centres
|
// Determine rays between coarse face centres
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
DynamicList<label> rayStartFace(nCoarseFaces + 0.01*nCoarseFaces);
|
DynamicList<label> rayStartFace(nCoarseFaces + 0.01*nCoarseFaces);
|
||||||
@ -486,8 +477,8 @@ int main(int argc, char *argv[])
|
|||||||
DynamicList<label> rayEndFace(rayStartFace.size());
|
DynamicList<label> rayEndFace(rayStartFace.size());
|
||||||
|
|
||||||
|
|
||||||
// Return rayStartFace in local index andrayEndFace in global index
|
// Return rayStartFace in local index and rayEndFace in global index
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
#include "shootRays.H"
|
#include "shootRays.H"
|
||||||
|
|
||||||
@ -508,7 +499,6 @@ int main(int argc, char *argv[])
|
|||||||
nViewFactors += nVisibleFaceFaces[faceI];
|
nViewFactors += nVisibleFaceFaces[faceI];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// - Construct compact numbering
|
// - Construct compact numbering
|
||||||
// - return map from remote to compact indices
|
// - return map from remote to compact indices
|
||||||
// (per processor (!= myProcNo) a map from remote index to compact index)
|
// (per processor (!= myProcNo) a map from remote index to compact index)
|
||||||
@ -519,54 +509,6 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
mapDistribute map(globalNumbering, rayEndFace, compactMap);
|
mapDistribute map(globalNumbering, rayEndFace, compactMap);
|
||||||
|
|
||||||
labelListIOList IOsubMap
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"subMap",
|
|
||||||
mesh.facesInstance(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
),
|
|
||||||
map.subMap()
|
|
||||||
);
|
|
||||||
IOsubMap.write();
|
|
||||||
|
|
||||||
|
|
||||||
labelListIOList IOconstructMap
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"constructMap",
|
|
||||||
mesh.facesInstance(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
),
|
|
||||||
map.constructMap()
|
|
||||||
);
|
|
||||||
IOconstructMap.write();
|
|
||||||
|
|
||||||
|
|
||||||
IOList<label> consMapDim
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"constructMapDim",
|
|
||||||
mesh.facesInstance(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
),
|
|
||||||
List<label>(1, map.constructSize())
|
|
||||||
);
|
|
||||||
consMapDim.write();
|
|
||||||
|
|
||||||
|
|
||||||
// visibleFaceFaces has:
|
// visibleFaceFaces has:
|
||||||
// (local face, local viewed face) = compact viewed face
|
// (local face, local viewed face) = compact viewed face
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -600,10 +542,14 @@ int main(int argc, char *argv[])
|
|||||||
forAll(viewFactorsPatches, i)
|
forAll(viewFactorsPatches, i)
|
||||||
{
|
{
|
||||||
label patchID = viewFactorsPatches[i];
|
label patchID = viewFactorsPatches[i];
|
||||||
|
|
||||||
const labelList& agglom = finalAgglom[patchID];
|
const labelList& agglom = finalAgglom[patchID];
|
||||||
|
if (agglom.size() > 0)
|
||||||
|
{
|
||||||
label nAgglom = max(agglom)+1;
|
label nAgglom = max(agglom)+1;
|
||||||
labelListList coarseToFine(invertOneToMany(nAgglom, agglom));
|
labelListList coarseToFine(invertOneToMany(nAgglom, agglom));
|
||||||
const labelList& coarsePatchFace = coarseMesh.patchFaceMap()[patchID];
|
const labelList& coarsePatchFace =
|
||||||
|
coarseMesh.patchFaceMap()[patchID];
|
||||||
|
|
||||||
forAll(coarseToFine, coarseI)
|
forAll(coarseToFine, coarseI)
|
||||||
{
|
{
|
||||||
@ -629,6 +575,7 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Do all swapping
|
// Do all swapping
|
||||||
map.distribute(compactCoarseSf);
|
map.distribute(compactCoarseSf);
|
||||||
@ -837,6 +784,8 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
label patchID = viewFactorsPatches[i];
|
label patchID = viewFactorsPatches[i];
|
||||||
const labelList& agglom = finalAgglom[patchID];
|
const labelList& agglom = finalAgglom[patchID];
|
||||||
|
if (agglom.size() > 0)
|
||||||
|
{
|
||||||
label nAgglom = max(agglom)+1;
|
label nAgglom = max(agglom)+1;
|
||||||
labelListList coarseToFine(invertOneToMany(nAgglom, agglom));
|
labelListList coarseToFine(invertOneToMany(nAgglom, agglom));
|
||||||
const labelList& coarsePatchFace =
|
const labelList& coarsePatchFace =
|
||||||
@ -855,6 +804,7 @@ int main(int argc, char *argv[])
|
|||||||
compactI++;
|
compactI++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
viewFactorField.write();
|
viewFactorField.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -886,10 +836,6 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (Pstream::master())
|
|
||||||
{
|
|
||||||
scalarSquareMatrix Fmatrix(totalNCoarseFaces, totalNCoarseFaces, 0.0);
|
|
||||||
|
|
||||||
labelListList globalFaceFaces(visibleFaceFaces.size());
|
labelListList globalFaceFaces(visibleFaceFaces.size());
|
||||||
|
|
||||||
// Create globalFaceFaces needed to insert view factors
|
// Create globalFaceFaces needed to insert view factors
|
||||||
@ -917,35 +863,37 @@ int main(int argc, char *argv[])
|
|||||||
globalFaceFaces
|
globalFaceFaces
|
||||||
);
|
);
|
||||||
IOglobalFaceFaces.write();
|
IOglobalFaceFaces.write();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
labelListList globalFaceFaces(visibleFaceFaces.size());
|
|
||||||
forAll(globalFaceFaces, faceI)
|
|
||||||
{
|
|
||||||
globalFaceFaces[faceI] = renumber
|
|
||||||
(
|
|
||||||
compactToGlobal,
|
|
||||||
visibleFaceFaces[faceI]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
labelListIOList IOglobalFaceFaces
|
|
||||||
|
labelListIOList IOvisibleFaceFaces
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"globalFaceFaces",
|
"visibleFaceFaces",
|
||||||
mesh.facesInstance(),
|
mesh.facesInstance(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE,
|
IOobject::NO_WRITE,
|
||||||
false
|
false
|
||||||
),
|
),
|
||||||
globalFaceFaces
|
visibleFaceFaces
|
||||||
|
);
|
||||||
|
IOvisibleFaceFaces.write();
|
||||||
|
|
||||||
|
IOmapDistribute IOmapDist
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"mapDist",
|
||||||
|
mesh.facesInstance(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
map.xfer()
|
||||||
);
|
);
|
||||||
|
|
||||||
IOglobalFaceFaces.write();
|
IOmapDist.write();
|
||||||
}
|
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -9,6 +9,8 @@ radiationModels/fvDOM/blackBodyEmission/blackBodyEmission.C
|
|||||||
radiationModels/fvDOM/absorptionCoeffs/absorptionCoeffs.C
|
radiationModels/fvDOM/absorptionCoeffs/absorptionCoeffs.C
|
||||||
radiationModels/viewFactor/viewFactor.C
|
radiationModels/viewFactor/viewFactor.C
|
||||||
radiationModels/opaqueSolid/opaqueSolid.C
|
radiationModels/opaqueSolid/opaqueSolid.C
|
||||||
|
radiationModels/solarLoad/solarLoad.C
|
||||||
|
radiationModels/solarLoad/faceShading/faceShading.C
|
||||||
|
|
||||||
/* Scatter model */
|
/* Scatter model */
|
||||||
submodels/scatterModel/scatterModel/scatterModel.C
|
submodels/scatterModel/scatterModel/scatterModel.C
|
||||||
@ -25,6 +27,8 @@ submodels/absorptionEmissionModel/binaryAbsorptionEmission/binaryAbsorptionEmiss
|
|||||||
submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C
|
submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C
|
||||||
submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C
|
submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C
|
||||||
submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C
|
submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C
|
||||||
|
submodels/absorptionEmissionModel/multiBandSolidAbsorptionEmission/multiBandSolidAbsorptionEmission.C
|
||||||
|
submodels/boundaryRadiationProperties/boundaryRadiationProperties.C
|
||||||
|
|
||||||
/* Soot model */
|
/* Soot model */
|
||||||
submodels/sootModel/sootModel/sootModel.C
|
submodels/sootModel/sootModel/sootModel.C
|
||||||
@ -32,12 +36,22 @@ submodels/sootModel/sootModel/sootModelNew.C
|
|||||||
submodels/sootModel/mixtureFractionSoot/mixtureFractionSoots.C
|
submodels/sootModel/mixtureFractionSoot/mixtureFractionSoots.C
|
||||||
submodels/sootModel/noSoot/noSoot.C
|
submodels/sootModel/noSoot/noSoot.C
|
||||||
|
|
||||||
|
/* Transmissivity model */
|
||||||
|
submodels/transmissivityModel/transmissivityModel/transmissivityModel.C
|
||||||
|
submodels/transmissivityModel/transmissivityModel/transmissivityModelNew.C
|
||||||
|
submodels/transmissivityModel/noTransmissivity/noTransmissivity.C
|
||||||
|
submodels/transmissivityModel/constantTransmissivity/constantTransmissivity.C
|
||||||
|
submodels/transmissivityModel/multiBandSolidTransmissivity/multiBandSolidTransmissivity.C
|
||||||
|
|
||||||
|
/* Solar calculator model */
|
||||||
|
submodels/solarCalculator/solarCalculator.C
|
||||||
|
|
||||||
/* Boundary conditions */
|
/* Boundary conditions */
|
||||||
derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C
|
derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C
|
||||||
derivedFvPatchFields/MarshakRadiationFixedTemperature/MarshakRadiationFixedTemperatureFvPatchScalarField.C
|
derivedFvPatchFields/MarshakRadiationFixedTemperature/MarshakRadiationFixedTemperatureFvPatchScalarField.C
|
||||||
derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C
|
derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C
|
||||||
derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C
|
derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C
|
||||||
derivedFvPatchFields/radiationCoupledBase/radiationCoupledBase.C
|
|
||||||
derivedFvPatchFields/greyDiffusiveViewFactor/greyDiffusiveViewFactorFixedValueFvPatchScalarField.C
|
derivedFvPatchFields/greyDiffusiveViewFactor/greyDiffusiveViewFactorFixedValueFvPatchScalarField.C
|
||||||
|
derivedFvPatchFields/boundaryRadiationProperties/boundaryRadiationPropertiesFvPatchField.C
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libradiationModels
|
LIB = $(FOAM_LIBBIN)/libradiationModels
|
||||||
|
|||||||
@ -10,7 +10,9 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
|
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||||
|
-I$(LIB_SRC)/parallel/distributed/lnInclude
|
||||||
|
|
||||||
LIB_LIBS = \
|
LIB_LIBS = \
|
||||||
-lcompressibleTransportModels \
|
-lcompressibleTransportModels \
|
||||||
@ -23,4 +25,6 @@ LIB_LIBS = \
|
|||||||
-lsolidProperties \
|
-lsolidProperties \
|
||||||
-lliquidProperties \
|
-lliquidProperties \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lmeshTools
|
-lmeshTools \
|
||||||
|
-ldistributed \
|
||||||
|
-ltriSurface
|
||||||
|
|||||||
@ -29,17 +29,18 @@ License
|
|||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "radiationModel.H"
|
#include "radiationModel.H"
|
||||||
#include "physicoChemicalConstants.H"
|
#include "physicoChemicalConstants.H"
|
||||||
|
#include "boundaryRadiationProperties.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField
|
Foam::radiation::MarshakRadiationFvPatchScalarField::
|
||||||
|
MarshakRadiationFvPatchScalarField
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<scalar, volMesh>& iF
|
const DimensionedField<scalar, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchScalarField(p, iF),
|
mixedFvPatchScalarField(p, iF),
|
||||||
radiationCoupledBase(p, "undefined", scalarField::null()),
|
|
||||||
TName_("T")
|
TName_("T")
|
||||||
{
|
{
|
||||||
refValue() = 0.0;
|
refValue() = 0.0;
|
||||||
@ -48,7 +49,8 @@ Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField
|
Foam::radiation::MarshakRadiationFvPatchScalarField::
|
||||||
|
MarshakRadiationFvPatchScalarField
|
||||||
(
|
(
|
||||||
const MarshakRadiationFvPatchScalarField& ptf,
|
const MarshakRadiationFvPatchScalarField& ptf,
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
@ -57,18 +59,12 @@ Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
||||||
radiationCoupledBase
|
|
||||||
(
|
|
||||||
p,
|
|
||||||
ptf.emissivityMethod(),
|
|
||||||
ptf.emissivity_,
|
|
||||||
mapper
|
|
||||||
),
|
|
||||||
TName_(ptf.TName_)
|
TName_(ptf.TName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField
|
Foam::radiation::MarshakRadiationFvPatchScalarField::
|
||||||
|
MarshakRadiationFvPatchScalarField
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<scalar, volMesh>& iF,
|
const DimensionedField<scalar, volMesh>& iF,
|
||||||
@ -76,7 +72,6 @@ Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchScalarField(p, iF),
|
mixedFvPatchScalarField(p, iF),
|
||||||
radiationCoupledBase(p, dict),
|
|
||||||
TName_(dict.lookupOrDefault<word>("T", "T"))
|
TName_(dict.lookupOrDefault<word>("T", "T"))
|
||||||
{
|
{
|
||||||
if (dict.found("value"))
|
if (dict.found("value"))
|
||||||
@ -97,63 +92,51 @@ Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField
|
Foam::radiation::MarshakRadiationFvPatchScalarField::
|
||||||
|
MarshakRadiationFvPatchScalarField
|
||||||
(
|
(
|
||||||
const MarshakRadiationFvPatchScalarField& ptf
|
const MarshakRadiationFvPatchScalarField& ptf
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchScalarField(ptf),
|
mixedFvPatchScalarField(ptf),
|
||||||
radiationCoupledBase
|
|
||||||
(
|
|
||||||
ptf.patch(),
|
|
||||||
ptf.emissivityMethod(),
|
|
||||||
ptf.emissivity_
|
|
||||||
),
|
|
||||||
TName_(ptf.TName_)
|
TName_(ptf.TName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField
|
Foam::radiation::MarshakRadiationFvPatchScalarField::
|
||||||
|
MarshakRadiationFvPatchScalarField
|
||||||
(
|
(
|
||||||
const MarshakRadiationFvPatchScalarField& ptf,
|
const MarshakRadiationFvPatchScalarField& ptf,
|
||||||
const DimensionedField<scalar, volMesh>& iF
|
const DimensionedField<scalar, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchScalarField(ptf, iF),
|
mixedFvPatchScalarField(ptf, iF),
|
||||||
radiationCoupledBase
|
|
||||||
(
|
|
||||||
ptf.patch(),
|
|
||||||
ptf.emissivityMethod(),
|
|
||||||
ptf.emissivity_
|
|
||||||
),
|
|
||||||
TName_(ptf.TName_)
|
TName_(ptf.TName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::MarshakRadiationFvPatchScalarField::autoMap
|
void Foam::radiation::MarshakRadiationFvPatchScalarField::autoMap
|
||||||
(
|
(
|
||||||
const fvPatchFieldMapper& m
|
const fvPatchFieldMapper& m
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
mixedFvPatchScalarField::autoMap(m);
|
scalarField::autoMap(m);
|
||||||
radiationCoupledBase::autoMap(m);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::MarshakRadiationFvPatchScalarField::rmap
|
void Foam::radiation::MarshakRadiationFvPatchScalarField::rmap
|
||||||
(
|
(
|
||||||
const fvPatchScalarField& ptf,
|
const fvPatchScalarField& ptf,
|
||||||
const labelList& addr
|
const labelList& addr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
mixedFvPatchScalarField::rmap(ptf, addr);
|
mixedFvPatchScalarField::rmap(ptf, addr);
|
||||||
radiationCoupledBase::rmap(ptf, addr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::MarshakRadiationFvPatchScalarField::updateCoeffs()
|
void Foam::radiation::MarshakRadiationFvPatchScalarField::updateCoeffs()
|
||||||
{
|
{
|
||||||
if (this->updated())
|
if (this->updated())
|
||||||
{
|
{
|
||||||
@ -176,9 +159,17 @@ void Foam::MarshakRadiationFvPatchScalarField::updateCoeffs()
|
|||||||
const scalarField& gamma =
|
const scalarField& gamma =
|
||||||
patch().lookupPatchField<volScalarField, scalar>("gammaRad");
|
patch().lookupPatchField<volScalarField, scalar>("gammaRad");
|
||||||
|
|
||||||
const scalarField temissivity = emissivity();
|
const boundaryRadiationProperties& boundaryRadiation =
|
||||||
|
boundaryRadiationProperties::New(dimensionedInternalField().mesh());
|
||||||
|
|
||||||
const scalarField Ep(temissivity/(2.0*(2.0 - temissivity)));
|
const tmp<scalarField> temissivity
|
||||||
|
(
|
||||||
|
boundaryRadiation.emissivity(patch().index())
|
||||||
|
);
|
||||||
|
|
||||||
|
const scalarField& emissivity = temissivity();
|
||||||
|
|
||||||
|
const scalarField Ep(emissivity/(2.0*(scalar(2.0) - emissivity)));
|
||||||
|
|
||||||
// Set value fraction
|
// Set value fraction
|
||||||
valueFraction() = 1.0/(1.0 + gamma*patch().deltaCoeffs()/Ep);
|
valueFraction() = 1.0/(1.0 + gamma*patch().deltaCoeffs()/Ep);
|
||||||
@ -190,10 +181,12 @@ void Foam::MarshakRadiationFvPatchScalarField::updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::MarshakRadiationFvPatchScalarField::write(Ostream& os) const
|
void Foam::radiation::MarshakRadiationFvPatchScalarField::write
|
||||||
|
(
|
||||||
|
Ostream& os
|
||||||
|
) const
|
||||||
{
|
{
|
||||||
mixedFvPatchScalarField::write(os);
|
mixedFvPatchScalarField::write(os);
|
||||||
radiationCoupledBase::write(os);
|
|
||||||
writeEntryIfDifferent<word>(os, "T", "T", TName_);
|
writeEntryIfDifferent<word>(os, "T", "T", TName_);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,6 +194,8 @@ void Foam::MarshakRadiationFvPatchScalarField::write(Ostream& os) const
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace radiation
|
||||||
{
|
{
|
||||||
makePatchTypeField
|
makePatchTypeField
|
||||||
(
|
(
|
||||||
@ -208,6 +203,6 @@ namespace Foam
|
|||||||
MarshakRadiationFvPatchScalarField
|
MarshakRadiationFvPatchScalarField
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -64,12 +64,13 @@ SourceFiles
|
|||||||
#define MarshakRadiationMixedFvPatchField_H
|
#define MarshakRadiationMixedFvPatchField_H
|
||||||
|
|
||||||
#include "mixedFvPatchFields.H"
|
#include "mixedFvPatchFields.H"
|
||||||
#include "radiationCoupledBase.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace radiation
|
||||||
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class MarshakRadiationFvPatchScalarField Declaration
|
Class MarshakRadiationFvPatchScalarField Declaration
|
||||||
@ -77,8 +78,7 @@ namespace Foam
|
|||||||
|
|
||||||
class MarshakRadiationFvPatchScalarField
|
class MarshakRadiationFvPatchScalarField
|
||||||
:
|
:
|
||||||
public mixedFvPatchScalarField,
|
public mixedFvPatchScalarField
|
||||||
public radiationCoupledBase
|
|
||||||
{
|
{
|
||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
@ -204,6 +204,7 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace radiation
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -29,10 +29,11 @@ License
|
|||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "radiationModel.H"
|
#include "radiationModel.H"
|
||||||
#include "physicoChemicalConstants.H"
|
#include "physicoChemicalConstants.H"
|
||||||
|
#include "boundaryRadiationProperties.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::MarshakRadiationFixedTemperatureFvPatchScalarField::
|
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::
|
||||||
MarshakRadiationFixedTemperatureFvPatchScalarField
|
MarshakRadiationFixedTemperatureFvPatchScalarField
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
@ -40,7 +41,6 @@ MarshakRadiationFixedTemperatureFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchScalarField(p, iF),
|
mixedFvPatchScalarField(p, iF),
|
||||||
radiationCoupledBase(p, "undefined", scalarField::null()),
|
|
||||||
Trad_(p.size())
|
Trad_(p.size())
|
||||||
{
|
{
|
||||||
refValue() = 0.0;
|
refValue() = 0.0;
|
||||||
@ -49,7 +49,7 @@ MarshakRadiationFixedTemperatureFvPatchScalarField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::MarshakRadiationFixedTemperatureFvPatchScalarField::
|
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::
|
||||||
MarshakRadiationFixedTemperatureFvPatchScalarField
|
MarshakRadiationFixedTemperatureFvPatchScalarField
|
||||||
(
|
(
|
||||||
const MarshakRadiationFixedTemperatureFvPatchScalarField& ptf,
|
const MarshakRadiationFixedTemperatureFvPatchScalarField& ptf,
|
||||||
@ -59,18 +59,11 @@ MarshakRadiationFixedTemperatureFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
||||||
radiationCoupledBase
|
|
||||||
(
|
|
||||||
p,
|
|
||||||
ptf.emissivityMethod(),
|
|
||||||
ptf.emissivity_,
|
|
||||||
mapper
|
|
||||||
),
|
|
||||||
Trad_(ptf.Trad_, mapper)
|
Trad_(ptf.Trad_, mapper)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::MarshakRadiationFixedTemperatureFvPatchScalarField::
|
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::
|
||||||
MarshakRadiationFixedTemperatureFvPatchScalarField
|
MarshakRadiationFixedTemperatureFvPatchScalarField
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
@ -79,7 +72,6 @@ MarshakRadiationFixedTemperatureFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchScalarField(p, iF),
|
mixedFvPatchScalarField(p, iF),
|
||||||
radiationCoupledBase(p, dict),
|
|
||||||
Trad_("Trad", dict, p.size())
|
Trad_("Trad", dict, p.size())
|
||||||
{
|
{
|
||||||
// refValue updated on each call to updateCoeffs()
|
// refValue updated on each call to updateCoeffs()
|
||||||
@ -94,24 +86,18 @@ MarshakRadiationFixedTemperatureFvPatchScalarField
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::MarshakRadiationFixedTemperatureFvPatchScalarField::
|
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::
|
||||||
MarshakRadiationFixedTemperatureFvPatchScalarField
|
MarshakRadiationFixedTemperatureFvPatchScalarField
|
||||||
(
|
(
|
||||||
const MarshakRadiationFixedTemperatureFvPatchScalarField& ptf
|
const MarshakRadiationFixedTemperatureFvPatchScalarField& ptf
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchScalarField(ptf),
|
mixedFvPatchScalarField(ptf),
|
||||||
radiationCoupledBase
|
|
||||||
(
|
|
||||||
ptf.patch(),
|
|
||||||
ptf.emissivityMethod(),
|
|
||||||
ptf.emissivity_
|
|
||||||
),
|
|
||||||
Trad_(ptf.Trad_)
|
Trad_(ptf.Trad_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::MarshakRadiationFixedTemperatureFvPatchScalarField::
|
Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::
|
||||||
MarshakRadiationFixedTemperatureFvPatchScalarField
|
MarshakRadiationFixedTemperatureFvPatchScalarField
|
||||||
(
|
(
|
||||||
const MarshakRadiationFixedTemperatureFvPatchScalarField& ptf,
|
const MarshakRadiationFixedTemperatureFvPatchScalarField& ptf,
|
||||||
@ -119,37 +105,31 @@ MarshakRadiationFixedTemperatureFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchScalarField(ptf, iF),
|
mixedFvPatchScalarField(ptf, iF),
|
||||||
radiationCoupledBase
|
|
||||||
(
|
|
||||||
ptf.patch(),
|
|
||||||
ptf.emissivityMethod(),
|
|
||||||
ptf.emissivity_
|
|
||||||
),
|
|
||||||
Trad_(ptf.Trad_)
|
Trad_(ptf.Trad_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::MarshakRadiationFixedTemperatureFvPatchScalarField::autoMap
|
void Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::
|
||||||
|
autoMap
|
||||||
(
|
(
|
||||||
const fvPatchFieldMapper& m
|
const fvPatchFieldMapper& m
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
mixedFvPatchScalarField::autoMap(m);
|
mixedFvPatchScalarField::autoMap(m);
|
||||||
radiationCoupledBase::autoMap(m);
|
|
||||||
Trad_.autoMap(m);
|
Trad_.autoMap(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::MarshakRadiationFixedTemperatureFvPatchScalarField::rmap
|
void Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::rmap
|
||||||
(
|
(
|
||||||
const fvPatchScalarField& ptf,
|
const fvPatchScalarField& ptf,
|
||||||
const labelList& addr
|
const labelList& addr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
mixedFvPatchScalarField::rmap(ptf, addr);
|
mixedFvPatchScalarField::rmap(ptf, addr);
|
||||||
radiationCoupledBase::rmap(ptf, addr);
|
|
||||||
const MarshakRadiationFixedTemperatureFvPatchScalarField& mrptf =
|
const MarshakRadiationFixedTemperatureFvPatchScalarField& mrptf =
|
||||||
refCast<const MarshakRadiationFixedTemperatureFvPatchScalarField>(ptf);
|
refCast<const MarshakRadiationFixedTemperatureFvPatchScalarField>(ptf);
|
||||||
|
|
||||||
@ -157,7 +137,8 @@ void Foam::MarshakRadiationFixedTemperatureFvPatchScalarField::rmap
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::MarshakRadiationFixedTemperatureFvPatchScalarField::updateCoeffs()
|
void Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::
|
||||||
|
updateCoeffs()
|
||||||
{
|
{
|
||||||
if (this->updated())
|
if (this->updated())
|
||||||
{
|
{
|
||||||
@ -176,9 +157,18 @@ void Foam::MarshakRadiationFixedTemperatureFvPatchScalarField::updateCoeffs()
|
|||||||
const scalarField& gamma =
|
const scalarField& gamma =
|
||||||
patch().lookupPatchField<volScalarField, scalar>("gammaRad");
|
patch().lookupPatchField<volScalarField, scalar>("gammaRad");
|
||||||
|
|
||||||
const scalarField temissivity = emissivity();
|
//const scalarField temissivity = emissivity();
|
||||||
|
const boundaryRadiationProperties& boundaryRadiation =
|
||||||
|
boundaryRadiationProperties::New(dimensionedInternalField().mesh());
|
||||||
|
|
||||||
const scalarField Ep(temissivity/(2.0*(scalar(2.0) - temissivity)));
|
const tmp<scalarField> temissivity
|
||||||
|
(
|
||||||
|
boundaryRadiation.emissivity(patch().index())
|
||||||
|
);
|
||||||
|
|
||||||
|
const scalarField& emissivity = temissivity();
|
||||||
|
|
||||||
|
const scalarField Ep(emissivity/(2.0*(scalar(2.0) - emissivity)));
|
||||||
|
|
||||||
// Set value fraction
|
// Set value fraction
|
||||||
valueFraction() = 1.0/(1.0 + gamma*patch().deltaCoeffs()/Ep);
|
valueFraction() = 1.0/(1.0 + gamma*patch().deltaCoeffs()/Ep);
|
||||||
@ -190,13 +180,12 @@ void Foam::MarshakRadiationFixedTemperatureFvPatchScalarField::updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::MarshakRadiationFixedTemperatureFvPatchScalarField::write
|
void Foam::radiation::MarshakRadiationFixedTemperatureFvPatchScalarField::write
|
||||||
(
|
(
|
||||||
Ostream& os
|
Ostream& os
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
mixedFvPatchScalarField::write(os);
|
mixedFvPatchScalarField::write(os);
|
||||||
radiationCoupledBase::write(os);
|
|
||||||
Trad_.writeEntry("Trad", os);
|
Trad_.writeEntry("Trad", os);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,6 +193,8 @@ void Foam::MarshakRadiationFixedTemperatureFvPatchScalarField::write
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace radiation
|
||||||
{
|
{
|
||||||
makePatchTypeField
|
makePatchTypeField
|
||||||
(
|
(
|
||||||
@ -211,6 +202,6 @@ namespace Foam
|
|||||||
MarshakRadiationFixedTemperatureFvPatchScalarField
|
MarshakRadiationFixedTemperatureFvPatchScalarField
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -64,21 +64,21 @@ SourceFiles
|
|||||||
#define MarshakRadiationFixedTemperatureFvPatchScalarField_H
|
#define MarshakRadiationFixedTemperatureFvPatchScalarField_H
|
||||||
|
|
||||||
#include "mixedFvPatchFields.H"
|
#include "mixedFvPatchFields.H"
|
||||||
#include "radiationCoupledBase.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace radiation
|
||||||
|
{
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class MarshakRadiationFixedTemperatureFvPatchScalarField Declaration
|
Class MarshakRadiationFixedTemperatureFvPatchScalarField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class MarshakRadiationFixedTemperatureFvPatchScalarField
|
class MarshakRadiationFixedTemperatureFvPatchScalarField
|
||||||
:
|
:
|
||||||
public mixedFvPatchScalarField,
|
public mixedFvPatchScalarField
|
||||||
public radiationCoupledBase
|
//public radiationCoupledBase
|
||||||
{
|
{
|
||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
@ -208,6 +208,7 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace radiation
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -0,0 +1,551 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2015 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 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 "boundaryRadiationPropertiesFvPatchField.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
#include "mappedPatchBase.H"
|
||||||
|
#include "fvPatchFieldMapper.H"
|
||||||
|
#include "radiationModel.H"
|
||||||
|
#include "absorptionEmissionModel.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
template<>
|
||||||
|
const char* Foam::NamedEnum
|
||||||
|
<
|
||||||
|
Foam::radiation::boundaryRadiationPropertiesFvPatchField::methodType,
|
||||||
|
3
|
||||||
|
>::names[] =
|
||||||
|
{
|
||||||
|
"solidRadiation",
|
||||||
|
"lookup",
|
||||||
|
"model"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const Foam::NamedEnum
|
||||||
|
<
|
||||||
|
Foam::radiation::boundaryRadiationPropertiesFvPatchField::methodType,
|
||||||
|
3
|
||||||
|
> Foam::radiation::boundaryRadiationPropertiesFvPatchField::methodTypeNames_;
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Private functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::label
|
||||||
|
Foam::radiation::boundaryRadiationPropertiesFvPatchField::nbrPatchIndex() const
|
||||||
|
{
|
||||||
|
// Get the coupling information from the mappedPatchBase
|
||||||
|
const mappedPatchBase& mpp =
|
||||||
|
refCast<const mappedPatchBase>(patch().patch());
|
||||||
|
|
||||||
|
return (mpp.samplePolyPatch().index());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const Foam::fvMesh&
|
||||||
|
Foam::radiation::boundaryRadiationPropertiesFvPatchField::nbrRegion() const
|
||||||
|
{
|
||||||
|
const mappedPatchBase& mpp =
|
||||||
|
refCast<const mappedPatchBase>(patch().patch());
|
||||||
|
|
||||||
|
return (refCast<const fvMesh>(mpp.sampleMesh()));
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
||||||
|
Foam::radiation::boundaryRadiationPropertiesFvPatchField::
|
||||||
|
boundaryRadiationPropertiesFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<scalar, volMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
calculatedFvPatchScalarField(p, iF),
|
||||||
|
method_(LOOKUP),
|
||||||
|
dict_(),
|
||||||
|
absorptionEmission_(NULL),
|
||||||
|
transmissivity_(NULL)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::radiation::boundaryRadiationPropertiesFvPatchField::
|
||||||
|
boundaryRadiationPropertiesFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<scalar, volMesh>& iF,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
calculatedFvPatchScalarField(p, iF),
|
||||||
|
method_(methodTypeNames_.read(dict.lookup("mode"))),
|
||||||
|
dict_(dict),
|
||||||
|
absorptionEmission_(NULL),
|
||||||
|
transmissivity_(NULL)
|
||||||
|
{
|
||||||
|
switch (method_)
|
||||||
|
{
|
||||||
|
case SOLIDRADIATION:
|
||||||
|
{
|
||||||
|
if (!isA<mappedPatchBase>(p.patch()))
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< "\n patch type '" << p.type()
|
||||||
|
<< "' not type '" << mappedPatchBase::typeName << "'"
|
||||||
|
<< "\n for patch " << p.name()
|
||||||
|
<< abort(FatalIOError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MODEL:
|
||||||
|
{
|
||||||
|
const fvMesh& mesh = this->dimensionedInternalField().mesh();
|
||||||
|
|
||||||
|
//if (dict.found("absorptionEmissionModel"))
|
||||||
|
{
|
||||||
|
absorptionEmission_.reset
|
||||||
|
(
|
||||||
|
absorptionEmissionModel::New(dict, mesh).ptr()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// if (dict.found("transmissivityModel"))
|
||||||
|
{
|
||||||
|
transmissivity_.reset
|
||||||
|
(
|
||||||
|
transmissivityModel::New(dict, mesh).ptr()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case LOOKUP:
|
||||||
|
{
|
||||||
|
//Do nothing
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dict.found("value"))
|
||||||
|
{
|
||||||
|
fvPatchScalarField::operator=
|
||||||
|
(
|
||||||
|
scalarField("value", dict, p.size())
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fvPatchScalarField::operator=(0.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::radiation::boundaryRadiationPropertiesFvPatchField::
|
||||||
|
boundaryRadiationPropertiesFvPatchField
|
||||||
|
(
|
||||||
|
const boundaryRadiationPropertiesFvPatchField& ptf,
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<scalar, volMesh>& iF,
|
||||||
|
const fvPatchFieldMapper& mapper
|
||||||
|
)
|
||||||
|
:
|
||||||
|
calculatedFvPatchScalarField(ptf, p, iF, mapper),
|
||||||
|
method_(ptf.method_),
|
||||||
|
dict_(ptf.dict_),
|
||||||
|
absorptionEmission_(NULL),
|
||||||
|
transmissivity_(NULL)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::radiation::boundaryRadiationPropertiesFvPatchField::
|
||||||
|
boundaryRadiationPropertiesFvPatchField
|
||||||
|
(
|
||||||
|
const boundaryRadiationPropertiesFvPatchField& ptf
|
||||||
|
)
|
||||||
|
:
|
||||||
|
calculatedFvPatchScalarField(ptf),
|
||||||
|
method_(ptf.method_),
|
||||||
|
dict_(ptf.dict_),
|
||||||
|
absorptionEmission_(NULL),
|
||||||
|
transmissivity_(NULL)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::radiation::boundaryRadiationPropertiesFvPatchField::
|
||||||
|
boundaryRadiationPropertiesFvPatchField
|
||||||
|
(
|
||||||
|
const boundaryRadiationPropertiesFvPatchField& ptf,
|
||||||
|
const DimensionedField<scalar, volMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
calculatedFvPatchScalarField(ptf, iF),
|
||||||
|
method_(ptf.method_),
|
||||||
|
dict_(ptf.dict_),
|
||||||
|
absorptionEmission_(NULL),
|
||||||
|
transmissivity_(NULL)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
const Foam::radiation::absorptionEmissionModel&
|
||||||
|
Foam::radiation::boundaryRadiationPropertiesFvPatchField::
|
||||||
|
absorptionEmission() const
|
||||||
|
{
|
||||||
|
return absorptionEmission_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const Foam::radiation::transmissivityModel&
|
||||||
|
Foam::radiation::boundaryRadiationPropertiesFvPatchField::
|
||||||
|
transmissiveModel() const
|
||||||
|
{
|
||||||
|
return transmissivity_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::scalarField> Foam::radiation::
|
||||||
|
boundaryRadiationPropertiesFvPatchField::
|
||||||
|
emissivity(const label bandI) const
|
||||||
|
{
|
||||||
|
switch (method_)
|
||||||
|
{
|
||||||
|
case SOLIDRADIATION:
|
||||||
|
{
|
||||||
|
const fvMesh& nbrMesh = nbrRegion();
|
||||||
|
|
||||||
|
const radiation::radiationModel& radiation =
|
||||||
|
nbrMesh.lookupObject<radiation::radiationModel>
|
||||||
|
(
|
||||||
|
"radiationProperties"
|
||||||
|
);
|
||||||
|
|
||||||
|
scalarField emissivity
|
||||||
|
(
|
||||||
|
radiation.absorptionEmission().e(bandI)().boundaryField()
|
||||||
|
[
|
||||||
|
nbrPatchIndex()
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
const mappedPatchBase& mpp =
|
||||||
|
refCast<const mappedPatchBase>(patch().patch());
|
||||||
|
|
||||||
|
mpp.distribute(emissivity);
|
||||||
|
|
||||||
|
const tmp<scalarField> te(new scalarField(emissivity));
|
||||||
|
|
||||||
|
return te;
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LOOKUP:
|
||||||
|
{
|
||||||
|
tmp<scalarField> e
|
||||||
|
(
|
||||||
|
new scalarField("emissivity", dict_, patch().size())
|
||||||
|
);
|
||||||
|
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
|
||||||
|
case MODEL:
|
||||||
|
{
|
||||||
|
const label index = patch().index();
|
||||||
|
|
||||||
|
tmp<scalarField> e
|
||||||
|
(
|
||||||
|
new scalarField
|
||||||
|
(
|
||||||
|
absorptionEmission_->e(bandI)().boundaryField()[index]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< "Please set 'mode' to one of " << methodTypeNames_.toc()
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return scalarField(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::scalarField> Foam::radiation::
|
||||||
|
boundaryRadiationPropertiesFvPatchField::absorptivity
|
||||||
|
(
|
||||||
|
const label bandI
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
switch (method_)
|
||||||
|
{
|
||||||
|
case SOLIDRADIATION:
|
||||||
|
{
|
||||||
|
const fvMesh& nbrMesh = nbrRegion();
|
||||||
|
|
||||||
|
const radiation::radiationModel& radiation =
|
||||||
|
nbrMesh.lookupObject<radiation::radiationModel>
|
||||||
|
(
|
||||||
|
"radiationProperties"
|
||||||
|
);
|
||||||
|
|
||||||
|
scalarField absorp
|
||||||
|
(
|
||||||
|
radiation.absorptionEmission().a(bandI)().boundaryField()
|
||||||
|
[
|
||||||
|
nbrPatchIndex()
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
const mappedPatchBase& mpp =
|
||||||
|
refCast<const mappedPatchBase>(patch().patch());
|
||||||
|
|
||||||
|
mpp.distribute(absorp);
|
||||||
|
|
||||||
|
const tmp<scalarField> ta(new scalarField(absorp));
|
||||||
|
|
||||||
|
return ta;
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MODEL:
|
||||||
|
{
|
||||||
|
const label index = patch().index();
|
||||||
|
tmp<scalarField> a
|
||||||
|
(
|
||||||
|
new scalarField
|
||||||
|
(
|
||||||
|
absorptionEmission_->a(bandI)().boundaryField()[index]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
case LOOKUP:
|
||||||
|
{
|
||||||
|
tmp<scalarField> a
|
||||||
|
(
|
||||||
|
new scalarField("absorptivity", dict_, patch().size())
|
||||||
|
);
|
||||||
|
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< "Unimplemented method " << method_ << endl
|
||||||
|
<< "Please set 'mode' to one of "
|
||||||
|
<< methodTypeNames_.toc()
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return scalarField(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::scalarField> Foam::radiation::
|
||||||
|
boundaryRadiationPropertiesFvPatchField::
|
||||||
|
transmissivity(const label bandI) const
|
||||||
|
{
|
||||||
|
switch (method_)
|
||||||
|
{
|
||||||
|
case SOLIDRADIATION:
|
||||||
|
{
|
||||||
|
const fvMesh& nbrMesh = nbrRegion();
|
||||||
|
|
||||||
|
const radiation::radiationModel& radiation =
|
||||||
|
nbrMesh.lookupObject<radiation::radiationModel>
|
||||||
|
(
|
||||||
|
"radiationProperties"
|
||||||
|
);
|
||||||
|
|
||||||
|
scalarField trans
|
||||||
|
(
|
||||||
|
radiation.transmissivity().tauEff(bandI)().boundaryField()
|
||||||
|
[
|
||||||
|
nbrPatchIndex()
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
const mappedPatchBase& mpp =
|
||||||
|
refCast<const mappedPatchBase>(patch().patch());
|
||||||
|
|
||||||
|
mpp.distribute(trans);
|
||||||
|
|
||||||
|
const tmp<scalarField> tt(new scalarField(trans));
|
||||||
|
|
||||||
|
return tt;
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MODEL:
|
||||||
|
{
|
||||||
|
const label index = patch().index();
|
||||||
|
tmp<scalarField> tau
|
||||||
|
(
|
||||||
|
new scalarField
|
||||||
|
(
|
||||||
|
transmissivity_->tauEff(bandI)().boundaryField()[index]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return tau;
|
||||||
|
}
|
||||||
|
|
||||||
|
case LOOKUP:
|
||||||
|
{
|
||||||
|
tmp<scalarField> tau
|
||||||
|
(
|
||||||
|
new scalarField
|
||||||
|
(
|
||||||
|
"transmissivity", dict_, patch().size()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return tau;
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< "Unimplemented method " << method_ << endl
|
||||||
|
<< "Please set 'mode' to one of "
|
||||||
|
<< methodTypeNames_.toc()
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return scalarField(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::scalarField> Foam::radiation::
|
||||||
|
boundaryRadiationPropertiesFvPatchField::
|
||||||
|
reflectivity(const label bandI) const
|
||||||
|
{
|
||||||
|
const tmp<scalarField> tt = transmissivity(bandI);
|
||||||
|
const tmp<scalarField> ta = absorptivity(bandI);
|
||||||
|
|
||||||
|
return (1.0 - tt - ta);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::radiation::boundaryRadiationPropertiesFvPatchField::
|
||||||
|
write(Ostream& os) const
|
||||||
|
{
|
||||||
|
calculatedFvPatchScalarField::write(os);
|
||||||
|
|
||||||
|
os.writeKeyword("mode") << methodTypeNames_[method_]
|
||||||
|
<< token::END_STATEMENT << nl;
|
||||||
|
|
||||||
|
switch (method_)
|
||||||
|
{
|
||||||
|
case MODEL:
|
||||||
|
{
|
||||||
|
word modelType
|
||||||
|
(
|
||||||
|
word(dict_.lookup("absorptionEmissionModel"))
|
||||||
|
);
|
||||||
|
|
||||||
|
os.writeKeyword("absorptionEmissionModel") << modelType
|
||||||
|
<< token::END_STATEMENT << nl;
|
||||||
|
|
||||||
|
word modelCoeffs(modelType + word("Coeffs"));
|
||||||
|
os.writeKeyword(modelCoeffs);
|
||||||
|
|
||||||
|
dict_.subDict(modelCoeffs).write(os);
|
||||||
|
|
||||||
|
modelType = word(dict_.lookup("transmissivityModel"));
|
||||||
|
|
||||||
|
os.writeKeyword("transmissivityModel") << modelType
|
||||||
|
<< token::END_STATEMENT << nl;
|
||||||
|
|
||||||
|
modelCoeffs = modelType + word("Coeffs");
|
||||||
|
|
||||||
|
os.writeKeyword(modelCoeffs);
|
||||||
|
|
||||||
|
dict_.subDict(modelCoeffs).write(os);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case LOOKUP:
|
||||||
|
{
|
||||||
|
const scalarField emissivity("emissivity", dict_, patch().size());
|
||||||
|
emissivity.writeEntry("emissivity", os);
|
||||||
|
|
||||||
|
const scalarField absorptivity
|
||||||
|
(
|
||||||
|
"absorptivity", dict_, patch().size()
|
||||||
|
);
|
||||||
|
absorptivity.writeEntry("absorptivity", os);
|
||||||
|
|
||||||
|
const scalarField transmissivity
|
||||||
|
(
|
||||||
|
"transmissivity", dict_, patch().size()
|
||||||
|
);
|
||||||
|
transmissivity.writeEntry("transmissivity", os);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case SOLIDRADIATION:
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace radiation
|
||||||
|
{
|
||||||
|
makePatchTypeField
|
||||||
|
(
|
||||||
|
fvPatchScalarField,
|
||||||
|
boundaryRadiationPropertiesFvPatchField
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,212 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2015 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 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::boundaryRadiationPropertiesFvPatchField
|
||||||
|
|
||||||
|
Description
|
||||||
|
Common functions to emissivity. It gets supplied from lookup into a
|
||||||
|
dictionary or calculated by the solidThermo:
|
||||||
|
|
||||||
|
- 'lookup' : lookup volScalarField with name
|
||||||
|
- 'solidThermo' : use solidThermo
|
||||||
|
- 'model' : use a model
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
boundaryRadiationPropertiesFvPatchField.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef boundaryRadiationPropertiesFvPatchField_H
|
||||||
|
#define boundaryRadiationPropertiesFvPatchField_H
|
||||||
|
|
||||||
|
#include "scalarField.H"
|
||||||
|
#include "NamedEnum.H"
|
||||||
|
#include "fvPatch.H"
|
||||||
|
#include "calculatedFvPatchFields.H"
|
||||||
|
#include "transmissivityModel.H"
|
||||||
|
#include "absorptionEmissionModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace radiation
|
||||||
|
{
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class boundaryRadiationPropertiesFvPatchField Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class boundaryRadiationPropertiesFvPatchField
|
||||||
|
:
|
||||||
|
public calculatedFvPatchScalarField
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
// - Type of look up
|
||||||
|
enum methodType
|
||||||
|
{
|
||||||
|
SOLIDRADIATION,
|
||||||
|
LOOKUP,
|
||||||
|
MODEL
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
static const NamedEnum<methodType, 3> methodTypeNames_;
|
||||||
|
|
||||||
|
//- How to get property
|
||||||
|
const methodType method_;
|
||||||
|
|
||||||
|
//- Dictionary
|
||||||
|
const dictionary dict_;
|
||||||
|
|
||||||
|
//- Absorption/emission model
|
||||||
|
autoPtr<absorptionEmissionModel> absorptionEmission_;
|
||||||
|
|
||||||
|
//- transmissivity model
|
||||||
|
autoPtr<transmissivityModel> transmissivity_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private functions
|
||||||
|
|
||||||
|
//- Return nbr patch index
|
||||||
|
label nbrPatchIndex() const;
|
||||||
|
|
||||||
|
//- Return nbr mesh
|
||||||
|
const fvMesh& nbrRegion() const;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("boundaryRadiation");
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
|
||||||
|
//- Construct from patch and internal field
|
||||||
|
boundaryRadiationPropertiesFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch&,
|
||||||
|
const DimensionedField<scalar, volMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct from patch, internal field and dictionary
|
||||||
|
boundaryRadiationPropertiesFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch&,
|
||||||
|
const DimensionedField<scalar, volMesh>&,
|
||||||
|
const dictionary&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct by mapping given a
|
||||||
|
// greyDiffusiveViewFactorFixedValueFvPatchScalarField onto a new patch
|
||||||
|
boundaryRadiationPropertiesFvPatchField
|
||||||
|
(
|
||||||
|
const boundaryRadiationPropertiesFvPatchField&,
|
||||||
|
const fvPatch&,
|
||||||
|
const DimensionedField<scalar, volMesh>&,
|
||||||
|
const fvPatchFieldMapper&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct as copy
|
||||||
|
boundaryRadiationPropertiesFvPatchField
|
||||||
|
(
|
||||||
|
const boundaryRadiationPropertiesFvPatchField&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct as copy setting internal field reference
|
||||||
|
boundaryRadiationPropertiesFvPatchField
|
||||||
|
(
|
||||||
|
const boundaryRadiationPropertiesFvPatchField&,
|
||||||
|
const DimensionedField<scalar, volMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct and return a clone
|
||||||
|
virtual tmp<fvPatchScalarField> clone() const
|
||||||
|
{
|
||||||
|
return tmp<fvPatchScalarField>
|
||||||
|
(
|
||||||
|
new boundaryRadiationPropertiesFvPatchField(*this)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Construct and return a clone setting internal field reference
|
||||||
|
virtual tmp<fvPatchScalarField> clone
|
||||||
|
(
|
||||||
|
const DimensionedField<scalar, volMesh>& iF
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return tmp<fvPatchScalarField>
|
||||||
|
(
|
||||||
|
new boundaryRadiationPropertiesFvPatchField(*this, iF)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
|
||||||
|
//- Method to obtain properties
|
||||||
|
word method() const
|
||||||
|
{
|
||||||
|
return methodTypeNames_[method_];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Return absorptionEmissionModel
|
||||||
|
const absorptionEmissionModel& absorptionEmission() const;
|
||||||
|
|
||||||
|
//- Return transmissivityModel
|
||||||
|
const transmissivityModel& transmissiveModel() const;
|
||||||
|
|
||||||
|
//- Calculate corresponding emissivity field for bandI
|
||||||
|
tmp<scalarField> emissivity(const label bandI = 0) const;
|
||||||
|
|
||||||
|
//- Calculate corresponding absorptivity field for bandI
|
||||||
|
tmp<scalarField> absorptivity(const label bandI = 0) const;
|
||||||
|
|
||||||
|
//- Calculate corresponding transmissivity field for bandI
|
||||||
|
tmp<scalarField> transmissivity(const label bandI = 0) const;
|
||||||
|
|
||||||
|
//- Calculate corresponding reflectivity field
|
||||||
|
tmp<scalarField> reflectivity(const label bandI = 0) const;
|
||||||
|
|
||||||
|
//- Write
|
||||||
|
virtual void write(Ostream&) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
} // End namespace radiation
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -27,6 +27,7 @@ License
|
|||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "fvPatchFieldMapper.H"
|
#include "fvPatchFieldMapper.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
|
#include "boundaryRadiationProperties.H"
|
||||||
|
|
||||||
#include "fvDOM.H"
|
#include "fvDOM.H"
|
||||||
#include "constants.H"
|
#include "constants.H"
|
||||||
@ -44,8 +45,8 @@ greyDiffusiveRadiationMixedFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchScalarField(p, iF),
|
mixedFvPatchScalarField(p, iF),
|
||||||
radiationCoupledBase(p, "undefined", scalarField::null()),
|
TName_("T"),
|
||||||
TName_("T")
|
solarLoad_(false)
|
||||||
{
|
{
|
||||||
refValue() = 0.0;
|
refValue() = 0.0;
|
||||||
refGrad() = 0.0;
|
refGrad() = 0.0;
|
||||||
@ -63,13 +64,8 @@ greyDiffusiveRadiationMixedFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
||||||
radiationCoupledBase
|
TName_(ptf.TName_),
|
||||||
(
|
solarLoad_(ptf.solarLoad_)
|
||||||
p,
|
|
||||||
ptf.emissivityMethod(),
|
|
||||||
ptf.emissivity_
|
|
||||||
),
|
|
||||||
TName_(ptf.TName_)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -82,8 +78,8 @@ greyDiffusiveRadiationMixedFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchScalarField(p, iF),
|
mixedFvPatchScalarField(p, iF),
|
||||||
radiationCoupledBase(p, dict),
|
TName_(dict.lookupOrDefault<word>("T", "T")),
|
||||||
TName_(dict.lookupOrDefault<word>("T", "T"))
|
solarLoad_(dict.lookupOrDefault<bool>("solarLoad", false))
|
||||||
{
|
{
|
||||||
if (dict.found("refValue"))
|
if (dict.found("refValue"))
|
||||||
{
|
{
|
||||||
@ -113,13 +109,8 @@ greyDiffusiveRadiationMixedFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchScalarField(ptf),
|
mixedFvPatchScalarField(ptf),
|
||||||
radiationCoupledBase
|
TName_(ptf.TName_),
|
||||||
(
|
solarLoad_(ptf.solarLoad_)
|
||||||
ptf.patch(),
|
|
||||||
ptf.emissivityMethod(),
|
|
||||||
ptf.emissivity_
|
|
||||||
),
|
|
||||||
TName_(ptf.TName_)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -131,13 +122,8 @@ greyDiffusiveRadiationMixedFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchScalarField(ptf, iF),
|
mixedFvPatchScalarField(ptf, iF),
|
||||||
radiationCoupledBase
|
TName_(ptf.TName_),
|
||||||
(
|
solarLoad_(ptf.solarLoad_)
|
||||||
ptf.patch(),
|
|
||||||
ptf.emissivityMethod(),
|
|
||||||
ptf.emissivity_
|
|
||||||
),
|
|
||||||
TName_(ptf.TName_)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -178,6 +164,7 @@ updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
scalarField& Iw = *this;
|
scalarField& Iw = *this;
|
||||||
|
|
||||||
const vectorField n(patch().nf());
|
const vectorField n(patch().nf());
|
||||||
|
|
||||||
radiativeIntensityRay& ray =
|
radiativeIntensityRay& ray =
|
||||||
@ -187,7 +174,15 @@ updateCoeffs()
|
|||||||
|
|
||||||
ray.Qr().boundaryField()[patchI] += Iw*nAve;
|
ray.Qr().boundaryField()[patchI] += Iw*nAve;
|
||||||
|
|
||||||
const scalarField temissivity = emissivity();
|
const boundaryRadiationProperties& boundaryRadiation =
|
||||||
|
boundaryRadiationProperties::New(dimensionedInternalField().mesh());
|
||||||
|
|
||||||
|
const tmp<scalarField> temissivity
|
||||||
|
(
|
||||||
|
boundaryRadiation.emissivity(patch().index())
|
||||||
|
);
|
||||||
|
|
||||||
|
const scalarField& emissivity = temissivity();
|
||||||
|
|
||||||
scalarField& Qem = ray.Qem().boundaryField()[patchI];
|
scalarField& Qem = ray.Qem().boundaryField()[patchI];
|
||||||
scalarField& Qin = ray.Qin().boundaryField()[patchI];
|
scalarField& Qin = ray.Qin().boundaryField()[patchI];
|
||||||
@ -203,6 +198,14 @@ updateCoeffs()
|
|||||||
Ir += dom.IRay(rayI).Qin().boundaryField()[patchI];
|
Ir += dom.IRay(rayI).Qin().boundaryField()[patchI];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (solarLoad_)
|
||||||
|
{
|
||||||
|
Ir += patch().lookupPatchField<volScalarField,scalar>
|
||||||
|
(
|
||||||
|
radiation.externalRadHeatFieldName_
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
forAll(Iw, faceI)
|
forAll(Iw, faceI)
|
||||||
{
|
{
|
||||||
if ((-n[faceI] & myRayId) > 0.0)
|
if ((-n[faceI] & myRayId) > 0.0)
|
||||||
@ -212,8 +215,8 @@ updateCoeffs()
|
|||||||
valueFraction()[faceI] = 1.0;
|
valueFraction()[faceI] = 1.0;
|
||||||
refValue()[faceI] =
|
refValue()[faceI] =
|
||||||
(
|
(
|
||||||
Ir[faceI]*(scalar(1.0) - temissivity[faceI])
|
Ir[faceI]*(scalar(1.0) - emissivity[faceI])
|
||||||
+ temissivity[faceI]*physicoChemical::sigma.value()
|
+ emissivity[faceI]*physicoChemical::sigma.value()
|
||||||
* pow4(Tp[faceI])
|
* pow4(Tp[faceI])
|
||||||
)/pi;
|
)/pi;
|
||||||
|
|
||||||
@ -245,8 +248,8 @@ void Foam::radiation::greyDiffusiveRadiationMixedFvPatchScalarField::write
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
mixedFvPatchScalarField::write(os);
|
mixedFvPatchScalarField::write(os);
|
||||||
radiationCoupledBase::write(os);
|
|
||||||
writeEntryIfDifferent<word>(os, "T", "T", TName_);
|
writeEntryIfDifferent<word>(os, "T", "T", TName_);
|
||||||
|
os.writeKeyword("solarLoad") << solarLoad_ << token::END_STATEMENT << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,6 @@ Description
|
|||||||
\table
|
\table
|
||||||
Property | Description | Required | Default value
|
Property | Description | Required | Default value
|
||||||
T | temperature field name | no | T
|
T | temperature field name | no | T
|
||||||
emissivityMode | emissivity mode: solidRadiation or lookup | yes |
|
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
Example of the boundary condition specification:
|
Example of the boundary condition specification:
|
||||||
@ -47,15 +46,14 @@ Description
|
|||||||
{
|
{
|
||||||
type greyDiffusiveRadiation;
|
type greyDiffusiveRadiation;
|
||||||
T T;
|
T T;
|
||||||
emissivityMode solidRadiation;
|
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
SeeAlso
|
SeeAlso
|
||||||
Foam::radiationCoupledBase
|
|
||||||
Foam::radiation::radiationModel
|
Foam::radiation::radiationModel
|
||||||
Foam::radiation::fvDOM
|
Foam::radiation::fvDOM
|
||||||
|
Foam::radiationCoupledBase
|
||||||
Foam::mixedFvPatchField
|
Foam::mixedFvPatchField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
@ -67,7 +65,6 @@ SourceFiles
|
|||||||
#define greyDiffusiveRadiationMixedFvPatchScalarField_H
|
#define greyDiffusiveRadiationMixedFvPatchScalarField_H
|
||||||
|
|
||||||
#include "mixedFvPatchFields.H"
|
#include "mixedFvPatchFields.H"
|
||||||
#include "radiationCoupledBase.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -81,14 +78,16 @@ namespace radiation
|
|||||||
|
|
||||||
class greyDiffusiveRadiationMixedFvPatchScalarField
|
class greyDiffusiveRadiationMixedFvPatchScalarField
|
||||||
:
|
:
|
||||||
public mixedFvPatchScalarField,
|
public mixedFvPatchScalarField
|
||||||
public radiationCoupledBase
|
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Name of temperature field
|
//- Name of temperature field
|
||||||
word TName_;
|
word TName_;
|
||||||
|
|
||||||
|
//- Activate solar load
|
||||||
|
bool solarLoad_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -191,8 +190,8 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace radiation
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ License
|
|||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "fvPatchFieldMapper.H"
|
#include "fvPatchFieldMapper.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
|
#include "radiationModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -39,8 +39,8 @@ greyDiffusiveViewFactorFixedValueFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchScalarField(p, iF),
|
fixedValueFvPatchScalarField(p, iF),
|
||||||
radiationCoupledBase(patch(), "undefined", scalarField::null()),
|
Qro_(),
|
||||||
Qro_(p.size(), 0.0)
|
solarLoad_(false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -54,13 +54,8 @@ greyDiffusiveViewFactorFixedValueFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
||||||
radiationCoupledBase
|
Qro_(ptf.Qro_, mapper),
|
||||||
(
|
solarLoad_(ptf.solarLoad_)
|
||||||
patch(),
|
|
||||||
ptf.emissivityMethod(),
|
|
||||||
ptf.emissivity_
|
|
||||||
),
|
|
||||||
Qro_(ptf.Qro_)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -73,8 +68,8 @@ greyDiffusiveViewFactorFixedValueFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchScalarField(p, iF),
|
fixedValueFvPatchScalarField(p, iF),
|
||||||
radiationCoupledBase(p, dict),
|
Qro_("Qro", dict, p.size()),
|
||||||
Qro_("Qro", dict, p.size())
|
solarLoad_(dict.lookupOrDefault<bool>("solarLoad", false))
|
||||||
{
|
{
|
||||||
if (dict.found("value"))
|
if (dict.found("value"))
|
||||||
{
|
{
|
||||||
@ -98,13 +93,8 @@ greyDiffusiveViewFactorFixedValueFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchScalarField(ptf),
|
fixedValueFvPatchScalarField(ptf),
|
||||||
radiationCoupledBase
|
Qro_(ptf.Qro_),
|
||||||
(
|
solarLoad_(ptf.solarLoad_)
|
||||||
ptf.patch(),
|
|
||||||
ptf.emissivityMethod(),
|
|
||||||
ptf.emissivity_
|
|
||||||
),
|
|
||||||
Qro_(ptf.Qro_)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -116,13 +106,8 @@ greyDiffusiveViewFactorFixedValueFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchScalarField(ptf, iF),
|
fixedValueFvPatchScalarField(ptf, iF),
|
||||||
radiationCoupledBase
|
Qro_(ptf.Qro_),
|
||||||
(
|
solarLoad_(ptf.solarLoad_)
|
||||||
ptf.patch(),
|
|
||||||
ptf.emissivityMethod(),
|
|
||||||
ptf.emissivity_
|
|
||||||
),
|
|
||||||
Qro_(ptf.Qro_)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -136,6 +121,7 @@ updateCoeffs()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Do nothing
|
// Do nothing
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
@ -152,8 +138,26 @@ updateCoeffs()
|
|||||||
<< " avg:" << gAverage(*this)
|
<< " avg:" << gAverage(*this)
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fixedValueFvPatchScalarField::updateCoeffs();
|
|
||||||
|
Foam::tmp<Foam::scalarField> Foam::radiation::
|
||||||
|
greyDiffusiveViewFactorFixedValueFvPatchScalarField::Qro() const
|
||||||
|
{
|
||||||
|
tmp<scalarField> tQrt(new scalarField(Qro_));
|
||||||
|
|
||||||
|
if (solarLoad_)
|
||||||
|
{
|
||||||
|
const radiationModel& radiation =
|
||||||
|
db().lookupObject<radiationModel>("radiationProperties");
|
||||||
|
|
||||||
|
tQrt() += patch().lookupPatchField<volScalarField,scalar>
|
||||||
|
(
|
||||||
|
radiation.externalRadHeatFieldName_
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return tQrt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -164,8 +168,8 @@ write
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
fixedValueFvPatchScalarField::write(os);
|
fixedValueFvPatchScalarField::write(os);
|
||||||
radiationCoupledBase::write(os);
|
|
||||||
Qro_.writeEntry("Qro", os);
|
Qro_.writeEntry("Qro", os);
|
||||||
|
os.writeKeyword("solarLoad") << solarLoad_ << token::END_STATEMENT << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,6 @@ Description
|
|||||||
\table
|
\table
|
||||||
Property | Description | Required | Default value
|
Property | Description | Required | Default value
|
||||||
Qro | external radiative heat flux | yes |
|
Qro | external radiative heat flux | yes |
|
||||||
emissivityMode | emissivity mode: solidRadiation or lookup | yes |
|
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
Example of the boundary condition specification:
|
Example of the boundary condition specification:
|
||||||
@ -45,15 +44,14 @@ Description
|
|||||||
{
|
{
|
||||||
type greyDiffusiveRadiationViewFactor;
|
type greyDiffusiveRadiationViewFactor;
|
||||||
Qro uniform 0;
|
Qro uniform 0;
|
||||||
emissivityMode solidRadiation;
|
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
SeeAlso
|
SeeAlso
|
||||||
Foam::radiationCoupledBase
|
|
||||||
Foam::radiation::radiationModel
|
Foam::radiation::radiationModel
|
||||||
Foam::radiation::viewFactor
|
Foam::radiation::viewFactor
|
||||||
|
Foam::radiationCoupledBase
|
||||||
Foam::fixedValueFvPatchField
|
Foam::fixedValueFvPatchField
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
@ -64,7 +62,6 @@ SourceFiles
|
|||||||
#ifndef greyDiffusiveViewFactorFixedValueFvPatchScalarField_H
|
#ifndef greyDiffusiveViewFactorFixedValueFvPatchScalarField_H
|
||||||
#define greyDiffusiveViewFactorFixedValueFvPatchScalarField_H
|
#define greyDiffusiveViewFactorFixedValueFvPatchScalarField_H
|
||||||
|
|
||||||
#include "radiationCoupledBase.H"
|
|
||||||
#include "fixedValueFvPatchFields.H"
|
#include "fixedValueFvPatchFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -73,21 +70,22 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
namespace radiation
|
namespace radiation
|
||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class greyDiffusiveViewFactorFixedValueFvPatchScalarField declaration
|
Class greyDiffusiveViewFactorFixedValueFvPatchScalarField declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class greyDiffusiveViewFactorFixedValueFvPatchScalarField
|
class greyDiffusiveViewFactorFixedValueFvPatchScalarField
|
||||||
:
|
:
|
||||||
public fixedValueFvPatchScalarField,
|
public fixedValueFvPatchScalarField
|
||||||
public radiationCoupledBase
|
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- External radiative heat flux
|
//- External radiative heat flux
|
||||||
scalarField Qro_;
|
scalarField Qro_;
|
||||||
|
|
||||||
|
//- Activate solar load
|
||||||
|
bool solarLoad_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -165,11 +163,8 @@ public:
|
|||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
//- Return external radiative heat flux
|
//- Return external + solar load radiative heat flux
|
||||||
const scalarList& Qro()
|
tmp<scalarField> Qro() const;
|
||||||
{
|
|
||||||
return Qro_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
@ -187,8 +182,8 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace radiation
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -1,236 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2015 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 "radiationCoupledBase.H"
|
|
||||||
#include "volFields.H"
|
|
||||||
#include "mappedPatchBase.H"
|
|
||||||
#include "fvPatchFieldMapper.H"
|
|
||||||
#include "radiationModel.H"
|
|
||||||
#include "absorptionEmissionModel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(radiationCoupledBase, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
template<>
|
|
||||||
const char* Foam::NamedEnum
|
|
||||||
<
|
|
||||||
Foam::radiationCoupledBase::emissivityMethodType,
|
|
||||||
2
|
|
||||||
>::names[] =
|
|
||||||
{
|
|
||||||
"solidRadiation",
|
|
||||||
"lookup"
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const Foam::NamedEnum<Foam::radiationCoupledBase::emissivityMethodType, 2>
|
|
||||||
Foam::radiationCoupledBase::emissivityMethodTypeNames_;
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::radiationCoupledBase::radiationCoupledBase
|
|
||||||
(
|
|
||||||
const fvPatch& patch,
|
|
||||||
const word& calculationType,
|
|
||||||
const scalarField& emissivity
|
|
||||||
)
|
|
||||||
:
|
|
||||||
patch_(patch),
|
|
||||||
method_(emissivityMethodTypeNames_[calculationType]),
|
|
||||||
emissivity_(emissivity)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::radiationCoupledBase::radiationCoupledBase
|
|
||||||
(
|
|
||||||
const fvPatch& patch,
|
|
||||||
const word& calculationType,
|
|
||||||
const scalarField& emissivity,
|
|
||||||
const fvPatchFieldMapper& mapper
|
|
||||||
)
|
|
||||||
:
|
|
||||||
patch_(patch),
|
|
||||||
method_(emissivityMethodTypeNames_[calculationType]),
|
|
||||||
emissivity_(emissivity, mapper)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::radiationCoupledBase::radiationCoupledBase
|
|
||||||
(
|
|
||||||
const fvPatch& patch,
|
|
||||||
const dictionary& dict
|
|
||||||
)
|
|
||||||
:
|
|
||||||
patch_(patch),
|
|
||||||
method_(emissivityMethodTypeNames_.read(dict.lookup("emissivityMode")))
|
|
||||||
{
|
|
||||||
switch (method_)
|
|
||||||
{
|
|
||||||
case SOLIDRADIATION:
|
|
||||||
{
|
|
||||||
if (!isA<mappedPatchBase>(patch_.patch()))
|
|
||||||
{
|
|
||||||
FatalIOErrorInFunction
|
|
||||||
(
|
|
||||||
dict
|
|
||||||
) << "\n patch type '" << patch_.type()
|
|
||||||
<< "' not type '" << mappedPatchBase::typeName << "'"
|
|
||||||
<< "\n for patch " << patch_.name()
|
|
||||||
<< exit(FatalIOError);
|
|
||||||
}
|
|
||||||
|
|
||||||
emissivity_ = scalarField(patch_.size(), 0.0);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LOOKUP:
|
|
||||||
{
|
|
||||||
if (!dict.found("emissivity"))
|
|
||||||
{
|
|
||||||
FatalIOErrorInFunction
|
|
||||||
(
|
|
||||||
dict
|
|
||||||
) << "\n emissivity key does not exist for patch "
|
|
||||||
<< patch_.name()
|
|
||||||
<< exit(FatalIOError);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
emissivity_ = scalarField("emissivity", dict, patch_.size());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::radiationCoupledBase::~radiationCoupledBase()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::scalarField Foam::radiationCoupledBase::emissivity() const
|
|
||||||
{
|
|
||||||
switch (method_)
|
|
||||||
{
|
|
||||||
case SOLIDRADIATION:
|
|
||||||
{
|
|
||||||
// Get the coupling information from the mappedPatchBase
|
|
||||||
const mappedPatchBase& mpp =
|
|
||||||
refCast<const mappedPatchBase>(patch_.patch());
|
|
||||||
|
|
||||||
const polyMesh& nbrMesh = mpp.sampleMesh();
|
|
||||||
|
|
||||||
const radiation::radiationModel& radiation =
|
|
||||||
nbrMesh.lookupObject<radiation::radiationModel>
|
|
||||||
(
|
|
||||||
"radiationProperties"
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
const fvMesh& nbrFvMesh = refCast<const fvMesh>(nbrMesh);
|
|
||||||
|
|
||||||
const fvPatch& nbrPatch =
|
|
||||||
nbrFvMesh.boundary()[mpp.samplePolyPatch().index()];
|
|
||||||
|
|
||||||
|
|
||||||
scalarField emissivity
|
|
||||||
(
|
|
||||||
radiation.absorptionEmission().e()().boundaryField()
|
|
||||||
[
|
|
||||||
nbrPatch.index()
|
|
||||||
]
|
|
||||||
);
|
|
||||||
mpp.distribute(emissivity);
|
|
||||||
|
|
||||||
return emissivity;
|
|
||||||
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LOOKUP:
|
|
||||||
{
|
|
||||||
// return local value
|
|
||||||
return emissivity_;
|
|
||||||
}
|
|
||||||
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
FatalErrorInFunction
|
|
||||||
<< "Unimplemented method " << method_ << endl
|
|
||||||
<< "Please set 'emissivity' to one of "
|
|
||||||
<< emissivityMethodTypeNames_.toc()
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return scalarField(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::radiationCoupledBase::autoMap
|
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
emissivity_.autoMap(m);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::radiationCoupledBase::rmap
|
|
||||||
(
|
|
||||||
const fvPatchScalarField& ptf,
|
|
||||||
const labelList& addr
|
|
||||||
)
|
|
||||||
{
|
|
||||||
const radiationCoupledBase& mrptf =
|
|
||||||
refCast<const radiationCoupledBase>(ptf);
|
|
||||||
|
|
||||||
emissivity_.rmap(mrptf.emissivity_, addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::radiationCoupledBase::write(Ostream& os) const
|
|
||||||
{
|
|
||||||
os.writeKeyword("emissivityMode") << emissivityMethodTypeNames_[method_]
|
|
||||||
<< token::END_STATEMENT << nl;
|
|
||||||
emissivity_.writeEntry("emissivity", os);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,172 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2015 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::radiationCoupledBase
|
|
||||||
|
|
||||||
Description
|
|
||||||
Common functions to emissivity. It gets supplied from lookup into a
|
|
||||||
dictionary or calculated by the solidThermo:
|
|
||||||
|
|
||||||
- 'lookup' : Read the patch emissivity field from the dictionary
|
|
||||||
- 'solidRadiation' : Use the emissivity field mapped from the adjacent solid
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
radiationCoupledBase.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef radiationCoupledBase_H
|
|
||||||
#define radiationCoupledBase_H
|
|
||||||
|
|
||||||
#include "scalarField.H"
|
|
||||||
#include "NamedEnum.H"
|
|
||||||
#include "fvPatch.H"
|
|
||||||
#include "fvPatchFieldMapper.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class radiationCoupledBase Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
class radiationCoupledBase
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Type of supplied emissivity
|
|
||||||
enum emissivityMethodType
|
|
||||||
{
|
|
||||||
SOLIDRADIATION,
|
|
||||||
LOOKUP
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
// Private data
|
|
||||||
|
|
||||||
static const NamedEnum<emissivityMethodType, 2>
|
|
||||||
emissivityMethodTypeNames_;
|
|
||||||
|
|
||||||
//- Underlying patch
|
|
||||||
const fvPatch& patch_;
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
// Protected data
|
|
||||||
|
|
||||||
//- How to get emissivity
|
|
||||||
const emissivityMethodType method_;
|
|
||||||
|
|
||||||
//- Emissivity
|
|
||||||
// Cached locally when is read from dictionary (lookup mode)
|
|
||||||
scalarField emissivity_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName("radiationCoupledBase");
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct from patch, emissivity mode and emissivity
|
|
||||||
radiationCoupledBase
|
|
||||||
(
|
|
||||||
const fvPatch& patch,
|
|
||||||
const word& calculationMethod,
|
|
||||||
const scalarField& emissivity
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct from patch, emissivity mode and emissivity and mapper
|
|
||||||
radiationCoupledBase
|
|
||||||
(
|
|
||||||
const fvPatch& patch,
|
|
||||||
const word& calculationMethod,
|
|
||||||
const scalarField& emissivity,
|
|
||||||
const fvPatchFieldMapper& mapper
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct from patch and dictionary
|
|
||||||
radiationCoupledBase
|
|
||||||
(
|
|
||||||
const fvPatch& patch,
|
|
||||||
const dictionary& dict
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
virtual ~radiationCoupledBase();
|
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
|
||||||
|
|
||||||
// Access
|
|
||||||
|
|
||||||
//- Method to obtain emissivity
|
|
||||||
word emissivityMethod() const
|
|
||||||
{
|
|
||||||
return emissivityMethodTypeNames_[method_];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//- Calculate corresponding emissivity field
|
|
||||||
scalarField emissivity() const;
|
|
||||||
|
|
||||||
|
|
||||||
// Mapping functions
|
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
|
||||||
virtual void autoMap
|
|
||||||
(
|
|
||||||
const fvPatchFieldMapper&
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
|
||||||
virtual void rmap
|
|
||||||
(
|
|
||||||
const fvPatchScalarField&,
|
|
||||||
const labelList&
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Write
|
|
||||||
void write(Ostream&) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -31,6 +31,7 @@ License
|
|||||||
#include "fvDOM.H"
|
#include "fvDOM.H"
|
||||||
#include "wideBandAbsorptionEmission.H"
|
#include "wideBandAbsorptionEmission.H"
|
||||||
#include "constants.H"
|
#include "constants.H"
|
||||||
|
#include "boundaryRadiationProperties.H"
|
||||||
|
|
||||||
using namespace Foam::constant;
|
using namespace Foam::constant;
|
||||||
using namespace Foam::constant::mathematical;
|
using namespace Foam::constant::mathematical;
|
||||||
@ -44,9 +45,7 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField
|
|||||||
const DimensionedField<scalar, volMesh>& iF
|
const DimensionedField<scalar, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchScalarField(p, iF),
|
mixedFvPatchScalarField(p, iF)
|
||||||
radiationCoupledBase(p, "undefined", scalarField::null()),
|
|
||||||
TName_("T")
|
|
||||||
{
|
{
|
||||||
refValue() = 0.0;
|
refValue() = 0.0;
|
||||||
refGrad() = 0.0;
|
refGrad() = 0.0;
|
||||||
@ -63,14 +62,7 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField
|
|||||||
const fvPatchFieldMapper& mapper
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
mixedFvPatchScalarField(ptf, p, iF, mapper)
|
||||||
radiationCoupledBase
|
|
||||||
(
|
|
||||||
p,
|
|
||||||
ptf.emissivityMethod(),
|
|
||||||
ptf.emissivity_
|
|
||||||
),
|
|
||||||
TName_(ptf.TName_)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -82,9 +74,7 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchScalarField(p, iF),
|
mixedFvPatchScalarField(p, iF)
|
||||||
radiationCoupledBase(p, dict),
|
|
||||||
TName_(dict.lookupOrDefault<word>("T", "T"))
|
|
||||||
{
|
{
|
||||||
if (dict.found("value"))
|
if (dict.found("value"))
|
||||||
{
|
{
|
||||||
@ -98,12 +88,9 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const scalarField& Tp =
|
refValue() = 0.0;
|
||||||
patch().lookupPatchField<volScalarField, scalar>(TName_);
|
|
||||||
|
|
||||||
refValue() =
|
|
||||||
4.0*physicoChemical::sigma.value()*pow4(Tp)*emissivity()/pi;
|
|
||||||
refGrad() = 0.0;
|
refGrad() = 0.0;
|
||||||
|
valueFraction() = 1.0;
|
||||||
|
|
||||||
fvPatchScalarField::operator=(refValue());
|
fvPatchScalarField::operator=(refValue());
|
||||||
}
|
}
|
||||||
@ -116,14 +103,7 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField
|
|||||||
const wideBandDiffusiveRadiationMixedFvPatchScalarField& ptf
|
const wideBandDiffusiveRadiationMixedFvPatchScalarField& ptf
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchScalarField(ptf),
|
mixedFvPatchScalarField(ptf)
|
||||||
radiationCoupledBase
|
|
||||||
(
|
|
||||||
ptf.patch(),
|
|
||||||
ptf.emissivityMethod(),
|
|
||||||
ptf.emissivity_
|
|
||||||
),
|
|
||||||
TName_(ptf.TName_)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -134,14 +114,7 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField
|
|||||||
const DimensionedField<scalar, volMesh>& iF
|
const DimensionedField<scalar, volMesh>& iF
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
mixedFvPatchScalarField(ptf, iF),
|
mixedFvPatchScalarField(ptf, iF)
|
||||||
radiationCoupledBase
|
|
||||||
(
|
|
||||||
ptf.patch(),
|
|
||||||
ptf.emissivityMethod(),
|
|
||||||
ptf.emissivity_
|
|
||||||
),
|
|
||||||
TName_(ptf.TName_)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -193,7 +166,16 @@ updateCoeffs()
|
|||||||
dom.blackBody().bLambda(lambdaId).boundaryField()[patchI]
|
dom.blackBody().bLambda(lambdaId).boundaryField()[patchI]
|
||||||
);
|
);
|
||||||
|
|
||||||
scalarField temissivity = emissivity();
|
const boundaryRadiationProperties& boundaryRadiation =
|
||||||
|
boundaryRadiationProperties::New(dimensionedInternalField().mesh());
|
||||||
|
|
||||||
|
|
||||||
|
const tmp<scalarField> temissivity
|
||||||
|
(
|
||||||
|
boundaryRadiation.emissivity(patch().index(), lambdaId)
|
||||||
|
);
|
||||||
|
|
||||||
|
const scalarField& emissivity = temissivity();
|
||||||
|
|
||||||
scalarField& Qem = ray.Qem().boundaryField()[patchI];
|
scalarField& Qem = ray.Qem().boundaryField()[patchI];
|
||||||
scalarField& Qin = ray.Qin().boundaryField()[patchI];
|
scalarField& Qin = ray.Qin().boundaryField()[patchI];
|
||||||
@ -218,8 +200,8 @@ updateCoeffs()
|
|||||||
valueFraction()[faceI] = 1.0;
|
valueFraction()[faceI] = 1.0;
|
||||||
refValue()[faceI] =
|
refValue()[faceI] =
|
||||||
(
|
(
|
||||||
Ir[faceI]*(1.0 - temissivity[faceI])
|
Ir[faceI]*(1.0 - emissivity[faceI])
|
||||||
+ temissivity[faceI]*Eb[faceI]
|
+ emissivity[faceI]*Eb[faceI]
|
||||||
)/pi;
|
)/pi;
|
||||||
|
|
||||||
// Emmited heat flux from this ray direction
|
// Emmited heat flux from this ray direction
|
||||||
@ -250,8 +232,6 @@ void Foam::radiation::wideBandDiffusiveRadiationMixedFvPatchScalarField::write
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
mixedFvPatchScalarField::write(os);
|
mixedFvPatchScalarField::write(os);
|
||||||
radiationCoupledBase::write(os);
|
|
||||||
writeEntryIfDifferent<word>(os, "T", "T", TName_);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -60,7 +60,7 @@ SourceFiles
|
|||||||
#define wideBandDiffusiveRadiationMixedFvPatchScalarField_H
|
#define wideBandDiffusiveRadiationMixedFvPatchScalarField_H
|
||||||
|
|
||||||
#include "mixedFvPatchFields.H"
|
#include "mixedFvPatchFields.H"
|
||||||
#include "radiationCoupledBase.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -74,15 +74,8 @@ namespace radiation
|
|||||||
|
|
||||||
class wideBandDiffusiveRadiationMixedFvPatchScalarField
|
class wideBandDiffusiveRadiationMixedFvPatchScalarField
|
||||||
:
|
:
|
||||||
public mixedFvPatchScalarField,
|
public mixedFvPatchScalarField
|
||||||
public radiationCoupledBase
|
|
||||||
{
|
{
|
||||||
// Private data
|
|
||||||
|
|
||||||
//- Name of temperature field
|
|
||||||
word TName_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
@ -153,20 +146,6 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
// Access
|
|
||||||
|
|
||||||
//- Return the temperature field name
|
|
||||||
const word& TName() const
|
|
||||||
{
|
|
||||||
return TName_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return reference to the temperature field name to allow
|
|
||||||
// adjustment
|
|
||||||
word& TName()
|
|
||||||
{
|
|
||||||
return TName_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|||||||
@ -87,14 +87,6 @@ void Foam::radiation::fvDOM::initialise()
|
|||||||
// 2D
|
// 2D
|
||||||
else if (mesh_.nSolutionD() == 2)
|
else if (mesh_.nSolutionD() == 2)
|
||||||
{
|
{
|
||||||
// Currently 2D solution is limited to the x-y plane
|
|
||||||
if (mesh_.solutionD()[vector::Z] != -1)
|
|
||||||
{
|
|
||||||
FatalErrorInFunction
|
|
||||||
<< "Currently 2D solution is limited to the x-y plane"
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
|
|
||||||
scalar thetai = piByTwo;
|
scalar thetai = piByTwo;
|
||||||
scalar deltaTheta = pi;
|
scalar deltaTheta = pi;
|
||||||
nRay_ = 4*nPhi_;
|
nRay_ = 4*nPhi_;
|
||||||
@ -127,14 +119,6 @@ void Foam::radiation::fvDOM::initialise()
|
|||||||
// 1D
|
// 1D
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Currently 1D solution is limited to the x-direction
|
|
||||||
if (mesh_.solutionD()[vector::X] != 1)
|
|
||||||
{
|
|
||||||
FatalErrorInFunction
|
|
||||||
<< "Currently 1D solution is limited to the x-direction"
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
|
|
||||||
scalar thetai = piByTwo;
|
scalar thetai = piByTwo;
|
||||||
scalar deltaTheta = pi;
|
scalar deltaTheta = pi;
|
||||||
nRay_ = 2;
|
nRay_ = 2;
|
||||||
@ -221,11 +205,35 @@ void Foam::radiation::fvDOM::initialise()
|
|||||||
{
|
{
|
||||||
omegaMax_ = IRay_[rayId].omega();
|
omegaMax_ = IRay_[rayId].omega();
|
||||||
}
|
}
|
||||||
Info<< '\t' << IRay_[rayId].I().name() << " : " << "omega : "
|
Info<< '\t' << IRay_[rayId].I().name() << " : " << "dAve : "
|
||||||
<< '\t' << IRay_[rayId].omega() << nl;
|
<< '\t' << IRay_[rayId].dAve() << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< endl;
|
Info<< endl;
|
||||||
|
|
||||||
|
if (this->found("useSolarLoad"))
|
||||||
|
{
|
||||||
|
this->lookup("useSolarLoad") >> useSolarLoad_;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (useSolarLoad_)
|
||||||
|
{
|
||||||
|
const dictionary& solarDict = this->subDict("solarLoarCoeffs");
|
||||||
|
solarLoad_.reset
|
||||||
|
(
|
||||||
|
new solarLoad(solarDict, T_, externalRadHeatFieldName_)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (solarLoad_->nBands() > 1)
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< "Requested solar radiation with fvDOM. Using "
|
||||||
|
<< "more than one band for the solar load is not allowed"
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "Creating Solar Load Model " << nl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -294,7 +302,7 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T)
|
|||||||
mesh_.time().timeName(),
|
mesh_.time().timeName(),
|
||||||
mesh_,
|
mesh_,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
mesh_,
|
mesh_,
|
||||||
dimensionedScalar("a", dimless/dimLength, 0.0)
|
dimensionedScalar("a", dimless/dimLength, 0.0)
|
||||||
@ -310,7 +318,13 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T)
|
|||||||
maxIter_(coeffs_.lookupOrDefault<label>("maxIter", 50)),
|
maxIter_(coeffs_.lookupOrDefault<label>("maxIter", 50)),
|
||||||
fvRayDiv_(nLambda_),
|
fvRayDiv_(nLambda_),
|
||||||
cacheDiv_(coeffs_.lookupOrDefault<bool>("cacheDiv", false)),
|
cacheDiv_(coeffs_.lookupOrDefault<bool>("cacheDiv", false)),
|
||||||
omegaMax_(0)
|
omegaMax_(0),
|
||||||
|
useSolarLoad_(false),
|
||||||
|
solarLoad_(),
|
||||||
|
meshOrientation_
|
||||||
|
(
|
||||||
|
coeffs_.lookupOrDefault<vector>("meshOrientation", vector::zero)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
initialise();
|
initialise();
|
||||||
}
|
}
|
||||||
@ -399,7 +413,13 @@ Foam::radiation::fvDOM::fvDOM
|
|||||||
maxIter_(coeffs_.lookupOrDefault<label>("maxIter", 50)),
|
maxIter_(coeffs_.lookupOrDefault<label>("maxIter", 50)),
|
||||||
fvRayDiv_(nLambda_),
|
fvRayDiv_(nLambda_),
|
||||||
cacheDiv_(coeffs_.lookupOrDefault<bool>("cacheDiv", false)),
|
cacheDiv_(coeffs_.lookupOrDefault<bool>("cacheDiv", false)),
|
||||||
omegaMax_(0)
|
omegaMax_(0),
|
||||||
|
useSolarLoad_(false),
|
||||||
|
solarLoad_(),
|
||||||
|
meshOrientation_
|
||||||
|
(
|
||||||
|
coeffs_.lookupOrDefault<vector>("meshOrientation", vector::zero)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
initialise();
|
initialise();
|
||||||
}
|
}
|
||||||
@ -436,6 +456,11 @@ void Foam::radiation::fvDOM::calculate()
|
|||||||
|
|
||||||
updateBlackBodyEmission();
|
updateBlackBodyEmission();
|
||||||
|
|
||||||
|
if (useSolarLoad_)
|
||||||
|
{
|
||||||
|
solarLoad_->calculate();
|
||||||
|
}
|
||||||
|
|
||||||
// Set rays convergence false
|
// Set rays convergence false
|
||||||
List<bool> rayIdConv(nRay_, false);
|
List<bool> rayIdConv(nRay_, false);
|
||||||
|
|
||||||
@ -482,8 +507,7 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::fvDOM::Rp() const
|
|||||||
IOobject::NO_WRITE,
|
IOobject::NO_WRITE,
|
||||||
false
|
false
|
||||||
),
|
),
|
||||||
// Only include continuous phase emission
|
4.0*a_*physicoChemical::sigma //absorptionEmission_->a()
|
||||||
4*absorptionEmission_->aCont()*physicoChemical::sigma
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -495,13 +519,10 @@ Foam::radiation::fvDOM::Ru() const
|
|||||||
|
|
||||||
const DimensionedField<scalar, volMesh>& G =
|
const DimensionedField<scalar, volMesh>& G =
|
||||||
G_.dimensionedInternalField();
|
G_.dimensionedInternalField();
|
||||||
|
|
||||||
const DimensionedField<scalar, volMesh> E =
|
const DimensionedField<scalar, volMesh> E =
|
||||||
absorptionEmission_->ECont()().dimensionedInternalField();
|
absorptionEmission_->ECont()().dimensionedInternalField();
|
||||||
|
|
||||||
// Only include continuous phase absorption
|
|
||||||
const DimensionedField<scalar, volMesh> a =
|
const DimensionedField<scalar, volMesh> a =
|
||||||
absorptionEmission_->aCont()().dimensionedInternalField();
|
a_.dimensionedInternalField();
|
||||||
|
|
||||||
return a*G - E;
|
return a*G - E;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,16 +47,23 @@ Description
|
|||||||
cacheDiv true; // cache the div of the RTE equation.
|
cacheDiv true; // cache the div of the RTE equation.
|
||||||
//NOTE: Caching div is "only" accurate if the upwind scheme is used
|
//NOTE: Caching div is "only" accurate if the upwind scheme is used
|
||||||
//in div(Ji,Ii_h)
|
//in div(Ji,Ii_h)
|
||||||
|
meshOrientation (1 1 1); //Mesh ortientation used for 2D and 1D
|
||||||
}
|
}
|
||||||
|
|
||||||
solverFreq 1; // Number of flow iterations per radiation iteration
|
solverFreq 1; // Number of flow iterations per radiation iteration
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
The total number of solid angles is 4*nPhi*nTheta.
|
The total number of solid angles is 4*nPhi*nTheta in 3-D.
|
||||||
|
|
||||||
In 1D the direction of the rays is X (nPhi and nTheta are ignored)
|
In 1-D the ray directions are on X, Y or Z (nPhi and nTheta are ignored).
|
||||||
In 2D the direction of the rays is on X-Y plane (only nPhi is considered)
|
'meshOrientation' vector can be used for any other 1D direction.
|
||||||
In 3D (nPhi and nTheta are considered)
|
|
||||||
|
In 2-D the ray directions are on X-Y, X-Z or Y-Z planes.
|
||||||
|
(only nPhi is considered). 'meshOrientation' vector can be used for
|
||||||
|
not-aligned planes specifying the plane normal vector.
|
||||||
|
|
||||||
|
In 3D (nPhi and nTheta are considered). 'meshOrientation' vector is not
|
||||||
|
considered.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
fvDOM.C
|
fvDOM.C
|
||||||
@ -69,6 +76,7 @@ SourceFiles
|
|||||||
#include "radiativeIntensityRay.H"
|
#include "radiativeIntensityRay.H"
|
||||||
#include "radiationModel.H"
|
#include "radiationModel.H"
|
||||||
#include "fvMatrices.H"
|
#include "fvMatrices.H"
|
||||||
|
#include "solarLoad.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -139,6 +147,15 @@ class fvDOM
|
|||||||
//- Maximum omega weight
|
//- Maximum omega weight
|
||||||
scalar omegaMax_;
|
scalar omegaMax_;
|
||||||
|
|
||||||
|
//- Use Solar Load model
|
||||||
|
bool useSolarLoad_;
|
||||||
|
|
||||||
|
//- Solar load radiation model
|
||||||
|
autoPtr<solarLoad> solarLoad_;
|
||||||
|
|
||||||
|
//- Mesh orientation vector
|
||||||
|
vector meshOrientation_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
@ -260,6 +277,9 @@ public:
|
|||||||
|
|
||||||
//- Return omegaMax
|
//- Return omegaMax
|
||||||
inline scalar omegaMax() const;
|
inline scalar omegaMax() const;
|
||||||
|
|
||||||
|
//- Return meshOrientation
|
||||||
|
inline vector meshOrientation() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -132,4 +132,10 @@ inline Foam::scalar Foam::radiation::fvDOM::omegaMax() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline Foam::vector Foam::radiation::fvDOM::meshOrientation() const
|
||||||
|
{
|
||||||
|
return meshOrientation_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -30,10 +30,8 @@ License
|
|||||||
|
|
||||||
using namespace Foam::constant;
|
using namespace Foam::constant;
|
||||||
|
|
||||||
const Foam::word Foam::radiation::radiativeIntensityRay::intensityPrefix
|
const Foam::word
|
||||||
(
|
Foam::radiation::radiativeIntensityRay::intensityPrefix("ILambda");
|
||||||
"ILambda"
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
@ -137,6 +135,53 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay
|
|||||||
0.5*deltaPhi*Foam::sin(2.0*theta)*Foam::sin(deltaTheta)
|
0.5*deltaPhi*Foam::sin(2.0*theta)*Foam::sin(deltaTheta)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (mesh_.nSolutionD() == 2)
|
||||||
|
{
|
||||||
|
vector meshDir(vector::zero);
|
||||||
|
if (dom_.meshOrientation() != vector::zero)
|
||||||
|
{
|
||||||
|
meshDir = dom_.meshOrientation();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (direction cmpt=0; cmpt<vector::nComponents; cmpt++)
|
||||||
|
{
|
||||||
|
if (mesh_.geometricD()[cmpt] == -1)
|
||||||
|
{
|
||||||
|
meshDir[cmpt] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const vector normal(vector(0, 0, 1));
|
||||||
|
|
||||||
|
const tensor coordRot = rotationTensor(normal, meshDir);
|
||||||
|
|
||||||
|
dAve_ = coordRot & dAve_;
|
||||||
|
d_ = coordRot & d_;
|
||||||
|
}
|
||||||
|
else if (mesh_.nSolutionD() == 1)
|
||||||
|
{
|
||||||
|
vector meshDir(vector::zero);
|
||||||
|
if (dom_.meshOrientation() != vector::zero)
|
||||||
|
{
|
||||||
|
meshDir = dom_.meshOrientation();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (direction cmpt=0; cmpt<vector::nComponents; cmpt++)
|
||||||
|
{
|
||||||
|
if (mesh_.geometricD()[cmpt] == 1)
|
||||||
|
{
|
||||||
|
meshDir[cmpt] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const vector normal(vector(1, 0, 0));
|
||||||
|
|
||||||
|
dAve_ = (dAve_ & normal)*meshDir;
|
||||||
|
d_ = (d_ & normal)*meshDir;
|
||||||
|
}
|
||||||
|
|
||||||
autoPtr<volScalarField> IDefaultPtr;
|
autoPtr<volScalarField> IDefaultPtr;
|
||||||
|
|
||||||
forAll(ILambda_, lambdaI)
|
forAll(ILambda_, lambdaI)
|
||||||
@ -226,12 +271,11 @@ Foam::scalar Foam::radiation::radiativeIntensityRay::correct()
|
|||||||
+ fvm::Sp(k*omega_, ILambda_[lambdaI])
|
+ fvm::Sp(k*omega_, ILambda_[lambdaI])
|
||||||
==
|
==
|
||||||
1.0/constant::mathematical::pi*omega_
|
1.0/constant::mathematical::pi*omega_
|
||||||
*(
|
* (
|
||||||
// Remove aDisp from k
|
|
||||||
(k - absorptionEmission_.aDisp(lambdaI))
|
(k - absorptionEmission_.aDisp(lambdaI))
|
||||||
*blackBody_.bLambda(lambdaI)
|
*blackBody_.bLambda(lambdaI)
|
||||||
|
+ absorptionEmission_.ECont(lambdaI)
|
||||||
+ absorptionEmission_.E(lambdaI)/4
|
+ absorptionEmission_.EDisp(lambdaI)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -244,10 +288,8 @@ Foam::scalar Foam::radiation::radiativeIntensityRay::correct()
|
|||||||
==
|
==
|
||||||
1.0/constant::mathematical::pi*omega_
|
1.0/constant::mathematical::pi*omega_
|
||||||
* (
|
* (
|
||||||
// Remove aDisp from k
|
|
||||||
(k - absorptionEmission_.aDisp(lambdaI))
|
(k - absorptionEmission_.aDisp(lambdaI))
|
||||||
*blackBody_.bLambda(lambdaI)
|
*blackBody_.bLambda(lambdaI)
|
||||||
|
|
||||||
+ absorptionEmission_.E(lambdaI)/4
|
+ absorptionEmission_.E(lambdaI)/4
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -42,6 +42,8 @@ namespace Foam
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Foam::word Foam::radiation::radiationModel::externalRadHeatFieldName_ =
|
||||||
|
"QrExt";
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -86,6 +88,8 @@ void Foam::radiation::radiationModel::initialise()
|
|||||||
scatter_.reset(scatterModel::New(*this, mesh_).ptr());
|
scatter_.reset(scatterModel::New(*this, mesh_).ptr());
|
||||||
|
|
||||||
soot_.reset(sootModel::New(*this, mesh_).ptr());
|
soot_.reset(sootModel::New(*this, mesh_).ptr());
|
||||||
|
|
||||||
|
transmissivity_.reset(transmissivityModel::New(*this, mesh_).ptr());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,7 +118,8 @@ Foam::radiation::radiationModel::radiationModel(const volScalarField& T)
|
|||||||
firstIter_(true),
|
firstIter_(true),
|
||||||
absorptionEmission_(NULL),
|
absorptionEmission_(NULL),
|
||||||
scatter_(NULL),
|
scatter_(NULL),
|
||||||
soot_(NULL)
|
soot_(NULL),
|
||||||
|
transmissivity_(NULL)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -134,7 +139,8 @@ Foam::radiation::radiationModel::radiationModel
|
|||||||
firstIter_(true),
|
firstIter_(true),
|
||||||
absorptionEmission_(NULL),
|
absorptionEmission_(NULL),
|
||||||
scatter_(NULL),
|
scatter_(NULL),
|
||||||
soot_(NULL)
|
soot_(NULL),
|
||||||
|
transmissivity_(NULL)
|
||||||
{
|
{
|
||||||
if (readOpt() == IOobject::NO_READ)
|
if (readOpt() == IOobject::NO_READ)
|
||||||
{
|
{
|
||||||
@ -173,7 +179,8 @@ Foam::radiation::radiationModel::radiationModel
|
|||||||
firstIter_(true),
|
firstIter_(true),
|
||||||
absorptionEmission_(NULL),
|
absorptionEmission_(NULL),
|
||||||
scatter_(NULL),
|
scatter_(NULL),
|
||||||
soot_(NULL)
|
soot_(NULL),
|
||||||
|
transmissivity_(NULL)
|
||||||
{
|
{
|
||||||
initialise();
|
initialise();
|
||||||
}
|
}
|
||||||
@ -286,4 +293,18 @@ Foam::radiation::radiationModel::soot() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const Foam::radiation::transmissivityModel&
|
||||||
|
Foam::radiation::radiationModel::transmissivity() const
|
||||||
|
{
|
||||||
|
if (!transmissivity_.valid())
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< "Requested radiation sootModel model, but model is "
|
||||||
|
<< "not activate" << abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
return transmissivity_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -49,6 +49,7 @@ SourceFiles
|
|||||||
#include "DimensionedField.H"
|
#include "DimensionedField.H"
|
||||||
#include "fvMatricesFwd.H"
|
#include "fvMatricesFwd.H"
|
||||||
#include "Switch.H"
|
#include "Switch.H"
|
||||||
|
#include "transmissivityModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -74,8 +75,17 @@ class radiationModel
|
|||||||
:
|
:
|
||||||
public IOdictionary
|
public IOdictionary
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Static data
|
||||||
|
|
||||||
|
//- Static name external radiative fluxes
|
||||||
|
static const word externalRadHeatFieldName_;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Protected data
|
// Protected data
|
||||||
|
|
||||||
//- Reference to the mesh database
|
//- Reference to the mesh database
|
||||||
@ -112,6 +122,9 @@ protected:
|
|||||||
//- Soot model
|
//- Soot model
|
||||||
autoPtr<sootModel> soot_;
|
autoPtr<sootModel> soot_;
|
||||||
|
|
||||||
|
//- Transmissivity model
|
||||||
|
autoPtr<transmissivityModel> transmissivity_;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -237,8 +250,12 @@ public:
|
|||||||
//- Access to absorptionEmission model
|
//- Access to absorptionEmission model
|
||||||
const absorptionEmissionModel& absorptionEmission() const;
|
const absorptionEmissionModel& absorptionEmission() const;
|
||||||
|
|
||||||
|
//- Access to transmissivity Model
|
||||||
|
const transmissivityModel& transmissivity() const;
|
||||||
|
|
||||||
//- Access to soot Model
|
//- Access to soot Model
|
||||||
const sootModel& soot() const;
|
const sootModel& soot() const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,447 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2015 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 "faceShading.H"
|
||||||
|
#include "fvMesh.H"
|
||||||
|
#include "boundaryRadiationProperties.H"
|
||||||
|
#include "OFstream.H"
|
||||||
|
#include "cyclicAMIPolyPatch.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
#include "distributedTriSurfaceMesh.H"
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(faceShading, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::faceShading::writeRays
|
||||||
|
(
|
||||||
|
const fileName& fName,
|
||||||
|
const DynamicField<point>& endCf,
|
||||||
|
const pointField& myFc
|
||||||
|
)
|
||||||
|
{
|
||||||
|
OFstream str(fName);
|
||||||
|
label vertI = 0;
|
||||||
|
|
||||||
|
Pout<< "Dumping rays to " << str.name() << endl;
|
||||||
|
|
||||||
|
forAll(myFc, faceI)
|
||||||
|
{
|
||||||
|
meshTools::writeOBJ(str, myFc[faceI]);
|
||||||
|
vertI++;
|
||||||
|
meshTools::writeOBJ(str, endCf[faceI]);
|
||||||
|
vertI++;
|
||||||
|
str << "l " << vertI-1 << ' ' << vertI << nl;
|
||||||
|
}
|
||||||
|
string cmd("objToVTK " + fName + " " + fName.lessExt() + ".vtk");
|
||||||
|
Pout<< "cmd:" << cmd << endl;
|
||||||
|
system(cmd);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::triSurface Foam::faceShading::triangulate
|
||||||
|
(
|
||||||
|
const labelHashSet& includePatches,
|
||||||
|
const List<labelHashSet>& includeAllFacesPerPatch
|
||||||
|
)
|
||||||
|
{
|
||||||
|
const polyBoundaryMesh& bMesh = mesh_.boundaryMesh();
|
||||||
|
|
||||||
|
// Storage for surfaceMesh. Size estimate.
|
||||||
|
DynamicList<labelledTri> triangles
|
||||||
|
(
|
||||||
|
mesh_.nFaces() - mesh_.nInternalFaces()
|
||||||
|
);
|
||||||
|
|
||||||
|
label newPatchI = 0;
|
||||||
|
|
||||||
|
forAllConstIter(labelHashSet, includePatches, iter)
|
||||||
|
{
|
||||||
|
const label patchI = iter.key();
|
||||||
|
const polyPatch& patch = bMesh[patchI];
|
||||||
|
const pointField& points = patch.points();
|
||||||
|
|
||||||
|
label nTriTotal = 0;
|
||||||
|
|
||||||
|
if (includeAllFacesPerPatch[patchI].size() > 0)
|
||||||
|
{
|
||||||
|
forAllConstIter
|
||||||
|
(
|
||||||
|
labelHashSet,
|
||||||
|
includeAllFacesPerPatch[patchI],
|
||||||
|
iter1
|
||||||
|
)
|
||||||
|
{
|
||||||
|
const label patchFaceI = iter1.key();
|
||||||
|
|
||||||
|
const face& f = patch[patchFaceI];
|
||||||
|
|
||||||
|
faceList triFaces(f.nTriangles(points));
|
||||||
|
|
||||||
|
label nTri = 0;
|
||||||
|
|
||||||
|
f.triangles(points, nTri, triFaces);
|
||||||
|
|
||||||
|
forAll(triFaces, triFaceI)
|
||||||
|
{
|
||||||
|
const face& f = triFaces[triFaceI];
|
||||||
|
|
||||||
|
triangles.append
|
||||||
|
(
|
||||||
|
labelledTri(f[0], f[1], f[2], newPatchI)
|
||||||
|
);
|
||||||
|
nTriTotal++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
newPatchI++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
triangles.shrink();
|
||||||
|
|
||||||
|
// Create globally numbered tri surface
|
||||||
|
triSurface rawSurface(triangles, mesh_.points());
|
||||||
|
|
||||||
|
// Create locally numbered tri surface
|
||||||
|
triSurface surface
|
||||||
|
(
|
||||||
|
rawSurface.localFaces(),
|
||||||
|
rawSurface.localPoints()
|
||||||
|
);
|
||||||
|
|
||||||
|
// Add patch names to surface
|
||||||
|
surface.patches().setSize(newPatchI);
|
||||||
|
|
||||||
|
newPatchI = 0;
|
||||||
|
|
||||||
|
forAllConstIter(labelHashSet, includePatches, iter)
|
||||||
|
{
|
||||||
|
const label patchI = iter.key();
|
||||||
|
const polyPatch& patch = bMesh[patchI];
|
||||||
|
|
||||||
|
if (includeAllFacesPerPatch[patchI].size() > 0)
|
||||||
|
{
|
||||||
|
surface.patches()[newPatchI].name() = patch.name();
|
||||||
|
surface.patches()[newPatchI].geometricType() = patch.type();
|
||||||
|
|
||||||
|
newPatchI++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return surface;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::faceShading::calculate()
|
||||||
|
{
|
||||||
|
const radiation::boundaryRadiationProperties& boundaryRadiation =
|
||||||
|
radiation::boundaryRadiationProperties::New(mesh_);
|
||||||
|
|
||||||
|
label nFaces = 0; //total number of direct hit faces
|
||||||
|
|
||||||
|
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
|
||||||
|
|
||||||
|
DynamicList<point> dynCf(nFaces);
|
||||||
|
DynamicList<label> dynFacesI;
|
||||||
|
|
||||||
|
forAll(patches, patchI)
|
||||||
|
{
|
||||||
|
const polyPatch& pp = patches[patchI];
|
||||||
|
const pointField& cf = pp.faceCentres();
|
||||||
|
|
||||||
|
if (!pp.coupled() && !isA<cyclicAMIPolyPatch>(pp))
|
||||||
|
{
|
||||||
|
const tmp<scalarField> tt =
|
||||||
|
boundaryRadiation.transmissivity(patchI);
|
||||||
|
const scalarField& t = tt();
|
||||||
|
const vectorField& n = pp.faceNormals();
|
||||||
|
|
||||||
|
forAll(n, faceI)
|
||||||
|
{
|
||||||
|
const vector nf(n[faceI]);
|
||||||
|
if (((direction_ & nf) > 0) && (t[faceI] == 0.0))
|
||||||
|
{
|
||||||
|
dynFacesI.append(faceI + pp.start());
|
||||||
|
dynCf.append(cf[faceI]);
|
||||||
|
nFaces++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
label numberPotentialHits = nFaces;
|
||||||
|
|
||||||
|
reduce(numberPotentialHits, sumOp<label>());
|
||||||
|
|
||||||
|
Info<< "Number of 'potential' direct hits : "
|
||||||
|
<< numberPotentialHits << endl;
|
||||||
|
|
||||||
|
labelList hitFacesIds(nFaces);
|
||||||
|
hitFacesIds.transfer(dynFacesI);
|
||||||
|
|
||||||
|
pointField Cfs(hitFacesIds.size());
|
||||||
|
Cfs.transfer(dynCf);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * *
|
||||||
|
// Create distributedTriSurfaceMesh
|
||||||
|
Random rndGen(653213);
|
||||||
|
|
||||||
|
// Determine mesh bounding boxes:
|
||||||
|
List<treeBoundBox> meshBb
|
||||||
|
(
|
||||||
|
1,
|
||||||
|
treeBoundBox
|
||||||
|
(
|
||||||
|
boundBox(mesh_.points(), false)
|
||||||
|
).extend(rndGen, 1e-3)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Dummy bounds dictionary
|
||||||
|
dictionary dict;
|
||||||
|
dict.add("bounds", meshBb);
|
||||||
|
dict.add
|
||||||
|
(
|
||||||
|
"distributionType",
|
||||||
|
distributedTriSurfaceMesh::distributionTypeNames_
|
||||||
|
[
|
||||||
|
distributedTriSurfaceMesh::FROZEN
|
||||||
|
]
|
||||||
|
);
|
||||||
|
dict.add("mergeDistance", SMALL);
|
||||||
|
|
||||||
|
labelHashSet includePatches;
|
||||||
|
List<labelHashSet> includeAllFacesPerPatch(patches.size());
|
||||||
|
|
||||||
|
forAll(patches, patchI)
|
||||||
|
{
|
||||||
|
const polyPatch& pp = patches[patchI];
|
||||||
|
if (!pp.coupled() && !isA<cyclicAMIPolyPatch>(pp))
|
||||||
|
{
|
||||||
|
includePatches.insert(patchI);
|
||||||
|
|
||||||
|
const tmp<scalarField> tt =
|
||||||
|
boundaryRadiation.transmissivity(patchI);
|
||||||
|
const scalarField& tau = tt();
|
||||||
|
|
||||||
|
forAll(pp, faceI)
|
||||||
|
{
|
||||||
|
if (tau[faceI] == 0.0)
|
||||||
|
{
|
||||||
|
includeAllFacesPerPatch[patchI].insert
|
||||||
|
(
|
||||||
|
faceI //pp.start()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
labelList triSurfaceToAgglom(5*nFaces);
|
||||||
|
|
||||||
|
triSurface localSurface = triangulate
|
||||||
|
(
|
||||||
|
includePatches,
|
||||||
|
includeAllFacesPerPatch
|
||||||
|
);
|
||||||
|
|
||||||
|
distributedTriSurfaceMesh surfacesMesh
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"opaqueSurface.stl",
|
||||||
|
mesh_.time().constant(), // directory
|
||||||
|
"triSurface", // instance
|
||||||
|
mesh_.time(), // registry
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
localSurface,
|
||||||
|
dict
|
||||||
|
);
|
||||||
|
|
||||||
|
surfacesMesh.searchableSurface::write();
|
||||||
|
|
||||||
|
triSurfaceToAgglom.resize(surfacesMesh.size());
|
||||||
|
|
||||||
|
scalar maxBounding = 5.0*mag(mesh_.bounds().max() - mesh_.bounds().min());
|
||||||
|
|
||||||
|
reduce(maxBounding, maxOp<scalar>());
|
||||||
|
|
||||||
|
// Calculate index of faces which have a direct hit (local)
|
||||||
|
DynamicList<label> rayStartFace(nFaces + 0.01*nFaces);
|
||||||
|
|
||||||
|
// Shoot Rays
|
||||||
|
// * * * * * * * * * * * * * * * *
|
||||||
|
{
|
||||||
|
|
||||||
|
DynamicField<point> start(nFaces);
|
||||||
|
DynamicField<point> end(start.size());
|
||||||
|
DynamicList<label> startIndex(start.size());
|
||||||
|
|
||||||
|
label i = 0;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
for (; i < Cfs.size(); i++)
|
||||||
|
{
|
||||||
|
const point& fc = Cfs[i];
|
||||||
|
|
||||||
|
const label myFaceId = hitFacesIds[i];
|
||||||
|
|
||||||
|
const vector d(direction_*maxBounding);
|
||||||
|
|
||||||
|
start.append(fc - SMALL*d);
|
||||||
|
|
||||||
|
startIndex.append(myFaceId);
|
||||||
|
|
||||||
|
end.append(fc - d);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}while (returnReduce(i < Cfs.size(), orOp<bool>()));
|
||||||
|
|
||||||
|
List<pointIndexHit> hitInfo(startIndex.size());
|
||||||
|
surfacesMesh.findLine(start, end, hitInfo);
|
||||||
|
|
||||||
|
// Collect the rays which has 'only one not wall' obstacle bettween
|
||||||
|
// start and end.
|
||||||
|
// If the ray hit itself get stored in dRayIs
|
||||||
|
forAll (hitInfo, rayI)
|
||||||
|
{
|
||||||
|
if (!hitInfo[rayI].hit())
|
||||||
|
{
|
||||||
|
rayStartFace.append(startIndex[rayI]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Plot all rays between visible faces.
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
writeRays
|
||||||
|
(
|
||||||
|
mesh_.time().path()/"allVisibleFaces.obj",
|
||||||
|
end,
|
||||||
|
Cfs
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
start.clear();
|
||||||
|
startIndex.clear();
|
||||||
|
end.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
rayStartFaces_.transfer(rayStartFace);
|
||||||
|
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
tmp<volScalarField> thitFaces
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"hitFaces",
|
||||||
|
mesh_.time().timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh_,
|
||||||
|
dimensionedScalar("zero", dimless, 0)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField& hitFaces = thitFaces();
|
||||||
|
|
||||||
|
hitFaces.boundaryField() = 0.0;
|
||||||
|
forAll (rayStartFaces_, i)
|
||||||
|
{
|
||||||
|
const label faceI = rayStartFaces_[i];
|
||||||
|
label patchID = patches.whichPatch(faceI);
|
||||||
|
const polyPatch& pp = patches[patchID];
|
||||||
|
hitFaces.boundaryField()[patchID][faceI - pp.start()] = 1.0;
|
||||||
|
}
|
||||||
|
hitFaces.write();
|
||||||
|
}
|
||||||
|
|
||||||
|
label totalHitFaces = rayStartFaces_.size();
|
||||||
|
|
||||||
|
reduce(totalHitFaces, sumOp<label>());
|
||||||
|
|
||||||
|
Info<< "Total number of hit faces : " << totalHitFaces << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::faceShading::faceShading
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const vector dir,
|
||||||
|
const labelList& hitFaceList
|
||||||
|
)
|
||||||
|
:
|
||||||
|
mesh_(mesh),
|
||||||
|
direction_(dir),
|
||||||
|
rayStartFaces_(hitFaceList)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Foam::faceShading::faceShading
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const vector dir
|
||||||
|
)
|
||||||
|
:
|
||||||
|
mesh_(mesh),
|
||||||
|
direction_(dir),
|
||||||
|
rayStartFaces_(0)
|
||||||
|
{
|
||||||
|
calculate();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::faceShading::~faceShading()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::faceShading::correct()
|
||||||
|
{
|
||||||
|
calculate();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,165 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2015 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::faceShading
|
||||||
|
|
||||||
|
Description
|
||||||
|
|
||||||
|
faceShading uses the transmissivity value in the boundaryRadiationProperties
|
||||||
|
in order to evaluate which faces are "hit" by the "direction" vector.
|
||||||
|
NOTE: Only transmissivity values of zero are considered for opaque walls.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
faceShading.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef faceShading_H
|
||||||
|
#define faceShading_H
|
||||||
|
|
||||||
|
#include "fvMesh.H"
|
||||||
|
#include "Time.H"
|
||||||
|
#include "meshTools.H"
|
||||||
|
#include "DynamicField.H"
|
||||||
|
#include "labelIOList.H"
|
||||||
|
#include "wallPolyPatch.H"
|
||||||
|
#include "triSurfaceTools.H"
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class faceShading Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class faceShading
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
//- Reference to mesh
|
||||||
|
const fvMesh& mesh_;
|
||||||
|
|
||||||
|
//- Direction
|
||||||
|
vector direction_;
|
||||||
|
|
||||||
|
//- Faces directly hit by vector direction
|
||||||
|
labelList rayStartFaces_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private members
|
||||||
|
|
||||||
|
//- Calculate ray start faces
|
||||||
|
void calculate();
|
||||||
|
|
||||||
|
|
||||||
|
//- Construct a triSurface from patches and faces on global local index
|
||||||
|
triSurface triangulate
|
||||||
|
(
|
||||||
|
const labelHashSet& includePatches,
|
||||||
|
const List<labelHashSet>& includeAllFaces
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Write rays
|
||||||
|
void writeRays
|
||||||
|
(
|
||||||
|
const fileName& fName,
|
||||||
|
const DynamicField<point>& endCf,
|
||||||
|
const pointField& myFc
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
faceShading(const faceShading&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const faceShading&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Declare name of the class and its debug switch
|
||||||
|
ClassName("faceShading");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
faceShading
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const vector dir,
|
||||||
|
const labelList& hitFaceList
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct from mesh and vector
|
||||||
|
faceShading
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const vector
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
~faceShading();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Access
|
||||||
|
|
||||||
|
//- const acess to direction
|
||||||
|
const vector direction() const
|
||||||
|
{
|
||||||
|
return direction_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Non-const access to direction
|
||||||
|
vector& direction()
|
||||||
|
{
|
||||||
|
return direction_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Access to rayStartFaces
|
||||||
|
const labelList& rayStartFaces() const
|
||||||
|
{
|
||||||
|
return rayStartFaces_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Recalculate rayStartFaces using direction vector
|
||||||
|
void correct();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,255 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2015 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::solarLoad
|
||||||
|
|
||||||
|
Description
|
||||||
|
|
||||||
|
The solar load radiation model includes Sun primary hits, their
|
||||||
|
reflective fluxes and diffusive sky radiative fluxes.
|
||||||
|
|
||||||
|
The primary hit rays are calculated using a face shading algorithm.
|
||||||
|
The reflected fluxes are considered diffusive and use a view factors method
|
||||||
|
to deposit the energy on "visible" walls. The sky diffusive radiation for
|
||||||
|
horizontal and vertical walls is calculated following the Fair Weather
|
||||||
|
Conditions Method from the ASHRAE Handbook.
|
||||||
|
|
||||||
|
By default the energy is included in cells adjacent to the patches into
|
||||||
|
the energy Equation (wallCoupled = false). On coupled patches the flux is
|
||||||
|
by default added to the wall and considered into the solid
|
||||||
|
(solidCoupled = true).
|
||||||
|
|
||||||
|
The reflected fluxes uses a grey absoprtion/emission model wich is weighted
|
||||||
|
by the spectral distribution. The flag useVFbeamToDiffuse should be
|
||||||
|
switched on and the view factors should be calculated using the
|
||||||
|
'viewFactorsGen' application.
|
||||||
|
|
||||||
|
The solarLoad model can be used in conjuntion with fvDOM and viewFactor
|
||||||
|
radiation models but only using a single band spectrum. On the
|
||||||
|
corresponding BC's for these models the flag "solarLoad" must be set to
|
||||||
|
true.
|
||||||
|
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
solarLoad.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef radiationModelsolarLoad_H
|
||||||
|
#define radiationModelsolarLoad_H
|
||||||
|
|
||||||
|
#include "radiationModel.H"
|
||||||
|
#include "singleCellFvMesh.H"
|
||||||
|
#include "scalarListIOList.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
#include "faceShading.H"
|
||||||
|
#include "solarCalculator.H"
|
||||||
|
#include "IOmapDistribute.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace radiation
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class solarLoad Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class solarLoad
|
||||||
|
:
|
||||||
|
public radiationModel
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Static data
|
||||||
|
|
||||||
|
//- Static name for view factor walls
|
||||||
|
static const word viewFactorWalls;
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
|
||||||
|
//- Agglomeration List
|
||||||
|
labelListIOList finalAgglom_;
|
||||||
|
|
||||||
|
//- Coarse mesh
|
||||||
|
autoPtr<singleCellFvMesh> coarseMesh_;
|
||||||
|
|
||||||
|
//- Net radiative heat flux [W/m2]
|
||||||
|
volScalarField Qr_;
|
||||||
|
|
||||||
|
//- Secondary solar radiative heat flux [W/m2]
|
||||||
|
volScalarField QsecondRad_;
|
||||||
|
|
||||||
|
//- Direct hit faces Ids
|
||||||
|
autoPtr<faceShading> hitFaces_;
|
||||||
|
|
||||||
|
//- Constant source term
|
||||||
|
DimensionedField<scalar, volMesh> Ru_;
|
||||||
|
|
||||||
|
//- Solar calculator
|
||||||
|
solarCalculator solarCalc_;
|
||||||
|
|
||||||
|
//- Vertical direction (Default is g vector)
|
||||||
|
vector verticalDir_;
|
||||||
|
|
||||||
|
//- Include diffuse reflected heat fluxes from direct heat flux
|
||||||
|
bool useVFbeamToDiffuse_;
|
||||||
|
|
||||||
|
//- Selected patches to apply solar load
|
||||||
|
labelList includePatches_;
|
||||||
|
|
||||||
|
//- Chached coarse to fine mapping for coarse mesh
|
||||||
|
List<labelListList> coarseToFine_;
|
||||||
|
|
||||||
|
//-Number of bands
|
||||||
|
label nBands_;
|
||||||
|
|
||||||
|
//- Spectral distribution for the integrated solar heat flux
|
||||||
|
scalarList spectralDistribution_;
|
||||||
|
|
||||||
|
//- Map distribute
|
||||||
|
autoPtr<IOmapDistribute> map_;
|
||||||
|
|
||||||
|
//- Face-compact map
|
||||||
|
labelListIOList visibleFaceFaces_;
|
||||||
|
|
||||||
|
//- Couple solids through mapped boundary patch using Qr (default:true)
|
||||||
|
bool solidCoupled_;
|
||||||
|
|
||||||
|
//- Couple wall patches using Qr (default:false)
|
||||||
|
bool wallCoupled_;
|
||||||
|
|
||||||
|
//- Absorptivity list
|
||||||
|
List<List<tmp<scalarField> > > absorptivity_;
|
||||||
|
|
||||||
|
//- Update absorptivity
|
||||||
|
bool updateAbsorptivity_;
|
||||||
|
|
||||||
|
//- First iteration
|
||||||
|
bool firstIter_;
|
||||||
|
|
||||||
|
//- Update Sun position index
|
||||||
|
label updateTimeIndex_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
|
||||||
|
//- Initialise
|
||||||
|
void initialise(const dictionary&);
|
||||||
|
|
||||||
|
//- Update direct hit faces radiation
|
||||||
|
void updateDirectHitRadiation(const labelList&, const labelHashSet&);
|
||||||
|
|
||||||
|
//- Calculate diffusive heat flux
|
||||||
|
void calculateQdiff(const labelHashSet&, const labelHashSet&);
|
||||||
|
|
||||||
|
//- Update Sky diffusive radiation
|
||||||
|
void updateSkyDiffusiveRadiation
|
||||||
|
(
|
||||||
|
const labelHashSet&,
|
||||||
|
const labelHashSet&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Update hit faces
|
||||||
|
bool updateHitFaces();
|
||||||
|
|
||||||
|
//- Update absorptivity
|
||||||
|
void updateAbsorptivity(const labelHashSet& includePatches);
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
solarLoad(const solarLoad&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const solarLoad&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("solarLoad");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from volScalarField
|
||||||
|
solarLoad(const volScalarField& T);
|
||||||
|
|
||||||
|
//- Construct from dictionary and volScalarField
|
||||||
|
solarLoad(const dictionary& dict, const volScalarField& T);
|
||||||
|
|
||||||
|
//- Constructor from local components. Does not create a radiationModel.
|
||||||
|
// radWallFieldName is the solar heat field name
|
||||||
|
solarLoad
|
||||||
|
(
|
||||||
|
const dictionary& dict,
|
||||||
|
const volScalarField& T,
|
||||||
|
const word radWallFieldName
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~solarLoad();
|
||||||
|
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
|
||||||
|
// Edit
|
||||||
|
|
||||||
|
//- Solve
|
||||||
|
void calculate();
|
||||||
|
|
||||||
|
//- Read radiation properties dictionary
|
||||||
|
bool read();
|
||||||
|
|
||||||
|
//- Source term component (for power of T^4)
|
||||||
|
virtual tmp<volScalarField> Rp() const;
|
||||||
|
|
||||||
|
//- Source term component (constant)
|
||||||
|
virtual tmp<DimensionedField<scalar, volMesh> > Ru() const;
|
||||||
|
|
||||||
|
|
||||||
|
// Access
|
||||||
|
|
||||||
|
//- Number of bands
|
||||||
|
label nBands() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace radiation
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -29,6 +29,7 @@ License
|
|||||||
#include "greyDiffusiveViewFactorFixedValueFvPatchScalarField.H"
|
#include "greyDiffusiveViewFactorFixedValueFvPatchScalarField.H"
|
||||||
#include "typeInfo.H"
|
#include "typeInfo.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "boundaryRadiationProperties.H"
|
||||||
|
|
||||||
using namespace Foam::constant;
|
using namespace Foam::constant;
|
||||||
|
|
||||||
@ -43,29 +44,21 @@ namespace Foam
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Foam::word Foam::radiation::viewFactor::viewFactorWalls
|
||||||
|
= "viewFactorWall";
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::radiation::viewFactor::initialise()
|
void Foam::radiation::viewFactor::initialise()
|
||||||
{
|
{
|
||||||
const polyBoundaryMesh& coarsePatches = coarseMesh_.boundaryMesh();
|
const polyBoundaryMesh& coarsePatches = coarseMesh_.boundaryMesh();
|
||||||
const volScalarField::GeometricBoundaryField& Qrp = Qr_.boundaryField();
|
|
||||||
|
|
||||||
label count = 0;
|
selectedPatches_ = mesh_.boundaryMesh().findIndices(viewFactorWalls);
|
||||||
forAll(Qrp, patchI)
|
forAll(selectedPatches_, i)
|
||||||
{
|
{
|
||||||
//const polyPatch& pp = mesh_.boundaryMesh()[patchI];
|
const label patchI = selectedPatches_[i];
|
||||||
const fvPatchScalarField& QrPatchI = Qrp[patchI];
|
|
||||||
|
|
||||||
if ((isA<fixedValueFvPatchScalarField>(QrPatchI)))
|
|
||||||
{
|
|
||||||
selectedPatches_[count] = QrPatchI.patch().index();
|
|
||||||
nLocalCoarseFaces_ += coarsePatches[patchI].size();
|
nLocalCoarseFaces_ += coarsePatches[patchI].size();
|
||||||
count++;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
selectedPatches_.resize(count--);
|
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
@ -84,52 +77,19 @@ void Foam::radiation::viewFactor::initialise()
|
|||||||
<< "Total number of clusters : " << totalNCoarseFaces_ << endl;
|
<< "Total number of clusters : " << totalNCoarseFaces_ << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
labelListIOList subMap
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"subMap",
|
|
||||||
mesh_.facesInstance(),
|
|
||||||
mesh_,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
labelListIOList constructMap
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"constructMap",
|
|
||||||
mesh_.facesInstance(),
|
|
||||||
mesh_,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
IOList<label> consMapDim
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"constructMapDim",
|
|
||||||
mesh_.facesInstance(),
|
|
||||||
mesh_,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
map_.reset
|
map_.reset
|
||||||
(
|
(
|
||||||
new mapDistribute
|
new IOmapDistribute
|
||||||
(
|
(
|
||||||
consMapDim[0],
|
IOobject
|
||||||
Xfer<labelListList>(subMap),
|
(
|
||||||
Xfer<labelListList>(constructMap)
|
"mapDist",
|
||||||
|
mesh_.facesInstance(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -235,6 +195,30 @@ void Foam::radiation::viewFactor::initialise()
|
|||||||
pivotIndices_.setSize(CLU_().n());
|
pivotIndices_.setSize(CLU_().n());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this->found("useSolarLoad"))
|
||||||
|
{
|
||||||
|
this->lookup("useSolarLoad") >> useSolarLoad_;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (useSolarLoad_)
|
||||||
|
{
|
||||||
|
const dictionary& solarDict = this->subDict("solarLoarCoeffs");
|
||||||
|
solarLoad_.reset
|
||||||
|
(
|
||||||
|
new solarLoad(solarDict, T_, externalRadHeatFieldName_)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (solarLoad_->nBands() > 1)
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< "Requested solar radiation with fvDOM. Using "
|
||||||
|
<< "more thant one band for the solar load is not allowed"
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "Creating Solar Load Model " << nl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -260,7 +244,7 @@ Foam::radiation::viewFactor::viewFactor(const volScalarField& T)
|
|||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
mesh_.name(),
|
"coarse:" + mesh_.name(),
|
||||||
mesh_.polyMesh::instance(),
|
mesh_.polyMesh::instance(),
|
||||||
mesh_.time(),
|
mesh_.time(),
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
@ -288,7 +272,9 @@ Foam::radiation::viewFactor::viewFactor(const volScalarField& T)
|
|||||||
nLocalCoarseFaces_(0),
|
nLocalCoarseFaces_(0),
|
||||||
constEmissivity_(false),
|
constEmissivity_(false),
|
||||||
iterCounter_(0),
|
iterCounter_(0),
|
||||||
pivotIndices_(0)
|
pivotIndices_(0),
|
||||||
|
useSolarLoad_(false),
|
||||||
|
solarLoad_()
|
||||||
{
|
{
|
||||||
initialise();
|
initialise();
|
||||||
}
|
}
|
||||||
@ -318,7 +304,7 @@ Foam::radiation::viewFactor::viewFactor
|
|||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
mesh_.name(),
|
"coarse:" + mesh_.name(),
|
||||||
mesh_.polyMesh::instance(),
|
mesh_.polyMesh::instance(),
|
||||||
mesh_.time(),
|
mesh_.time(),
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
@ -346,7 +332,9 @@ Foam::radiation::viewFactor::viewFactor
|
|||||||
nLocalCoarseFaces_(0),
|
nLocalCoarseFaces_(0),
|
||||||
constEmissivity_(false),
|
constEmissivity_(false),
|
||||||
iterCounter_(0),
|
iterCounter_(0),
|
||||||
pivotIndices_(0)
|
pivotIndices_(0),
|
||||||
|
useSolarLoad_(false),
|
||||||
|
solarLoad_()
|
||||||
{
|
{
|
||||||
initialise();
|
initialise();
|
||||||
}
|
}
|
||||||
@ -401,6 +389,11 @@ void Foam::radiation::viewFactor::calculate()
|
|||||||
// Store previous iteration
|
// Store previous iteration
|
||||||
Qr_.storePrevIter();
|
Qr_.storePrevIter();
|
||||||
|
|
||||||
|
if (useSolarLoad_)
|
||||||
|
{
|
||||||
|
solarLoad_->calculate();
|
||||||
|
}
|
||||||
|
|
||||||
scalarField compactCoarseT(map_->constructSize(), 0.0);
|
scalarField compactCoarseT(map_->constructSize(), 0.0);
|
||||||
scalarField compactCoarseE(map_->constructSize(), 0.0);
|
scalarField compactCoarseE(map_->constructSize(), 0.0);
|
||||||
scalarField compactCoarseHo(map_->constructSize(), 0.0);
|
scalarField compactCoarseHo(map_->constructSize(), 0.0);
|
||||||
@ -412,6 +405,9 @@ void Foam::radiation::viewFactor::calculate()
|
|||||||
DynamicList<scalar> localCoarseEave(nLocalCoarseFaces_);
|
DynamicList<scalar> localCoarseEave(nLocalCoarseFaces_);
|
||||||
DynamicList<scalar> localCoarseHoave(nLocalCoarseFaces_);
|
DynamicList<scalar> localCoarseHoave(nLocalCoarseFaces_);
|
||||||
|
|
||||||
|
const boundaryRadiationProperties& boundaryRadiation =
|
||||||
|
boundaryRadiationProperties::New(mesh_);
|
||||||
|
|
||||||
forAll(selectedPatches_, i)
|
forAll(selectedPatches_, i)
|
||||||
{
|
{
|
||||||
label patchID = selectedPatches_[i];
|
label patchID = selectedPatches_[i];
|
||||||
@ -427,9 +423,11 @@ void Foam::radiation::viewFactor::calculate()
|
|||||||
greyDiffusiveViewFactorFixedValueFvPatchScalarField
|
greyDiffusiveViewFactorFixedValueFvPatchScalarField
|
||||||
>(QrPatch);
|
>(QrPatch);
|
||||||
|
|
||||||
const scalarList eb = Qrp.emissivity();
|
const tmp<scalarField> teb = boundaryRadiation.emissivity(patchID);
|
||||||
|
const scalarField& eb = teb();
|
||||||
|
|
||||||
const scalarList& Hoi = Qrp.Qro();
|
const tmp<scalarField> tHoi = Qrp.Qro();
|
||||||
|
const scalarField& Hoi = tHoi();
|
||||||
|
|
||||||
const polyPatch& pp = coarseMesh_.boundaryMesh()[patchID];
|
const polyPatch& pp = coarseMesh_.boundaryMesh()[patchID];
|
||||||
const labelList& coarsePatchFace = coarseMesh_.patchFaceMap()[patchID];
|
const labelList& coarsePatchFace = coarseMesh_.patchFaceMap()[patchID];
|
||||||
|
|||||||
@ -50,8 +50,9 @@ SourceFiles
|
|||||||
#include "scalarMatrices.H"
|
#include "scalarMatrices.H"
|
||||||
#include "globalIndex.H"
|
#include "globalIndex.H"
|
||||||
#include "scalarListIOList.H"
|
#include "scalarListIOList.H"
|
||||||
#include "mapDistribute.H"
|
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
|
#include "IOmapDistribute.H"
|
||||||
|
#include "solarLoad.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -68,13 +69,21 @@ class viewFactor
|
|||||||
:
|
:
|
||||||
public radiationModel
|
public radiationModel
|
||||||
{
|
{
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Static data
|
||||||
|
|
||||||
|
//- Static name for view factor walls
|
||||||
|
static const word viewFactorWalls;
|
||||||
|
|
||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Agglomeration List
|
//- Agglomeration List
|
||||||
labelListIOList finalAgglom_;
|
labelListIOList finalAgglom_;
|
||||||
|
|
||||||
//- Map distributed
|
//- Map distributed
|
||||||
autoPtr<mapDistribute> map_;
|
autoPtr<IOmapDistribute> map_;
|
||||||
|
|
||||||
//- Coarse mesh
|
//- Coarse mesh
|
||||||
singleCellFvMesh coarseMesh_;
|
singleCellFvMesh coarseMesh_;
|
||||||
@ -106,6 +115,12 @@ class viewFactor
|
|||||||
//- Pivot Indices for LU decomposition
|
//- Pivot Indices for LU decomposition
|
||||||
labelList pivotIndices_;
|
labelList pivotIndices_;
|
||||||
|
|
||||||
|
//- Use Solar Load model
|
||||||
|
bool useSolarLoad_;
|
||||||
|
|
||||||
|
//- Solar load radiation model
|
||||||
|
autoPtr<solarLoad> solarLoad_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
|
|||||||
@ -172,7 +172,6 @@ Foam::radiation::greyMeanAbsorptionEmission::greyMeanAbsorptionEmission
|
|||||||
<< iter.key() << nl
|
<< iter.key() << nl
|
||||||
<< " is not found " << nl
|
<< " is not found " << nl
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015 OpenCFD Ltd
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -26,8 +26,6 @@ License
|
|||||||
#include "greyMeanSolidAbsorptionEmission.H"
|
#include "greyMeanSolidAbsorptionEmission.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "unitConversion.H"
|
#include "unitConversion.H"
|
||||||
#include "zeroGradientFvPatchFields.H"
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015 OpenCFD Ltd
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -26,20 +26,7 @@ Class
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
greyMeanSolidAbsorptionEmission radiation absorption and emission
|
greyMeanSolidAbsorptionEmission radiation absorption and emission
|
||||||
coefficients for continuous phase
|
coefficients for solid mixture
|
||||||
|
|
||||||
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
|
SourceFiles
|
||||||
greyMeanSolidAbsorptionEmission.C
|
greyMeanSolidAbsorptionEmission.C
|
||||||
@ -52,6 +39,7 @@ SourceFiles
|
|||||||
#include "absorptionEmissionModel.H"
|
#include "absorptionEmissionModel.H"
|
||||||
#include "solidThermo.H"
|
#include "solidThermo.H"
|
||||||
#include "basicSpecieMixture.H"
|
#include "basicSpecieMixture.H"
|
||||||
|
#include "zeroGradientFvPatchFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,158 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2015 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 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 "multiBandSolidAbsorptionEmission.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace radiation
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(multiBandSolidAbsorptionEmission, 0);
|
||||||
|
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
absorptionEmissionModel,
|
||||||
|
multiBandSolidAbsorptionEmission,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::radiation::multiBandSolidAbsorptionEmission::
|
||||||
|
multiBandSolidAbsorptionEmission
|
||||||
|
(
|
||||||
|
const dictionary& dict,
|
||||||
|
const fvMesh& mesh
|
||||||
|
)
|
||||||
|
:
|
||||||
|
absorptionEmissionModel(dict, mesh),
|
||||||
|
coeffsDict_(dict.subDict(typeName + "Coeffs")),
|
||||||
|
absCoeffs_(maxBands_),
|
||||||
|
emiCoeffs_(maxBands_),
|
||||||
|
nBands_(0)
|
||||||
|
{
|
||||||
|
coeffsDict_.lookup("absorptivity") >> absCoeffs_;
|
||||||
|
coeffsDict_.lookup("emissivity") >> emiCoeffs_;
|
||||||
|
nBands_ = absCoeffs_.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::radiation::multiBandSolidAbsorptionEmission::
|
||||||
|
~multiBandSolidAbsorptionEmission()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::radiation::multiBandSolidAbsorptionEmission::aCont
|
||||||
|
(
|
||||||
|
const label bandI
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
tmp<volScalarField> ta
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"a",
|
||||||
|
mesh().time().timeName(),
|
||||||
|
mesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh(),
|
||||||
|
dimensionedScalar("a", dimless/dimLength, absCoeffs_[bandI])
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
return ta;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::radiation::multiBandSolidAbsorptionEmission::eCont
|
||||||
|
(
|
||||||
|
const label bandI
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
tmp<volScalarField> te
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"e",
|
||||||
|
mesh().time().timeName(),
|
||||||
|
mesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh(),
|
||||||
|
dimensionedScalar("e", dimless/dimLength, emiCoeffs_[bandI])
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
return te;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::radiation::multiBandSolidAbsorptionEmission::ECont
|
||||||
|
(
|
||||||
|
const label bandI
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
tmp<volScalarField> E
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"E",
|
||||||
|
mesh().time().timeName(),
|
||||||
|
mesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh(),
|
||||||
|
dimensionedScalar("E", dimMass/dimLength/pow3(dimTime), 0.0)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
return E;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,147 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2015 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 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::multiBandSolidAbsorptionEmission
|
||||||
|
|
||||||
|
Description
|
||||||
|
|
||||||
|
multiBandSolidAbsorptionEmission radiation absorption/emission for solids.
|
||||||
|
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
multiBandSolidAbsorptionEmission.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef multiBandSolidAbsorptionEmission_H
|
||||||
|
#define multiBandSolidAbsorptionEmission_H
|
||||||
|
|
||||||
|
#include "absorptionEmissionModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace radiation
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class multiBandSolidAbsorptionEmission Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class multiBandSolidAbsorptionEmission
|
||||||
|
:
|
||||||
|
public absorptionEmissionModel
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Public data
|
||||||
|
|
||||||
|
//- Maximum number of bands
|
||||||
|
static const int maxBands_ = 5;
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
//- Absorption model dictionary
|
||||||
|
dictionary coeffsDict_;
|
||||||
|
|
||||||
|
//- Absorption coefficients
|
||||||
|
scalarList absCoeffs_;
|
||||||
|
|
||||||
|
//- Emissivity coefficients
|
||||||
|
scalarList emiCoeffs_;
|
||||||
|
|
||||||
|
//- Bands
|
||||||
|
label nBands_;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("multiBandSolidAbsorptionEmission");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
multiBandSolidAbsorptionEmission
|
||||||
|
(
|
||||||
|
const dictionary& dict,
|
||||||
|
const fvMesh& mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~multiBandSolidAbsorptionEmission();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Access
|
||||||
|
|
||||||
|
// Absorption coefficient
|
||||||
|
|
||||||
|
//- Absorption coefficient
|
||||||
|
tmp<volScalarField> aCont(const label bandI) const;
|
||||||
|
|
||||||
|
|
||||||
|
// Emission coefficient
|
||||||
|
|
||||||
|
//- Emission coefficient
|
||||||
|
tmp<volScalarField> eCont(const label bandI) const;
|
||||||
|
|
||||||
|
|
||||||
|
// Emission contribution
|
||||||
|
|
||||||
|
//- Emission contribution
|
||||||
|
tmp<volScalarField> ECont(const label bandI) const;
|
||||||
|
|
||||||
|
|
||||||
|
inline bool isGrey() const
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Number of bands
|
||||||
|
inline label nBands() const
|
||||||
|
{
|
||||||
|
return nBands_;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace radiation
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,207 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2015 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 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 "boundaryRadiationProperties.H"
|
||||||
|
#include "boundaryRadiationPropertiesFvPatchField.H"
|
||||||
|
#include "fvPatchField.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace radiation
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(boundaryRadiationProperties, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::IOobject Foam::radiation::boundaryRadiationProperties::createIOobject
|
||||||
|
(
|
||||||
|
const fvMesh& mesh, const word name
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
IOobject io
|
||||||
|
(
|
||||||
|
name,
|
||||||
|
mesh.time().constant(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
);
|
||||||
|
|
||||||
|
if (io.headerOk())
|
||||||
|
{
|
||||||
|
io.readOpt() = IOobject::MUST_READ_IF_MODIFIED;
|
||||||
|
return io;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
io.readOpt() = IOobject::NO_READ;
|
||||||
|
return io;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::radiation::boundaryRadiationProperties::boundaryRadiationProperties
|
||||||
|
(
|
||||||
|
const fvMesh& mesh
|
||||||
|
)
|
||||||
|
:
|
||||||
|
MeshObject
|
||||||
|
<
|
||||||
|
fvMesh,
|
||||||
|
Foam::GeometricMeshObject,
|
||||||
|
boundaryRadiationProperties
|
||||||
|
>(mesh),
|
||||||
|
radBoundaryProperties_()
|
||||||
|
{
|
||||||
|
const IOobject boundaryIO
|
||||||
|
(
|
||||||
|
createIOobject(mesh, boundaryRadiationProperties::typeName)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (boundaryIO.readOpt() == IOobject::MUST_READ_IF_MODIFIED)
|
||||||
|
{
|
||||||
|
radBoundaryProperties_.set
|
||||||
|
(
|
||||||
|
new volScalarField(boundaryIO, mesh)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member fucntions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
const Foam::volScalarField& Foam::radiation::boundaryRadiationProperties::
|
||||||
|
radBoundaryProperties() const
|
||||||
|
{
|
||||||
|
return radBoundaryProperties_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::scalarField> Foam::radiation::boundaryRadiationProperties::
|
||||||
|
emissivity(const label index, const label bandI) const
|
||||||
|
{
|
||||||
|
if (!radBoundaryProperties_.empty())
|
||||||
|
{
|
||||||
|
return refCast<const boundaryRadiationPropertiesFvPatchField>
|
||||||
|
(
|
||||||
|
radBoundaryProperties_->boundaryField()[index]
|
||||||
|
).emissivity(bandI);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< "Field 'boundaryRadiationProperties'"
|
||||||
|
<< "is not found in the constant directory."
|
||||||
|
<< "Please add it "
|
||||||
|
<< exit(FatalError);
|
||||||
|
|
||||||
|
return tmp<scalarField>(new scalarField());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::scalarField> Foam::radiation::boundaryRadiationProperties::
|
||||||
|
absorptivity(const label index, const label bandI) const
|
||||||
|
{
|
||||||
|
if (!radBoundaryProperties_.empty())
|
||||||
|
{
|
||||||
|
return refCast<const boundaryRadiationPropertiesFvPatchField>
|
||||||
|
(
|
||||||
|
radBoundaryProperties_->boundaryField()[index]
|
||||||
|
).absorptivity(bandI);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< "Field 'boundaryRadiationProperties'"
|
||||||
|
<< "is not found in the constant directory."
|
||||||
|
<< "Please add it "
|
||||||
|
<< exit(FatalError);
|
||||||
|
|
||||||
|
return tmp<scalarField>(new scalarField());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::scalarField> Foam::radiation::boundaryRadiationProperties::
|
||||||
|
transmissivity(const label index, const label bandI) const
|
||||||
|
{
|
||||||
|
if (!radBoundaryProperties_.empty())
|
||||||
|
{
|
||||||
|
return refCast<const boundaryRadiationPropertiesFvPatchField>
|
||||||
|
(
|
||||||
|
radBoundaryProperties_->boundaryField()[index]
|
||||||
|
).transmissivity(bandI);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< "Field 'boundaryRadiationProperties'"
|
||||||
|
<< "is not found in the constant directory."
|
||||||
|
<< "Please add it "
|
||||||
|
<< exit(FatalError);
|
||||||
|
|
||||||
|
return tmp<scalarField>(new scalarField());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::scalarField> Foam::radiation::boundaryRadiationProperties::
|
||||||
|
reflectivity(const label index, const label bandI) const
|
||||||
|
{
|
||||||
|
if (!radBoundaryProperties_.empty())
|
||||||
|
{
|
||||||
|
return refCast<const boundaryRadiationPropertiesFvPatchField>
|
||||||
|
(
|
||||||
|
radBoundaryProperties_->boundaryField()[index]
|
||||||
|
).reflectivity(bandI);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< "Field 'boundaryRadiationProperties'"
|
||||||
|
<< "is not found in the constant directory."
|
||||||
|
<< "Please add it "
|
||||||
|
<< exit(FatalError);
|
||||||
|
|
||||||
|
return tmp<scalarField>(new scalarField());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::radiation::boundaryRadiationProperties::~boundaryRadiationProperties()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,143 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2015 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 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::fv::boundaryRadiationProperties
|
||||||
|
|
||||||
|
Description
|
||||||
|
Boundary radiation properties holder
|
||||||
|
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
boundaryRadiationProperties.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef boundaryRadiationProperties_H
|
||||||
|
#define boundaryRadiationProperties_H
|
||||||
|
|
||||||
|
#include "MeshObject.H"
|
||||||
|
#include "GeometricField.H"
|
||||||
|
#include "volMesh.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
class fvMesh;
|
||||||
|
|
||||||
|
namespace radiation
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class boundaryRadiationProperties Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class boundaryRadiationProperties
|
||||||
|
:
|
||||||
|
public MeshObject
|
||||||
|
<
|
||||||
|
fvMesh,
|
||||||
|
Foam::GeometricMeshObject,
|
||||||
|
boundaryRadiationProperties
|
||||||
|
>
|
||||||
|
{
|
||||||
|
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
//- AutoPtr to volSacalarField properties
|
||||||
|
autoPtr<volScalarField> radBoundaryProperties_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private member functions
|
||||||
|
|
||||||
|
//- Create IO object if dictionary is present
|
||||||
|
IOobject createIOobject(const fvMesh& mesh, const word) const;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Declare name of the class and its debug switch
|
||||||
|
TypeName("boundaryRadiationProperties");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct given fvMesh and IOobject
|
||||||
|
boundaryRadiationProperties(const fvMesh&);
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Access boundary emissivity on patch
|
||||||
|
tmp<scalarField> emissivity
|
||||||
|
(
|
||||||
|
const label patchId,
|
||||||
|
const label bandI = 0
|
||||||
|
) const;
|
||||||
|
|
||||||
|
|
||||||
|
//- Access boundary absorptivity on patch
|
||||||
|
tmp<scalarField> absorptivity
|
||||||
|
(
|
||||||
|
const label patchId,
|
||||||
|
const label bandI = 0
|
||||||
|
) const;
|
||||||
|
|
||||||
|
|
||||||
|
//- Access boundary transmissivity on patch
|
||||||
|
tmp<scalarField> transmissivity
|
||||||
|
(
|
||||||
|
const label patchId,
|
||||||
|
const label bandI = 0
|
||||||
|
) const;
|
||||||
|
|
||||||
|
//- Access boundary reflectivity on patch
|
||||||
|
tmp<scalarField> reflectivity
|
||||||
|
(
|
||||||
|
const label patchId,
|
||||||
|
const label bandI = 0
|
||||||
|
) const;
|
||||||
|
|
||||||
|
|
||||||
|
//- Access to radBoundaryProperties
|
||||||
|
const volScalarField& radBoundaryProperties() const;
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~boundaryRadiationProperties();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace radiation
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,292 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2015 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 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 "solarCalculator.H"
|
||||||
|
#include "Time.H"
|
||||||
|
#include "unitConversion.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(solarCalculator, 0);
|
||||||
|
|
||||||
|
template<>
|
||||||
|
const char* NamedEnum
|
||||||
|
<
|
||||||
|
solarCalculator::sunDirModel,
|
||||||
|
2
|
||||||
|
>::names[] =
|
||||||
|
{
|
||||||
|
"sunDirConstant",
|
||||||
|
"sunDirTraking"
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
const char* NamedEnum
|
||||||
|
<
|
||||||
|
solarCalculator::sunLModel,
|
||||||
|
3
|
||||||
|
>::names[] =
|
||||||
|
{
|
||||||
|
"sunLoadConstant",
|
||||||
|
"sunLoadFairWeatherConditions",
|
||||||
|
"sunLoadTheoreticalMaximum"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const Foam::NamedEnum<Foam::solarCalculator::sunDirModel, 2>
|
||||||
|
Foam::solarCalculator::sunDirectionModelTypeNames_;
|
||||||
|
|
||||||
|
const Foam::NamedEnum<Foam::solarCalculator::sunLModel, 3>
|
||||||
|
Foam::solarCalculator::sunLoadModelTypeNames_;
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::solarCalculator::calculateBetaTetha()
|
||||||
|
{
|
||||||
|
scalar runTime = 0.0;
|
||||||
|
switch (sunDirectionModel_)
|
||||||
|
{
|
||||||
|
case mSunDirTraking:
|
||||||
|
{
|
||||||
|
runTime = mesh_.time().value();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case mSunDirConstant:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
scalar LSM = 15.0*(readScalar(dict_.lookup("localStandardMeridian")));
|
||||||
|
|
||||||
|
scalar D = readScalar(dict_.lookup("startDay")) + runTime/86400.0;
|
||||||
|
scalar M = 6.24004 + 0.0172*D;
|
||||||
|
scalar EOT = -7.659*sin(M) + 9.863*sin(2*M + 3.5932);
|
||||||
|
|
||||||
|
startTime_ = readScalar(dict_.lookup("startTime"));
|
||||||
|
scalar LST = startTime_ + runTime/3600.0;
|
||||||
|
|
||||||
|
scalar LON = readScalar(dict_.lookup("longitude"));
|
||||||
|
|
||||||
|
scalar AST = LST + EOT/60.0 + (LON - LSM)/15;
|
||||||
|
|
||||||
|
scalar delta = 23.45*sin(degToRad((360*(284 + D))/365));
|
||||||
|
|
||||||
|
scalar H = degToRad(15*(AST - 12));
|
||||||
|
|
||||||
|
scalar L = degToRad(readScalar(dict_.lookup("latitude")));
|
||||||
|
|
||||||
|
scalar deltaRad = degToRad(delta);
|
||||||
|
beta_ = max(asin(cos(L)*cos(deltaRad)*cos(H) + sin(L)*sin(deltaRad)), 1e-3);
|
||||||
|
tetha_ = acos((sin(beta_)*sin(L) - sin(deltaRad))/(cos(beta_)*cos(L)));
|
||||||
|
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
Info << tab << "altitude : " << radToDeg(beta_) << endl;
|
||||||
|
Info << tab << "azimuth : " << radToDeg(tetha_) << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::solarCalculator::calculateSunDirection()
|
||||||
|
{
|
||||||
|
|
||||||
|
dict_.lookup("gridUp") >> gridUp_;
|
||||||
|
gridUp_ /= mag(gridUp_);
|
||||||
|
|
||||||
|
dict_.lookup("gridEast") >> eastDir_;
|
||||||
|
eastDir_ /= mag(eastDir_);
|
||||||
|
|
||||||
|
coord_.reset
|
||||||
|
(
|
||||||
|
new coordinateSystem("grid", vector::zero, gridUp_, eastDir_)
|
||||||
|
);
|
||||||
|
|
||||||
|
direction_.z() = -sin(beta_);
|
||||||
|
direction_.y() = cos(beta_)*cos(tetha_); //North
|
||||||
|
direction_.x() = cos(beta_)*sin(tetha_); //East
|
||||||
|
|
||||||
|
direction_ /= mag(direction_);
|
||||||
|
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
Info<< "Sun direction in absolute coordinates : " << direction_ <<endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
direction_ = coord_->R().transform(direction_);
|
||||||
|
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
Info<< "Sun direction in the Grid coordinates : " << direction_ <<endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::solarCalculator::init()
|
||||||
|
{
|
||||||
|
switch (sunDirectionModel_)
|
||||||
|
{
|
||||||
|
case mSunDirConstant:
|
||||||
|
{
|
||||||
|
if (dict_.found("sunDirection"))
|
||||||
|
{
|
||||||
|
dict_.lookup("sunDirection") >> direction_;
|
||||||
|
direction_ /= mag(direction_);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
calculateBetaTetha();
|
||||||
|
calculateSunDirection();
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case mSunDirTraking:
|
||||||
|
{
|
||||||
|
if (word(mesh_.ddtScheme("default")) == "steadyState")
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< " Sun direction model can not be sunDirtracking if the "
|
||||||
|
<< " case is steady " << nl << exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
dict_.lookup("sunTrackingUpdateInterval") >>
|
||||||
|
sunTrackingUpdateInterval_;
|
||||||
|
|
||||||
|
calculateBetaTetha();
|
||||||
|
calculateSunDirection();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (sunLoadModel_)
|
||||||
|
{
|
||||||
|
case mSunLoadConstant:
|
||||||
|
{
|
||||||
|
dict_.lookup("directSolarRad") >> directSolarRad_;
|
||||||
|
dict_.lookup("diffuseSolarRad") >> diffuseSolarRad_;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case mSunLoadFairWeatherConditions:
|
||||||
|
{
|
||||||
|
A_ = readScalar(dict_.lookup("A"));
|
||||||
|
B_ = readScalar(dict_.lookup("B"));
|
||||||
|
|
||||||
|
if (dict_.found("beta"))
|
||||||
|
{
|
||||||
|
dict_.lookup("beta") >> beta_;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
calculateBetaTetha();
|
||||||
|
}
|
||||||
|
|
||||||
|
directSolarRad_ = A_/exp(B_/sin(beta_));
|
||||||
|
|
||||||
|
groundReflectivity_ =
|
||||||
|
readScalar(dict_.lookup("groundReflectivity"));
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case mSunLoadTheoreticalMaximum:
|
||||||
|
{
|
||||||
|
Setrn_ = readScalar(dict_.lookup("Setrn"));
|
||||||
|
SunPrime_ = readScalar(dict_.lookup("SunPrime"));
|
||||||
|
directSolarRad_ = Setrn_*SunPrime_;
|
||||||
|
|
||||||
|
groundReflectivity_ =
|
||||||
|
readScalar(dict_.lookup("groundReflectivity"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::solarCalculator::solarCalculator
|
||||||
|
(
|
||||||
|
const dictionary& dict,
|
||||||
|
const fvMesh& mesh
|
||||||
|
)
|
||||||
|
:
|
||||||
|
mesh_(mesh),
|
||||||
|
dict_(dict),
|
||||||
|
direction_(vector::zero),
|
||||||
|
directSolarRad_(0.0),
|
||||||
|
diffuseSolarRad_(0.0),
|
||||||
|
groundReflectivity_(0.0),
|
||||||
|
A_(0.0),
|
||||||
|
B_(0.0),
|
||||||
|
beta_(0.0),
|
||||||
|
tetha_(0.0),
|
||||||
|
Setrn_(0.0),
|
||||||
|
SunPrime_(0.0),
|
||||||
|
C_(readScalar(dict.lookup("C"))),
|
||||||
|
sunDirectionModel_
|
||||||
|
(
|
||||||
|
sunDirectionModelTypeNames_.read(dict.lookup("sunDirectionModel"))
|
||||||
|
),
|
||||||
|
sunLoadModel_
|
||||||
|
(
|
||||||
|
sunLoadModelTypeNames_.read(dict.lookup("sunLoadModel"))
|
||||||
|
),
|
||||||
|
coord_()
|
||||||
|
{
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::solarCalculator::~solarCalculator()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::solarCalculator::correctSunDirection()
|
||||||
|
{
|
||||||
|
switch (sunDirectionModel_)
|
||||||
|
{
|
||||||
|
case mSunDirConstant:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case mSunDirTraking:
|
||||||
|
{
|
||||||
|
calculateBetaTetha();
|
||||||
|
calculateSunDirection();
|
||||||
|
directSolarRad_ = A_/exp(B_/sin(max(beta_, ROOTVSMALL)));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,323 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2015 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 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::solarCalculator
|
||||||
|
|
||||||
|
Description
|
||||||
|
The solar calculator model provides information about the Sun direction
|
||||||
|
and Sun load model. The available models are:
|
||||||
|
|
||||||
|
For the Sun direction:
|
||||||
|
1) SunDirConstant : the direction is given in 'sunDirection'
|
||||||
|
2) SunDirTraking : the direction is calculated from the following
|
||||||
|
parameters:
|
||||||
|
localStandardMeridian : GMT (Local Zone Meridian) in hours
|
||||||
|
startDay : day from 1 to 365)
|
||||||
|
startTime: in hours
|
||||||
|
longitude: in degrees
|
||||||
|
latitude: in degrees
|
||||||
|
gridUp: grid orientation upwards
|
||||||
|
gridEast grid orientation eastwards
|
||||||
|
|
||||||
|
This model should be use in transient calculations.
|
||||||
|
The keyword 'sunTrackingUpdateInterval' (in hours) specifies on which
|
||||||
|
interval is the Sun direction updated.
|
||||||
|
|
||||||
|
|
||||||
|
Solar Load models available:
|
||||||
|
1) SunLoadConstant: direct and diffusive heat fluxes are provided by the
|
||||||
|
entries 'directSolarRad' and 'diffuseSolarRad'
|
||||||
|
|
||||||
|
2) SunLoadFairWeatherConditions: The solar fluxes are calculated following
|
||||||
|
the Fair Weather Conditions Method from the ASHRAE Handbook. The entries
|
||||||
|
are:
|
||||||
|
A : Apparent solar irradiation at air mass m = 0
|
||||||
|
B : Atmospheric extinction coefficient
|
||||||
|
beta: Solar altitude (in degrees) above the horizontal. This
|
||||||
|
can be read or calculated providing the respective parameters
|
||||||
|
for Sun position explained above.
|
||||||
|
groundReflectivity : ground reflectivity
|
||||||
|
|
||||||
|
In this model the flux is calculated as:
|
||||||
|
|
||||||
|
directSolarRad = A/exp(B/sin(beta));
|
||||||
|
|
||||||
|
3) SunLoadTheoreticalMaximum: The entries are:
|
||||||
|
Setrn
|
||||||
|
SunPrime:
|
||||||
|
groundReflectivity : ground reflectivity
|
||||||
|
|
||||||
|
In this model the flux is calculated as:
|
||||||
|
|
||||||
|
directSolarRad = Setrn*SunPrime;
|
||||||
|
|
||||||
|
The diffuse on vertical/horizontal walls and ground-reflected radiation are
|
||||||
|
calculated following the ASHRAE Handbook.
|
||||||
|
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
solarCalculator.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef solarCalculator_H
|
||||||
|
#define solarCalculator_H
|
||||||
|
|
||||||
|
#include "fvMesh.H"
|
||||||
|
#include "meshTools.H"
|
||||||
|
#include "DynamicField.H"
|
||||||
|
#include "HashSet.H"
|
||||||
|
#include "coordinateSystem.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class solarCalculator Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class solarCalculator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Public enumeration
|
||||||
|
|
||||||
|
//- Sun direction models
|
||||||
|
enum sunDirModel
|
||||||
|
{
|
||||||
|
mSunDirConstant,
|
||||||
|
mSunDirTraking
|
||||||
|
};
|
||||||
|
|
||||||
|
//- Direct sun load models
|
||||||
|
enum sunLModel
|
||||||
|
{
|
||||||
|
mSunLoadConstant,
|
||||||
|
mSunLoadFairWeatherConditions,
|
||||||
|
mSunLoadTheoreticalMaximum
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
//- Sun direction models
|
||||||
|
static const NamedEnum<sunDirModel, 2> sunDirectionModelTypeNames_;
|
||||||
|
|
||||||
|
//- Sun load models
|
||||||
|
static const NamedEnum<sunLModel, 3> sunLoadModelTypeNames_;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
|
||||||
|
//- Reference to mesh
|
||||||
|
const fvMesh& mesh_;
|
||||||
|
|
||||||
|
//- Dictionary
|
||||||
|
dictionary dict_;
|
||||||
|
|
||||||
|
//- Direction
|
||||||
|
vector direction_;
|
||||||
|
|
||||||
|
//- Direct solar irradiation
|
||||||
|
scalar directSolarRad_;
|
||||||
|
|
||||||
|
//- Diffuse solar irradiation on vertical surfaces
|
||||||
|
scalar diffuseSolarRad_;
|
||||||
|
|
||||||
|
//- Ground reflectivity
|
||||||
|
scalar groundReflectivity_;
|
||||||
|
|
||||||
|
//- Fair weather direct solar load model parameters
|
||||||
|
scalar A_;
|
||||||
|
scalar B_;
|
||||||
|
scalar beta_;
|
||||||
|
scalar tetha_;
|
||||||
|
|
||||||
|
|
||||||
|
//- Maximum theoretical direct solar load model parameters
|
||||||
|
scalar Setrn_;
|
||||||
|
scalar SunPrime_;
|
||||||
|
|
||||||
|
|
||||||
|
//- Diffusive solar load model parameters
|
||||||
|
scalar C_;
|
||||||
|
|
||||||
|
//- Sun direction model
|
||||||
|
sunDirModel sunDirectionModel_;
|
||||||
|
|
||||||
|
//- Sun load model
|
||||||
|
sunLModel sunLoadModel_;
|
||||||
|
|
||||||
|
//- Grid coordinate system
|
||||||
|
autoPtr<coordinateSystem> coord_;
|
||||||
|
|
||||||
|
//- East grid orientation
|
||||||
|
vector eastDir_;
|
||||||
|
|
||||||
|
//- Up grid orientation
|
||||||
|
vector gridUp_;
|
||||||
|
|
||||||
|
//- Interval in decimal hours to update Sun direction for SunDirTraking
|
||||||
|
scalar sunTrackingUpdateInterval_;
|
||||||
|
|
||||||
|
//- Start time for the Sun position (decimal hours)
|
||||||
|
scalar startTime_;
|
||||||
|
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
solarCalculator(const solarCalculator&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const solarCalculator&);
|
||||||
|
|
||||||
|
|
||||||
|
// Private members
|
||||||
|
|
||||||
|
//- Init
|
||||||
|
void init();
|
||||||
|
|
||||||
|
//- Calculate beta and tetha angles
|
||||||
|
void calculateBetaTetha();
|
||||||
|
|
||||||
|
//- Calculate Sun direction
|
||||||
|
void calculateSunDirection();
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Declare name of the class and its debug switch
|
||||||
|
ClassName("solarCalculator");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from dictionary
|
||||||
|
solarCalculator(const dictionary&, const fvMesh&);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
~solarCalculator();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Access
|
||||||
|
|
||||||
|
//- const acess to direction
|
||||||
|
const vector direction() const
|
||||||
|
{
|
||||||
|
return direction_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Non-const access to direction
|
||||||
|
vector& direction()
|
||||||
|
{
|
||||||
|
return direction_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return direct solar irradiation
|
||||||
|
scalar directSolarRad()
|
||||||
|
{
|
||||||
|
return directSolarRad_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return diffuse solar irradiation
|
||||||
|
scalar diffuseSolarRad()
|
||||||
|
{
|
||||||
|
return diffuseSolarRad_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return C consntant
|
||||||
|
scalar C()
|
||||||
|
{
|
||||||
|
return C_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return beta
|
||||||
|
scalar beta()
|
||||||
|
{
|
||||||
|
return beta_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return tetha
|
||||||
|
scalar tetha()
|
||||||
|
{
|
||||||
|
return tetha_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return Sun direction model
|
||||||
|
sunDirModel sunDirectionModel() const
|
||||||
|
{
|
||||||
|
return sunDirectionModel_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return Sun load model
|
||||||
|
sunLModel sunLoadModel() const
|
||||||
|
{
|
||||||
|
return sunLoadModel_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return groundReflectivity
|
||||||
|
scalar groundReflectivity()
|
||||||
|
{
|
||||||
|
return groundReflectivity_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return coordinateSystem
|
||||||
|
const coordinateSystem& coord()
|
||||||
|
{
|
||||||
|
return coord_();
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return sunTrackingUpdateInterval
|
||||||
|
scalar sunTrackingUpdateInterval()
|
||||||
|
{
|
||||||
|
return sunTrackingUpdateInterval_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return startTime
|
||||||
|
scalar startTime()
|
||||||
|
{
|
||||||
|
return startTime_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Recalculate
|
||||||
|
void correctSunDirection();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,94 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2015 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 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 "constantTransmissivity.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace radiation
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(constantTransmissivity, 0);
|
||||||
|
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
transmissivityModel,
|
||||||
|
constantTransmissivity,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::radiation::constantTransmissivity::constantTransmissivity
|
||||||
|
(
|
||||||
|
const dictionary& dict,
|
||||||
|
const fvMesh& mesh
|
||||||
|
)
|
||||||
|
:
|
||||||
|
transmissivityModel(dict, mesh),
|
||||||
|
coeffsDict_(dict.subDict(typeName + "Coeffs")),
|
||||||
|
tau_(readScalar(coeffsDict_.lookup("transmissivity")))
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::radiation::constantTransmissivity::~constantTransmissivity()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::radiation::constantTransmissivity::tauEff(const label bandI) const
|
||||||
|
{
|
||||||
|
tmp<volScalarField> tt
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"tau",
|
||||||
|
mesh_.time().timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
|
),
|
||||||
|
mesh_,
|
||||||
|
dimensionedScalar("tau", dimless/dimLength, tau_)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
return tt;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,111 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2015 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 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::constantTransmissivity
|
||||||
|
|
||||||
|
Description
|
||||||
|
Constant radiation scatter coefficient
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
constantTransmissivity.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef radiationConstantTransmissivity_H
|
||||||
|
#define radiationConstantTransmissivity_H
|
||||||
|
|
||||||
|
#include "transmissivityModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace radiation
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class constantTransmissivity Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class constantTransmissivity
|
||||||
|
:
|
||||||
|
public transmissivityModel
|
||||||
|
{
|
||||||
|
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
//- Coefficients dictionary
|
||||||
|
dictionary coeffsDict_;
|
||||||
|
|
||||||
|
//- Transmissivity coefficient / []
|
||||||
|
scalar tau_;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("constantTransmissivity");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
constantTransmissivity(const dictionary& dict, const fvMesh& mesh);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~constantTransmissivity();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return scatter coefficient
|
||||||
|
tmp<volScalarField> tauEff(const label bandI = 0) const;
|
||||||
|
|
||||||
|
|
||||||
|
//- Is Grey
|
||||||
|
inline bool isGrey() const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Number of bands
|
||||||
|
inline label nBands() const
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace radiation
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,96 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2015 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 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 "multiBandSolidTransmissivity.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace radiation
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(multiBandSolidTransmissivity, 0);
|
||||||
|
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
transmissivityModel,
|
||||||
|
multiBandSolidTransmissivity,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::radiation::multiBandSolidTransmissivity::multiBandSolidTransmissivity
|
||||||
|
(
|
||||||
|
const dictionary& dict,
|
||||||
|
const fvMesh& mesh
|
||||||
|
)
|
||||||
|
:
|
||||||
|
transmissivityModel(dict, mesh),
|
||||||
|
coeffsDict_(dict.subDict(typeName + "Coeffs")),
|
||||||
|
tauCoeffs_(),
|
||||||
|
nBands_(0)
|
||||||
|
{
|
||||||
|
coeffsDict_.lookup("transmissivity") >> tauCoeffs_;
|
||||||
|
nBands_ = tauCoeffs_.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::radiation::multiBandSolidTransmissivity::~multiBandSolidTransmissivity()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::radiation::multiBandSolidTransmissivity::tauEff(const label bandI) const
|
||||||
|
{
|
||||||
|
tmp<volScalarField> tt
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"t",
|
||||||
|
mesh_.time().timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh_,
|
||||||
|
dimensionedScalar("t", dimless/dimLength, tauCoeffs_[bandI])
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
return tt;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,132 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2015 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 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::multiBandSolidTransmissivity
|
||||||
|
|
||||||
|
Description
|
||||||
|
|
||||||
|
multiBandSolidTransmissivity radiation transmissivity for solids.
|
||||||
|
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
multiBandSolidTransmissivity.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef multiBandSolidTransmissivity_H
|
||||||
|
#define multiBandSolidTransmissivity_H
|
||||||
|
|
||||||
|
#include "transmissivityModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace radiation
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class multiBandSolidTransmissivity Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class multiBandSolidTransmissivity
|
||||||
|
:
|
||||||
|
public transmissivityModel
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Public data
|
||||||
|
|
||||||
|
//- Maximum number of bands
|
||||||
|
static const label maxBands_ = 5;
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
//- Absorption model dictionary
|
||||||
|
dictionary coeffsDict_;
|
||||||
|
|
||||||
|
//- Absorption coefficients
|
||||||
|
scalarList tauCoeffs_;
|
||||||
|
|
||||||
|
//- Bands
|
||||||
|
label nBands_;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("multiBandSolidTransmissivity");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
multiBandSolidTransmissivity
|
||||||
|
(
|
||||||
|
const dictionary& dict,
|
||||||
|
const fvMesh& mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~multiBandSolidTransmissivity();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Access
|
||||||
|
|
||||||
|
//- Transmissivity coefficient
|
||||||
|
tmp<volScalarField> tauEff(const label bandI) const;
|
||||||
|
|
||||||
|
|
||||||
|
//- Is Grey
|
||||||
|
inline bool isGrey() const
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Number of bands
|
||||||
|
inline label nBands() const
|
||||||
|
{
|
||||||
|
return nBands_;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace radiation
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2015 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 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 "noTransmissivity.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace radiation
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(noTransmissivity, 0);
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
transmissivityModel,
|
||||||
|
noTransmissivity,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::radiation::noTransmissivity::noTransmissivity
|
||||||
|
(
|
||||||
|
const dictionary& dict,
|
||||||
|
const fvMesh& mesh
|
||||||
|
)
|
||||||
|
:
|
||||||
|
transmissivityModel(dict, mesh)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::radiation::noTransmissivity::~noTransmissivity()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField> Foam::radiation::noTransmissivity::tauEff
|
||||||
|
(
|
||||||
|
const label bandI
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return tmp<volScalarField>
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"tau",
|
||||||
|
mesh_.time().timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
|
),
|
||||||
|
mesh_,
|
||||||
|
dimensionedScalar("zero", dimless, 0.0)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,101 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2015 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 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::noTransmissivity
|
||||||
|
|
||||||
|
Description
|
||||||
|
Dummy transmissivity model for 'none'
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
noTransmissivity.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef radiationConstantScatter_H
|
||||||
|
#define radiationConstantScatter_H
|
||||||
|
|
||||||
|
#include "transmissivityModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace radiation
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class noTransmissivity Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class noTransmissivity
|
||||||
|
:
|
||||||
|
public transmissivityModel
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("none");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
noTransmissivity(const dictionary& dict, const fvMesh& mesh);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~noTransmissivity();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return scatter coefficient
|
||||||
|
tmp<volScalarField> tauEff(const label bandI = 0) const;
|
||||||
|
|
||||||
|
//- Is Grey
|
||||||
|
inline bool isGrey() const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Number of bands
|
||||||
|
inline label nBands() const
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace radiation
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2015 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 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 "error.H"
|
||||||
|
#include "transmissivityModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace radiation
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(transmissivityModel, 0);
|
||||||
|
defineRunTimeSelectionTable(transmissivityModel, dictionary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::radiation::transmissivityModel::transmissivityModel
|
||||||
|
(
|
||||||
|
const dictionary&,
|
||||||
|
const fvMesh& mesh
|
||||||
|
)
|
||||||
|
:
|
||||||
|
mesh_(mesh)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::radiation::transmissivityModel::~transmissivityModel()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,123 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2015 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 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::transmissivityModel
|
||||||
|
|
||||||
|
Description
|
||||||
|
Base class for radiation scattering
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef transmissivityModel_H
|
||||||
|
#define transmissivityModel_H
|
||||||
|
|
||||||
|
#include "IOdictionary.H"
|
||||||
|
#include "autoPtr.H"
|
||||||
|
#include "runTimeSelectionTables.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace radiation
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class transmissivityModel Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class transmissivityModel
|
||||||
|
{
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Protected data
|
||||||
|
|
||||||
|
//- Reference to the fvMesh
|
||||||
|
const fvMesh& mesh_;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("transmissivityModel");
|
||||||
|
|
||||||
|
// Declare runtime constructor selection table
|
||||||
|
|
||||||
|
declareRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
autoPtr,
|
||||||
|
transmissivityModel,
|
||||||
|
dictionary,
|
||||||
|
(
|
||||||
|
const dictionary& dict,
|
||||||
|
const fvMesh& mesh
|
||||||
|
),
|
||||||
|
(dict, mesh)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
transmissivityModel(const dictionary& dict, const fvMesh& mesh);
|
||||||
|
|
||||||
|
|
||||||
|
// Selector
|
||||||
|
|
||||||
|
static autoPtr<transmissivityModel> New
|
||||||
|
(
|
||||||
|
const dictionary& dict,
|
||||||
|
const fvMesh& mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~transmissivityModel();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return scatter coefficient
|
||||||
|
virtual tmp<volScalarField> tauEff(const label bandI = 0) const = 0;
|
||||||
|
|
||||||
|
//- Is Grey
|
||||||
|
virtual bool isGrey() const = 0;
|
||||||
|
|
||||||
|
//- Number of bands
|
||||||
|
virtual label nBands() const = 0;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace radiation
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2015 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 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 "error.H"
|
||||||
|
#include "transmissivityModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::autoPtr<Foam::radiation::transmissivityModel> Foam::radiation::
|
||||||
|
transmissivityModel::New
|
||||||
|
(
|
||||||
|
const dictionary& dict,
|
||||||
|
const fvMesh& mesh
|
||||||
|
)
|
||||||
|
{
|
||||||
|
const word modelType(dict.lookup("transmissivityModel"));
|
||||||
|
|
||||||
|
Info<< "Selecting transmissivityModel " << modelType << endl;
|
||||||
|
|
||||||
|
dictionaryConstructorTable::iterator cstrIter =
|
||||||
|
dictionaryConstructorTablePtr_->find(modelType);
|
||||||
|
|
||||||
|
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< "Unknown transmissivityModel type "
|
||||||
|
<< modelType << nl << nl
|
||||||
|
<< "Valid transmissivityModel types are :" << nl
|
||||||
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
return autoPtr<transmissivityModel>(cstrIter()(dict, mesh));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -24,9 +24,6 @@ boundaryField
|
|||||||
region0_to_pyrolysisRegion_coupledWall
|
region0_to_pyrolysisRegion_coupledWall
|
||||||
{
|
{
|
||||||
type greyDiffusiveRadiation;
|
type greyDiffusiveRadiation;
|
||||||
T T;
|
|
||||||
emissivityMode solidRadiation;
|
|
||||||
emissivity uniform 1.0;
|
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,9 +35,6 @@ boundaryField
|
|||||||
".*"
|
".*"
|
||||||
{
|
{
|
||||||
type greyDiffusiveRadiation;
|
type greyDiffusiveRadiation;
|
||||||
T T;
|
|
||||||
emissivityMode lookup;
|
|
||||||
emissivity uniform 1.0;
|
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,5 +37,6 @@ greyMeanSolidAbsorptionEmissionCoeffs
|
|||||||
|
|
||||||
scatterModel none;
|
scatterModel none;
|
||||||
|
|
||||||
|
transmissivityModel none;
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -53,5 +53,6 @@ scatterModel none;
|
|||||||
|
|
||||||
sootModel none;
|
sootModel none;
|
||||||
|
|
||||||
|
transmissivityModel none;
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -23,17 +23,12 @@ boundaryField
|
|||||||
".*"
|
".*"
|
||||||
{
|
{
|
||||||
type MarshakRadiation;
|
type MarshakRadiation;
|
||||||
T T;
|
|
||||||
emissivityMode lookup;
|
|
||||||
emissivity uniform 1.0;
|
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
"(region0_to.*)"
|
"(region0_to.*)"
|
||||||
{
|
{
|
||||||
type MarshakRadiation;
|
type MarshakRadiation;
|
||||||
T T;
|
|
||||||
emissivityMode solidRadiation;
|
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,16 +23,11 @@ boundaryField
|
|||||||
".*"
|
".*"
|
||||||
{
|
{
|
||||||
type greyDiffusiveRadiation;
|
type greyDiffusiveRadiation;
|
||||||
T T;
|
|
||||||
emissivityMode lookup;
|
|
||||||
emissivity uniform 1.0;
|
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
"(region0_to.*)"
|
"(region0_to.*)"
|
||||||
{
|
{
|
||||||
type greyDiffusiveRadiation;
|
type greyDiffusiveRadiation;
|
||||||
T T;
|
|
||||||
emissivityMode solidRadiation;
|
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,5 +39,6 @@ greyMeanSolidAbsorptionEmissionCoeffs
|
|||||||
|
|
||||||
scatterModel none;
|
scatterModel none;
|
||||||
|
|
||||||
|
transmissivityModel none;
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -193,4 +193,6 @@ scatterModel none;
|
|||||||
|
|
||||||
sootModel none;
|
sootModel none;
|
||||||
|
|
||||||
|
transmissivityModel none;
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -23,9 +23,6 @@ boundaryField
|
|||||||
".*"
|
".*"
|
||||||
{
|
{
|
||||||
type MarshakRadiation;
|
type MarshakRadiation;
|
||||||
T T;
|
|
||||||
emissivityMode lookup;
|
|
||||||
emissivity uniform 1.0;
|
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,9 +23,6 @@ boundaryField
|
|||||||
".*"
|
".*"
|
||||||
{
|
{
|
||||||
type greyDiffusiveRadiation;
|
type greyDiffusiveRadiation;
|
||||||
T T;
|
|
||||||
emissivityMode lookup;
|
|
||||||
emissivity uniform 1.0;
|
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,37 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
object boundaryRadiationProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
".*"
|
||||||
|
{
|
||||||
|
type boundaryRadiation;
|
||||||
|
mode lookup;
|
||||||
|
emissivity uniform 1.0;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -197,4 +197,8 @@ mixtureFractionSootCoeffs
|
|||||||
nuSoot 0.055;
|
nuSoot 0.055;
|
||||||
Wsoot 12;
|
Wsoot 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
transmissivityModel none;
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -23,9 +23,6 @@ boundaryField
|
|||||||
".*"
|
".*"
|
||||||
{
|
{
|
||||||
type MarshakRadiation;
|
type MarshakRadiation;
|
||||||
T T;
|
|
||||||
emissivityMode lookup;
|
|
||||||
emissivity uniform 1.0;
|
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,9 +23,6 @@ boundaryField
|
|||||||
".*"
|
".*"
|
||||||
{
|
{
|
||||||
type greyDiffusiveRadiation;
|
type greyDiffusiveRadiation;
|
||||||
T T;
|
|
||||||
emissivityMode lookup;
|
|
||||||
emissivity uniform 1;
|
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,33 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
object boundaryRadiationProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
".*"
|
||||||
|
{
|
||||||
|
type boundaryRadiation;
|
||||||
|
mode lookup;
|
||||||
|
emissivity uniform 1.0;
|
||||||
|
absorptivity uniform 0.0;
|
||||||
|
value uniform 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -192,4 +192,7 @@ scatterModel none;
|
|||||||
|
|
||||||
sootModel none;
|
sootModel none;
|
||||||
|
|
||||||
|
transmissivityModel none;
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -23,36 +23,24 @@ boundaryField
|
|||||||
floor
|
floor
|
||||||
{
|
{
|
||||||
type MarshakRadiation;
|
type MarshakRadiation;
|
||||||
T T;
|
|
||||||
emissivityMode lookup;
|
|
||||||
emissivity uniform 1.0;
|
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
fixedWalls
|
fixedWalls
|
||||||
{
|
{
|
||||||
type MarshakRadiation;
|
type MarshakRadiation;
|
||||||
T T;
|
|
||||||
emissivityMode lookup;
|
|
||||||
emissivity uniform 1.0;
|
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ceiling
|
ceiling
|
||||||
{
|
{
|
||||||
type MarshakRadiation;
|
type MarshakRadiation;
|
||||||
T T;
|
|
||||||
emissivityMode lookup;
|
|
||||||
emissivity uniform 1.0;
|
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
box
|
box
|
||||||
{
|
{
|
||||||
type MarshakRadiation;
|
type MarshakRadiation;
|
||||||
T T;
|
|
||||||
emissivityMode lookup;
|
|
||||||
emissivity uniform 1.0;
|
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,60 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
object boundaryRadiationProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
box
|
||||||
|
{
|
||||||
|
type boundaryRadiation;
|
||||||
|
mode lookup;
|
||||||
|
emissivity uniform 1.0;
|
||||||
|
absorptivity uniform 1.0;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
floor
|
||||||
|
{
|
||||||
|
type boundaryRadiation;
|
||||||
|
mode lookup;
|
||||||
|
emissivity uniform 1.0;
|
||||||
|
absorptivity uniform 1.0;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ceiling
|
||||||
|
{
|
||||||
|
type boundaryRadiation;
|
||||||
|
mode lookup;
|
||||||
|
emissivity uniform 1.0;
|
||||||
|
absorptivity uniform 1.0;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
fixedWalls
|
||||||
|
{
|
||||||
|
type boundaryRadiation;
|
||||||
|
mode lookup;
|
||||||
|
emissivity uniform 1.0;
|
||||||
|
absorptivity uniform 1.0;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -35,5 +35,6 @@ scatterModel none;
|
|||||||
|
|
||||||
sootModel none;
|
sootModel none;
|
||||||
|
|
||||||
|
transmissivityModel none;
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -23,9 +23,6 @@ boundaryField
|
|||||||
".*"
|
".*"
|
||||||
{
|
{
|
||||||
type greyDiffusiveRadiation;
|
type greyDiffusiveRadiation;
|
||||||
T T;
|
|
||||||
emissivityMode lookup;
|
|
||||||
emissivity uniform 1.0;
|
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,33 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
object boundaryRadiationProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
".*"
|
||||||
|
{
|
||||||
|
type boundaryRadiation;
|
||||||
|
mode lookup;
|
||||||
|
emissivity uniform 1.0;
|
||||||
|
absorptivity uniform 1.0;
|
||||||
|
value uniform 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -44,4 +44,6 @@ scatterModel none;
|
|||||||
|
|
||||||
sootModel none;
|
sootModel none;
|
||||||
|
|
||||||
|
transmissivityModel none;
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -0,0 +1,62 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
location "0/air";
|
||||||
|
object G;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [1 0 -3 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
air_to_floor
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
air_to_solid
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev-OpenCFD |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0/air";
|
||||||
|
object IDefault;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 1 0 -3 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type greyDiffusiveRadiation;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type greyDiffusiveRadiation;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type greyDiffusiveRadiation;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type greyDiffusiveRadiation;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type greyDiffusiveRadiation;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
air_to_floor
|
||||||
|
{
|
||||||
|
type greyDiffusiveRadiation;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
air_to_solid
|
||||||
|
{
|
||||||
|
type greyDiffusiveRadiation;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
location "0/air";
|
||||||
|
object Qr;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [1 0 -3 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
air_to_floor
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
air_to_solid
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,79 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev-OpenCFD |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0/air";
|
||||||
|
object T;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 0 0 1 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 300;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
value uniform 300;
|
||||||
|
inletValue uniform 300;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
value uniform 300;
|
||||||
|
inletValue uniform 300;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
value uniform 300;
|
||||||
|
inletValue uniform 300;
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
value uniform 300;
|
||||||
|
inletValue uniform 300;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
value uniform 300;
|
||||||
|
inletValue uniform 300;
|
||||||
|
}
|
||||||
|
air_to_floor
|
||||||
|
{
|
||||||
|
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||||
|
value uniform 300;
|
||||||
|
inletValue uniform 300;
|
||||||
|
Tnbr T;
|
||||||
|
kappa fluidThermo;
|
||||||
|
QrNbr none;
|
||||||
|
Qr Qr;
|
||||||
|
kappaName none;
|
||||||
|
}
|
||||||
|
air_to_solid
|
||||||
|
{
|
||||||
|
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||||
|
value uniform 300;
|
||||||
|
inletValue uniform 300;
|
||||||
|
Tnbr T;
|
||||||
|
kappa fluidThermo;
|
||||||
|
QrNbr none;
|
||||||
|
Qr Qr;
|
||||||
|
kappaName none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,74 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev-OpenCFD |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volVectorField;
|
||||||
|
location "0/air";
|
||||||
|
object U;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 1 -1 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform ( 0.1 0 0 );
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type pressureInletOutletVelocity;
|
||||||
|
value uniform ( 0 0 0 );
|
||||||
|
phi phi;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type pressureInletOutletVelocity;
|
||||||
|
value uniform ( 0 0 0 );
|
||||||
|
phi phi;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type pressureInletOutletVelocity;
|
||||||
|
value uniform ( 0 0 0 );
|
||||||
|
phi phi;
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type pressureInletOutletVelocity;
|
||||||
|
value uniform ( 0 0 0 );
|
||||||
|
phi phi;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type pressureInletOutletVelocity;
|
||||||
|
value uniform ( 0 0 0 );
|
||||||
|
phi phi;
|
||||||
|
}
|
||||||
|
air_to_floor
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform ( 0 0 0 );
|
||||||
|
phi phi;
|
||||||
|
}
|
||||||
|
air_to_solid
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform ( 0 0 0 );
|
||||||
|
phi phi;
|
||||||
|
}
|
||||||
|
region0_to_floor_floor_zone
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform ( 0 0 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
location "0/air";
|
||||||
|
object alphat;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [1 -1 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
air_to_floor
|
||||||
|
{
|
||||||
|
type compressible::alphatWallFunction;
|
||||||
|
Prt 0.85;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
air_to_solid
|
||||||
|
{
|
||||||
|
type compressible::alphatWallFunction;
|
||||||
|
Prt 0.85;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev-OpenCFD |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0/air";
|
||||||
|
object epsilon;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 2 -3 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 0.01;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
value uniform 0.01;
|
||||||
|
inletValue uniform 0.01;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
value uniform 0.01;
|
||||||
|
inletValue uniform 0.01;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
value uniform 0.01;
|
||||||
|
inletValue uniform 0.01;
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
value uniform 0.01;
|
||||||
|
inletValue uniform 0.01;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
value uniform 0.01;
|
||||||
|
inletValue uniform 0.01;
|
||||||
|
}
|
||||||
|
air_to_floor
|
||||||
|
{
|
||||||
|
type epsilonWallFunction;
|
||||||
|
value uniform 0.01;
|
||||||
|
inletValue uniform 0.01;
|
||||||
|
}
|
||||||
|
air_to_solid
|
||||||
|
{
|
||||||
|
type epsilonWallFunction;
|
||||||
|
value uniform 0.01;
|
||||||
|
inletValue uniform 0.01;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev-OpenCFD |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0/air";
|
||||||
|
object k;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 2 -2 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 0.1;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
value uniform 0.1;
|
||||||
|
inletValue uniform 0.1;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
value uniform 0.1;
|
||||||
|
inletValue uniform 0.1;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
value uniform 0.1;
|
||||||
|
inletValue uniform 0.1;
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
value uniform 0.1;
|
||||||
|
inletValue uniform 0.1;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
value uniform 0.1;
|
||||||
|
inletValue uniform 0.1;
|
||||||
|
}
|
||||||
|
air_to_floor
|
||||||
|
{
|
||||||
|
type kqRWallFunction;
|
||||||
|
value uniform 0.1;
|
||||||
|
inletValue uniform 0.1;
|
||||||
|
}
|
||||||
|
air_to_solid
|
||||||
|
{
|
||||||
|
type kqRWallFunction;
|
||||||
|
value uniform 0.1;
|
||||||
|
inletValue uniform 0.1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,68 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
location "0/air";
|
||||||
|
object nut;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
air_to_floor
|
||||||
|
{
|
||||||
|
type nutkWallFunction;
|
||||||
|
Cmu 0.09;
|
||||||
|
kappa 0.41;
|
||||||
|
E 9.8;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
air_to_solid
|
||||||
|
{
|
||||||
|
type nutkWallFunction;
|
||||||
|
Cmu 0.09;
|
||||||
|
kappa 0.41;
|
||||||
|
E 9.8;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev-OpenCFD |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0/air";
|
||||||
|
object p;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 1 -1 -2 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 100000;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
air_to_floor
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
air_to_solid
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 100000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,104 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev-OpenCFD |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0/air";
|
||||||
|
object p_rgh;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 1 -1 -2 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 100000;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type totalPressure;
|
||||||
|
value $internalField;
|
||||||
|
p0 $internalField;
|
||||||
|
U U;
|
||||||
|
phi phi;
|
||||||
|
rho rho;
|
||||||
|
psi none;
|
||||||
|
gamma 0;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type totalPressure;
|
||||||
|
value $internalField;
|
||||||
|
p0 $internalField;
|
||||||
|
U U;
|
||||||
|
phi phi;
|
||||||
|
rho rho;
|
||||||
|
psi none;
|
||||||
|
gamma 0;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type totalPressure;
|
||||||
|
value $internalField;
|
||||||
|
p0 $internalField;
|
||||||
|
U U;
|
||||||
|
phi phi;
|
||||||
|
rho rho;
|
||||||
|
psi none;
|
||||||
|
gamma 0;
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type totalPressure;
|
||||||
|
value $internalField;
|
||||||
|
p0 $internalField;
|
||||||
|
U U;
|
||||||
|
phi phi;
|
||||||
|
rho rho;
|
||||||
|
psi none;
|
||||||
|
gamma 0;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type totalPressure;
|
||||||
|
value $internalField;
|
||||||
|
p0 $internalField;
|
||||||
|
U U;
|
||||||
|
phi phi;
|
||||||
|
rho rho;
|
||||||
|
psi none;
|
||||||
|
gamma 0;
|
||||||
|
}
|
||||||
|
air_to_floor
|
||||||
|
{
|
||||||
|
type fixedFluxPressure;
|
||||||
|
value uniform 100000;
|
||||||
|
p0 $internalField;
|
||||||
|
U U;
|
||||||
|
phi phi;
|
||||||
|
rho rho;
|
||||||
|
psi none;
|
||||||
|
gamma 0;
|
||||||
|
}
|
||||||
|
air_to_solid
|
||||||
|
{
|
||||||
|
type fixedFluxPressure;
|
||||||
|
value uniform 100000;
|
||||||
|
p0 $internalField;
|
||||||
|
U U;
|
||||||
|
phi phi;
|
||||||
|
rho rho;
|
||||||
|
psi none;
|
||||||
|
gamma 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,83 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev-OpenCFD |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0/floor";
|
||||||
|
object T;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 0 0 1 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 300;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
value uniform 300;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
value uniform 300;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
value uniform 300;
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
value uniform 300;
|
||||||
|
}
|
||||||
|
minZ
|
||||||
|
{
|
||||||
|
type externalWallHeatFluxTemperature;
|
||||||
|
value uniform 300;
|
||||||
|
kappa solidThermo;
|
||||||
|
Ta uniform 313;
|
||||||
|
h uniform 1000000;
|
||||||
|
thicknessLayers ( 1 2 );
|
||||||
|
kappaLayers ( 100 200 );
|
||||||
|
kappaName none;
|
||||||
|
}
|
||||||
|
floor_to_domain3
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
value uniform 300;
|
||||||
|
}
|
||||||
|
floor_to_air
|
||||||
|
{
|
||||||
|
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||||
|
value uniform 300;
|
||||||
|
Tnbr T;
|
||||||
|
kappa solidThermo;
|
||||||
|
QrNbr Qr;
|
||||||
|
Qr none;
|
||||||
|
kappaName none;
|
||||||
|
}
|
||||||
|
floor_to_solid
|
||||||
|
{
|
||||||
|
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||||
|
value uniform 300;
|
||||||
|
Tnbr T;
|
||||||
|
kappa solidThermo;
|
||||||
|
QrNbr none;
|
||||||
|
Qr none;
|
||||||
|
kappaName none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,67 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
location "0/floor";
|
||||||
|
object p;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [1 -1 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 100000;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
minZ
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
floor_to_domain3
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
floor_to_air
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
floor_to_solid
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev-OpenCFD |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0/solid";
|
||||||
|
object T;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 0 0 1 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 300;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
solid_to_domain3
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform 300;
|
||||||
|
}
|
||||||
|
solid_to_air
|
||||||
|
{
|
||||||
|
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||||
|
value uniform 300;
|
||||||
|
Tnbr T;
|
||||||
|
kappa solidThermo;
|
||||||
|
QrNbr Qr;
|
||||||
|
Qr none;
|
||||||
|
kappaName none;
|
||||||
|
}
|
||||||
|
solid_to_floor
|
||||||
|
{
|
||||||
|
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||||
|
value uniform 300;
|
||||||
|
Tnbr T;
|
||||||
|
kappa solidThermo;
|
||||||
|
QrNbr none;
|
||||||
|
Qr none;
|
||||||
|
kappaName none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
location "0/solid";
|
||||||
|
object p;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [1 -1 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 100000;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
solid_to_domain3
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
solid_to_air
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
solid_to_floor
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
33
tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean
Executable file
33
tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
|
# Source tutorial clean functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
|
cleanCase
|
||||||
|
|
||||||
|
rm -rf VTK
|
||||||
|
rm -rf constant/cellToRegion constant/polyMesh/sets
|
||||||
|
|
||||||
|
rm -rf constant/air/polyMesh
|
||||||
|
rm -rf constant/solid/polyMesh
|
||||||
|
rm -rf constant/floor/polyMesh
|
||||||
|
rm -rf constant/triSurface
|
||||||
|
|
||||||
|
rm -f constant/air/F
|
||||||
|
rm -f constant/air/constructMap*
|
||||||
|
rm -f constant/air/finalAgglom
|
||||||
|
rm -f constant/air/globalFaceFaces
|
||||||
|
rm -f constant/air/mapDist
|
||||||
|
rm -f constant/air/visibleFaceFaces
|
||||||
|
|
||||||
|
rm -f 0/air/facesAgglomeration
|
||||||
|
rm -f 0/air/viewFactorField
|
||||||
|
rm -f 0/air/cellToRegion
|
||||||
|
rm -f 0/floor/cellToRegion
|
||||||
|
rm -f 0/solid/cellToRegion
|
||||||
|
rm -f 0/cellToRegion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
34
tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun
Executable file
34
tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
|
|
||||||
|
# Source tutorial run functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
# Setup case
|
||||||
|
./Allrun.pre
|
||||||
|
|
||||||
|
#-- Run on single processor
|
||||||
|
|
||||||
|
# Agglomerate patch faces
|
||||||
|
for i in air
|
||||||
|
do
|
||||||
|
faceAgglomerate -region $i -dict constant/viewFactorsDict > log.faceAgglomerate.$i 2>&1
|
||||||
|
done
|
||||||
|
|
||||||
|
# Generate view factors
|
||||||
|
for i in air
|
||||||
|
do
|
||||||
|
viewFactorsGen -region $i > log.viewFactorsGen.$i 2>&1
|
||||||
|
done
|
||||||
|
|
||||||
|
runApplication `getApplication`
|
||||||
|
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "creating files for paraview post-processing"
|
||||||
|
echo
|
||||||
|
paraFoam -touchAll
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
29
tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun.pre
Executable file
29
tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun.pre
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
|
|
||||||
|
# Source tutorial run functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication topoSet
|
||||||
|
runApplication splitMeshRegions -cellZones -overwrite
|
||||||
|
|
||||||
|
# Remove unwanted region
|
||||||
|
rm -r 0/domain3
|
||||||
|
rm -r constant/domain3
|
||||||
|
rm -r system/domain3
|
||||||
|
|
||||||
|
# remove fluid fields from solid regions (important for post-processing)
|
||||||
|
for i in solid floor
|
||||||
|
do
|
||||||
|
rm -f 0*/$i/{rho,mut,alphat,epsilon,k,U,p_rgh,Qr,G,IDefault}
|
||||||
|
done
|
||||||
|
|
||||||
|
for i in air solid floor
|
||||||
|
do
|
||||||
|
changeDictionary -region $i > log.changeDictionary.$i 2>&1
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
object boundaryRadiationProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
".*"
|
||||||
|
{
|
||||||
|
type boundaryRadiation;
|
||||||
|
mode lookup;
|
||||||
|
emissivity uniform 1.0;
|
||||||
|
absorptivity uniform 0.0;
|
||||||
|
transmissivity uniform 1.0;
|
||||||
|
|
||||||
|
value uniform 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
air_to_solid
|
||||||
|
{
|
||||||
|
type boundaryRadiation;
|
||||||
|
mode solidRadiation;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
air_to_floor
|
||||||
|
{
|
||||||
|
type boundaryRadiation;
|
||||||
|
mode solidRadiation;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
/*--------------------------------*- 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 uniformDimensionedVectorField;
|
||||||
|
object g;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 1 -2 0 0 0 0];
|
||||||
|
value (0 0 -9.81);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,97 @@
|
|||||||
|
/*--------------------------------*- 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 on;
|
||||||
|
|
||||||
|
radiationModel solarLoad;
|
||||||
|
|
||||||
|
solarLoadCoeffs
|
||||||
|
{
|
||||||
|
useVFbeamToDiffuse true;
|
||||||
|
|
||||||
|
sunDirectionModel sunDirTraking;//sunDirConstant;
|
||||||
|
|
||||||
|
// Time interval to update Sun position (sec)
|
||||||
|
sunTrackingUpdateInterval 800;
|
||||||
|
|
||||||
|
// Sun ray direction. Give the sunDirection or calculated using the
|
||||||
|
// solar calculator
|
||||||
|
|
||||||
|
//sunDirection (-1 1 -1);
|
||||||
|
|
||||||
|
localStandardMeridian 9; // GMT offset (hours)
|
||||||
|
startDay 204; // day of the year
|
||||||
|
startTime 15; // time of the day (hours decimal)
|
||||||
|
longitude 139.74; // longitude (degrees)
|
||||||
|
latitude 35.658; // latitude (degrees)
|
||||||
|
|
||||||
|
// Grid orientation
|
||||||
|
gridUp (0 0 1);
|
||||||
|
gridEast (1 0 0);
|
||||||
|
|
||||||
|
// Energy spectrum
|
||||||
|
spectralDistribution (1 1);
|
||||||
|
|
||||||
|
// Solar model:
|
||||||
|
// sunLoadConstant-sunLoadFairWeatherConditions-SunLoadTheoreticalMaximum;
|
||||||
|
sunLoadModel sunLoadFairWeatherConditions;
|
||||||
|
|
||||||
|
// Sun load constant model
|
||||||
|
directSolarRad 500;
|
||||||
|
diffuseSolarRad 40;
|
||||||
|
|
||||||
|
// Fair Weather Conditions Model Constants.
|
||||||
|
// Calculate beta from the Solar calculator or input
|
||||||
|
A 300; // Apparent solar irradiation at air mass m = 0
|
||||||
|
B 0.142; // Atmospheric extinction coefficient
|
||||||
|
//beta 45; // Solar altitude (in degrees) above the horizontal
|
||||||
|
|
||||||
|
// Theoretical maximum model constants
|
||||||
|
Setrn 10;
|
||||||
|
SunPrime 1;
|
||||||
|
|
||||||
|
// Ground reflectivity
|
||||||
|
groundReflectivity 0.2;
|
||||||
|
|
||||||
|
// Solar diffusivity constants
|
||||||
|
C 0.058; // Model constant
|
||||||
|
|
||||||
|
// Radiative flux coupling flags
|
||||||
|
solidCoupled true; //Couple through Qr the solid regions (default true)
|
||||||
|
wallCoupled false; //Couple through Qr wall patches (default false)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
viewFactorCoeffs
|
||||||
|
{
|
||||||
|
smoothing true; //Smooth view factor matrix (use when in a close surface
|
||||||
|
//to force Sum(Fij = 1)
|
||||||
|
constantEmissivity true; //constant emissivity on surfaces.
|
||||||
|
}
|
||||||
|
|
||||||
|
// Number of flow iterations per radiation iteration
|
||||||
|
solverFreq 1;
|
||||||
|
|
||||||
|
absorptionEmissionModel none;
|
||||||
|
|
||||||
|
scatterModel none;
|
||||||
|
|
||||||
|
sootModel none;
|
||||||
|
|
||||||
|
transmissivityModel none;
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
/*--------------------------------*- 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/bottomAir";
|
||||||
|
object thermophysicalProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
thermoType
|
||||||
|
{
|
||||||
|
type heRhoThermo;
|
||||||
|
mixture pureMixture;
|
||||||
|
transport const;
|
||||||
|
thermo hConst;
|
||||||
|
equationOfState perfectGas;
|
||||||
|
specie specie;
|
||||||
|
energy sensibleEnthalpy;
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
specie
|
||||||
|
{
|
||||||
|
nMoles 1;
|
||||||
|
molWeight 28.9;
|
||||||
|
}
|
||||||
|
thermodynamics
|
||||||
|
{
|
||||||
|
Cp 1000;
|
||||||
|
Hf 0;
|
||||||
|
}
|
||||||
|
transport
|
||||||
|
{
|
||||||
|
mu 1.8e-05;
|
||||||
|
Pr 0.7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
/*--------------------------------*- 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;
|
||||||
|
object turbulenceProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
simulationType RAS;
|
||||||
|
|
||||||
|
RAS
|
||||||
|
{
|
||||||
|
RASModel kEpsilon;
|
||||||
|
turbulence on;
|
||||||
|
printCoeffs on;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
/*--------------------------------*- 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;
|
||||||
|
object viewFactorsDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
writeViewFactorMatrix true;
|
||||||
|
writeFacesAgglomeration true;
|
||||||
|
writePatchViewFactors false;
|
||||||
|
|
||||||
|
maxDynListLength 200000;
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
/*--------------------------------*- 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 on;
|
||||||
|
|
||||||
|
radiationModel opaqueSolid;
|
||||||
|
|
||||||
|
absorptionEmissionModel multiBandSolidAbsorptionEmission;
|
||||||
|
|
||||||
|
multiBandSolidAbsorptionEmissionCoeffs
|
||||||
|
{
|
||||||
|
absorptivity (0.7 0.7);
|
||||||
|
emissivity (0.7 0.7);
|
||||||
|
}
|
||||||
|
|
||||||
|
transmissivityModel multiBandSolidTransmissivity;
|
||||||
|
|
||||||
|
multiBandSolidTransmissivityCoeffs
|
||||||
|
{
|
||||||
|
transmissivity (0 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
scatterModel none;
|
||||||
|
|
||||||
|
sootModel none;
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
/*--------------------------------*- 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;
|
||||||
|
object thermophysicalProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
thermoType
|
||||||
|
{
|
||||||
|
type heSolidThermo;
|
||||||
|
mixture pureMixture;
|
||||||
|
transport constIso;
|
||||||
|
thermo hConst;
|
||||||
|
equationOfState rhoConst;
|
||||||
|
specie specie;
|
||||||
|
energy sensibleEnthalpy;
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
specie
|
||||||
|
{
|
||||||
|
nMoles 1;
|
||||||
|
molWeight 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
transport
|
||||||
|
{
|
||||||
|
kappa 80;
|
||||||
|
}
|
||||||
|
|
||||||
|
thermodynamics
|
||||||
|
{
|
||||||
|
Hf 0;
|
||||||
|
Cp 450;
|
||||||
|
}
|
||||||
|
|
||||||
|
equationOfState
|
||||||
|
{
|
||||||
|
rho 8000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,96 @@
|
|||||||
|
/*--------------------------------*- 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;
|
||||||
|
object blockMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
convertToMeters 1;
|
||||||
|
|
||||||
|
vertices
|
||||||
|
(
|
||||||
|
( 0 0 -1)
|
||||||
|
( 40 0 -1)
|
||||||
|
( 40 40 -1)
|
||||||
|
( 0 40 -1)
|
||||||
|
( 0 0 60)
|
||||||
|
( 40 0 60)
|
||||||
|
( 40 40 60)
|
||||||
|
( 0 40 60)
|
||||||
|
);
|
||||||
|
|
||||||
|
blocks
|
||||||
|
(
|
||||||
|
hex (0 1 2 3 4 5 6 7) (30 30 45) simpleGrading (1 1 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
edges
|
||||||
|
(
|
||||||
|
);
|
||||||
|
|
||||||
|
boundary
|
||||||
|
(
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(3 7 6 2)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 4 7 3)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(2 6 5 1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(1 5 4 0)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
minZ
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 3 2 1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(4 5 6 7)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
mergePatchPairs
|
||||||
|
(
|
||||||
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev-OpenCFD |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class polyBoundaryMesh;
|
||||||
|
location "constant/polyMesh";
|
||||||
|
object boundary;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
6
|
||||||
|
(
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
nFaces 1350;
|
||||||
|
startFace 117900;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
nFaces 1350;
|
||||||
|
startFace 119250;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
nFaces 1350;
|
||||||
|
startFace 120600;
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
nFaces 1350;
|
||||||
|
startFace 121950;
|
||||||
|
}
|
||||||
|
minZ
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
inGroups 1(wall);
|
||||||
|
nFaces 900;
|
||||||
|
startFace 123300;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
nFaces 900;
|
||||||
|
startFace 124200;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev-OpenCFD |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class polyBoundaryMesh;
|
||||||
|
location "constant/polyMesh";
|
||||||
|
object boundary;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
6
|
||||||
|
(
|
||||||
|
maxY
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
nFaces 1350;
|
||||||
|
startFace 117900;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
nFaces 1350;
|
||||||
|
startFace 119250;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
nFaces 1350;
|
||||||
|
startFace 120600;
|
||||||
|
}
|
||||||
|
minY
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
nFaces 1350;
|
||||||
|
startFace 121950;
|
||||||
|
}
|
||||||
|
minZ
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
inGroups 1(wall);
|
||||||
|
nFaces 900;
|
||||||
|
startFace 123300;
|
||||||
|
}
|
||||||
|
maxZ
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
nFaces 900;
|
||||||
|
startFace 124200;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
/*--------------------------------*- 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 regionProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
regions
|
||||||
|
(
|
||||||
|
fluid (air )
|
||||||
|
solid (solid floor)
|
||||||
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user