mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Adding reflection capability to solar load radiation model
ENH: Several modifycations to avoid erroneuos rays to be shot from wrong faces. ENH: Updating tutorials and avoiding registration of the coarse singleCellFvMesh Adding solarLoad tutorial case simpleCarSolarPanel ENH: Changes needed for the merge
This commit is contained in:
@ -533,6 +533,11 @@ bool Foam::radiation::laserDTRM::read()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Foam::label Foam::radiation::laserDTRM::nBands() const
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::radiation::laserDTRM::calculate()
|
void Foam::radiation::laserDTRM::calculate()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -250,6 +250,9 @@ public:
|
|||||||
//- Read radiation properties dictionary
|
//- Read radiation properties dictionary
|
||||||
bool read();
|
bool read();
|
||||||
|
|
||||||
|
//- Number of bands for this radiation model
|
||||||
|
virtual label nBands() const;
|
||||||
|
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
|
|||||||
@ -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) 2016 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2011-2018 OpenFOAM Foundation
|
| Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||||
|
|||||||
@ -77,6 +77,8 @@ Foam::patchDistMethods::exact::patchSurface() const
|
|||||||
|
|
||||||
Info<< "Triangulating local patch faces" << nl << endl;
|
Info<< "Triangulating local patch faces" << nl << endl;
|
||||||
|
|
||||||
|
labelList mapTriToGlobal;
|
||||||
|
|
||||||
patchSurfPtr_.reset
|
patchSurfPtr_.reset
|
||||||
(
|
(
|
||||||
new distributedTriSurfaceMesh
|
new distributedTriSurfaceMesh
|
||||||
@ -93,7 +95,8 @@ Foam::patchDistMethods::exact::patchSurface() const
|
|||||||
triSurfaceTools::triangulate
|
triSurfaceTools::triangulate
|
||||||
(
|
(
|
||||||
pbm,
|
pbm,
|
||||||
patchIDs_
|
patchIDs_,
|
||||||
|
mapTriToGlobal
|
||||||
),
|
),
|
||||||
dict
|
dict
|
||||||
)
|
)
|
||||||
|
|||||||
@ -125,9 +125,11 @@ void Foam::faceReflecting::initialise(const dictionary& coeffs)
|
|||||||
// global face index
|
// global face index
|
||||||
globalIndex globalNumbering(mesh_.nFaces());
|
globalIndex globalNumbering(mesh_.nFaces());
|
||||||
|
|
||||||
|
|
||||||
// Collect faces with t = 0, r = 0 and a > 0 to shoot rays
|
// Collect faces with t = 0, r = 0 and a > 0 to shoot rays
|
||||||
// and patches to construct the triSurface
|
// and patches to construct the triSurface
|
||||||
DynamicList<point> dynCf;
|
DynamicList<point> dynCf;
|
||||||
|
DynamicList<vector> dynNf;
|
||||||
DynamicList<label> dynFacesI;
|
DynamicList<label> dynFacesI;
|
||||||
forAll(patches, patchI)
|
forAll(patches, patchI)
|
||||||
{
|
{
|
||||||
@ -149,17 +151,31 @@ void Foam::faceReflecting::initialise(const dictionary& coeffs)
|
|||||||
const scalarField& r = tr();
|
const scalarField& r = tr();
|
||||||
const scalarField& a = ta();
|
const scalarField& a = ta();
|
||||||
|
|
||||||
|
const vectorField& n = pp.faceNormals();
|
||||||
|
|
||||||
forAll(pp, faceI)
|
forAll(pp, faceI)
|
||||||
{
|
{
|
||||||
|
//const vector nf(n[faceI]);
|
||||||
// Opaque, non-reflective, absortived faces to shoot
|
// Opaque, non-reflective, absortived faces to shoot
|
||||||
if (t[faceI] == 0 && r[faceI] == 0 && a[faceI] > 0)
|
if
|
||||||
|
(
|
||||||
|
t[faceI] == 0
|
||||||
|
&& r[faceI] == 0
|
||||||
|
&& a[faceI] > 0
|
||||||
|
)
|
||||||
{
|
{
|
||||||
dynFacesI.append(faceI + pp.start());
|
dynFacesI.append(faceI + pp.start());
|
||||||
dynCf.append(cf[faceI]);
|
dynCf.append(cf[faceI]);
|
||||||
|
dynNf.append(n[faceI]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// relfective opaque patches to build reflective surface
|
// relfective opaque patches to build reflective surface
|
||||||
if (r[faceI] > 0 && t[faceI] == 0)
|
// plus opaque non-reflective
|
||||||
|
if
|
||||||
|
(
|
||||||
|
(r[faceI] > 0 && t[faceI] == 0) ||
|
||||||
|
(t[faceI] == 0 && a[faceI] > 0 && r[faceI] == 0)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
includePatches_.insert(patchI);
|
includePatches_.insert(patchI);
|
||||||
}
|
}
|
||||||
@ -169,6 +185,7 @@ void Foam::faceReflecting::initialise(const dictionary& coeffs)
|
|||||||
|
|
||||||
shootFacesIds_.reset(new labelList(dynFacesI));
|
shootFacesIds_.reset(new labelList(dynFacesI));
|
||||||
Cfs_.reset(new pointField(dynCf));
|
Cfs_.reset(new pointField(dynCf));
|
||||||
|
Nfs_.reset(new vectorField(dynNf));
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * *
|
// * * * * * * * * * * * * * * *
|
||||||
// Create distributedTriSurfaceMesh
|
// Create distributedTriSurfaceMesh
|
||||||
@ -334,11 +351,15 @@ void Foam::faceReflecting::calculate()
|
|||||||
{
|
{
|
||||||
const point& fc = Cfs_()[i];
|
const point& fc = Cfs_()[i];
|
||||||
|
|
||||||
|
const vector nf = Nfs_()[i];
|
||||||
|
|
||||||
const label myFaceId = shootFacesIds_()[i];
|
const label myFaceId = shootFacesIds_()[i];
|
||||||
|
|
||||||
forAll (refDisDirsIndex, dirIndex)
|
forAll (refDisDirsIndex, dirIndex)
|
||||||
{
|
{
|
||||||
if (refDisDirsIndex[dirIndex] > -1)
|
if (refDisDirsIndex[dirIndex] > -1)
|
||||||
|
{
|
||||||
|
if ( (nf & refDiscAngles_[dirIndex]) > 0)
|
||||||
{
|
{
|
||||||
const vector direction = -refDiscAngles_[dirIndex];
|
const vector direction = -refDiscAngles_[dirIndex];
|
||||||
|
|
||||||
@ -351,6 +372,7 @@ void Foam::faceReflecting::calculate()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}while (returnReduce(i < Cfs_->size(), orOp<bool>()));
|
}while (returnReduce(i < Cfs_->size(), orOp<bool>()));
|
||||||
|
|
||||||
@ -370,14 +392,6 @@ void Foam::faceReflecting::calculate()
|
|||||||
);
|
);
|
||||||
const mapDistribute& map = mapPtr();
|
const mapDistribute& map = mapPtr();
|
||||||
|
|
||||||
List<scalarField> r(nBands);
|
|
||||||
labelList refDirIndex(triangleIndex.size());
|
|
||||||
|
|
||||||
for (label bandI = 0; bandI < nBands; bandI++)
|
|
||||||
{
|
|
||||||
r[bandI].setSize(triangleIndex.size());
|
|
||||||
}
|
|
||||||
|
|
||||||
PtrList<List<scalarField> > patchr(patches.size());
|
PtrList<List<scalarField> > patchr(patches.size());
|
||||||
PtrList<List<scalarField> > patcha(patches.size());
|
PtrList<List<scalarField> > patcha(patches.size());
|
||||||
forAll (patchr, patchi)
|
forAll (patchr, patchi)
|
||||||
@ -418,6 +432,14 @@ void Foam::faceReflecting::calculate()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<scalarField> r(nBands);
|
||||||
|
for (label bandI = 0; bandI < nBands; bandI++)
|
||||||
|
{
|
||||||
|
r[bandI].setSize(triangleIndex.size());
|
||||||
|
}
|
||||||
|
labelList refDirIndex(triangleIndex.size());
|
||||||
|
labelList refIndex(triangleIndex.size());
|
||||||
|
// triangleIndex includes hits on non-reflecting and reflecting faces
|
||||||
forAll(triangleIndex, i)
|
forAll(triangleIndex, i)
|
||||||
{
|
{
|
||||||
label trii = triangleIndex[i];
|
label trii = triangleIndex[i];
|
||||||
@ -430,6 +452,7 @@ void Foam::faceReflecting::calculate()
|
|||||||
if (refFacesDirIndex.found(globalFace))
|
if (refFacesDirIndex.found(globalFace))
|
||||||
{
|
{
|
||||||
refDirIndex[i] = refFacesDirIndex.find(globalFace)();
|
refDirIndex[i] = refFacesDirIndex.find(globalFace)();
|
||||||
|
refIndex[i] = globalFace;
|
||||||
}
|
}
|
||||||
for (label bandI = 0; bandI < nBands; bandI++)
|
for (label bandI = 0; bandI < nBands; bandI++)
|
||||||
{
|
{
|
||||||
@ -437,6 +460,7 @@ void Foam::faceReflecting::calculate()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
map.reverseDistribute(hitInfo.size(), refDirIndex);
|
map.reverseDistribute(hitInfo.size(), refDirIndex);
|
||||||
|
map.reverseDistribute(hitInfo.size(), refIndex);
|
||||||
for (label bandI = 0; bandI < nBands; bandI++)
|
for (label bandI = 0; bandI < nBands; bandI++)
|
||||||
{
|
{
|
||||||
map.reverseDistribute(hitInfo.size(), r[bandI]);
|
map.reverseDistribute(hitInfo.size(), r[bandI]);
|
||||||
@ -457,7 +481,11 @@ void Foam::faceReflecting::calculate()
|
|||||||
{
|
{
|
||||||
if (hitInfo[rayI].hit())
|
if (hitInfo[rayI].hit())
|
||||||
{
|
{
|
||||||
if (dirStartIndex[rayI]==refDirIndex[rayI])
|
if
|
||||||
|
(
|
||||||
|
dirStartIndex[rayI]==refDirIndex[rayI]
|
||||||
|
&& refFacesDirIndex.found(refIndex[rayI])
|
||||||
|
)
|
||||||
{
|
{
|
||||||
for (label bandI = 0; bandI < nBands; bandI++)
|
for (label bandI = 0; bandI < nBands; bandI++)
|
||||||
{
|
{
|
||||||
@ -474,9 +502,18 @@ void Foam::faceReflecting::calculate()
|
|||||||
|
|
||||||
const vectorField& nStart = ppStart.faceNormals();
|
const vectorField& nStart = ppStart.faceNormals();
|
||||||
|
|
||||||
|
vector rayIn = refDiscAngles_[dirStartIndex[rayI]];
|
||||||
|
|
||||||
|
rayIn /= mag(rayIn);
|
||||||
|
|
||||||
qrefBf[startPatchI][localStartFaceI] +=
|
qrefBf[startPatchI][localStartFaceI] +=
|
||||||
(qPrim*r[bandI][rayI]*spectralDistribution_[bandI]*a)
|
(
|
||||||
& nStart[localStartFaceI];
|
(
|
||||||
|
mag(qPrim)*r[bandI][rayI]*spectralDistribution_[bandI]
|
||||||
|
*a*rayIn
|
||||||
|
)
|
||||||
|
& nStart[localStartFaceI]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -512,6 +549,7 @@ Foam::faceReflecting::faceReflecting
|
|||||||
surfacesMesh_(),
|
surfacesMesh_(),
|
||||||
shootFacesIds_(),
|
shootFacesIds_(),
|
||||||
Cfs_(),
|
Cfs_(),
|
||||||
|
Nfs_(),
|
||||||
solarCalc_(solar),
|
solarCalc_(solar),
|
||||||
includePatches_(),
|
includePatches_(),
|
||||||
mapTriToGlobal_()
|
mapTriToGlobal_()
|
||||||
|
|||||||
@ -92,6 +92,9 @@ class faceReflecting
|
|||||||
//- Face centres from which rays are shot
|
//- Face centres from which rays are shot
|
||||||
autoPtr<pointField> Cfs_;
|
autoPtr<pointField> Cfs_;
|
||||||
|
|
||||||
|
//- Face normal from which rays are shot
|
||||||
|
autoPtr<vectorField> Nfs_;
|
||||||
|
|
||||||
//- Solar calculator
|
//- Solar calculator
|
||||||
const solarCalculator& solarCalc_;
|
const solarCalculator& solarCalc_;
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,10 @@ namespace Foam
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::radiation::solarLoad::updateReflectedRays()
|
void Foam::radiation::solarLoad::updateReflectedRays
|
||||||
|
(
|
||||||
|
const labelHashSet& includePatches
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (reflectedFaces_.empty() && !hitFaces_.empty())
|
if (reflectedFaces_.empty() && !hitFaces_.empty())
|
||||||
{
|
{
|
||||||
@ -72,12 +75,41 @@ void Foam::radiation::solarLoad::updateReflectedRays()
|
|||||||
reflectedFaces_->correct();
|
reflectedFaces_->correct();
|
||||||
|
|
||||||
volScalarField::Boundary& qrBf = qr_.boundaryFieldRef();
|
volScalarField::Boundary& qrBf = qr_.boundaryFieldRef();
|
||||||
|
const scalarField& V = mesh_.V();
|
||||||
|
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
|
||||||
|
|
||||||
|
forAll (qrBf, patchID)
|
||||||
|
{
|
||||||
|
if (includePatches[patchID])
|
||||||
|
{
|
||||||
|
for (label bandI = 0; bandI < nBands_; bandI++)
|
||||||
|
{
|
||||||
|
qrBf[patchID] +=
|
||||||
|
reflectedFaces_->qreflective(bandI).boundaryField()[patchID];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const scalarField& sf = mesh_.magSf().boundaryField()[patchID];
|
||||||
|
const labelList cellIs = patches[patchID].faceCells();
|
||||||
|
|
||||||
for (label bandI = 0; bandI < nBands_; bandI++)
|
for (label bandI = 0; bandI < nBands_; bandI++)
|
||||||
{
|
{
|
||||||
qrBf += reflectedFaces_->qreflective(bandI).boundaryField();
|
forAll (cellIs, i)
|
||||||
|
{
|
||||||
|
const label cellI = cellIs[i];
|
||||||
|
|
||||||
|
Ru_[cellI] +=
|
||||||
|
(reflectedFaces_->qreflective(bandI).
|
||||||
|
boundaryField()[patchID][i] * sf[i])/V[cellI];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::radiation::solarLoad::updateHitFaces()
|
bool Foam::radiation::solarLoad::updateHitFaces()
|
||||||
@ -863,7 +895,7 @@ void Foam::radiation::solarLoad::calculate()
|
|||||||
// Add specular reflected radiation
|
// Add specular reflected radiation
|
||||||
if (useReflectedRays_)
|
if (useReflectedRays_)
|
||||||
{
|
{
|
||||||
updateReflectedRays();
|
updateReflectedRays(includeMappedPatchBasePatches);
|
||||||
}
|
}
|
||||||
|
|
||||||
firstIter_ = false;
|
firstIter_ = false;
|
||||||
|
|||||||
@ -148,7 +148,7 @@ private:
|
|||||||
void updateDirectHitRadiation(const labelList&, const labelHashSet&);
|
void updateDirectHitRadiation(const labelList&, const labelHashSet&);
|
||||||
|
|
||||||
//- Update reflected heat flux
|
//- Update reflected heat flux
|
||||||
void updateReflectedRays();
|
void updateReflectedRays(const labelHashSet&);
|
||||||
|
|
||||||
//- Calculate diffusive heat flux
|
//- Calculate diffusive heat flux
|
||||||
//void calculateQdiff(const labelHashSet&, const labelHashSet&);
|
//void calculateQdiff(const labelHashSet&, const labelHashSet&);
|
||||||
|
|||||||
@ -239,7 +239,8 @@ Foam::radiation::viewFactor::viewFactor(const volScalarField& T)
|
|||||||
mesh_.polyMesh::instance(),
|
mesh_.polyMesh::instance(),
|
||||||
mesh_.time(),
|
mesh_.time(),
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
),
|
),
|
||||||
mesh_,
|
mesh_,
|
||||||
finalAgglom_
|
finalAgglom_
|
||||||
@ -300,7 +301,8 @@ Foam::radiation::viewFactor::viewFactor
|
|||||||
mesh_.polyMesh::instance(),
|
mesh_.polyMesh::instance(),
|
||||||
mesh_.time(),
|
mesh_.time(),
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
),
|
),
|
||||||
mesh_,
|
mesh_,
|
||||||
finalAgglom_
|
finalAgglom_
|
||||||
@ -385,15 +387,9 @@ void Foam::radiation::viewFactor::calculate()
|
|||||||
solarLoad_->calculate();
|
solarLoad_->calculate();
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
scalarField compactCoarseT4(map_->constructSize(), Zero);
|
|
||||||
scalarField compactCoarseE(map_->constructSize(), Zero);
|
|
||||||
scalarField compactCoarseHo(map_->constructSize(), Zero);
|
|
||||||
=======
|
|
||||||
// Net radiation
|
// Net radiation
|
||||||
scalarField q(totalNCoarseFaces_, 0.0);
|
scalarField q(totalNCoarseFaces_, 0.0);
|
||||||
volScalarField::Boundary& qrBf = qr_.boundaryFieldRef();
|
volScalarField::Boundary& qrBf = qr_.boundaryFieldRef();
|
||||||
>>>>>>> ENH:
|
|
||||||
|
|
||||||
globalIndex globalNumbering(nLocalCoarseFaces_);
|
globalIndex globalNumbering(nLocalCoarseFaces_);
|
||||||
|
|
||||||
@ -429,13 +425,7 @@ void Foam::radiation::viewFactor::calculate()
|
|||||||
const tmp<scalarField> teb =
|
const tmp<scalarField> teb =
|
||||||
boundaryRadiation.emissivity(patchID, bandI);
|
boundaryRadiation.emissivity(patchID, bandI);
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
scalarList T4ave(pp.size(), Zero);
|
|
||||||
scalarList Eave(pp.size(), Zero);
|
|
||||||
scalarList Hoiave(pp.size(), Zero);
|
|
||||||
=======
|
|
||||||
const scalarField& eb = teb();
|
const scalarField& eb = teb();
|
||||||
>>>>>>> ENH:
|
|
||||||
|
|
||||||
const tmp<scalarField> tHoi = qrp.qro(bandI);
|
const tmp<scalarField> tHoi = qrp.qro(bandI);
|
||||||
const scalarField& Hoi = tHoi();
|
const scalarField& Hoi = tHoi();
|
||||||
@ -492,17 +482,10 @@ void Foam::radiation::viewFactor::calculate()
|
|||||||
SubList<scalar>(compactCoarseHo, nLocalCoarseFaces_) =
|
SubList<scalar>(compactCoarseHo, nLocalCoarseFaces_) =
|
||||||
localCoarseHoave;
|
localCoarseHoave;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
// Create global size vectors
|
|
||||||
scalarField T4(totalNCoarseFaces_, Zero);
|
|
||||||
scalarField E(totalNCoarseFaces_, Zero);
|
|
||||||
scalarField qrExt(totalNCoarseFaces_, Zero);
|
|
||||||
=======
|
|
||||||
// Distribute data
|
// Distribute data
|
||||||
map_->distribute(compactCoarseT4);
|
map_->distribute(compactCoarseT4);
|
||||||
map_->distribute(compactCoarseE);
|
map_->distribute(compactCoarseE);
|
||||||
map_->distribute(compactCoarseHo);
|
map_->distribute(compactCoarseHo);
|
||||||
>>>>>>> ENH:
|
|
||||||
|
|
||||||
// Distribute local global ID
|
// Distribute local global ID
|
||||||
labelList compactGlobalIds(map_->constructSize(), Zero);
|
labelList compactGlobalIds(map_->constructSize(), Zero);
|
||||||
@ -519,45 +502,18 @@ void Foam::radiation::viewFactor::calculate()
|
|||||||
|
|
||||||
map_->distribute(compactGlobalIds);
|
map_->distribute(compactGlobalIds);
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
// Net radiation
|
|
||||||
scalarField q(totalNCoarseFaces_, Zero);
|
|
||||||
=======
|
|
||||||
// Create global size vectors
|
// Create global size vectors
|
||||||
scalarField T4(totalNCoarseFaces_, 0.0);
|
scalarField T4(totalNCoarseFaces_, 0.0);
|
||||||
scalarField E(totalNCoarseFaces_, 0.0);
|
scalarField E(totalNCoarseFaces_, 0.0);
|
||||||
scalarField qrExt(totalNCoarseFaces_, 0.0);
|
scalarField qrExt(totalNCoarseFaces_, 0.0);
|
||||||
>>>>>>> ENH:
|
|
||||||
|
|
||||||
// Fill lists from compact to global indexes.
|
// Fill lists from compact to global indexes.
|
||||||
forAll(compactCoarseT4, i)
|
forAll(compactCoarseT4, i)
|
||||||
{
|
{
|
||||||
<<<<<<< HEAD
|
|
||||||
scalarSquareMatrix C(totalNCoarseFaces_, Zero);
|
|
||||||
|
|
||||||
for (label i=0; i<totalNCoarseFaces_; i++)
|
|
||||||
{
|
|
||||||
for (label j=0; j<totalNCoarseFaces_; j++)
|
|
||||||
{
|
|
||||||
const scalar invEj = 1.0/E[j];
|
|
||||||
const scalar sigmaT4 = physicoChemical::sigma.value()*T4[j];
|
|
||||||
|
|
||||||
if (i==j)
|
|
||||||
{
|
|
||||||
C(i, j) = invEj - (invEj - 1.0)*Fmatrix_()(i, j);
|
|
||||||
q[i] += (Fmatrix_()(i, j) - 1.0)*sigmaT4 - qrExt[j];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
C(i, j) = (1.0 - invEj)*Fmatrix_()(i, j);
|
|
||||||
q[i] += Fmatrix_()(i, j)*sigmaT4;
|
|
||||||
}
|
|
||||||
=======
|
|
||||||
T4[compactGlobalIds[i]] = compactCoarseT4[i];
|
T4[compactGlobalIds[i]] = compactCoarseT4[i];
|
||||||
E[compactGlobalIds[i]] = compactCoarseE[i];
|
E[compactGlobalIds[i]] = compactCoarseE[i];
|
||||||
qrExt[compactGlobalIds[i]] = compactCoarseHo[i];
|
qrExt[compactGlobalIds[i]] = compactCoarseHo[i];
|
||||||
}
|
}
|
||||||
>>>>>>> ENH:
|
|
||||||
|
|
||||||
Pstream::listCombineGather(T4, maxEqOp<scalar>());
|
Pstream::listCombineGather(T4, maxEqOp<scalar>());
|
||||||
Pstream::listCombineGather(E, maxEqOp<scalar>());
|
Pstream::listCombineGather(E, maxEqOp<scalar>());
|
||||||
|
|||||||
@ -51,7 +51,10 @@ Foam::radiation::boundaryRadiationPropertiesPatch::New
|
|||||||
const polyPatch& pp
|
const polyPatch& pp
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word modelType(dict.lookup("type"));
|
word modelType
|
||||||
|
(
|
||||||
|
dict.lookupCompat("type", {{"mode", 1812}})
|
||||||
|
);
|
||||||
|
|
||||||
Info<< "Selecting boundary radiation Model: "
|
Info<< "Selecting boundary radiation Model: "
|
||||||
<< modelType << endl;
|
<< modelType << endl;
|
||||||
|
|||||||
@ -21,10 +21,10 @@ radiationModel fvDOM;
|
|||||||
|
|
||||||
fvDOMCoeffs
|
fvDOMCoeffs
|
||||||
{
|
{
|
||||||
nPhi 3; // azimuthal angles in PI/2 on X-Y.(from Y to X)
|
nPhi 3;
|
||||||
nTheta 5; // polar angles in PI (from Z to X-Y plane)
|
nTheta 5;
|
||||||
maxIter 10; // maximum number of iterations
|
tolerance 1e-3;
|
||||||
tolerance 1e-3; // convergence criteria for radiation iteration
|
maxIter 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number of flow iterations per radiation iteration
|
// Number of flow iterations per radiation iteration
|
||||||
|
|||||||
@ -0,0 +1,39 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v1806 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object T;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 1 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 300;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
"(solarpanel.*|ref_wall|ZMin)"
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
"(YMax|YMin|XMax|XMin|ZMax)"
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue $internalField;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v1806 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volVectorField;
|
||||||
|
location "0";
|
||||||
|
object U;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 1 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform (0.1 0 0);
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
#includeEtc "caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
"(solarpanel.*|ref_wall|YMax|YMin|XMax|XMin|ZMin)"
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
ZMax
|
||||||
|
{
|
||||||
|
type pressureInletOutletVelocity;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v1806 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object p;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [1 -1 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 101325;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
#includeEtc "caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
".*"
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v1806 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object p_rgh;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [1 -1 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 101325;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
#includeEtc "caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
|
"(solarpanel.*|ref_wall|YMax|YMin|XMax|XMin|ZMin)"
|
||||||
|
{
|
||||||
|
type fixedFluxPressure;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
ZMax
|
||||||
|
{
|
||||||
|
type prghTotalPressure;
|
||||||
|
p0 $internalField;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
8
tutorials/heatTransfer/buoyantSimpleFoam/simpleCarSolarPanel/Allclean
Executable file
8
tutorials/heatTransfer/buoyantSimpleFoam/simpleCarSolarPanel/Allclean
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
|
||||||
|
|
||||||
|
cleanCase0
|
||||||
|
rm -rf constant/extendedFeatureEdgeMesh
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
15
tutorials/heatTransfer/buoyantSimpleFoam/simpleCarSolarPanel/Allrun
Executable file
15
tutorials/heatTransfer/buoyantSimpleFoam/simpleCarSolarPanel/Allrun
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
|
||||||
|
restore0Dir
|
||||||
|
|
||||||
|
runApplication surfaceFeatureExtract
|
||||||
|
|
||||||
|
runApplication snappyHexMesh -overwrite
|
||||||
|
|
||||||
|
runApplication $(getApplication)
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
@ -0,0 +1,75 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v1806 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object boundaryRadiationProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
".*"
|
||||||
|
{
|
||||||
|
type transparent;
|
||||||
|
wallAbsorptionEmissionModel
|
||||||
|
{
|
||||||
|
type multiBandAbsorption;
|
||||||
|
emissivity (1 1);
|
||||||
|
absorptivity (0 0);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
body_bottom
|
||||||
|
{
|
||||||
|
type opaqueDiffusive;
|
||||||
|
wallAbsorptionEmissionModel
|
||||||
|
{
|
||||||
|
type multiBandAbsorption;
|
||||||
|
absorptivity (0.3 0.7);
|
||||||
|
emissivity (0.3 0.7);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
"(solarpanel.*)"
|
||||||
|
{
|
||||||
|
type opaqueDiffusive;
|
||||||
|
wallAbsorptionEmissionModel
|
||||||
|
{
|
||||||
|
type multiBandAbsorption;
|
||||||
|
absorptivity (0.3 0.7);
|
||||||
|
emissivity (0.3 0.7);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
ref_wall
|
||||||
|
{
|
||||||
|
type opaqueReflective;
|
||||||
|
|
||||||
|
// Fraction of the reflected is diffussive
|
||||||
|
fd 0.0; // 0: all specular 1: all diffusive
|
||||||
|
|
||||||
|
wallAbsorptionEmissionModel
|
||||||
|
{
|
||||||
|
type multiBandAbsorption;
|
||||||
|
absorptivity (0.03 0.07);
|
||||||
|
emissivity (0.03 0.07);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
ZMin
|
||||||
|
{
|
||||||
|
type opaqueDiffusive;
|
||||||
|
wallAbsorptionEmissionModel
|
||||||
|
{
|
||||||
|
type multiBandAbsorption;
|
||||||
|
absorptivity (0.3 0.7);
|
||||||
|
emissivity (0.3 0.7);
|
||||||
|
};
|
||||||
|
}
|
||||||
21
tutorials/heatTransfer/buoyantSimpleFoam/simpleCarSolarPanel/constant/g
Executable file
21
tutorials/heatTransfer/buoyantSimpleFoam/simpleCarSolarPanel/constant/g
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v1806 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class uniformDimensionedVectorField;
|
||||||
|
location "constant";
|
||||||
|
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: v1806 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object radiationProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
radiation on;
|
||||||
|
|
||||||
|
radiationModel solarLoad;
|
||||||
|
|
||||||
|
solarLoadCoeffs
|
||||||
|
{
|
||||||
|
sunDirectionModel sunDirConstant;
|
||||||
|
|
||||||
|
skyCloudCoverFraction 0;
|
||||||
|
|
||||||
|
sunDirection (-1 0.7 -1.5);
|
||||||
|
|
||||||
|
localStandardMeridian -8; // GMT offset (hours)
|
||||||
|
startDay 22; // day of the year
|
||||||
|
startTime 10; // time of the day (hours decimal)
|
||||||
|
|
||||||
|
longitude -118.243683; // longitude (degrees)
|
||||||
|
latitude 34.052235; // latitude (degrees)
|
||||||
|
|
||||||
|
// Grid orientation
|
||||||
|
gridUp (0 0 1);
|
||||||
|
gridEast (0 1 0);
|
||||||
|
|
||||||
|
// Energy spectrum
|
||||||
|
spectralDistribution (2 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 2229.78119355; // Apparent solar irradiation at air mass m = 0
|
||||||
|
B 0.142064516129; // 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.058064516129; // Model constant
|
||||||
|
|
||||||
|
// Radiative flux coupling flags
|
||||||
|
solidCoupled false; // Couple through Qr the solid regions (default true)
|
||||||
|
wallCoupled true; // Couple through Qr wall patches (default false)
|
||||||
|
|
||||||
|
// Reflecting rays
|
||||||
|
useReflectedRays true;
|
||||||
|
reflecting
|
||||||
|
{
|
||||||
|
nPhi 10;
|
||||||
|
nTheta 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
absorptionEmissionModel none;
|
||||||
|
scatterModel none;
|
||||||
|
sootModel none;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Number of flow iterations per radiation iteration
|
||||||
|
solverFreq 1;
|
||||||
|
|
||||||
|
absorptionEmissionModel none;
|
||||||
|
|
||||||
|
scatterModel none;
|
||||||
|
|
||||||
|
sootModel none;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v1806 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object thermophysicalProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
thermoType
|
||||||
|
{
|
||||||
|
type heRhoThermo;
|
||||||
|
mixture pureMixture;
|
||||||
|
transport const;
|
||||||
|
thermo hConst;
|
||||||
|
equationOfState perfectGas;
|
||||||
|
specie specie;
|
||||||
|
energy sensibleEnthalpy;
|
||||||
|
}
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
|
||||||
|
specie
|
||||||
|
{
|
||||||
|
molWeight 28.966;
|
||||||
|
}
|
||||||
|
|
||||||
|
thermodynamics
|
||||||
|
{
|
||||||
|
Cp 1006.43;
|
||||||
|
Hf 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
transport
|
||||||
|
{
|
||||||
|
mu 1.846e-05;
|
||||||
|
Pr 0.706414;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,20 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v1806 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object turbulenceProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
simulationType laminar;
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,105 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v1806 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object blockMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
convertToMeters 1;
|
||||||
|
|
||||||
|
X_MIN_TUNNEL -1.84;
|
||||||
|
Y_MIN_TUNNEL -2.1;
|
||||||
|
Z_MIN_TUNNEL -3.0616171e-17;
|
||||||
|
X_MAX_TUNNEL 1.085;
|
||||||
|
Y_MAX_TUNNEL 2.4;
|
||||||
|
Z_MAX_TUNNEL 3.25;
|
||||||
|
NCELLS_X 11;
|
||||||
|
NCELLS_Y 17;
|
||||||
|
NCELLS_Z 12;
|
||||||
|
|
||||||
|
|
||||||
|
vertices
|
||||||
|
(
|
||||||
|
( $X_MIN_TUNNEL $Y_MIN_TUNNEL $Z_MIN_TUNNEL ) //Node 0
|
||||||
|
( $X_MAX_TUNNEL $Y_MIN_TUNNEL $Z_MIN_TUNNEL ) //Node 1
|
||||||
|
( $X_MAX_TUNNEL $Y_MAX_TUNNEL $Z_MIN_TUNNEL ) //Node 2
|
||||||
|
( $X_MIN_TUNNEL $Y_MAX_TUNNEL $Z_MIN_TUNNEL ) //Node 3
|
||||||
|
( $X_MIN_TUNNEL $Y_MIN_TUNNEL $Z_MAX_TUNNEL ) //Node 4
|
||||||
|
( $X_MAX_TUNNEL $Y_MIN_TUNNEL $Z_MAX_TUNNEL ) //Node 5
|
||||||
|
( $X_MAX_TUNNEL $Y_MAX_TUNNEL $Z_MAX_TUNNEL ) //Node 6
|
||||||
|
( $X_MIN_TUNNEL $Y_MAX_TUNNEL $Z_MAX_TUNNEL ) //Node 7
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
blocks
|
||||||
|
(
|
||||||
|
hex (0 1 2 3 4 5 6 7) ( $NCELLS_X $NCELLS_Y $NCELLS_Z)
|
||||||
|
simpleGrading (1 1 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
edges
|
||||||
|
(
|
||||||
|
);
|
||||||
|
|
||||||
|
boundary
|
||||||
|
(
|
||||||
|
XMin
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 4 7 3)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
XMax
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(1 2 6 5)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
YMin
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 1 5 4)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
YMax
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(3 7 6 2)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
ZMin
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 3 2 1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
ZMax
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(4 5 6 7)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v1806 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object controlDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
application buoyantSimpleFoam;
|
||||||
|
|
||||||
|
startFrom startTime;
|
||||||
|
|
||||||
|
startTime 0;
|
||||||
|
|
||||||
|
stopAt endTime;
|
||||||
|
|
||||||
|
endTime 50;
|
||||||
|
|
||||||
|
deltaT 1;
|
||||||
|
|
||||||
|
writeControl timeStep;
|
||||||
|
|
||||||
|
writeInterval 5;
|
||||||
|
|
||||||
|
writeFormat ascii;
|
||||||
|
|
||||||
|
writePrecision 6;
|
||||||
|
|
||||||
|
writeCompression off;
|
||||||
|
|
||||||
|
timeFormat general;
|
||||||
|
|
||||||
|
timePrecision 6;
|
||||||
|
|
||||||
|
runTimeModifiable true;
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v1806 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvSchemes;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
ddtSchemes
|
||||||
|
{
|
||||||
|
default steadyState;
|
||||||
|
}
|
||||||
|
|
||||||
|
gradSchemes
|
||||||
|
{
|
||||||
|
default Gauss linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
divSchemes
|
||||||
|
{
|
||||||
|
default none;
|
||||||
|
|
||||||
|
div(phi,U) bounded Gauss upwind;
|
||||||
|
div(phi,h) bounded Gauss upwind;
|
||||||
|
div(phi,k) bounded Gauss upwind;
|
||||||
|
div(phi,K) bounded Gauss upwind;
|
||||||
|
div(phi,epsilon) bounded Gauss upwind;
|
||||||
|
|
||||||
|
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
laplacianSchemes
|
||||||
|
{
|
||||||
|
default Gauss linear limited corrected 0.333;
|
||||||
|
}
|
||||||
|
|
||||||
|
interpolationSchemes
|
||||||
|
{
|
||||||
|
default linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
snGradSchemes
|
||||||
|
{
|
||||||
|
default limited corrected 0.333;
|
||||||
|
}
|
||||||
|
|
||||||
|
fluxRequired
|
||||||
|
{
|
||||||
|
default no;
|
||||||
|
p_rgh;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v1806 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object fvSolution;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
solvers
|
||||||
|
{
|
||||||
|
p_rgh
|
||||||
|
{
|
||||||
|
solver GAMG;
|
||||||
|
tolerance 1e-8;
|
||||||
|
relTol 0.01;
|
||||||
|
|
||||||
|
smoother GaussSeidel;
|
||||||
|
|
||||||
|
cacheAgglomeration true;
|
||||||
|
nCellsInCoarsestLevel 10;
|
||||||
|
agglomerator faceAreaPair;
|
||||||
|
mergeLevels 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
"(U|h|k|epsilon)"
|
||||||
|
{
|
||||||
|
solver PBiCGStab;
|
||||||
|
preconditioner DILU;
|
||||||
|
tolerance 1e-7;
|
||||||
|
relTol 0.05;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SIMPLE
|
||||||
|
{
|
||||||
|
momentumPredictor no;
|
||||||
|
nNonOrthogonalCorrectors 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
relaxationFactors
|
||||||
|
{
|
||||||
|
fields
|
||||||
|
{
|
||||||
|
rho 1;
|
||||||
|
p_rgh 0.7;
|
||||||
|
}
|
||||||
|
equations
|
||||||
|
{
|
||||||
|
U 0.01;
|
||||||
|
h 0.3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v1806 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object meshQualityDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
// Include defaults parameters from master dictionary
|
||||||
|
#includeEtc "caseDicts/meshQualityDict"
|
||||||
|
|
||||||
|
//- minFaceWeight (0 -> 0.5)
|
||||||
|
minFaceWeight 0.02;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,156 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v1806 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object snappyHexMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
castellatedMesh true;
|
||||||
|
snap true;
|
||||||
|
addLayers false;
|
||||||
|
|
||||||
|
|
||||||
|
geometry
|
||||||
|
{
|
||||||
|
simpleCar.stl
|
||||||
|
{
|
||||||
|
type triSurfaceMesh;
|
||||||
|
name simpleCar ;
|
||||||
|
regions
|
||||||
|
{
|
||||||
|
body_bottom
|
||||||
|
{
|
||||||
|
name body_bottom;
|
||||||
|
}
|
||||||
|
solarpanel_body_left
|
||||||
|
{
|
||||||
|
name solarpanel_body_left;
|
||||||
|
}
|
||||||
|
solarpanel_body_right
|
||||||
|
{
|
||||||
|
name solarpanel_body_right;
|
||||||
|
}
|
||||||
|
solarpanel_body_top
|
||||||
|
{
|
||||||
|
name solarpanel_body_top;
|
||||||
|
}
|
||||||
|
solarpanel_body_back
|
||||||
|
{
|
||||||
|
name solarpanel_body_back;
|
||||||
|
}
|
||||||
|
ref_wall
|
||||||
|
{
|
||||||
|
name ref_wall;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
castellatedMeshControls
|
||||||
|
{
|
||||||
|
maxLocalCells 200000000;
|
||||||
|
maxGlobalCells 300000000;
|
||||||
|
minRefinementCells 20;
|
||||||
|
nCellsBetweenLevels 2;
|
||||||
|
maxLoadUnbalance 0.2;
|
||||||
|
allowFreeStandingZoneFaces true;
|
||||||
|
resolveFeatureAngle 30;
|
||||||
|
features
|
||||||
|
(
|
||||||
|
{
|
||||||
|
file "simpleCar.eMesh" ;
|
||||||
|
level 0 ;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
refinementSurfaces
|
||||||
|
{
|
||||||
|
simpleCar
|
||||||
|
{
|
||||||
|
level (2 2);
|
||||||
|
regions
|
||||||
|
{
|
||||||
|
body_bottom
|
||||||
|
{
|
||||||
|
level (2 2);
|
||||||
|
status 1 ;
|
||||||
|
}
|
||||||
|
solarpanel_body_left
|
||||||
|
{
|
||||||
|
level (3 3);
|
||||||
|
status 1 ;
|
||||||
|
}
|
||||||
|
solarpanel_body_right
|
||||||
|
{
|
||||||
|
level (3 3);
|
||||||
|
status 1 ;
|
||||||
|
}
|
||||||
|
solarpanel_body_top
|
||||||
|
{
|
||||||
|
level (3 3);
|
||||||
|
status 1 ;
|
||||||
|
}
|
||||||
|
solarpanel_body_back
|
||||||
|
{
|
||||||
|
level (3 3);
|
||||||
|
status 1 ;
|
||||||
|
}
|
||||||
|
ref_wall
|
||||||
|
{
|
||||||
|
level (2 2);
|
||||||
|
status 1 ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
refinementRegions
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
locationInMesh ( 0.695 1.95 2.875 ) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
snapControls
|
||||||
|
{
|
||||||
|
tolerance 2;
|
||||||
|
implicitFeatureSnap false;
|
||||||
|
explicitFeatureSnap true;
|
||||||
|
multiRegionFeatureSnap true;
|
||||||
|
detectNearSurfacesSnap true;
|
||||||
|
nSmoothPatch 3;
|
||||||
|
nSolveIter 100;
|
||||||
|
nRelaxIter 5;
|
||||||
|
nFeatureSnapIter 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
addLayersControls
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// Generic mesh quality settings. At any undoable phase these determine
|
||||||
|
// where to undo.
|
||||||
|
meshQualityControls
|
||||||
|
{
|
||||||
|
#include "meshQualityDict"
|
||||||
|
|
||||||
|
|
||||||
|
// Advanced
|
||||||
|
|
||||||
|
//- Number of error distribution iterations
|
||||||
|
nSmoothScale 4;
|
||||||
|
//- Amount to scale back displacement at error points
|
||||||
|
errorReduction 0.75;
|
||||||
|
}
|
||||||
|
|
||||||
|
mergeTolerance 1e-06;
|
||||||
|
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v1806 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object surfaceFeatureExtractDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
simpleCar.stl
|
||||||
|
{
|
||||||
|
extractionMethod extractFromSurface;
|
||||||
|
writeObj yes;
|
||||||
|
|
||||||
|
extractFromSurfaceCoeffs
|
||||||
|
{
|
||||||
|
includedAngle 150;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ -36,10 +36,9 @@ air_to_solid
|
|||||||
|
|
||||||
wallAbsorptionEmissionModel
|
wallAbsorptionEmissionModel
|
||||||
{
|
{
|
||||||
type solidAbsorption;
|
type multiBandAbsorption;
|
||||||
//multiBandAbsorption;
|
absorptivity (0.1 0.1);
|
||||||
//absorptivity (0.1 0.1);
|
emissivity (0.1 0.1);
|
||||||
//emissivity (0.1 0.1);
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,7 @@ FoamFile
|
|||||||
|
|
||||||
radiation on;
|
radiation on;
|
||||||
|
|
||||||
radiationModel viewFactor;//solarLoad;
|
radiationModel viewFactor;
|
||||||
|
|
||||||
solarLoadCoeffs
|
solarLoadCoeffs
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,11 +16,11 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
radiation on;
|
radiation off;
|
||||||
|
|
||||||
radiationModel opaqueSolid;
|
radiationModel none;//opaqueSolid;
|
||||||
|
|
||||||
absorptionEmissionModel multiBandSolidAbsorptionEmission;
|
absorptionEmissionModel none;
|
||||||
|
|
||||||
multiBandSolidAbsorptionEmissionCoeffs
|
multiBandSolidAbsorptionEmissionCoeffs
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,11 +16,11 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
radiation on;
|
radiation off;
|
||||||
|
|
||||||
radiationModel opaqueSolid;
|
radiationModel none;//opaqueSolid;
|
||||||
|
|
||||||
absorptionEmissionModel multiBandSolidAbsorptionEmission;
|
absorptionEmissionModel none;//multiBandSolidAbsorptionEmission;
|
||||||
|
|
||||||
multiBandSolidAbsorptionEmissionCoeffs
|
multiBandSolidAbsorptionEmissionCoeffs
|
||||||
{
|
{
|
||||||
|
|||||||
@ -29,14 +29,7 @@ viewFactorCoeffs
|
|||||||
// Number of flow iterations per radiation iteration
|
// Number of flow iterations per radiation iteration
|
||||||
solverFreq 3;
|
solverFreq 3;
|
||||||
|
|
||||||
absorptionEmissionModel constantAbsorptionEmission;
|
absorptionEmissionModel none;
|
||||||
|
|
||||||
constantAbsorptionEmissionCoeffs
|
|
||||||
{
|
|
||||||
absorptivity absorptivity [0 -1 0 0 0 0 0] 0.01;
|
|
||||||
emissivity emissivity [0 -1 0 0 0 0 0] 0.01;
|
|
||||||
E E [1 -1 -3 0 0 0 0] 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
scatterModel none;
|
scatterModel none;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user