mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: faceAgglomeration, vuew factor molde and view factor generator
This commit is contained in:
@ -42,6 +42,9 @@ Description
|
||||
KName none;
|
||||
}
|
||||
|
||||
Note:
|
||||
Only the pair h, Ta or q can be specified in the dictionary.
|
||||
|
||||
|
||||
SourceFiles
|
||||
externalWallHeatFluxTemperatureFvPatchScalarField.C
|
||||
@ -1,271 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2011 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 "externalWallHeatFluxTemperatureFvPatchScalarField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "directMappedPatchBase.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
template<>
|
||||
const char*
|
||||
NamedEnum
|
||||
<externalWallHeatFluxTemperatureFvPatchScalarField::operationMode, 3>::names[]=
|
||||
{
|
||||
"fixed_heat_flux",
|
||||
"fixed_heat_transfer_coefficient",
|
||||
"unknown"
|
||||
};
|
||||
|
||||
const NamedEnum
|
||||
<
|
||||
externalWallHeatFluxTemperatureFvPatchScalarField::operationMode, 3
|
||||
>
|
||||
externalWallHeatFluxTemperatureFvPatchScalarField::operationModeNames;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::externalWallHeatFluxTemperatureFvPatchScalarField::
|
||||
externalWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(p, iF),
|
||||
temperatureCoupledBase(patch(), "undefined", "undefined-K"),
|
||||
oldMode_(unknown),
|
||||
q_(p.size(), 0.0),
|
||||
h_(p.size(), 0.0),
|
||||
Ta_(p.size(), 0.0)
|
||||
{
|
||||
this->refValue() = 0.0;
|
||||
this->refGrad() = 0.0;
|
||||
this->valueFraction() = 1.0;
|
||||
}
|
||||
|
||||
|
||||
Foam::externalWallHeatFluxTemperatureFvPatchScalarField::
|
||||
externalWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const externalWallHeatFluxTemperatureFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
||||
temperatureCoupledBase(patch(), ptf.KMethod(), ptf.KName()),
|
||||
oldMode_(unknown),
|
||||
q_(ptf.q_, mapper),
|
||||
h_(ptf.h_, mapper),
|
||||
Ta_(ptf.Ta_, mapper)
|
||||
{}
|
||||
|
||||
|
||||
Foam::externalWallHeatFluxTemperatureFvPatchScalarField::
|
||||
externalWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(p, iF),
|
||||
temperatureCoupledBase(patch(), dict),
|
||||
oldMode_(unknown),
|
||||
q_(p.size(), 0.0),
|
||||
h_(p.size(), 0.0),
|
||||
Ta_(p.size(), 0.0)
|
||||
{
|
||||
if (dict.found("q") && !dict.found("h") && !dict.found("Ta"))
|
||||
{
|
||||
oldMode_ = fixedHeatFlux;
|
||||
q_ = scalarField("q", dict, p.size());
|
||||
}
|
||||
else if(dict.found("h") && dict.found("Ta") && !dict.found("q"))
|
||||
{
|
||||
oldMode_ = fixedHeatTransferCoeff;
|
||||
h_ = scalarField("h", dict, p.size());
|
||||
Ta_ = scalarField("Ta", dict, p.size());
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"externalWallHeatFluxTemperatureFvPatchScalarField::"
|
||||
"externalWallHeatFluxTemperatureFvPatchScalarField\n"
|
||||
"(\n"
|
||||
" const fvPatch& p,\n"
|
||||
" const DimensionedField<scalar, volMesh>& iF,\n"
|
||||
" const dictionary& dict\n"
|
||||
")\n"
|
||||
) << "\n patch type '" << p.type()
|
||||
<< "' either q or h and Ta were not found '"
|
||||
<< "\n for patch " << p.name()
|
||||
<< " of field " << dimensionedInternalField().name()
|
||||
<< " in file " << dimensionedInternalField().objectPath()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
||||
|
||||
if (dict.found("refValue"))
|
||||
{
|
||||
// Full restart
|
||||
refValue() = scalarField("refValue", dict, p.size());
|
||||
refGrad() = scalarField("refGradient", dict, p.size());
|
||||
valueFraction() = scalarField("valueFraction", dict, p.size());
|
||||
}
|
||||
else
|
||||
{
|
||||
// Start from user entered data. Assume fixedValue.
|
||||
refValue() = *this;
|
||||
refGrad() = 0.0;
|
||||
valueFraction() = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::externalWallHeatFluxTemperatureFvPatchScalarField::
|
||||
externalWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const externalWallHeatFluxTemperatureFvPatchScalarField& tppsf
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(tppsf),
|
||||
temperatureCoupledBase(tppsf),
|
||||
oldMode_(unknown),
|
||||
q_(tppsf.q_),
|
||||
h_(tppsf.h_),
|
||||
Ta_(tppsf.Ta_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::externalWallHeatFluxTemperatureFvPatchScalarField::
|
||||
externalWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const externalWallHeatFluxTemperatureFvPatchScalarField& tppsf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(tppsf, iF),
|
||||
temperatureCoupledBase(patch(), tppsf.KMethod(), tppsf.KName()),
|
||||
oldMode_(tppsf.oldMode_),
|
||||
q_(tppsf.q_),
|
||||
h_(tppsf.h_),
|
||||
Ta_(tppsf.Ta_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
if (updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(oldMode_ == fixedHeatFlux)
|
||||
{
|
||||
this->refGrad() = q_/K(*this);
|
||||
this->refValue() = 0.0;
|
||||
this->valueFraction() = 0.0;
|
||||
}
|
||||
else if(oldMode_ == fixedHeatTransferCoeff)
|
||||
{
|
||||
this->refGrad() = (Ta_ - *this)*h_/K(*this);
|
||||
this->refValue() = 0.0;
|
||||
this->valueFraction() = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"externalWallHeatFluxTemperatureFvPatchScalarField"
|
||||
"::updateCoeffs()"
|
||||
) << "Illegal mode " << operationModeNames[oldMode_]
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
mixedFvPatchScalarField::updateCoeffs();
|
||||
|
||||
if (debug)
|
||||
{
|
||||
scalar Q = gSum(K(*this)*patch().magSf()*snGrad());
|
||||
|
||||
Info<< patch().boundaryMesh().mesh().name() << ':'
|
||||
<< patch().name() << ':'
|
||||
<< this->dimensionedInternalField().name() << " :"
|
||||
<< " heatFlux:" << Q
|
||||
<< " walltemperature "
|
||||
<< " min:" << gMin(*this)
|
||||
<< " max:" << gMax(*this)
|
||||
<< " avg:" << gAverage(*this)
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::write
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
mixedFvPatchScalarField::write(os);
|
||||
temperatureCoupledBase::write(os);
|
||||
q_.writeEntry("q", os);
|
||||
h_.writeEntry("h", os);
|
||||
Ta_.writeEntry("Ta", os);
|
||||
this->writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
externalWallHeatFluxTemperatureFvPatchScalarField
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,188 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2011 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
|
||||
externalWallHeatFluxTemperatureFvPatchScalarField
|
||||
|
||||
Description
|
||||
Heat flux boundary condition for temperature on external wall.
|
||||
|
||||
If h and Ta are specified then fixed_heat_transfer_coefficient mode is used
|
||||
If q is specified then fixed_heat_flux is used.
|
||||
|
||||
Example usage:
|
||||
myWallPatch
|
||||
{
|
||||
type externalWallHeatFluxTemperature;
|
||||
K solidThermo; // solidThermo or lookup
|
||||
q uniform 1000; // Heat flux / [W/m2]
|
||||
Ta uniform 300.0; // Tambient temperature /[K]
|
||||
h uniform 10.0; // Heat transfer coeff /[W/Km2]
|
||||
value uniform 300.0; // Initial temperature / [K]
|
||||
KName none;
|
||||
}
|
||||
|
||||
|
||||
SourceFiles
|
||||
externalWallHeatFluxTemperatureFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef solidWallHeatFluxTemperatureFvPatchScalarField_H
|
||||
#define solidWallHeatFluxTemperatureFvPatchScalarField_H
|
||||
|
||||
//#include "fixedGradientFvPatchFields.H"
|
||||
|
||||
#include "mixedFvPatchFields.H"
|
||||
#include "temperatureCoupledBase.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class externalWallHeatFluxTemperatureFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class externalWallHeatFluxTemperatureFvPatchScalarField
|
||||
:
|
||||
public mixedFvPatchScalarField,
|
||||
public temperatureCoupledBase
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- how to operate the BC
|
||||
enum operationMode
|
||||
{
|
||||
fixedHeatFlux,
|
||||
fixedHeatTransferCoeff,
|
||||
unknown
|
||||
};
|
||||
static const NamedEnum<operationMode, 3> operationModeNames;
|
||||
|
||||
//- Operation mode
|
||||
operationMode oldMode_;
|
||||
|
||||
//- Heat flux / [W/m2]
|
||||
scalarField q_;
|
||||
|
||||
//- Heat transfer coefficient / [W/m2K]
|
||||
scalarField h_;
|
||||
|
||||
//- Ambient temperature / [K]
|
||||
scalarField Ta_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("externalWallHeatFluxTemperature");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
externalWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
externalWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given
|
||||
// externalWallHeatFluxTemperatureFvPatchScalarField
|
||||
// onto a new patch
|
||||
externalWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const externalWallHeatFluxTemperatureFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
externalWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const externalWallHeatFluxTemperatureFvPatchScalarField&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchScalarField> clone() const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new externalWallHeatFluxTemperatureFvPatchScalarField(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
externalWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const externalWallHeatFluxTemperatureFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchScalarField> clone
|
||||
(
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new externalWallHeatFluxTemperatureFvPatchScalarField(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write
|
||||
void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,257 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "turbulentTemperatureCoupledMixedSTFvPatchScalarField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "directMappedPatchBase.H"
|
||||
/*
|
||||
#include "mapDistribute.H"
|
||||
#include "regionProperties.H"
|
||||
#include "basicThermo.H"
|
||||
#include "LESModel.H"
|
||||
*/
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressible
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
turbulentTemperatureCoupledMixedSTFvPatchScalarField::
|
||||
turbulentTemperatureCoupledMixedSTFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(p, iF),
|
||||
temperatureCoupledBase(patch(), "undefined", "undefined-K"),
|
||||
TnbrName_("undefined-Tnbr"),
|
||||
QrNbrName_("undefined-QrNbr"),
|
||||
QrName_("undefined-Qr")
|
||||
{
|
||||
this->refValue() = 0.0;
|
||||
this->refGrad() = 0.0;
|
||||
this->valueFraction() = 1.0;
|
||||
}
|
||||
|
||||
|
||||
turbulentTemperatureCoupledMixedSTFvPatchScalarField::
|
||||
turbulentTemperatureCoupledMixedSTFvPatchScalarField
|
||||
(
|
||||
const turbulentTemperatureCoupledMixedSTFvPatchScalarField& psf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(psf, p, iF, mapper),
|
||||
temperatureCoupledBase(patch(), psf.KMethod(), psf.KName()),
|
||||
TnbrName_(psf.TnbrName_),
|
||||
QrNbrName_(psf.QrNbrName_),
|
||||
QrName_(psf.QrName_)
|
||||
{}
|
||||
|
||||
|
||||
turbulentTemperatureCoupledMixedSTFvPatchScalarField::
|
||||
turbulentTemperatureCoupledMixedSTFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(p, iF),
|
||||
temperatureCoupledBase(patch(), dict),
|
||||
TnbrName_(dict.lookup("Tnbr")),
|
||||
QrNbrName_(dict.lookup("QrNbr")),
|
||||
QrName_(dict.lookup("Qr"))
|
||||
{
|
||||
if (!isA<directMappedPatchBase>(this->patch().patch()))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"turbulentTemperatureCoupledMixedSTFvPatchScalarField::"
|
||||
"turbulentTemperatureCoupledMixedSTFvPatchScalarField\n"
|
||||
"(\n"
|
||||
" const fvPatch& p,\n"
|
||||
" const DimensionedField<scalar, volMesh>& iF,\n"
|
||||
" const dictionary& dict\n"
|
||||
")\n"
|
||||
) << "\n patch type '" << p.type()
|
||||
<< "' not type '" << directMappedPatchBase::typeName << "'"
|
||||
<< "\n for patch " << p.name()
|
||||
<< " of field " << dimensionedInternalField().name()
|
||||
<< " in file " << dimensionedInternalField().objectPath()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
||||
|
||||
if (dict.found("refValue"))
|
||||
{
|
||||
// Full restart
|
||||
refValue() = scalarField("refValue", dict, p.size());
|
||||
refGrad() = scalarField("refGradient", dict, p.size());
|
||||
valueFraction() = scalarField("valueFraction", dict, p.size());
|
||||
}
|
||||
else
|
||||
{
|
||||
// Start from user entered data. Assume fixedValue.
|
||||
refValue() = *this;
|
||||
refGrad() = 0.0;
|
||||
valueFraction() = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
turbulentTemperatureCoupledMixedSTFvPatchScalarField::
|
||||
turbulentTemperatureCoupledMixedSTFvPatchScalarField
|
||||
(
|
||||
const turbulentTemperatureCoupledMixedSTFvPatchScalarField& psf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(psf, iF),
|
||||
temperatureCoupledBase(patch(), psf.KMethod(), psf.KName()),
|
||||
TnbrName_(psf.TnbrName_),
|
||||
QrNbrName_(psf.QrNbrName_),
|
||||
QrName_(psf.QrName_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void turbulentTemperatureCoupledMixedSTFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
if (updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the coupling information from the directMappedPatchBase
|
||||
const directMappedPatchBase& mpp =
|
||||
refCast<const directMappedPatchBase>(patch().patch());
|
||||
const polyMesh& nbrMesh = mpp.sampleMesh();
|
||||
const label samplePatchI = mpp.samplePolyPatch().index();
|
||||
const fvPatch& nbrPatch =
|
||||
refCast<const fvMesh>(nbrMesh).boundary()[samplePatchI];
|
||||
|
||||
// Force recalculation of mapping and schedule
|
||||
const mapDistribute& distMap = mpp.map();
|
||||
|
||||
scalarField Tc = patchInternalField();
|
||||
scalarField& Tp = *this;
|
||||
|
||||
const turbulentTemperatureCoupledMixedSTFvPatchScalarField&
|
||||
nbrField = refCast
|
||||
<const turbulentTemperatureCoupledMixedSTFvPatchScalarField>
|
||||
(
|
||||
nbrPatch.lookupPatchField<volScalarField, scalar>(TnbrName_)
|
||||
);
|
||||
|
||||
// Swap to obtain full local values of neighbour internal field
|
||||
scalarField TcNbr = nbrField.patchInternalField();
|
||||
mapDistribute::distribute
|
||||
(
|
||||
Pstream::defaultCommsType,
|
||||
distMap.schedule(),
|
||||
distMap.constructSize(),
|
||||
distMap.subMap(), // what to send
|
||||
distMap.constructMap(), // what to receive
|
||||
TcNbr
|
||||
);
|
||||
|
||||
// Swap to obtain full local values of neighbour K*delta
|
||||
scalarField KDeltaNbr = nbrField.K(TcNbr)*nbrPatch.deltaCoeffs();
|
||||
mapDistribute::distribute
|
||||
(
|
||||
Pstream::defaultCommsType,
|
||||
distMap.schedule(),
|
||||
distMap.constructSize(),
|
||||
distMap.subMap(), // what to send
|
||||
distMap.constructMap(), // what to receive
|
||||
KDeltaNbr
|
||||
);
|
||||
|
||||
scalarField KDelta = K(*this)*patch().deltaCoeffs();
|
||||
|
||||
scalarField Qr(Tp.size(), 0.0);
|
||||
if (QrName_ != "none")
|
||||
{
|
||||
Qr = patch().lookupPatchField<volScalarField, scalar>(QrName_);
|
||||
}
|
||||
|
||||
scalarField QrNbr(Tp.size(), 0.0);
|
||||
if (QrNbrName_ != "none")
|
||||
{
|
||||
QrNbr = nbrPatch.lookupPatchField<volScalarField, scalar>(QrNbrName_);
|
||||
}
|
||||
|
||||
scalarField alpha(KDeltaNbr - (Qr + QrNbr)/Tp);
|
||||
|
||||
valueFraction() = alpha/(alpha + KDelta);
|
||||
|
||||
refValue() = (KDeltaNbr*TcNbr)/alpha;
|
||||
|
||||
mixedFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void turbulentTemperatureCoupledMixedSTFvPatchScalarField::write
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
mixedFvPatchScalarField::write(os);
|
||||
os.writeKeyword("Tnbr")<< TnbrName_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("QrNbr")<< QrNbrName_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("Qr")<< QrName_ << token::END_STATEMENT << nl;
|
||||
temperatureCoupledBase::write(os);
|
||||
//os.writeKeyword("K") << KName_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
turbulentTemperatureCoupledMixedSTFvPatchScalarField
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace compressible
|
||||
} // End namespace Foam
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,187 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2011 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::
|
||||
compressible::
|
||||
turbulentTemperatureCoupledMixedSTFvPatchScalarField
|
||||
|
||||
Description
|
||||
Mixed boundary condition for temperature, to be used for heat-transfer
|
||||
on back-to-back baffles.
|
||||
|
||||
Example usage:
|
||||
myInterfacePatchName
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledMixedST;
|
||||
TNbr T; // name of T field on neighbour region
|
||||
K K; // or none. Name of thermal conductivity field.
|
||||
Calculated from database if equal to 'none'
|
||||
|
||||
QrNbr Qr; // or none. Name of Qr field on neighbour region
|
||||
Qr Qr; // or none. Name of Qr field on local region
|
||||
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
Needs to be on underlying directMapped(Wall)FvPatch.
|
||||
|
||||
Note: runs in parallel with arbitrary decomposition. Uses directMapped
|
||||
functionality to calculate exchange.
|
||||
|
||||
SourceFiles
|
||||
turbulentTemperatureCoupledMixedSTFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef turbulentTemperatureCoupledMixedSTFvPatchScalarField_H
|
||||
#define turbulentTemperatureCoupledMixedSTFvPatchScalarField_H
|
||||
|
||||
#include "mixedFvPatchFields.H"
|
||||
#include "temperatureCoupledBase.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressible
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class turbulentTemperatureCoupledMixedSTFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class turbulentTemperatureCoupledMixedSTFvPatchScalarField
|
||||
:
|
||||
public mixedFvPatchScalarField,
|
||||
public temperatureCoupledBase
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Name of field on the neighbour region
|
||||
const word TnbrName_;
|
||||
|
||||
//- Name of the radiative heat flux in the neighbout region
|
||||
const word QrNbrName_;
|
||||
|
||||
//- Name of the radiative heat flux in local region
|
||||
const word QrName_;
|
||||
|
||||
//- Name of thermal conductivity field
|
||||
//const word KName_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("compressible::turbulentTemperatureCoupledMixedST");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
turbulentTemperatureCoupledMixedSTFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
turbulentTemperatureCoupledMixedSTFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given
|
||||
// turbulentTemperatureCoupledBaffleMixedFvPatchScalarField onto a
|
||||
// new patch
|
||||
turbulentTemperatureCoupledMixedSTFvPatchScalarField
|
||||
(
|
||||
const
|
||||
turbulentTemperatureCoupledMixedSTFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchScalarField> clone() const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new turbulentTemperatureCoupledMixedSTFvPatchScalarField
|
||||
(
|
||||
*this
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
turbulentTemperatureCoupledMixedSTFvPatchScalarField
|
||||
(
|
||||
const turbulentTemperatureCoupledMixedSTFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchScalarField> clone
|
||||
(
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new turbulentTemperatureCoupledMixedSTFvPatchScalarField
|
||||
(
|
||||
*this,
|
||||
iF
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Get corresponding K field
|
||||
//tmp<scalarField> K() const;
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace compressible
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,3 @@
|
||||
faceAgglomerate.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/faceAgglomerate
|
||||
@ -0,0 +1,192 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2011 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/>.
|
||||
|
||||
Application
|
||||
faceAgglomerate
|
||||
|
||||
Description
|
||||
|
||||
Agglomerate boundary faces using the pairPatchAgglomeration algorithm.
|
||||
It writes a map from the fine to coarse grid.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "fvMesh.H"
|
||||
#include "Time.H"
|
||||
#include "volFields.H"
|
||||
#include "CompactListList.H"
|
||||
#include "unitConversion.H"
|
||||
#include "pairPatchAgglomeration.H"
|
||||
#include "labelListIOList.H"
|
||||
#include "syncTools.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// Main program:
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
#include "addRegionOption.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createNamedMesh.H"
|
||||
|
||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||
|
||||
labelListIOList finalAgglom
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"finalAgglom",
|
||||
mesh.facesInstance(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
patches.size()
|
||||
);
|
||||
|
||||
|
||||
// Read view factor dictionary
|
||||
IOdictionary viewFactorDict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"viewFactorsDict",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
bool writeAgglo =
|
||||
readBool(viewFactorDict.lookup("writeFacesAgglomeration"));
|
||||
|
||||
const polyBoundaryMesh& boundary = mesh.boundaryMesh();
|
||||
|
||||
forAll(boundary, patchId)
|
||||
{
|
||||
const polyPatch& pp = boundary[patchId];
|
||||
|
||||
label patchI = pp.index();
|
||||
finalAgglom[patchI].setSize(pp.size(), 0);
|
||||
|
||||
if (pp.size() > 0 && !pp.coupled())
|
||||
{
|
||||
if (viewFactorDict.found(pp.name()))
|
||||
{
|
||||
Info << "\nAgglomerating name : " << pp.name() << endl;
|
||||
pairPatchAgglomeration agglomObject
|
||||
(
|
||||
pp,
|
||||
viewFactorDict.subDict(pp.name())
|
||||
);
|
||||
agglomObject.agglomerate();
|
||||
finalAgglom[patchI] =
|
||||
agglomObject.restrictTopBottomAddressing();
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"main(int argc, char *argv[])"
|
||||
) << pp.name()
|
||||
<< " not found in dictionary : "
|
||||
<< viewFactorDict.name()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sync agglomeration across coupled patches
|
||||
labelList nbrAgglom(mesh.nFaces()-mesh.nInternalFaces(), -1);
|
||||
|
||||
forAll(boundary, patchId)
|
||||
{
|
||||
const polyPatch& pp = boundary[patchId];
|
||||
if (pp.coupled())
|
||||
{
|
||||
finalAgglom[patchId] = identity(pp.size());
|
||||
forAll(pp, i)
|
||||
{
|
||||
nbrAgglom[pp.start()-mesh.nInternalFaces()+i] =
|
||||
finalAgglom[patchId][i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
syncTools::swapBoundaryFaceList(mesh, nbrAgglom);
|
||||
forAll(boundary, patchId)
|
||||
{
|
||||
const polyPatch& pp = boundary[patchId];
|
||||
if (pp.coupled() && !refCast<const coupledPolyPatch>(pp).owner())
|
||||
{
|
||||
forAll(pp, i)
|
||||
{
|
||||
finalAgglom[patchId][i] =
|
||||
nbrAgglom[pp.start()-mesh.nInternalFaces()+i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
finalAgglom.write();
|
||||
|
||||
if (writeAgglo)
|
||||
{
|
||||
volScalarField facesAgglomeration
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"facesAgglomeration",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("facesAgglomeration", dimless, 0)
|
||||
);
|
||||
|
||||
forAll(boundary, patchId)
|
||||
{
|
||||
|
||||
fvPatchScalarField& bFacesAgglomeration =
|
||||
facesAgglomeration.boundaryField()[patchId];
|
||||
|
||||
forAll(bFacesAgglomeration, j)
|
||||
{
|
||||
bFacesAgglomeration[j] = finalAgglom[patchId][j];
|
||||
}
|
||||
}
|
||||
|
||||
Info << "\nWriting facesAgglomeration..." << endl;
|
||||
facesAgglomeration.write();
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
return 0;
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
viewFactorsGen.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/viewFactorsGen
|
||||
@ -0,0 +1,16 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||
-I$(LIB_SRC)/parallel/distributed/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/OpenFOAM/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
-lfiniteVolume \
|
||||
-lOpenFOAM \
|
||||
-lmeshTools \
|
||||
-ltriSurface \
|
||||
-ldistributed \
|
||||
-lradiationModels
|
||||
|
||||
@ -0,0 +1,54 @@
|
||||
Random rndGen(653213);
|
||||
|
||||
// Determine mesh bounding boxes:
|
||||
List<treeBoundBox> meshBb
|
||||
(
|
||||
1,
|
||||
treeBoundBox
|
||||
(
|
||||
boundBox(coarseMesh.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;
|
||||
forAll(patches, patchI) //
|
||||
{
|
||||
if (!isA<processorPolyPatch>(patches[patchI]))
|
||||
{
|
||||
includePatches.insert(patchI);
|
||||
}
|
||||
}
|
||||
|
||||
distributedTriSurfaceMesh surfacesMesh
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"wallSurface.stl",
|
||||
runTime.constant(), // directory
|
||||
"triSurface", // instance
|
||||
runTime, // registry
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
triSurfaceTools::triangulate
|
||||
(
|
||||
patches,
|
||||
includePatches
|
||||
),
|
||||
dict
|
||||
);
|
||||
|
||||
//surfacesMesh.searchableSurface::write();
|
||||
@ -0,0 +1,97 @@
|
||||
// All rays expressed as start face (local) index end end face (global)
|
||||
// Pre-size by assuming a certain percentage is visible.
|
||||
|
||||
// Maximum lenght for dynamicList
|
||||
const label maxDynListLenght = 10000;
|
||||
//label lenghtCount = 0;
|
||||
|
||||
for (label procI = 0; procI < Pstream::nProcs(); procI++)
|
||||
{
|
||||
// Shoot rays from me to procI. Note that even if processor has
|
||||
// 0 faces we still need to call findLine to keep calls synced.
|
||||
|
||||
DynamicField<point> start(coarseMesh.nFaces());
|
||||
DynamicField<point> end(start.size());
|
||||
DynamicList<label> startIndex(start.size());
|
||||
DynamicList<label> endIndex(start.size());
|
||||
|
||||
|
||||
const pointField& myFc = remoteCoarseCf[Pstream::myProcNo()];
|
||||
const vectorField& myArea = remoteCoarseSf[Pstream::myProcNo()];
|
||||
|
||||
const pointField& remoteArea = remoteCoarseSf[procI];
|
||||
const pointField& remoteFc = remoteCoarseCf[procI];
|
||||
|
||||
if (myFc.size()*remoteFc.size() > 0)
|
||||
{
|
||||
forAll(myFc, i)
|
||||
{
|
||||
const point& fc = myFc[i];
|
||||
const vector& fA = myArea[i];
|
||||
|
||||
forAll(remoteFc, j)
|
||||
{
|
||||
if (procI != Pstream::myProcNo() || i != j)
|
||||
{
|
||||
const point& remFc = remoteFc[j];
|
||||
const vector& remA = remoteArea[j];
|
||||
const vector& d = remFc-fc;
|
||||
|
||||
if (((d & fA) < 0.) && ((d & remA) > 0))
|
||||
{
|
||||
//lenghtCount ++;
|
||||
start.append(fc + 0.0001*d);
|
||||
startIndex.append(i);
|
||||
end.append(fc + 0.9999*d);
|
||||
label globalI = globalNumbering.toGlobal(procI, j);
|
||||
endIndex.append(globalI);
|
||||
|
||||
if (startIndex.size() > maxDynListLenght)
|
||||
{
|
||||
List<pointIndexHit> hitInfo(startIndex.size());
|
||||
surfacesMesh.findLine
|
||||
(
|
||||
start,
|
||||
end,
|
||||
hitInfo
|
||||
);
|
||||
surfacesMesh.findLine(start, end, hitInfo);
|
||||
forAll (hitInfo, rayI)
|
||||
{
|
||||
if (!hitInfo[rayI].hit())
|
||||
{
|
||||
rayStartFace.append(startIndex[rayI]);
|
||||
rayEndFace.append(endIndex[rayI]);
|
||||
}
|
||||
}
|
||||
//lenghtCount = 0;
|
||||
start.clear();
|
||||
startIndex.clear();
|
||||
end.clear();
|
||||
endIndex.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!start.empty())
|
||||
{
|
||||
List<pointIndexHit> hitInfo(startIndex.size());
|
||||
surfacesMesh.findLine
|
||||
(
|
||||
start,
|
||||
end,
|
||||
hitInfo
|
||||
);
|
||||
surfacesMesh.findLine(start, end, hitInfo);
|
||||
forAll (hitInfo, rayI)
|
||||
{
|
||||
if (!hitInfo[rayI].hit())
|
||||
{
|
||||
rayStartFace.append(startIndex[rayI]);
|
||||
rayEndFace.append(endIndex[rayI]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,861 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2011 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/>.
|
||||
|
||||
Application
|
||||
viewFactorGenerator
|
||||
|
||||
Description
|
||||
View factors are calculated based on a face agglomeration array
|
||||
(finalAgglom generated by faceAgglomerate utility).
|
||||
|
||||
Each view factor between the agglomerated faces i and j (Fij) is calculated
|
||||
using a double integral of the sub-areas composing the agglomaration.
|
||||
|
||||
The patches involved in the view factor calculation are taken from the Qr
|
||||
volScalarField (radiative flux) when is greyDiffusiveRadiationViewFactor
|
||||
otherwise they are not included.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include "argList.H"
|
||||
#include "fvMesh.H"
|
||||
#include "Time.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "distributedTriSurfaceMesh.H"
|
||||
#include "triSurfaceTools.H"
|
||||
#include "mapDistribute.H"
|
||||
|
||||
#include "OFstream.H"
|
||||
#include "meshTools.H"
|
||||
#include "plane.H"
|
||||
#include "uindirectPrimitivePatch.H"
|
||||
#include "DynamicField.H"
|
||||
#include "IFstream.H"
|
||||
#include "unitConversion.H"
|
||||
|
||||
#include "mathematicalConstants.H"
|
||||
#include "scalarMatrices.H"
|
||||
#include "CompactListList.H"
|
||||
#include "labelIOList.H"
|
||||
#include "labelListIOList.H"
|
||||
#include "scalarListIOList.H"
|
||||
|
||||
#include "singleCellFvMesh.H"
|
||||
#include "IOdictionary.H"
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
void writeRays
|
||||
(
|
||||
const fileName& fName,
|
||||
const pointField& compactCf,
|
||||
const pointField& myFc,
|
||||
const labelListList& visibleFaceFaces
|
||||
)
|
||||
{
|
||||
OFstream str(fName);
|
||||
label vertI = 0;
|
||||
|
||||
Pout<< "Dumping rays to " << str.name() << endl;
|
||||
|
||||
forAll(myFc, faceI)
|
||||
{
|
||||
const labelList visFaces = visibleFaceFaces[faceI];
|
||||
forAll(visFaces, faceRemote)
|
||||
{
|
||||
label compactI = visFaces[faceRemote];
|
||||
const point& remoteFc = compactCf[compactI];
|
||||
|
||||
meshTools::writeOBJ(str, myFc[faceI]);
|
||||
vertI++;
|
||||
meshTools::writeOBJ(str, remoteFc);
|
||||
vertI++;
|
||||
str << "l " << vertI-1 << ' ' << vertI << nl;
|
||||
}
|
||||
}
|
||||
string cmd("objToVTK " + fName + " " + fName.lessExt() + ".vtk");
|
||||
Pout<< "cmd:" << cmd << endl;
|
||||
system(cmd);
|
||||
}
|
||||
|
||||
|
||||
scalar calculateViewFactorFij
|
||||
(
|
||||
const vector& i,
|
||||
const vector& j,
|
||||
const vector& dAi,
|
||||
const vector& dAj
|
||||
)
|
||||
{
|
||||
vector r = i - j;
|
||||
scalar rMag = mag(r);
|
||||
scalar dAiMag = mag(dAi);
|
||||
scalar dAjMag = mag(dAj);
|
||||
|
||||
vector ni = dAi/dAiMag;
|
||||
vector nj = dAj/dAjMag;
|
||||
scalar cosThetaJ = mag(nj & r)/rMag;
|
||||
scalar cosThetaI = mag(ni & r)/rMag;
|
||||
|
||||
return
|
||||
(
|
||||
(cosThetaI*cosThetaJ*dAjMag*dAiMag)
|
||||
/(sqr(rMag)*constant::mathematical::pi)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void insertMatrixElements
|
||||
(
|
||||
const globalIndex& globalNumbering,
|
||||
const label fromProcI,
|
||||
const labelListList& globalFaceFaces,
|
||||
const scalarListList& viewFactors,
|
||||
scalarSquareMatrix& matrix
|
||||
)
|
||||
{
|
||||
forAll(viewFactors, faceI)
|
||||
{
|
||||
const scalarList& vf = viewFactors[faceI];
|
||||
const labelList& globalFaces = globalFaceFaces[faceI];
|
||||
|
||||
label globalI = globalNumbering.toGlobal(fromProcI, faceI);
|
||||
forAll(globalFaces, i)
|
||||
{
|
||||
matrix[globalI][globalFaces[i]] = vf[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Main program:
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "addRegionOption.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createNamedMesh.H"
|
||||
|
||||
// Read view factor dictionary
|
||||
IOdictionary viewFactorDict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"viewFactorsDict",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
const bool writeViewFactors =
|
||||
viewFactorDict.lookupOrDefault<bool>("writeViewFactorMatrix", false);
|
||||
|
||||
const bool dumpRays =
|
||||
viewFactorDict.lookupOrDefault<bool>("dumpRays", false);
|
||||
|
||||
// Debug
|
||||
// ~~~~~
|
||||
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
|
||||
labelListIOList finalAgglom
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"finalAgglom",
|
||||
mesh.facesInstance(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
// - Create the coarse mesh using agglomeration //
|
||||
//-----------------------------------------------//
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Info << "\nCreating single cell mesh..." << endl;
|
||||
}
|
||||
|
||||
singleCellFvMesh coarseMesh
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
mesh.name(),
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
finalAgglom
|
||||
);
|
||||
|
||||
|
||||
// - Calculate total number of fine and coarse faces //
|
||||
//---------------------------------------------------//
|
||||
|
||||
label nCoarseFaces = 0; //total number of coarse faces
|
||||
label nFineFaces = 0; //total number of fine faces
|
||||
|
||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||
const polyBoundaryMesh& coarsePatches = coarseMesh.boundaryMesh();
|
||||
|
||||
labelList viewFactorsPatches(patches.size());
|
||||
|
||||
const volScalarField::GeometricBoundaryField& Qrb = Qr.boundaryField();
|
||||
|
||||
label count = 0;
|
||||
forAll(Qrb, patchI)
|
||||
{
|
||||
const polyPatch& pp = patches[patchI];
|
||||
const fvPatchScalarField& QrpI = Qrb[patchI];
|
||||
|
||||
if ((isA<fixedValueFvPatchScalarField>(QrpI)) && (pp.size() > 0))
|
||||
{
|
||||
viewFactorsPatches[count] = QrpI.patch().index();
|
||||
nCoarseFaces += coarsePatches[patchI].size();
|
||||
nFineFaces += patches[patchI].size();
|
||||
count ++;
|
||||
}
|
||||
}
|
||||
|
||||
viewFactorsPatches.resize(count--);
|
||||
|
||||
//total number of coarse faces
|
||||
label totalNCoarseFaces = nCoarseFaces;
|
||||
|
||||
reduce(totalNCoarseFaces, sumOp<label>());
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
Info << "\nTotal number of coarse faces: "<< totalNCoarseFaces << endl;
|
||||
}
|
||||
|
||||
if (Pstream::master() && debug)
|
||||
{
|
||||
Pout << "\nView factor patches included in the calculation : "
|
||||
<< viewFactorsPatches << endl;
|
||||
}
|
||||
|
||||
// - Collect local Cf and Sf on coarse mesh //.
|
||||
//------------------------------------------//
|
||||
|
||||
DynamicList<point> localCoarseCf(nCoarseFaces);
|
||||
DynamicList<point> localCoarseSf(nCoarseFaces);
|
||||
|
||||
forAll (viewFactorsPatches, i)
|
||||
{
|
||||
const label patchID = viewFactorsPatches[i];
|
||||
|
||||
const polyPatch& pp = patches[patchID];
|
||||
const labelList& agglom = finalAgglom[patchID];
|
||||
label nAgglom = max(agglom)+1;
|
||||
labelListList coarseToFine(invertOneToMany(nAgglom, agglom));
|
||||
const labelList& coarsePatchFace = coarseMesh.patchFaceMap()[patchID];
|
||||
|
||||
const pointField& coarseCf = coarseMesh.Cf().boundaryField()[patchID];
|
||||
const pointField& coarseSf = coarseMesh.Sf().boundaryField()[patchID];
|
||||
|
||||
forAll(coarseCf, faceI)
|
||||
{
|
||||
point cf = coarseCf[faceI];
|
||||
const label coarseFaceI = coarsePatchFace[faceI];
|
||||
const labelList& fineFaces = coarseToFine[coarseFaceI];
|
||||
// Construct single face
|
||||
uindirectPrimitivePatch upp
|
||||
(
|
||||
UIndirectList<face>(pp, fineFaces),
|
||||
pp.points()
|
||||
);
|
||||
|
||||
List<point> availablePoints
|
||||
(
|
||||
upp.faceCentres().size()
|
||||
+ upp.localPoints().size()
|
||||
);
|
||||
|
||||
SubList<point>
|
||||
(
|
||||
availablePoints,
|
||||
upp.faceCentres().size()
|
||||
).assign(upp.faceCentres());
|
||||
|
||||
SubList<point>
|
||||
(
|
||||
availablePoints,
|
||||
upp.localPoints().size(),
|
||||
upp.faceCentres().size()
|
||||
).assign(upp.localPoints());
|
||||
|
||||
point cfo = cf;
|
||||
scalar dist = GREAT;
|
||||
forAll(availablePoints, iPoint)
|
||||
{
|
||||
point cfFine = availablePoints[iPoint];
|
||||
if(mag(cfFine-cfo) < dist)
|
||||
{
|
||||
dist = mag(cfFine-cfo);
|
||||
cf = cfFine;
|
||||
}
|
||||
}
|
||||
|
||||
point sf = coarseSf[faceI];
|
||||
localCoarseCf.append(cf);
|
||||
localCoarseSf.append(sf);
|
||||
}
|
||||
}
|
||||
|
||||
// - Collect remote Cf and Sf on coarse mesh //.
|
||||
//------------------------------------------//
|
||||
|
||||
List<pointField> remoteCoarseCf(Pstream::nProcs());
|
||||
List<pointField> remoteCoarseSf(Pstream::nProcs());
|
||||
|
||||
remoteCoarseCf[Pstream::myProcNo()] = localCoarseCf;
|
||||
remoteCoarseSf[Pstream::myProcNo()] = localCoarseSf;
|
||||
|
||||
// - Collect remote Cf and Sf on fine mesh //.
|
||||
//------------------------------------------//
|
||||
|
||||
List<pointField> remoteFineCf(Pstream::nProcs());
|
||||
List<pointField> remoteFineSf(Pstream::nProcs());
|
||||
|
||||
remoteCoarseCf[Pstream::myProcNo()] = localCoarseCf;
|
||||
remoteCoarseSf[Pstream::myProcNo()] = localCoarseSf;
|
||||
|
||||
// Distribute local coarse Cf and Sf for shooting rays
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Pstream::gatherList(remoteCoarseCf);
|
||||
Pstream::scatterList(remoteCoarseCf);
|
||||
Pstream::gatherList(remoteCoarseSf);
|
||||
Pstream::scatterList(remoteCoarseSf);
|
||||
|
||||
|
||||
// Set up searching engine for obstacles
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# include "searchingEngine.H"
|
||||
|
||||
|
||||
// Determine rays between coarse face centres
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
DynamicList<label> rayStartFace
|
||||
(
|
||||
nCoarseFaces
|
||||
+ 0.01*nCoarseFaces
|
||||
);
|
||||
|
||||
DynamicList<label> rayEndFace(rayStartFace.size());
|
||||
|
||||
globalIndex globalNumbering(nCoarseFaces);
|
||||
|
||||
|
||||
//- Return rayStartFace in local index andrayEndFace in global index //
|
||||
// ------------------------------------------------------------------//
|
||||
|
||||
# include "shootRays.H"
|
||||
|
||||
// Calculate number of visible faces from local index
|
||||
labelList nVisibleFaceFaces(nCoarseFaces, 0);
|
||||
|
||||
forAll(rayStartFace, i)
|
||||
{
|
||||
nVisibleFaceFaces[rayStartFace[i]]++;
|
||||
}
|
||||
|
||||
labelListList visibleFaceFaces(nCoarseFaces);
|
||||
|
||||
label nViewFactors = 0;
|
||||
forAll(nVisibleFaceFaces, faceI)
|
||||
{
|
||||
visibleFaceFaces[faceI].setSize(nVisibleFaceFaces[faceI]);
|
||||
nViewFactors += nVisibleFaceFaces[faceI];
|
||||
}
|
||||
|
||||
|
||||
// - Construct compact numbering
|
||||
// - return map from remote to compact indices
|
||||
// (per processor (!= myProcNo) a map from remote index to compact index)
|
||||
// - construct distribute map
|
||||
// - renumber rayEndFace into compact addressing
|
||||
|
||||
List<Map<label> > compactMap(Pstream::nProcs());
|
||||
|
||||
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:
|
||||
// (local face, local viewed face) = compact viewed face
|
||||
//------------------------------------------------------------//
|
||||
|
||||
nVisibleFaceFaces = 0;
|
||||
forAll(rayStartFace, i)
|
||||
{
|
||||
label faceI = rayStartFace[i];
|
||||
label compactI = rayEndFace[i];
|
||||
visibleFaceFaces[faceI][nVisibleFaceFaces[faceI]++] = compactI;
|
||||
}
|
||||
|
||||
|
||||
// Construct data in compact addressing
|
||||
// I need coarse Sf (Ai), fine Sf (dAi) and fine Cf(r) to calculate Fij
|
||||
// --------------------------------------------------------------------//
|
||||
|
||||
pointField compactCoarseCf(map.constructSize(), pTraits<vector>::zero);
|
||||
pointField compactCoarseSf(map.constructSize(), pTraits<vector>::zero);
|
||||
List<List<point> > compactFineSf(map.constructSize());
|
||||
List<List<point> > compactFineCf(map.constructSize());
|
||||
|
||||
DynamicList<label> compactPatchId(map.constructSize());
|
||||
|
||||
// Insert my coarse local values
|
||||
SubList<point>(compactCoarseSf, nCoarseFaces).assign(localCoarseSf);
|
||||
SubList<point>(compactCoarseCf, nCoarseFaces).assign(localCoarseCf);
|
||||
|
||||
// Insert my fine local values
|
||||
label compactI = 0;
|
||||
forAll(viewFactorsPatches, i)
|
||||
{
|
||||
label patchID = viewFactorsPatches[i];
|
||||
const labelList& agglom = finalAgglom[patchID];
|
||||
label nAgglom = max(agglom)+1;
|
||||
labelListList coarseToFine(invertOneToMany(nAgglom, agglom));
|
||||
const labelList& coarsePatchFace = coarseMesh.patchFaceMap()[patchID];
|
||||
|
||||
forAll(coarseToFine, coarseI)
|
||||
{
|
||||
compactPatchId.append(patchID);
|
||||
List<point>& fineCf = compactFineCf[compactI];
|
||||
List<point>& fineSf = compactFineSf[compactI++];
|
||||
|
||||
const label coarseFaceI = coarsePatchFace[coarseI];
|
||||
const labelList& fineFaces = coarseToFine[coarseFaceI];
|
||||
|
||||
fineCf.setSize(fineFaces.size());
|
||||
fineSf.setSize(fineFaces.size());
|
||||
|
||||
fineCf = UIndirectList<point>
|
||||
(
|
||||
mesh.Cf().boundaryField()[patchID],
|
||||
coarseToFine[coarseFaceI]
|
||||
);
|
||||
fineSf = UIndirectList<point>
|
||||
(
|
||||
mesh.Sf().boundaryField()[patchID],
|
||||
coarseToFine[coarseFaceI]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Do all swapping
|
||||
map.distribute(compactCoarseSf);
|
||||
map.distribute(compactCoarseCf);
|
||||
map.distribute(compactFineCf);
|
||||
map.distribute(compactFineSf);
|
||||
|
||||
map.distribute(compactPatchId);
|
||||
|
||||
|
||||
// Plot all rays between visible faces.
|
||||
if (dumpRays)
|
||||
{
|
||||
writeRays
|
||||
(
|
||||
runTime.path()/"allVisibleFaces.obj",
|
||||
compactCoarseCf,
|
||||
remoteCoarseCf[Pstream::myProcNo()],
|
||||
visibleFaceFaces
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Fill local view factor matrix
|
||||
//-----------------------------
|
||||
|
||||
scalarListIOList F
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"F",
|
||||
mesh.facesInstance(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
nCoarseFaces
|
||||
);
|
||||
|
||||
label totalPatches = coarsePatches.size();
|
||||
reduce(totalPatches, maxOp<label>());
|
||||
|
||||
// Matrix sum in j(Fij) for each i (if enclosure sum = 1
|
||||
scalarSquareMatrix sumViewFactorPatch
|
||||
(
|
||||
totalPatches,
|
||||
totalPatches,
|
||||
0.0
|
||||
);
|
||||
|
||||
scalarList patchArea(totalPatches, 0.0);
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
Info << "\nCalculating view factors..." << endl;
|
||||
}
|
||||
|
||||
if (mesh.nSolutionD() == 3)
|
||||
{
|
||||
forAll (localCoarseSf, coarseFaceI)
|
||||
{
|
||||
const List<point>& localFineSf = compactFineSf[coarseFaceI];
|
||||
const vector Ai = sum(localFineSf);
|
||||
const List<point>& localFineCf = compactFineCf[coarseFaceI];
|
||||
const label fromPatchId = compactPatchId[coarseFaceI];
|
||||
patchArea[fromPatchId] += mag(Ai);
|
||||
|
||||
const labelList& visCoarseFaces = visibleFaceFaces[coarseFaceI];
|
||||
|
||||
forAll (visCoarseFaces, visCoarseFaceI)
|
||||
{
|
||||
F[coarseFaceI].setSize(visCoarseFaces.size());
|
||||
label compactJ = visCoarseFaces[visCoarseFaceI];
|
||||
const List<point>& remoteFineSj = compactFineSf[compactJ];
|
||||
const List<point>& remoteFineCj = compactFineCf[compactJ];
|
||||
|
||||
const label toPatchId = compactPatchId[compactJ];
|
||||
|
||||
scalar Fij = 0;
|
||||
forAll (localFineSf, i)
|
||||
{
|
||||
const vector& dAi = localFineSf[i];
|
||||
const vector& dCi = localFineCf[i];
|
||||
|
||||
forAll (remoteFineSj, j)
|
||||
{
|
||||
const vector& dAj = remoteFineSj[j];
|
||||
const vector& dCj = remoteFineCj[j];
|
||||
|
||||
scalar dIntFij = calculateViewFactorFij
|
||||
(
|
||||
dCi,
|
||||
dCj,
|
||||
dAi,
|
||||
dAj
|
||||
);
|
||||
|
||||
Fij += dIntFij;
|
||||
}
|
||||
}
|
||||
F[coarseFaceI][visCoarseFaceI] = Fij/mag(Ai);
|
||||
sumViewFactorPatch[fromPatchId][toPatchId] += Fij;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (mesh.nSolutionD() == 2)
|
||||
{
|
||||
const boundBox& box = mesh.bounds();
|
||||
const Vector<label>& dirs = mesh.geometricD();
|
||||
vector emptyDir = vector::zero;
|
||||
forAll (dirs, i)
|
||||
{
|
||||
if (dirs[i] == -1)
|
||||
{
|
||||
emptyDir[i] = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
scalar wideBy2 = (box.span() & emptyDir)*2.0;
|
||||
|
||||
forAll (localCoarseSf, coarseFaceI)
|
||||
{
|
||||
const vector& Ai = localCoarseSf[coarseFaceI];
|
||||
const vector& Ci = localCoarseCf[coarseFaceI];
|
||||
vector Ain = Ai/mag(Ai);
|
||||
vector R1i = Ci + (mag(Ai)/wideBy2)*(Ain ^ emptyDir);
|
||||
vector R2i = Ci - (mag(Ai)/wideBy2)*(Ain ^ emptyDir) ;
|
||||
|
||||
const label fromPatchId = compactPatchId[coarseFaceI];
|
||||
patchArea[fromPatchId] += mag(Ai);
|
||||
|
||||
const labelList& visCoarseFaces = visibleFaceFaces[coarseFaceI];
|
||||
forAll (visCoarseFaces, visCoarseFaceI)
|
||||
{
|
||||
F[coarseFaceI].setSize(visCoarseFaces.size());
|
||||
label compactJ = visCoarseFaces[visCoarseFaceI];
|
||||
const vector& Aj = compactCoarseSf[compactJ];
|
||||
const vector& Cj = compactCoarseCf[compactJ];
|
||||
|
||||
const label toPatchId = compactPatchId[compactJ];
|
||||
|
||||
vector Ajn = Aj/mag(Aj);
|
||||
vector R1j = Cj + (mag(Aj)/wideBy2)*(Ajn ^ emptyDir);
|
||||
vector R2j = Cj - (mag(Aj)/wideBy2)*(Ajn ^ emptyDir);
|
||||
|
||||
scalar d1 = mag(R1i - R2j);
|
||||
scalar d2 = mag(R2i - R1j);
|
||||
scalar s1 = mag(R1i - R1j);
|
||||
scalar s2 = mag(R2i - R2j);
|
||||
|
||||
scalar Fij = mag((d1 + d2) - (s1 + s2))/(4.0*mag(Ai)/wideBy2);
|
||||
|
||||
F[coarseFaceI][visCoarseFaceI] = Fij;
|
||||
sumViewFactorPatch[fromPatchId][toPatchId] += Fij*mag(Ai);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
Info << "Writing view factor matrix..." << endl;
|
||||
}
|
||||
|
||||
// Write view factors matrix in listlist form
|
||||
F.write();
|
||||
|
||||
reduce(sumViewFactorPatch, sumOp<scalarSquareMatrix>());
|
||||
reduce(patchArea, sumOp<scalarList>());
|
||||
|
||||
|
||||
if (Pstream::master() && debug)
|
||||
{
|
||||
forAll (viewFactorsPatches, i)
|
||||
{
|
||||
label patchI = viewFactorsPatches[i];
|
||||
forAll (viewFactorsPatches, i)
|
||||
{
|
||||
label patchJ = viewFactorsPatches[i];
|
||||
Info << "F" << patchI << patchJ << ": "
|
||||
<< sumViewFactorPatch[patchI][patchJ]/patchArea[patchI]
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (writeViewFactors)
|
||||
{
|
||||
volScalarField viewFactorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"viewFactorField",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("viewFactorField", dimless, 0)
|
||||
);
|
||||
|
||||
label compactI = 0;
|
||||
forAll(viewFactorsPatches, i)
|
||||
{
|
||||
label patchID = viewFactorsPatches[i];
|
||||
const labelList& agglom = finalAgglom[patchID];
|
||||
label nAgglom = max(agglom)+1;
|
||||
labelListList coarseToFine(invertOneToMany(nAgglom, agglom));
|
||||
const labelList& coarsePatchFace =
|
||||
coarseMesh.patchFaceMap()[patchID];
|
||||
|
||||
forAll (coarseToFine, coarseI)
|
||||
{
|
||||
const scalar Fij = sum(F[compactI]);
|
||||
const label coarseFaceID = coarsePatchFace[coarseI];
|
||||
const labelList& fineFaces = coarseToFine[coarseFaceID];
|
||||
forAll (fineFaces, fineId)
|
||||
{
|
||||
const label faceID = fineFaces[fineId];
|
||||
viewFactorField.boundaryField()[patchID][faceID] = Fij;
|
||||
}
|
||||
compactI++;
|
||||
}
|
||||
}
|
||||
viewFactorField.write();
|
||||
}
|
||||
|
||||
|
||||
// Invert compactMap (from processor+localface to compact) to go
|
||||
// from compact to processor+localface (expressed as a globalIndex)
|
||||
// globalIndex globalCoarFaceNum(coarseMesh.nFaces());
|
||||
labelList compactToGlobal(map.constructSize());
|
||||
|
||||
// Local indices first (note: are not in compactMap)
|
||||
for (label i = 0; i < globalNumbering.localSize(); i++)
|
||||
{
|
||||
compactToGlobal[i] = globalNumbering.toGlobal(i);
|
||||
}
|
||||
|
||||
|
||||
forAll(compactMap, procI)
|
||||
{
|
||||
const Map<label>& localToCompactMap = compactMap[procI];
|
||||
|
||||
forAllConstIter(Map<label>, localToCompactMap, iter)
|
||||
{
|
||||
compactToGlobal[iter()] = globalNumbering.toGlobal
|
||||
(
|
||||
procI,
|
||||
iter.key()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
scalarSquareMatrix Fmatrix(totalNCoarseFaces, totalNCoarseFaces, 0.0);
|
||||
|
||||
labelListList globalFaceFaces(visibleFaceFaces.size());
|
||||
|
||||
// Create globalFaceFaces needed to insert view factors
|
||||
// in F to the global matrix Fmatrix
|
||||
forAll(globalFaceFaces, faceI)
|
||||
{
|
||||
globalFaceFaces[faceI] = renumber
|
||||
(
|
||||
compactToGlobal,
|
||||
visibleFaceFaces[faceI]
|
||||
);
|
||||
}
|
||||
|
||||
labelListIOList IOglobalFaceFaces
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"globalFaceFaces",
|
||||
mesh.facesInstance(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
globalFaceFaces
|
||||
);
|
||||
IOglobalFaceFaces.write();
|
||||
}
|
||||
else
|
||||
{
|
||||
labelListList globalFaceFaces(visibleFaceFaces.size());
|
||||
forAll(globalFaceFaces, faceI)
|
||||
{
|
||||
globalFaceFaces[faceI] = renumber
|
||||
(
|
||||
compactToGlobal,
|
||||
visibleFaceFaces[faceI]
|
||||
);
|
||||
}
|
||||
|
||||
labelListIOList IOglobalFaceFaces
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"globalFaceFaces",
|
||||
mesh.facesInstance(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
globalFaceFaces
|
||||
);
|
||||
|
||||
IOglobalFaceFaces.write();
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -7,6 +7,7 @@ radiationModel/fvDOM/fvDOM/fvDOM.C
|
||||
radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C
|
||||
radiationModel/fvDOM/blackBodyEmission/blackBodyEmission.C
|
||||
radiationModel/fvDOM/absorptionCoeffs/absorptionCoeffs.C
|
||||
radiationModel/viewFactor/viewFactor.C
|
||||
|
||||
/* Scatter model */
|
||||
submodels/scatterModel/scatterModel/scatterModel.C
|
||||
|
||||
@ -41,8 +41,8 @@ Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(p, iF),
|
||||
TName_("undefined"),
|
||||
emissivity_(0.0)
|
||||
radiationCoupledBase(p, "undefined", scalarField::null()),
|
||||
TName_("undefined")
|
||||
{
|
||||
refValue() = 0.0;
|
||||
refGrad() = 0.0;
|
||||
@ -59,8 +59,13 @@ Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
||||
TName_(ptf.TName_),
|
||||
emissivity_(ptf.emissivity_)
|
||||
radiationCoupledBase
|
||||
(
|
||||
p,
|
||||
ptf.emissivityMethod(),
|
||||
ptf.emissivity_
|
||||
),
|
||||
TName_(ptf.TName_)
|
||||
{}
|
||||
|
||||
|
||||
@ -72,8 +77,8 @@ Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(p, iF),
|
||||
TName_(dict.lookup("T")),
|
||||
emissivity_(readScalar(dict.lookup("emissivity")))
|
||||
radiationCoupledBase(p, dict),
|
||||
TName_(dict.lookup("T"))
|
||||
{
|
||||
if (dict.found("value"))
|
||||
{
|
||||
@ -99,8 +104,13 @@ Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(ptf),
|
||||
TName_(ptf.TName_),
|
||||
emissivity_(ptf.emissivity_)
|
||||
radiationCoupledBase
|
||||
(
|
||||
ptf.patch(),
|
||||
ptf.emissivityMethod(),
|
||||
ptf.emissivity_
|
||||
),
|
||||
TName_(ptf.TName_)
|
||||
{}
|
||||
|
||||
|
||||
@ -111,8 +121,13 @@ Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(ptf, iF),
|
||||
TName_(ptf.TName_),
|
||||
emissivity_(ptf.emissivity_)
|
||||
radiationCoupledBase
|
||||
(
|
||||
ptf.patch(),
|
||||
ptf.emissivityMethod(),
|
||||
ptf.emissivity_
|
||||
),
|
||||
TName_(ptf.TName_)
|
||||
{}
|
||||
|
||||
|
||||
@ -155,7 +170,7 @@ void Foam::MarshakRadiationFvPatchScalarField::updateCoeffs()
|
||||
const scalarField& gamma =
|
||||
patch().lookupPatchField<volScalarField, scalar>("gammaRad");
|
||||
|
||||
const scalar Ep = emissivity_/(2.0*(2.0 - emissivity_));
|
||||
const scalarField Ep = emissivity()/(2.0*(2.0 - emissivity()));
|
||||
|
||||
// Set value fraction
|
||||
valueFraction() = 1.0/(1.0 + gamma*patch().deltaCoeffs()/Ep);
|
||||
@ -167,8 +182,8 @@ void Foam::MarshakRadiationFvPatchScalarField::updateCoeffs()
|
||||
void Foam::MarshakRadiationFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
mixedFvPatchScalarField::write(os);
|
||||
radiationCoupledBase::write(os);
|
||||
os.writeKeyword("T") << TName_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("emissivity") << emissivity_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -37,6 +37,7 @@ SourceFiles
|
||||
#define MarshakRadiationMixedFvPatchField_H
|
||||
|
||||
#include "mixedFvPatchFields.H"
|
||||
#include "radiationCoupledBase.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -49,7 +50,8 @@ namespace Foam
|
||||
|
||||
class MarshakRadiationFvPatchScalarField
|
||||
:
|
||||
public mixedFvPatchScalarField
|
||||
public mixedFvPatchScalarField,
|
||||
public radiationCoupledBase
|
||||
{
|
||||
|
||||
// Private data
|
||||
@ -57,9 +59,6 @@ class MarshakRadiationFvPatchScalarField
|
||||
//- Name of temperature field
|
||||
word TName_;
|
||||
|
||||
//- Emissivity
|
||||
scalar emissivity_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -146,18 +145,6 @@ public:
|
||||
return TName_;
|
||||
}
|
||||
|
||||
//- Return the emissivity
|
||||
scalar emissivity() const
|
||||
{
|
||||
return emissivity_;
|
||||
}
|
||||
|
||||
//- Return reference to the emissivity to allow adjustment
|
||||
scalar& emissivity()
|
||||
{
|
||||
return emissivity_;
|
||||
}
|
||||
|
||||
|
||||
// Mapping functions
|
||||
|
||||
|
||||
@ -42,8 +42,8 @@ MarshakRadiationFixedTMixedFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(p, iF),
|
||||
Trad_(p.size()),
|
||||
emissivity_(0.0)
|
||||
radiationCoupledBase(p, "undefined", scalarField::null()),
|
||||
Trad_(p.size())
|
||||
{
|
||||
refValue() = 0.0;
|
||||
refGrad() = 0.0;
|
||||
@ -61,8 +61,13 @@ MarshakRadiationFixedTMixedFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
||||
Trad_(ptf.Trad_, mapper),
|
||||
emissivity_(ptf.emissivity_)
|
||||
radiationCoupledBase
|
||||
(
|
||||
p,
|
||||
ptf.emissivityMethod(),
|
||||
ptf.emissivity_
|
||||
),
|
||||
Trad_(ptf.Trad_, mapper)
|
||||
{}
|
||||
|
||||
|
||||
@ -75,8 +80,8 @@ MarshakRadiationFixedTMixedFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(p, iF),
|
||||
Trad_("Trad", dict, p.size()),
|
||||
emissivity_(readScalar(dict.lookup("emissivity")))
|
||||
radiationCoupledBase(p, dict),
|
||||
Trad_("Trad", dict, p.size())
|
||||
{
|
||||
// refValue updated on each call to updateCoeffs()
|
||||
refValue() = 4.0*constant::physicoChemical::sigma.value()*pow4(Trad_);
|
||||
@ -97,8 +102,13 @@ MarshakRadiationFixedTMixedFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(ptf),
|
||||
Trad_(ptf.Trad_),
|
||||
emissivity_(ptf.emissivity_)
|
||||
radiationCoupledBase
|
||||
(
|
||||
ptf.patch(),
|
||||
ptf.emissivityMethod(),
|
||||
ptf.emissivity_
|
||||
),
|
||||
Trad_(ptf.Trad_)
|
||||
{}
|
||||
|
||||
|
||||
@ -110,8 +120,13 @@ MarshakRadiationFixedTMixedFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(ptf, iF),
|
||||
Trad_(ptf.Trad_),
|
||||
emissivity_(ptf.emissivity_)
|
||||
radiationCoupledBase
|
||||
(
|
||||
ptf.patch(),
|
||||
ptf.emissivityMethod(),
|
||||
ptf.emissivity_
|
||||
),
|
||||
Trad_(ptf.Trad_)
|
||||
{}
|
||||
|
||||
|
||||
@ -156,7 +171,7 @@ void Foam::MarshakRadiationFixedTMixedFvPatchScalarField::updateCoeffs()
|
||||
const scalarField& gamma =
|
||||
patch().lookupPatchField<volScalarField, scalar>("gammaRad");
|
||||
|
||||
const scalar Ep = emissivity_/(2.0*(2.0 - emissivity_));
|
||||
const scalarField Ep = emissivity()/(2.0*(scalar(2.0) - emissivity()));
|
||||
|
||||
// Set value fraction
|
||||
valueFraction() = 1.0/(1.0 + gamma*patch().deltaCoeffs()/Ep);
|
||||
@ -171,8 +186,8 @@ void Foam::MarshakRadiationFixedTMixedFvPatchScalarField::write
|
||||
) const
|
||||
{
|
||||
mixedFvPatchScalarField::write(os);
|
||||
radiationCoupledBase::write(os);
|
||||
Trad_.writeEntry("Trad", os);
|
||||
os.writeKeyword("emissivity") << emissivity_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -37,6 +37,7 @@ SourceFiles
|
||||
#define MarshakRadiationFixedTMixedFvPatchField_H
|
||||
|
||||
#include "mixedFvPatchFields.H"
|
||||
#include "radiationCoupledBase.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -49,7 +50,8 @@ namespace Foam
|
||||
|
||||
class MarshakRadiationFixedTMixedFvPatchScalarField
|
||||
:
|
||||
public mixedFvPatchScalarField
|
||||
public mixedFvPatchScalarField,
|
||||
public radiationCoupledBase
|
||||
{
|
||||
|
||||
// Private data
|
||||
@ -57,9 +59,6 @@ class MarshakRadiationFixedTMixedFvPatchScalarField
|
||||
//- Radiation temperature field
|
||||
scalarField Trad_;
|
||||
|
||||
//- Emissivity
|
||||
scalar emissivity_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -146,18 +145,6 @@ public:
|
||||
return Trad_;
|
||||
}
|
||||
|
||||
//- Return the emissivity
|
||||
scalar emissivity() const
|
||||
{
|
||||
return emissivity_;
|
||||
}
|
||||
|
||||
//- Return reference to the emissivity to allow adjustment
|
||||
scalar& emissivity()
|
||||
{
|
||||
return emissivity_;
|
||||
}
|
||||
|
||||
|
||||
// Mapping functions
|
||||
|
||||
|
||||
@ -44,8 +44,8 @@ greyDiffusiveRadiationMixedFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(p, iF),
|
||||
TName_("undefinedT"),
|
||||
emissivity_(0.0)
|
||||
radiationCoupledBase(p, "undefined", scalarField::null()),
|
||||
TName_("undefinedT")
|
||||
{
|
||||
refValue() = 0.0;
|
||||
refGrad() = 0.0;
|
||||
@ -63,8 +63,13 @@ greyDiffusiveRadiationMixedFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
||||
TName_(ptf.TName_),
|
||||
emissivity_(ptf.emissivity_)
|
||||
radiationCoupledBase
|
||||
(
|
||||
p,
|
||||
ptf.emissivityMethod(),
|
||||
ptf.emissivity_
|
||||
),
|
||||
TName_(ptf.TName_)
|
||||
{}
|
||||
|
||||
|
||||
@ -77,8 +82,8 @@ greyDiffusiveRadiationMixedFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(p, iF),
|
||||
TName_(dict.lookup("T")),
|
||||
emissivity_(readScalar(dict.lookup("emissivity")))
|
||||
radiationCoupledBase(p, dict),
|
||||
TName_(dict.lookup("T"))
|
||||
{
|
||||
if (dict.found("refValue"))
|
||||
{
|
||||
@ -98,7 +103,7 @@ greyDiffusiveRadiationMixedFvPatchScalarField
|
||||
patch().lookupPatchField<volScalarField, scalar>(TName_);
|
||||
|
||||
refValue() =
|
||||
emissivity_*4.0*physicoChemical::sigma.value()*pow4(Tp)/pi;
|
||||
4.0*physicoChemical::sigma.value()*pow4(Tp)*emissivity()/pi;
|
||||
refGrad() = 0.0;
|
||||
valueFraction() = 1.0;
|
||||
|
||||
@ -114,8 +119,13 @@ greyDiffusiveRadiationMixedFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(ptf),
|
||||
TName_(ptf.TName_),
|
||||
emissivity_(ptf.emissivity_)
|
||||
radiationCoupledBase
|
||||
(
|
||||
ptf.patch(),
|
||||
ptf.emissivityMethod(),
|
||||
ptf.emissivity_
|
||||
),
|
||||
TName_(ptf.TName_)
|
||||
{}
|
||||
|
||||
|
||||
@ -127,8 +137,13 @@ greyDiffusiveRadiationMixedFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(ptf, iF),
|
||||
TName_(ptf.TName_),
|
||||
emissivity_(ptf.emissivity_)
|
||||
radiationCoupledBase
|
||||
(
|
||||
ptf.patch(),
|
||||
ptf.emissivityMethod(),
|
||||
ptf.emissivity_
|
||||
),
|
||||
TName_(ptf.TName_)
|
||||
{}
|
||||
|
||||
|
||||
@ -202,8 +217,9 @@ updateCoeffs()
|
||||
valueFraction()[faceI] = 1.0;
|
||||
refValue()[faceI] =
|
||||
(
|
||||
Ir*(1.0 - emissivity_)
|
||||
+ emissivity_*physicoChemical::sigma.value()*pow4(Tp[faceI])
|
||||
Ir*(scalar(1.0) - emissivity()()[faceI])
|
||||
+ emissivity()()[faceI]*physicoChemical::sigma.value()
|
||||
* pow4(Tp[faceI])
|
||||
)/pi;
|
||||
}
|
||||
else
|
||||
@ -225,8 +241,8 @@ void Foam::radiation::greyDiffusiveRadiationMixedFvPatchScalarField::write
|
||||
) const
|
||||
{
|
||||
mixedFvPatchScalarField::write(os);
|
||||
radiationCoupledBase::write(os);
|
||||
os.writeKeyword("T") << TName_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("emissivity") << emissivity_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -36,6 +36,7 @@ SourceFiles
|
||||
#define greyDiffusiveRadiationMixedFvPatchScalarField_H
|
||||
|
||||
#include "mixedFvPatchFields.H"
|
||||
#include "radiationCoupledBase.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -49,16 +50,14 @@ namespace radiation
|
||||
|
||||
class greyDiffusiveRadiationMixedFvPatchScalarField
|
||||
:
|
||||
public mixedFvPatchScalarField
|
||||
public mixedFvPatchScalarField,
|
||||
public radiationCoupledBase
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Name of temperature field
|
||||
word TName_;
|
||||
|
||||
//- Emissivity
|
||||
scalar emissivity_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -145,18 +144,6 @@ public:
|
||||
return TName_;
|
||||
}
|
||||
|
||||
//- Return the emissivity
|
||||
scalar emissivity() const
|
||||
{
|
||||
return emissivity_;
|
||||
}
|
||||
|
||||
//- Return reference to the emissivity to allow adjustment
|
||||
scalar& emissivity()
|
||||
{
|
||||
return emissivity_;
|
||||
}
|
||||
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
|
||||
@ -45,8 +45,8 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(p, iF),
|
||||
TName_("undefinedT"),
|
||||
emissivity_(0.0)
|
||||
radiationCoupledBase(p, "undefined", scalarField::null()),
|
||||
TName_("undefinedT")
|
||||
{
|
||||
refValue() = 0.0;
|
||||
refGrad() = 0.0;
|
||||
@ -64,8 +64,13 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
||||
TName_(ptf.TName_),
|
||||
emissivity_(ptf.emissivity_)
|
||||
radiationCoupledBase
|
||||
(
|
||||
p,
|
||||
ptf.emissivityMethod(),
|
||||
ptf.emissivity_
|
||||
),
|
||||
TName_(ptf.TName_)
|
||||
{}
|
||||
|
||||
|
||||
@ -78,8 +83,8 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(p, iF),
|
||||
TName_(dict.lookup("T")),
|
||||
emissivity_(readScalar(dict.lookup("emissivity")))
|
||||
radiationCoupledBase(p, dict),
|
||||
TName_(dict.lookup("T"))
|
||||
{
|
||||
if (dict.found("value"))
|
||||
{
|
||||
@ -97,7 +102,7 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField
|
||||
patch().lookupPatchField<volScalarField, scalar>(TName_);
|
||||
|
||||
refValue() =
|
||||
emissivity_*4.0*physicoChemical::sigma.value()*pow4(Tp)/pi;
|
||||
4.0*physicoChemical::sigma.value()*pow4(Tp)*emissivity()/pi;
|
||||
refGrad() = 0.0;
|
||||
|
||||
fvPatchScalarField::operator=(refValue());
|
||||
@ -112,8 +117,13 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(ptf),
|
||||
TName_(ptf.TName_),
|
||||
emissivity_(ptf.emissivity_)
|
||||
radiationCoupledBase
|
||||
(
|
||||
ptf.patch(),
|
||||
ptf.emissivityMethod(),
|
||||
ptf.emissivity_
|
||||
),
|
||||
TName_(ptf.TName_)
|
||||
{}
|
||||
|
||||
|
||||
@ -125,8 +135,13 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(ptf, iF),
|
||||
TName_(ptf.TName_),
|
||||
emissivity_(ptf.emissivity_)
|
||||
radiationCoupledBase
|
||||
(
|
||||
ptf.patch(),
|
||||
ptf.emissivityMethod(),
|
||||
ptf.emissivity_
|
||||
),
|
||||
TName_(ptf.TName_)
|
||||
{}
|
||||
|
||||
|
||||
@ -200,8 +215,8 @@ updateCoeffs()
|
||||
valueFraction()[faceI] = 1.0;
|
||||
refValue()[faceI] =
|
||||
(
|
||||
Ir*(1.0 - emissivity_)
|
||||
+ emissivity_*Eb[faceI]
|
||||
Ir*(1.0 - emissivity()()[faceI])
|
||||
+ emissivity()()[faceI]*Eb[faceI]
|
||||
)/pi;
|
||||
}
|
||||
else
|
||||
@ -223,8 +238,9 @@ void Foam::radiation::wideBandDiffusiveRadiationMixedFvPatchScalarField::write
|
||||
) const
|
||||
{
|
||||
mixedFvPatchScalarField::write(os);
|
||||
radiationCoupledBase::write(os);
|
||||
os.writeKeyword("T") << TName_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("emissivity") << emissivity_ << token::END_STATEMENT << nl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -36,6 +36,7 @@ SourceFiles
|
||||
#define wideBandDiffusiveRadiationMixedFvPatchScalarField_H
|
||||
|
||||
#include "mixedFvPatchFields.H"
|
||||
#include "radiationCoupledBase.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -49,16 +50,14 @@ namespace radiation
|
||||
|
||||
class wideBandDiffusiveRadiationMixedFvPatchScalarField
|
||||
:
|
||||
public mixedFvPatchScalarField
|
||||
public mixedFvPatchScalarField,
|
||||
public radiationCoupledBase
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Name of temperature field
|
||||
word TName_;
|
||||
|
||||
//- Emissivity
|
||||
scalar emissivity_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -145,18 +144,6 @@ public:
|
||||
return TName_;
|
||||
}
|
||||
|
||||
//- Return the emissivity
|
||||
scalar emissivity() const
|
||||
{
|
||||
return emissivity_;
|
||||
}
|
||||
|
||||
//- Return reference to the emissivity to allow adjustment
|
||||
scalar& emissivity()
|
||||
{
|
||||
return emissivity_;
|
||||
}
|
||||
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
|
||||
@ -0,0 +1,641 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2011 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 "viewFactor.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "constants.H"
|
||||
#include "greyDiffusiveViewFactorFixedValueFvPatchScalarField.H"
|
||||
#include "typeInfo.H"
|
||||
|
||||
|
||||
using namespace Foam::constant;
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace radiation
|
||||
{
|
||||
defineTypeNameAndDebug(viewFactor, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
radiationModel,
|
||||
viewFactor,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::radiation::viewFactor::viewFactor(const volScalarField& T)
|
||||
:
|
||||
radiationModel(typeName, T),
|
||||
finalAgglom_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"finalAgglom",
|
||||
mesh_.facesInstance(),
|
||||
mesh_,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
),
|
||||
map_(),
|
||||
coarseMesh_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
mesh_.name(),
|
||||
mesh_.polyMesh::instance(),
|
||||
mesh_.time(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh_,
|
||||
finalAgglom_
|
||||
),
|
||||
Qr_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Qr",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh_
|
||||
),
|
||||
Fmatrix_(),
|
||||
CLU_(),
|
||||
selectedPatches_(mesh_.boundary().size(), -1),
|
||||
totalNCoarseFaces_(0),
|
||||
nLocalCoarseFaces_(0),
|
||||
constEmissivity_(false),
|
||||
iterCounter_(0),
|
||||
pivotIndices_(0)
|
||||
{
|
||||
|
||||
const polyBoundaryMesh& coarsePatches = coarseMesh_.boundaryMesh();
|
||||
const volScalarField::GeometricBoundaryField& Qrp = Qr_.boundaryField();
|
||||
|
||||
label count = 0;
|
||||
forAll(Qrp, patchI)
|
||||
{
|
||||
const polyPatch& pp = mesh_.boundaryMesh()[patchI];
|
||||
const fvPatchScalarField& QrPatchI = Qrp[patchI];
|
||||
|
||||
if ((isA<fixedValueFvPatchScalarField>(QrPatchI)) && (pp.size() > 0))
|
||||
{
|
||||
selectedPatches_[count] = QrPatchI.patch().index();
|
||||
nLocalCoarseFaces_ += coarsePatches[patchI].size();
|
||||
count ++;
|
||||
}
|
||||
}
|
||||
|
||||
selectedPatches_.resize(count--);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Pout << "SelectedPatches:" << selectedPatches_ << endl;
|
||||
Pout << "Number of coarse faces:" << nLocalCoarseFaces_ << endl;
|
||||
}
|
||||
|
||||
totalNCoarseFaces_ = nLocalCoarseFaces_;
|
||||
reduce(totalNCoarseFaces_, sumOp<label>());
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
Info << "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
|
||||
(
|
||||
new mapDistribute
|
||||
(
|
||||
consMapDim[0],
|
||||
Xfer<labelListList>(subMap),
|
||||
Xfer<labelListList>(constructMap)
|
||||
)
|
||||
);
|
||||
|
||||
scalarListIOList FmyProc
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"F",
|
||||
mesh_.facesInstance(),
|
||||
mesh_,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
labelListIOList globalFaceFaces
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"globalFaceFaces",
|
||||
mesh_.facesInstance(),
|
||||
mesh_,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
);
|
||||
|
||||
List<labelListList> globalFaceFacesProc(Pstream::nProcs());
|
||||
globalFaceFacesProc[Pstream::myProcNo()] = globalFaceFaces;
|
||||
Pstream::gatherList(globalFaceFacesProc);
|
||||
|
||||
List<scalarListList> F(Pstream::nProcs());
|
||||
F[Pstream::myProcNo()] = FmyProc;
|
||||
Pstream::gatherList(F);
|
||||
|
||||
globalIndex globalNumbering(nLocalCoarseFaces_);
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
Fmatrix_.reset
|
||||
(
|
||||
new scalarSquareMatrix(totalNCoarseFaces_, totalNCoarseFaces_, 0.0)
|
||||
);
|
||||
|
||||
Info << "Insert elemets in the matrix.." << endl;
|
||||
|
||||
for (label procI = 0; procI < Pstream::nProcs(); procI++)
|
||||
{
|
||||
insertMatrixElements
|
||||
(
|
||||
globalNumbering,
|
||||
procI,
|
||||
globalFaceFacesProc[procI],
|
||||
F[procI],
|
||||
Fmatrix_()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
bool smoothing = readBool(coeffs_.lookup("smoothing"));
|
||||
if(smoothing)
|
||||
{
|
||||
Info << "Smoothing the matrix..." << endl;
|
||||
|
||||
for(label i=0; i<totalNCoarseFaces_; i++)
|
||||
{
|
||||
scalar sumF = 0.0;
|
||||
for(label j=0; j<totalNCoarseFaces_; j++)
|
||||
{
|
||||
sumF += Fmatrix_()[i][j];
|
||||
}
|
||||
scalar delta = 1.0 - sumF;
|
||||
for(label j=0; j<totalNCoarseFaces_; j++)
|
||||
{
|
||||
Fmatrix_()[i][j] *= (1.0 - delta/(sumF + 0.001));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
constEmissivity_ = readBool(coeffs_.lookup("constantEmissivity"));
|
||||
if (constEmissivity_)
|
||||
{
|
||||
CLU_.reset
|
||||
(
|
||||
new scalarSquareMatrix
|
||||
(
|
||||
totalNCoarseFaces_,
|
||||
totalNCoarseFaces_,
|
||||
0.0
|
||||
)
|
||||
);
|
||||
|
||||
pivotIndices_.setSize(CLU_().n());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::radiation::viewFactor::~viewFactor()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::radiation::viewFactor::read()
|
||||
{
|
||||
if (radiationModel::read())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::radiation::viewFactor::insertMatrixElements
|
||||
(
|
||||
const globalIndex& globalNumbering,
|
||||
const label procI,
|
||||
const labelListList& globalFaceFaces,
|
||||
const scalarListList& viewFactors,
|
||||
scalarSquareMatrix& Fmatrix
|
||||
)
|
||||
{
|
||||
forAll(viewFactors, faceI)
|
||||
{
|
||||
const scalarList& vf = viewFactors[faceI];
|
||||
const labelList& globalFaces = globalFaceFaces[faceI];
|
||||
|
||||
label globalI = globalNumbering.toGlobal(procI, faceI);
|
||||
forAll(globalFaces, i)
|
||||
{
|
||||
Fmatrix[globalI][globalFaces[i]] = vf[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::radiation::viewFactor::calculate()
|
||||
{
|
||||
// Store previous iteration
|
||||
Qr_.storePrevIter();
|
||||
|
||||
scalarField compactCoarseT(map_->constructSize(), 0.0);
|
||||
scalarField compactCoarseE(map_->constructSize(), 0.0);
|
||||
scalarField compactCoarseHo(map_->constructSize(), 0.0);
|
||||
|
||||
globalIndex globalNumbering(nLocalCoarseFaces_);
|
||||
|
||||
// Fill local averaged(T), emissivity(E) and external heatFlux(Ho)
|
||||
DynamicList<scalar> localCoarseTave(nLocalCoarseFaces_);
|
||||
DynamicList<scalar> localCoarseEave(nLocalCoarseFaces_);
|
||||
DynamicList<scalar> localCoarseHoave(nLocalCoarseFaces_);
|
||||
|
||||
forAll (selectedPatches_, i)
|
||||
{
|
||||
label patchID = selectedPatches_[i];
|
||||
|
||||
const scalarField& Tp = T_.boundaryField()[patchID];
|
||||
const scalarField& sf = mesh_.magSf().boundaryField()[patchID];
|
||||
|
||||
fvPatchScalarField& QrPatch = Qr_.boundaryField()[patchID];
|
||||
|
||||
greyDiffusiveViewFactorFixedValueFvPatchScalarField& Qrp =
|
||||
refCast
|
||||
<
|
||||
greyDiffusiveViewFactorFixedValueFvPatchScalarField
|
||||
>(QrPatch);
|
||||
|
||||
const scalarList eb = Qrp.emissivity();
|
||||
const scalarList& Hoi = Qrp.Qro();
|
||||
|
||||
const polyPatch& pp = coarseMesh_.boundaryMesh()[patchID];
|
||||
const labelList& coarsePatchFace = coarseMesh_.patchFaceMap()[patchID];
|
||||
|
||||
const labelList& agglom = finalAgglom_[patchID];
|
||||
label nAgglom = max(agglom)+1;
|
||||
|
||||
labelListList coarseToFine(invertOneToMany(nAgglom, agglom));
|
||||
|
||||
scalarList Tave(pp.size(), 0.0);
|
||||
scalarList Eave(Tave.size(), 0.0);
|
||||
scalarList Hoiave(Tave.size(), 0.0);
|
||||
|
||||
forAll(coarseToFine, coarseI)
|
||||
{
|
||||
const label coarseFaceID = coarsePatchFace[coarseI];
|
||||
const labelList& fineFaces = coarseToFine[coarseFaceID];
|
||||
UIndirectList<scalar> fineSf
|
||||
(
|
||||
sf,
|
||||
fineFaces
|
||||
);
|
||||
scalar area = sum(fineSf());
|
||||
// Temperature, emissivity and external flux area weighting
|
||||
forAll(fineFaces, j)
|
||||
{
|
||||
label faceI = fineFaces[j];
|
||||
Tave[coarseI] += (Tp[faceI]*sf[faceI])/area;
|
||||
Eave[coarseI] += (eb[faceI]*sf[faceI])/area;
|
||||
Hoiave[coarseI] += (Hoi[faceI]*sf[faceI])/area;
|
||||
}
|
||||
|
||||
localCoarseTave.append(Tave[coarseI]);
|
||||
localCoarseEave.append(Eave[coarseI]);
|
||||
localCoarseHoave.append(Hoiave[coarseI]);
|
||||
}
|
||||
}
|
||||
|
||||
// Fill the local values to distribute
|
||||
SubList<scalar>(compactCoarseT,nLocalCoarseFaces_).assign(localCoarseTave);
|
||||
SubList<scalar>(compactCoarseE,nLocalCoarseFaces_).assign(localCoarseEave);
|
||||
SubList<scalar>
|
||||
(compactCoarseHo,nLocalCoarseFaces_).assign(localCoarseHoave);
|
||||
|
||||
// Distribute data
|
||||
map_->distribute(compactCoarseT);
|
||||
map_->distribute(compactCoarseE);
|
||||
map_->distribute(compactCoarseHo);
|
||||
|
||||
// Distribute local global ID
|
||||
labelList compactGlobalIds(map_->constructSize(), 0.0);
|
||||
|
||||
labelList localGlobalIds(nLocalCoarseFaces_);
|
||||
|
||||
for (label k = 0; k < nLocalCoarseFaces_; k++)
|
||||
{
|
||||
localGlobalIds[k] = globalNumbering.toGlobal(Pstream::myProcNo(), k);
|
||||
}
|
||||
|
||||
SubList<label>
|
||||
(
|
||||
compactGlobalIds,
|
||||
nLocalCoarseFaces_
|
||||
).assign(localGlobalIds);
|
||||
|
||||
map_->distribute(compactGlobalIds);
|
||||
|
||||
// Create global size vectors
|
||||
scalarField T(totalNCoarseFaces_, 0.0);
|
||||
scalarField E(totalNCoarseFaces_, 0.0);
|
||||
scalarField QrExt(totalNCoarseFaces_, 0.0);
|
||||
|
||||
// Fill lists from compact to global indexes.
|
||||
forAll(compactCoarseT, i)
|
||||
{
|
||||
T[compactGlobalIds[i]] = compactCoarseT[i];
|
||||
E[compactGlobalIds[i]] = compactCoarseE[i];
|
||||
QrExt[compactGlobalIds[i]] = compactCoarseHo[i];
|
||||
}
|
||||
|
||||
Pstream::listCombineGather(T, maxEqOp<scalar>());
|
||||
Pstream::listCombineGather(E, maxEqOp<scalar>());
|
||||
Pstream::listCombineGather(QrExt, maxEqOp<scalar>());
|
||||
|
||||
Pstream::listCombineScatter(T);
|
||||
Pstream::listCombineScatter(E);
|
||||
Pstream::listCombineScatter(QrExt);
|
||||
|
||||
// Net radiation
|
||||
scalarField q(totalNCoarseFaces_, 0.0);
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
// Variable emissivity
|
||||
if (!constEmissivity_)
|
||||
{
|
||||
scalarSquareMatrix C(totalNCoarseFaces_, totalNCoarseFaces_, 0.0);
|
||||
|
||||
for (label i=0; i<totalNCoarseFaces_; i++)
|
||||
{
|
||||
for (label j=0; j<totalNCoarseFaces_; j++)
|
||||
{
|
||||
scalar invEj = 1.0/E[j];
|
||||
scalar sigmaT4 =
|
||||
physicoChemical::sigma.value()*pow(T[j], 4.0);
|
||||
|
||||
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 - QrExt[j];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "\nSolving view factor equations.." << endl;
|
||||
// Negative coming into the fluid
|
||||
LUsolve(C, q);
|
||||
}
|
||||
else //Constant emissivity
|
||||
{
|
||||
// Initial iter calculates CLU and chaches it
|
||||
if(iterCounter_ == 0)
|
||||
{
|
||||
for (label i=0; i<totalNCoarseFaces_; i++)
|
||||
{
|
||||
for (label j=0; j<totalNCoarseFaces_; j++)
|
||||
{
|
||||
scalar invEj = 1.0/E[j];
|
||||
if (i==j)
|
||||
{
|
||||
CLU_()[i][j] = invEj - (invEj-1.0)*Fmatrix_()[i][j];
|
||||
}
|
||||
else
|
||||
{
|
||||
CLU_()[i][j] = (1.0 - invEj)*Fmatrix_()[i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
Info<< "\nDecomposing C matrix.." << endl;
|
||||
LUDecompose(CLU_(), pivotIndices_);
|
||||
}
|
||||
|
||||
for (label i=0; i<totalNCoarseFaces_; i++)
|
||||
{
|
||||
for (label j=0; j<totalNCoarseFaces_; j++)
|
||||
{
|
||||
scalar sigmaT4 =
|
||||
constant::physicoChemical::sigma.value()
|
||||
*pow(T[j], 4.0);
|
||||
|
||||
if (i==j)
|
||||
{
|
||||
q[i] += (Fmatrix_()[i][j] - 1.0)*sigmaT4 - QrExt[j];
|
||||
}
|
||||
else
|
||||
{
|
||||
q[i] += Fmatrix_()[i][j]*sigmaT4 - QrExt[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "\nLU Back substitute C matrix.." << endl;
|
||||
LUBacksubstitute(CLU_(), pivotIndices_, q);
|
||||
iterCounter_ ++;
|
||||
}
|
||||
}
|
||||
|
||||
// Scatter q and fill Qr
|
||||
Pstream::listCombineScatter(q);
|
||||
Pstream::listCombineGather(q, maxEqOp<scalar>());
|
||||
|
||||
|
||||
label globCoarseId = 0;
|
||||
forAll (selectedPatches_, i)
|
||||
{
|
||||
const label patchID = selectedPatches_[i];
|
||||
scalarField& Qrp = Qr_.boundaryField()[patchID];
|
||||
const scalarField& sf = mesh_.magSf().boundaryField()[patchID];
|
||||
const labelList& agglom = finalAgglom_[patchID];
|
||||
label nAgglom = max(agglom)+1;
|
||||
|
||||
labelListList coarseToFine(invertOneToMany(nAgglom, agglom));
|
||||
|
||||
const labelList& coarsePatchFace = coarseMesh_.patchFaceMap()[patchID];
|
||||
|
||||
scalar heatFlux = 0.0;
|
||||
forAll(coarseToFine, coarseI)
|
||||
{
|
||||
label globalCoarse =
|
||||
globalNumbering.toGlobal(Pstream::myProcNo(), globCoarseId);
|
||||
const label coarseFaceID = coarsePatchFace[coarseI];
|
||||
const labelList& fineFaces = coarseToFine[coarseFaceID];
|
||||
forAll(fineFaces, k)
|
||||
{
|
||||
label faceI = fineFaces[k];
|
||||
|
||||
Qrp[faceI] = q[globalCoarse];
|
||||
heatFlux += Qrp[faceI]*sf[faceI];
|
||||
}
|
||||
globCoarseId ++;
|
||||
}
|
||||
}
|
||||
|
||||
if (debug)
|
||||
{
|
||||
forAll(Qr_.boundaryField(), patchID)
|
||||
{
|
||||
const scalarField& Qrp = Qr_.boundaryField()[patchID];
|
||||
const scalarField& magSf = mesh_.magSf().boundaryField()[patchID];
|
||||
scalar heatFlux = gSum(Qrp*magSf);
|
||||
Info << "Total heat flux at patch: "
|
||||
<< patchID << " "
|
||||
<< heatFlux << " [W]" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
// Relax Qr if necessary
|
||||
Qr_.relax();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::radiation::viewFactor::Rp() const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Rp",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
"zero",
|
||||
dimMass/pow3(dimTime)/dimLength/pow4(dimTemperature),
|
||||
0.0
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
|
||||
Foam::radiation::viewFactor::Ru() const
|
||||
{
|
||||
tmp<DimensionedField<scalar, volMesh> > tRu
|
||||
(
|
||||
new DimensionedField<scalar, volMesh>
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"tRu",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar("zero", dimMass/dimLength/pow3(dimTime), 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
return tRu;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,180 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2011 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::viewFactor
|
||||
|
||||
Description
|
||||
View factor radiation model. The system solved is: C q = b
|
||||
where:
|
||||
Cij = deltaij/Ej - (1/Ej - 1)Fij
|
||||
q = heat flux
|
||||
b = A eb - Ho
|
||||
and:
|
||||
eb = sigma*T^4
|
||||
Ej = emissivity
|
||||
Aij = deltaij - Fij
|
||||
Fij = view factor matrix
|
||||
|
||||
|
||||
SourceFiles
|
||||
viewFactor.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef radiationModelviewFactor_H
|
||||
#define radiationModelviewFactor_H
|
||||
|
||||
#include "radiationModel.H"
|
||||
#include "singleCellFvMesh.H"
|
||||
#include "scalarMatrices.H"
|
||||
#include "globalIndex.H"
|
||||
#include "scalarListIOList.H"
|
||||
#include "mapDistribute.H"
|
||||
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace radiation
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class viewFactor Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class viewFactor
|
||||
:
|
||||
public radiationModel
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Agglomeration List
|
||||
labelListIOList finalAgglom_;
|
||||
|
||||
//- Map distributed
|
||||
autoPtr<mapDistribute> map_;
|
||||
|
||||
//- Coarse mesh
|
||||
singleCellFvMesh coarseMesh_;
|
||||
|
||||
//- Net radiative heat flux [W/m2]
|
||||
volScalarField Qr_;
|
||||
|
||||
//- View factor matrix
|
||||
autoPtr<scalarSquareMatrix> Fmatrix_;
|
||||
|
||||
//- Inverse of C matrix
|
||||
autoPtr<scalarSquareMatrix> CLU_;
|
||||
|
||||
//- Selected patches
|
||||
labelList selectedPatches_;
|
||||
|
||||
//- Total global coarse faces
|
||||
label totalNCoarseFaces_;
|
||||
|
||||
//- Total local coarse faces
|
||||
label nLocalCoarseFaces_;
|
||||
|
||||
//- Constant emissivity
|
||||
bool constEmissivity_;
|
||||
|
||||
//- Iterations Counter
|
||||
label iterCounter_;
|
||||
|
||||
//- Pivot Indices for LU decomposition
|
||||
labelList pivotIndices_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Insert view factors into main matrix
|
||||
void insertMatrixElements
|
||||
(
|
||||
const globalIndex& index,
|
||||
const label fromProcI,
|
||||
const labelListList& globalFaceFaces,
|
||||
const scalarListList& viewFactors,
|
||||
scalarSquareMatrix& matrix
|
||||
);
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
viewFactor(const viewFactor&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const viewFactor&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("viewFactor");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
viewFactor(const volScalarField& T);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~viewFactor();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
// Edit
|
||||
|
||||
//- Solve system of equation(s)
|
||||
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
|
||||
|
||||
//- Const access to total radiative heat flux field
|
||||
inline const volScalarField& Qr() const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "viewFactorI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace radiation
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,34 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2010 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/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
inline const Foam::volScalarField& Foam::radiation::viewFactor::Qr() const
|
||||
{
|
||||
return Qr_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,29 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object G;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 0 -3 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,29 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object IDefault;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 0 -3 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,29 @@
|
||||
/*--------------------------------*- 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 Qr;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 0 -3 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,29 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,29 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0.1 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,30 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object Ychar;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0.5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,30 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object Ypmma;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0.5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,30 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object epsilon;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -3 0 0 0 0];
|
||||
|
||||
internalField uniform 0.01;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,30 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,29 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,29 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p_rgh;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,29 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object rho;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -3 0 0 0 0 0];
|
||||
|
||||
internalField uniform 8000;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,35 @@
|
||||
#!/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 0/bottomAir
|
||||
rm -rf 0/topAir
|
||||
rm -rf 0/heater
|
||||
rm -rf 0/leftSolid
|
||||
rm -rf 0/rightSolid
|
||||
rm -f 0/cellToRegion
|
||||
|
||||
rm -rf constant/bottomAir/polyMesh
|
||||
rm -rf constant/topAir/polyMesh
|
||||
rm -rf constant/heater/polyMesh
|
||||
rm -rf constant/leftSolid/polyMesh
|
||||
rm -rf constant/rightSolid/polyMesh
|
||||
|
||||
rm -f constant/bottomAir/F
|
||||
rm -f constant/bottomAir/constructMap*
|
||||
rm -f constant/bottomAir/finalAgglom
|
||||
rm -f constant/bottomAir/globalFaceFaces
|
||||
rm -f constant/bottomAir/subMap
|
||||
|
||||
rm -f constant/topAir/F
|
||||
rm -f constant/topAir/constructMap*
|
||||
rm -f constant/topAir/finalAgglom
|
||||
rm -f constant/topAir/globalFaceFaces
|
||||
rm -f constant/topAir/subMap
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -0,0 +1,69 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication setSet -batch makeCellSets.setSet
|
||||
runApplication splitMeshRegions -cellZones -overwrite
|
||||
|
||||
# remove fluid fields from solid regions (important for post-processing)
|
||||
for i in heater leftSolid rightSolid
|
||||
do
|
||||
rm -f 0*/$i/{rho,mut,alphat,epsilon,k,p,U,p_rgh,Qr,G,IDefault}
|
||||
done
|
||||
|
||||
## remove solid fields from fluid regions (important for post-processing)
|
||||
for i in bottomAir topAir
|
||||
do
|
||||
rm -f 0*/$i/{Ypmma,Ychar}
|
||||
done
|
||||
|
||||
for i in bottomAir topAir heater leftSolid rightSolid
|
||||
do
|
||||
changeDictionary -region $i > log.changeDictionary.$i 2>&1
|
||||
done
|
||||
|
||||
|
||||
for i in bottomAir topAir
|
||||
do
|
||||
faceAgglomerate -region $i > log.faceAgglomerate.$i 2>&1
|
||||
done
|
||||
|
||||
for i in bottomAir topAir
|
||||
do
|
||||
viewFactorsGen -region $i > log.viewFactorsGen.$i 2>&1
|
||||
done
|
||||
|
||||
|
||||
|
||||
#-- Run on single processor
|
||||
runApplication chtMultiRegionSimpleFoam
|
||||
|
||||
## Decompose
|
||||
#for i in bottomAir topAir heater leftSolid rightSolid
|
||||
#do
|
||||
# decomposePar -region $i > log.decomposePar.$i 2>&1
|
||||
#done
|
||||
#
|
||||
## Run
|
||||
#runParallel chtMultiRegionSimpleFoam 4
|
||||
#
|
||||
## Reconstruct
|
||||
#for i in bottomAir topAir heater leftSolid rightSolid
|
||||
#do
|
||||
# reconstructPar -region $i > log.reconstructPar.$i 2>&1
|
||||
#done
|
||||
|
||||
|
||||
echo
|
||||
echo "creating files for paraview post-processing"
|
||||
echo
|
||||
for i in bottomAir topAir heater leftSolid rightSolid
|
||||
do
|
||||
paraFoam -touch -region $i
|
||||
done
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,24 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object RASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
RASModel laminar;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,20 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class uniformDimensionedVectorField;
|
||||
object g;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -2 0 0 0 0];
|
||||
value (0 -9.81 0);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,156 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object radiationProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
radiation on;
|
||||
|
||||
radiationModel viewFactor;//fvDOM;//P1;
|
||||
|
||||
viewFactorCoeffs
|
||||
{
|
||||
smoothing true; //Smooth view factor matrix (use when in a close surface
|
||||
//to force Sum(Fij = 1)
|
||||
constantEmissivity true; //constant emissivity on surfaces.
|
||||
}
|
||||
|
||||
noRadiation
|
||||
{
|
||||
}
|
||||
|
||||
P1Coeffs
|
||||
{
|
||||
}
|
||||
|
||||
fvDOMCoeffs
|
||||
{
|
||||
nPhi 3; // azimuthal angles in PI/2 on X-Y.(from Y to X)
|
||||
nTheta 4; // polar angles in PI (from Z to X-Y plane)
|
||||
convergence 1e-3; // convergence criteria for radiation iteration
|
||||
maxIter 5; // maximum number of iterations
|
||||
}
|
||||
|
||||
// Number of flow iterations per radiation iteration
|
||||
solverFreq 3;
|
||||
|
||||
absorptionEmissionModel constantAbsorptionEmission;
|
||||
|
||||
constantAbsorptionEmissionCoeffs
|
||||
{
|
||||
a a [ 0 -1 0 0 0 0 0 ] 0.01;
|
||||
e e [ 0 -1 0 0 0 0 0 ] 0.01;
|
||||
E E [ 1 -1 -3 0 0 0 0 ] 0;
|
||||
}
|
||||
|
||||
greyMeanAbsorptionEmissionCoeffs
|
||||
{
|
||||
lookUpTableFileName "SpeciesTable";
|
||||
|
||||
EhrrCoeff 0.0;
|
||||
|
||||
CO2
|
||||
{
|
||||
Tcommon 300; //Common Temp
|
||||
invTemp true; //Is the polynomio using inverse temperature.
|
||||
Tlow 200; //Low Temp
|
||||
Thigh 2500; //High Temp
|
||||
|
||||
loTcoeffs //coefss for T < Tcommon
|
||||
(
|
||||
0 // a0 +
|
||||
0 // a1*T +
|
||||
0 // a2*T^(+/-)2 +
|
||||
0 // a3*T^(+/-)3 +
|
||||
0 // a4*T^(+/-)4 +
|
||||
0 // a5*T^(+/-)5 +
|
||||
);
|
||||
hiTcoeffs //coefss for T > Tcommon
|
||||
(
|
||||
18.741
|
||||
-121.31e3
|
||||
273.5e6
|
||||
-194.05e9
|
||||
56.31e12
|
||||
-5.8169e15
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
H2O
|
||||
{
|
||||
Tcommon 300;
|
||||
invTemp true;
|
||||
Tlow 200;
|
||||
Thigh 2500;
|
||||
|
||||
loTcoeffs
|
||||
(
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
);
|
||||
hiTcoeffs
|
||||
(
|
||||
-0.23093
|
||||
-1.12390e3
|
||||
9.4153e6
|
||||
-2.99885e9
|
||||
0.51382e12
|
||||
-1.868e10
|
||||
);
|
||||
}
|
||||
|
||||
CH4
|
||||
{
|
||||
Tcommon 300;
|
||||
Tlow 200;
|
||||
Thigh 2500;
|
||||
invTemp false;
|
||||
|
||||
loTcoeffs
|
||||
(
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
);
|
||||
hiTcoeffs
|
||||
(
|
||||
6.6334
|
||||
-0.0035686
|
||||
1.6682e-8
|
||||
2.5611e-10
|
||||
-2.6558e-14
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
scatterModel constantScatter;
|
||||
|
||||
constantScatterCoeffs
|
||||
{
|
||||
sigma sigma [ 0 -1 0 0 0 0 0 ] 0;
|
||||
C C [ 0 0 0 0 0 0 0 ] 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,31 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant/bottomAir";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>;
|
||||
|
||||
mixture
|
||||
{
|
||||
nMoles 1;
|
||||
molWeight 28.9;
|
||||
Cp 1000;
|
||||
Hf 0;
|
||||
mu 1.8e-05;
|
||||
Pr 0.7;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,19 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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 dictionary;
|
||||
object viewFactorsDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
writeViewFactorMatrix true;
|
||||
writeFacesAgglomeration true;
|
||||
|
||||
bottomAir_to_heater
|
||||
{
|
||||
nFacesInCoarsestLevel 30;
|
||||
featureAngle 10;
|
||||
}
|
||||
|
||||
bottomAir_to_leftSolid
|
||||
{
|
||||
nFacesInCoarsestLevel 20;
|
||||
featureAngle 10;
|
||||
}
|
||||
|
||||
bottomAir_to_rightSolid
|
||||
{
|
||||
nFacesInCoarsestLevel 20;
|
||||
featureAngle 10;
|
||||
}
|
||||
|
||||
minX
|
||||
{
|
||||
nFacesInCoarsestLevel 10;
|
||||
featureAngle 10;
|
||||
}
|
||||
|
||||
minY
|
||||
{
|
||||
nFacesInCoarsestLevel 30;
|
||||
featureAngle 10;
|
||||
}
|
||||
|
||||
minZ
|
||||
{
|
||||
nFacesInCoarsestLevel 20;
|
||||
featureAngle 10;
|
||||
}
|
||||
|
||||
maxX
|
||||
{
|
||||
nFacesInCoarsestLevel 10;
|
||||
featureAngle 10;
|
||||
}
|
||||
|
||||
maxZ
|
||||
{
|
||||
nFacesInCoarsestLevel 20;
|
||||
featureAngle 10;
|
||||
}
|
||||
|
||||
@ -0,0 +1,152 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object solidThermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType constSolidThermo;
|
||||
//thermoType isotropicKSolidThermo;
|
||||
//thermoType directionalKSolidThermo;
|
||||
//thermoType solidMixtureThermo<multiComponentSolidMixture<exponentialSolidTransport<constSolidRad<exponentialSolidThermo<constRho>>>>>;
|
||||
|
||||
|
||||
constSolidThermoCoeffs
|
||||
{
|
||||
//- thermo properties
|
||||
rho rho [1 -3 0 0 0 0 0] 8000;
|
||||
Cp Cp [0 2 -2 -1 0 0 0] 450;
|
||||
K K [1 1 -3 -1 0 0 0] 80;
|
||||
|
||||
//- radiative properties
|
||||
kappa kappa [0 -1 0 0 0 0 0] 0;
|
||||
sigmaS sigmaS [0 -1 0 0 0 0 0] 0;
|
||||
emissivity emissivity [0 0 0 0 0 0 0] 0.5;
|
||||
|
||||
//- chemical properties
|
||||
Hf Hf [0 2 -2 0 0 0 0] 0;
|
||||
}
|
||||
|
||||
|
||||
isotropicKSolidThermoCoeffs
|
||||
{
|
||||
|
||||
//- thermo properties
|
||||
TValues (100 1000);
|
||||
rhoValues (1000 1700);
|
||||
cpValues (1700 1700);
|
||||
KValues (80 40);
|
||||
|
||||
|
||||
//- radiative properties
|
||||
emissivityValues (1 1);
|
||||
kappaValues (0 0);
|
||||
sigmaSValues (0 0);
|
||||
|
||||
//- chemical properties
|
||||
HfValues (1 1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
directionalKSolidThermoCoeffs
|
||||
{
|
||||
//- does interpolation and directional K in coordinate system.
|
||||
// Specify multiple values, one for each temperature. Properties are
|
||||
// interpolated according to the local temperature.
|
||||
|
||||
//- thermo properties
|
||||
TValues (100 1000);
|
||||
rhoValues (1700 1700);
|
||||
cpValues (1700 1700);
|
||||
KValues ((10 10 10) (40 40 40));
|
||||
|
||||
coordinateSystem
|
||||
{
|
||||
origin (-0.000062 0.000019 0.000039);
|
||||
coordinateRotation
|
||||
{
|
||||
type axes;
|
||||
e1 (1 0 0);
|
||||
e3 (-3.1807824e-6 -0.99813473 0.0610505);
|
||||
}
|
||||
}
|
||||
|
||||
//- chemical properties
|
||||
HfValues (1 1);
|
||||
|
||||
//- radiative properties
|
||||
emissivityValues (1 1);
|
||||
kappaValues (1 1);
|
||||
sigmaSValues (1 1);
|
||||
}
|
||||
|
||||
solidComponents
|
||||
(
|
||||
pmma char
|
||||
);
|
||||
|
||||
pmmaCoeffs
|
||||
{
|
||||
transportProperties
|
||||
{
|
||||
K0 0.152;
|
||||
n0 1.3;
|
||||
Tref 300; //K0*pow(T/Tref_, n0))
|
||||
}
|
||||
radiativeProperties
|
||||
{
|
||||
sigmaS 0.0;
|
||||
kappa 0.0;
|
||||
emissivity 0.1;
|
||||
}
|
||||
thermoProperties
|
||||
{
|
||||
Hf 0;
|
||||
C0 1462; // Cp = C0*(T/Tref)^n0
|
||||
Tref 300;
|
||||
n0 1.31;
|
||||
}
|
||||
densityProperties
|
||||
{
|
||||
rho 1114.0;
|
||||
}
|
||||
}
|
||||
|
||||
charCoeffs
|
||||
{
|
||||
transportProperties
|
||||
{
|
||||
K0 0.4;
|
||||
n0 1.3;
|
||||
Tref 300; //K0*pow(T/Tref_, n0))
|
||||
}
|
||||
radiativeProperties
|
||||
{
|
||||
sigmaS 0.0;
|
||||
kappa 0.0;
|
||||
emissivity 0.0;
|
||||
}
|
||||
thermoProperties
|
||||
{
|
||||
Hf 0;
|
||||
C0 611.0;; // Cp = C0*(T/Tref)^n0
|
||||
Tref 300;
|
||||
n0 1.31;
|
||||
}
|
||||
densityProperties
|
||||
{
|
||||
rho 11.5;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1 @@
|
||||
../heater/solidThermophysicalProperties
|
||||
@ -0,0 +1,72 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(-0.1 -0.04 -0.05)
|
||||
( 0.1 -0.04 -0.05)
|
||||
( 0.1 0.04 -0.05)
|
||||
(-0.1 0.04 -0.05)
|
||||
(-0.1 -0.04 0.05)
|
||||
( 0.1 -0.04 0.05)
|
||||
( 0.1 0.04 0.05)
|
||||
(-0.1 0.04 0.05)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (30 10 10) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
patches
|
||||
(
|
||||
wall maxY
|
||||
(
|
||||
(3 7 6 2)
|
||||
)
|
||||
patch minX
|
||||
(
|
||||
(0 4 7 3)
|
||||
)
|
||||
patch maxX
|
||||
(
|
||||
(2 6 5 1)
|
||||
)
|
||||
wall minY
|
||||
(
|
||||
(1 5 4 0)
|
||||
)
|
||||
wall minZ
|
||||
(
|
||||
(0 3 2 1)
|
||||
)
|
||||
wall maxZ
|
||||
(
|
||||
(4 5 6 7)
|
||||
)
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,58 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
6
|
||||
(
|
||||
maxY
|
||||
{
|
||||
type wall;
|
||||
nFaces 300;
|
||||
startFace 8300;
|
||||
}
|
||||
minX
|
||||
{
|
||||
type patch;
|
||||
nFaces 100;
|
||||
startFace 8600;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type patch;
|
||||
nFaces 100;
|
||||
startFace 8700;
|
||||
}
|
||||
minY
|
||||
{
|
||||
type wall;
|
||||
nFaces 300;
|
||||
startFace 8800;
|
||||
}
|
||||
minZ
|
||||
{
|
||||
type wall;
|
||||
nFaces 300;
|
||||
startFace 9100;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type wall;
|
||||
nFaces 300;
|
||||
startFace 9400;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,22 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object regionProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
fluidRegionNames ( bottomAir topAir );
|
||||
|
||||
solidRegionNames ( heater leftSolid rightSolid );
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1 @@
|
||||
../heater/solidThermophysicalProperties
|
||||
@ -0,0 +1,24 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object RASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
RASModel laminar;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,20 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class uniformDimensionedVectorField;
|
||||
object g;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -2 0 0 0 0];
|
||||
value (0 -9.81 0);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,155 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object radiationProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
radiation on;
|
||||
|
||||
radiationModel viewFactor;//fvDOM;//P1;
|
||||
|
||||
viewFactorCoeffs
|
||||
{
|
||||
smoothing true; //Smooth view factor matrix (use when in a close surface
|
||||
//to force Sum(Fij = 1)
|
||||
constantEmissivity true; //constant emissivity on surfaces.
|
||||
}
|
||||
|
||||
noRadiation
|
||||
{
|
||||
}
|
||||
|
||||
P1Coeffs
|
||||
{
|
||||
}
|
||||
|
||||
fvDOMCoeffs
|
||||
{
|
||||
nPhi 3; // azimuthal angles in PI/2 on X-Y.(from Y to X)
|
||||
nTheta 4; // polar angles in PI (from Z to X-Y plane)
|
||||
convergence 1e-3; // convergence criteria for radiation iteration
|
||||
maxIter 5; // maximum number of iterations
|
||||
}
|
||||
|
||||
// Number of flow iterations per radiation iteration
|
||||
solverFreq 3;
|
||||
|
||||
absorptionEmissionModel constantAbsorptionEmission;
|
||||
|
||||
constantAbsorptionEmissionCoeffs
|
||||
{
|
||||
a a [ 0 -1 0 0 0 0 0 ] 0.01;
|
||||
e e [ 0 -1 0 0 0 0 0 ] 0.01;
|
||||
E E [ 1 -1 -3 0 0 0 0 ] 0;
|
||||
}
|
||||
|
||||
greyMeanAbsorptionEmissionCoeffs
|
||||
{
|
||||
lookUpTableFileName "SpeciesTable";
|
||||
|
||||
EhrrCoeff 0.0;
|
||||
|
||||
CO2
|
||||
{
|
||||
Tcommon 300; //Common Temp
|
||||
invTemp true; //Is the polynomio using inverse temperature.
|
||||
Tlow 200; //Low Temp
|
||||
Thigh 2500; //High Temp
|
||||
|
||||
loTcoeffs //coefss for T < Tcommon
|
||||
(
|
||||
0 // a0 +
|
||||
0 // a1*T +
|
||||
0 // a2*T^(+/-)2 +
|
||||
0 // a3*T^(+/-)3 +
|
||||
0 // a4*T^(+/-)4 +
|
||||
0 // a5*T^(+/-)5 +
|
||||
);
|
||||
hiTcoeffs //coefss for T > Tcommon
|
||||
(
|
||||
18.741
|
||||
-121.31e3
|
||||
273.5e6
|
||||
-194.05e9
|
||||
56.31e12
|
||||
-5.8169e15
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
H2O
|
||||
{
|
||||
Tcommon 300;
|
||||
invTemp true;
|
||||
Tlow 200;
|
||||
Thigh 2500;
|
||||
|
||||
loTcoeffs
|
||||
(
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
);
|
||||
hiTcoeffs
|
||||
(
|
||||
-0.23093
|
||||
-1.12390e3
|
||||
9.4153e6
|
||||
-2.99885e9
|
||||
0.51382e12
|
||||
-1.868e10
|
||||
);
|
||||
}
|
||||
|
||||
CH4
|
||||
{
|
||||
Tcommon 300;
|
||||
Tlow 200;
|
||||
Thigh 2500;
|
||||
invTemp false;
|
||||
|
||||
loTcoeffs
|
||||
(
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
);
|
||||
hiTcoeffs
|
||||
(
|
||||
6.6334
|
||||
-0.0035686
|
||||
1.6682e-8
|
||||
2.5611e-10
|
||||
-2.6558e-14
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
scatterModel constantScatter;
|
||||
|
||||
constantScatterCoeffs
|
||||
{
|
||||
sigma sigma [ 0 -1 0 0 0 0 0 ] 0;
|
||||
C C [ 0 0 0 0 0 0 0 ] 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,31 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant/topAir";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType hRhoThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>;
|
||||
|
||||
mixture
|
||||
{
|
||||
nMoles 1;
|
||||
molWeight 28.9;
|
||||
Cp 1000;
|
||||
Hf 0;
|
||||
mu 1.8e-05;
|
||||
Pr 0.7;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,19 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,69 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object viewFactorsDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
writeViewFactorMatrix true;
|
||||
writeFacesAgglomeration true;
|
||||
writePatchViewFactors false;
|
||||
|
||||
topAir_to_heater
|
||||
{
|
||||
nFacesInCoarsestLevel 24;
|
||||
featureAngle 10;
|
||||
}
|
||||
|
||||
topAir_to_leftSolid
|
||||
{
|
||||
nFacesInCoarsestLevel 20;
|
||||
featureAngle 10;
|
||||
}
|
||||
|
||||
topAir_to_rightSolid
|
||||
{
|
||||
nFacesInCoarsestLevel 20;
|
||||
featureAngle 10;
|
||||
}
|
||||
|
||||
minX
|
||||
{
|
||||
nFacesInCoarsestLevel 10;
|
||||
featureAngle 10;
|
||||
}
|
||||
|
||||
maxY
|
||||
{
|
||||
nFacesInCoarsestLevel 40;
|
||||
featureAngle 10;
|
||||
}
|
||||
|
||||
minZ
|
||||
{
|
||||
nFacesInCoarsestLevel 20;
|
||||
featureAngle 10;
|
||||
}
|
||||
|
||||
maxX
|
||||
{
|
||||
nFacesInCoarsestLevel 10;
|
||||
featureAngle 10;
|
||||
}
|
||||
|
||||
maxZ
|
||||
{
|
||||
nFacesInCoarsestLevel 20;
|
||||
featureAngle 10;
|
||||
}
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
cellSet heater new boxToCell (-0.01 0 -100 )(0.01 0.01 100)
|
||||
cellSet heater add boxToCell (-0.01 -100 -0.01)(0.01 0.01 0.01)
|
||||
cellZoneSet heater new setToCellZone heater
|
||||
cellSet leftSolid new boxToCell (-100 0 -100 )(-0.01 0.01 100)
|
||||
cellZoneSet leftSolid new setToCellZone leftSolid
|
||||
cellSet rightSolid new boxToCell (0.01 0 -100 )(100 0.01 100)
|
||||
cellZoneSet rightSolid new setToCellZone rightSolid
|
||||
cellSet topAir new boxToCell (-100 0.01 -100 )(100 100 100)
|
||||
cellZoneSet topAir new setToCellZone topAir
|
||||
cellSet bottomAir clear
|
||||
cellSet bottomAir add cellToCell heater
|
||||
cellSet bottomAir add cellToCell leftSolid
|
||||
cellSet bottomAir add cellToCell rightSolid
|
||||
cellSet bottomAir add cellToCell topAir
|
||||
cellSet bottomAir invert
|
||||
cellZoneSet bottomAir new setToCellZone bottomAir
|
||||
@ -0,0 +1,3 @@
|
||||
fvSolution is used for outer correctors specification.
|
||||
fvSchemes is only so that pre-processing activities can proceed
|
||||
|
||||
@ -0,0 +1,196 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object changeDictionaryDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dictionaryReplacement
|
||||
{
|
||||
boundary
|
||||
{
|
||||
minX
|
||||
{
|
||||
type wall;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type wall;
|
||||
}
|
||||
}
|
||||
|
||||
U
|
||||
{
|
||||
internalField uniform (0.01 0 0);
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
T
|
||||
{
|
||||
internalField uniform 300;
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
"bottomAir_to_.*"
|
||||
{
|
||||
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||
Tnbr T;
|
||||
K basicThermo;
|
||||
QrNbr none;
|
||||
Qr Qr;
|
||||
KName none;
|
||||
value uniform 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
epsilon
|
||||
{
|
||||
internalField uniform 0.01;
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type compressible::epsilonWallFunction;
|
||||
value uniform 0.01;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
k
|
||||
{
|
||||
internalField uniform 0.1;
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type compressible::kqRWallFunction;
|
||||
value uniform 0.1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p_rgh
|
||||
{
|
||||
internalField uniform 1e5;
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type buoyantPressure;
|
||||
value uniform 1e5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p
|
||||
{
|
||||
internalField uniform 1e5;
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1e5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Qr
|
||||
{
|
||||
internalField uniform 0;
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type greyDiffusiveRadiationViewFactor;
|
||||
emissivityMode lookup;
|
||||
Qro uniform 0;
|
||||
emissivity uniform 1.0;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
"bottomAir_to_.*"
|
||||
{
|
||||
type greyDiffusiveRadiationViewFactor;
|
||||
emissivityMode solidThermo;
|
||||
Qro uniform 0;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
G
|
||||
{
|
||||
internalField uniform 0;
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type MarshakRadiation;
|
||||
T T;
|
||||
emissivityMode lookup;
|
||||
emissivity uniform 1.0;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
"bottomAir_to_.*"
|
||||
{
|
||||
type MarshakRadiation;
|
||||
T T;
|
||||
emissivityMode solidThermo;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IDefault
|
||||
{
|
||||
internalField uniform 0;
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type greyDiffusiveRadiation;
|
||||
T T;
|
||||
emissivityMode lookup;
|
||||
Qro uniform 0;
|
||||
emissivity uniform 1.0;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
"bottomAir_to_.*"
|
||||
{
|
||||
type greyDiffusiveRadiation;
|
||||
T T;
|
||||
emissivityMode solidThermo;
|
||||
Qro uniform 0;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,72 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
note "mesh decomposition control dictionary";
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
//- Keep owner and neighbour on same processor for faces in zones:
|
||||
// preserveFaceZones (heater solid1 solid3);
|
||||
|
||||
method scotch;
|
||||
// method hierarchical;
|
||||
// method simple;
|
||||
// method manual;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
scotchCoeffs
|
||||
{
|
||||
//processorWeights
|
||||
//(
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
//);
|
||||
//writeGraph true;
|
||||
//strategy "b";
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "decompositionData";
|
||||
}
|
||||
|
||||
|
||||
//// Is the case distributed
|
||||
//distributed yes;
|
||||
//// Per slave (so nProcs-1 entries) the directory above the case.
|
||||
//roots
|
||||
//(
|
||||
// "/tmp"
|
||||
// "/tmp"
|
||||
//);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,69 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / 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) Gauss upwind;
|
||||
div(U,p) Gauss linear;
|
||||
div(phi,h) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div(phi,R) Gauss upwind;
|
||||
div(R) Gauss linear;
|
||||
div(Ji,Ii_h) Gauss linearUpwind Gauss linear; //Gauss upwind;
|
||||
div((muEff*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(muEff,U) Gauss linear corrected;
|
||||
laplacian((rho*(1|A(U))),p_rgh) Gauss linear corrected;
|
||||
laplacian(alphaEff,h) Gauss linear corrected;
|
||||
laplacian(DkEff,k) Gauss linear corrected;
|
||||
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
|
||||
laplacian(DREff,R) Gauss linear corrected;
|
||||
laplacian(gammaRad,G) Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p_rgh;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,82 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
rho
|
||||
{
|
||||
solver PCG
|
||||
preconditioner DIC;
|
||||
tolerance 1e-7;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
p_rgh
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-7;
|
||||
relTol 0.01;
|
||||
|
||||
smoother GaussSeidel;
|
||||
|
||||
cacheAgglomeration true;
|
||||
nCellsInCoarsestLevel 10;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
}
|
||||
|
||||
"(U|h|k|epsilon|G|Ii)"
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-7;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
G
|
||||
{
|
||||
$p_rgh;
|
||||
tolerance 1e-05;
|
||||
relTol 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
momentumPredictor on;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
pRefCell 0;
|
||||
pRefValue 100000;
|
||||
rhoMin rhoMin [1 -3 0 0 0] 0.2;
|
||||
rhoMax rhoMax [1 -3 0 0 0] 2;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
rho 1;
|
||||
p_rgh 0.7;
|
||||
U 0.3;
|
||||
h 0.7;
|
||||
nuTilda 0.7;
|
||||
k 0.7;
|
||||
epsilon 0.7;
|
||||
omega 0.7;
|
||||
G 0.7;
|
||||
"ILambda.*" 0.7;
|
||||
Qr 0.7;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application chtMultiRegionSimpleFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 2000;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 300;
|
||||
|
||||
purgeWrite 10;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 7;
|
||||
|
||||
writeCompression uncompressed;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,72 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
note "mesh decomposition control dictionary";
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
//- Keep owner and neighbour on same processor for faces in zones:
|
||||
// preserveFaceZones (heater solid1 solid3);
|
||||
|
||||
method scotch;
|
||||
// method hierarchical;
|
||||
// method simple;
|
||||
// method manual;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
scotchCoeffs
|
||||
{
|
||||
//processorWeights
|
||||
//(
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
//);
|
||||
//writeGraph true;
|
||||
//strategy "b";
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "decompositionData";
|
||||
}
|
||||
|
||||
|
||||
//// Is the case distributed
|
||||
//distributed yes;
|
||||
//// Per slave (so nProcs-1 entries) the directory above the case.
|
||||
//roots
|
||||
//(
|
||||
// "/tmp"
|
||||
// "/tmp"
|
||||
//);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,46 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,17 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,116 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object changeDictionaryDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dictionaryReplacement
|
||||
{
|
||||
boundary
|
||||
{
|
||||
minY
|
||||
{
|
||||
type patch;
|
||||
}
|
||||
minZ
|
||||
{
|
||||
type patch;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type patch;
|
||||
}
|
||||
}
|
||||
|
||||
T
|
||||
{
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
heater_to_topAir
|
||||
{
|
||||
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||
Tnbr T;
|
||||
K solidThermo;
|
||||
QrNbr Qr;
|
||||
Qr none;
|
||||
KName none;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
heater_to_bottomAir
|
||||
{
|
||||
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||
Tnbr T;
|
||||
K solidThermo;
|
||||
QrNbr Qr;
|
||||
Qr none;
|
||||
KName none;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
"heater_to_.*"
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
neighbourFieldName T;
|
||||
K solidThermo;
|
||||
KName none;
|
||||
value uniform 300;
|
||||
}
|
||||
minY
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ypmma
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Ychar
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,72 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
note "mesh decomposition control dictionary";
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
//- Keep owner and neighbour on same processor for faces in zones:
|
||||
// preserveFaceZones (heater solid1 solid3);
|
||||
|
||||
method scotch;
|
||||
// method hierarchical;
|
||||
// method simple;
|
||||
// method manual;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
scotchCoeffs
|
||||
{
|
||||
//processorWeights
|
||||
//(
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
//);
|
||||
//writeGraph true;
|
||||
//strategy "b";
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "decompositionData";
|
||||
}
|
||||
|
||||
|
||||
//// Is the case distributed
|
||||
//distributed yes;
|
||||
//// Per slave (so nProcs-1 entries) the directory above the case.
|
||||
//roots
|
||||
//(
|
||||
// "/tmp"
|
||||
// "/tmp"
|
||||
//);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,53 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / 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;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(K,T) Gauss linear limited 0.333;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default limited 0.333;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
T
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-06;
|
||||
relTol 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
T 0.7;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,107 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object changeDictionaryDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dictionaryReplacement
|
||||
{
|
||||
boundary
|
||||
{
|
||||
minZ
|
||||
{
|
||||
type patch;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type patch;
|
||||
}
|
||||
}
|
||||
|
||||
T
|
||||
{
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
leftSolid_to_topAir
|
||||
{
|
||||
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||
Tnbr T;
|
||||
K solidThermo;
|
||||
QrNbr Qr;
|
||||
Qr none;
|
||||
KName none;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
leftSolid_to_bottomAir
|
||||
{
|
||||
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||
Tnbr T;
|
||||
K solidThermo;
|
||||
QrNbr Qr;
|
||||
Qr none;
|
||||
KName none;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
"leftSolid_to_.*"
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
neighbourFieldName T;
|
||||
K solidThermo;
|
||||
KName none;
|
||||
value uniform 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ypmma
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Ychar
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,72 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
note "mesh decomposition control dictionary";
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
//- Keep owner and neighbour on same processor for faces in zones:
|
||||
// preserveFaceZones (heater solid1 solid3);
|
||||
|
||||
method scotch;
|
||||
// method hierarchical;
|
||||
// method simple;
|
||||
// method manual;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
scotchCoeffs
|
||||
{
|
||||
//processorWeights
|
||||
//(
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
//);
|
||||
//writeGraph true;
|
||||
//strategy "b";
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "decompositionData";
|
||||
}
|
||||
|
||||
|
||||
//// Is the case distributed
|
||||
//distributed yes;
|
||||
//// Per slave (so nProcs-1 entries) the directory above the case.
|
||||
//roots
|
||||
//(
|
||||
// "/tmp"
|
||||
// "/tmp"
|
||||
//);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,53 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / 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;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(K,T) Gauss linear limited 0.333;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default limited 0.333;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
T
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-06;
|
||||
relTol 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
T 0.7;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,107 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object changeDictionaryDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dictionaryReplacement
|
||||
{
|
||||
boundary
|
||||
{
|
||||
minZ
|
||||
{
|
||||
type patch;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type patch;
|
||||
}
|
||||
}
|
||||
|
||||
T
|
||||
{
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
rightSolid_to_topAir
|
||||
{
|
||||
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||
Tnbr T;
|
||||
K solidThermo;
|
||||
QrNbr Qr;
|
||||
Qr none;
|
||||
KName none;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
rightSolid_to_bottomAir
|
||||
{
|
||||
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||
Tnbr T;
|
||||
K solidThermo;
|
||||
QrNbr Qr;
|
||||
Qr none;
|
||||
KName none;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
"rightSolid_to_.*"
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
neighbourFieldName T;
|
||||
K solidThermo;
|
||||
KName none;
|
||||
value uniform 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ypmma
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Ychar
|
||||
{
|
||||
internalField uniform 0.5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,72 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
note "mesh decomposition control dictionary";
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
//- Keep owner and neighbour on same processor for faces in zones:
|
||||
// preserveFaceZones (heater solid1 solid3);
|
||||
|
||||
method scotch;
|
||||
// method hierarchical;
|
||||
// method simple;
|
||||
// method manual;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
scotchCoeffs
|
||||
{
|
||||
//processorWeights
|
||||
//(
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
//);
|
||||
//writeGraph true;
|
||||
//strategy "b";
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "decompositionData";
|
||||
}
|
||||
|
||||
|
||||
//// Is the case distributed
|
||||
//distributed yes;
|
||||
//// Per slave (so nProcs-1 entries) the directory above the case.
|
||||
//roots
|
||||
//(
|
||||
// "/tmp"
|
||||
// "/tmp"
|
||||
//);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,53 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / 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;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(K,T) Gauss linear limited 0.333;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default limited 0.333;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
T
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-06;
|
||||
relTol 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
T 0.7;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,241 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object changeDictionaryDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dictionaryReplacement
|
||||
{
|
||||
U
|
||||
{
|
||||
internalField uniform (0.1 0 0);
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform ( 0.1 0 0 );
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform ( 0 0 0 );
|
||||
value uniform ( 0.1 0 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
T
|
||||
{
|
||||
internalField uniform 300;
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 300;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 300;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
"topAir_to_.*"
|
||||
{
|
||||
type compressible::turbulentTemperatureRadCoupledMixed;
|
||||
Tnbr T;
|
||||
K basicThermo;
|
||||
QrNbr none;
|
||||
Qr Qr;
|
||||
KName none;
|
||||
value uniform 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
epsilon
|
||||
{
|
||||
internalField uniform 0.01;
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type compressible::epsilonWallFunction;
|
||||
value uniform 0.01;
|
||||
}
|
||||
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.01;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0.01;
|
||||
value uniform 0.01;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
k
|
||||
{
|
||||
internalField uniform 0.1;
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type compressible::kqRWallFunction;
|
||||
value uniform 0.1;
|
||||
}
|
||||
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.1;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0.1;
|
||||
value uniform 0.1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p_rgh
|
||||
{
|
||||
internalField uniform 1e5;
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type buoyantPressure;
|
||||
value uniform 1e5;
|
||||
}
|
||||
|
||||
maxX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1e5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p
|
||||
{
|
||||
internalField uniform 1e5;
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1e5;
|
||||
}
|
||||
|
||||
maxX
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1e5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Qr
|
||||
{
|
||||
internalField uniform 0;
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type greyDiffusiveRadiationViewFactor;
|
||||
emissivityMode lookup;
|
||||
Qro uniform 0;
|
||||
emissivity uniform 1.0;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
"topAir_to_.*"
|
||||
{
|
||||
type greyDiffusiveRadiationViewFactor;
|
||||
emissivityMode solidThermo;
|
||||
Qro uniform 0;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
G
|
||||
{
|
||||
internalField uniform 0;
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type MarshakRadiation;
|
||||
T T;
|
||||
emissivityMode lookup;
|
||||
emissivity uniform 1.0;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
"topAir_to_.*"
|
||||
{
|
||||
type MarshakRadiation;
|
||||
T T;
|
||||
emissivityMode solidThermo;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IDefault
|
||||
{
|
||||
internalField uniform 0;
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type greyDiffusiveRadiation;
|
||||
T T;
|
||||
emissivityMode lookup;
|
||||
Qro uniform 0;
|
||||
emissivity uniform 1.0;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
"topAir_to_.*"
|
||||
{
|
||||
type greyDiffusiveRadiation;
|
||||
T T;
|
||||
emissivityMode solidThermo;
|
||||
Qro uniform 0;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,72 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
note "mesh decomposition control dictionary";
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
//- Keep owner and neighbour on same processor for faces in zones:
|
||||
// preserveFaceZones (heater solid1 solid3);
|
||||
|
||||
method scotch;
|
||||
// method hierarchical;
|
||||
// method simple;
|
||||
// method manual;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
scotchCoeffs
|
||||
{
|
||||
//processorWeights
|
||||
//(
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
//);
|
||||
//writeGraph true;
|
||||
//strategy "b";
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "decompositionData";
|
||||
}
|
||||
|
||||
|
||||
//// Is the case distributed
|
||||
//distributed yes;
|
||||
//// Per slave (so nProcs-1 entries) the directory above the case.
|
||||
//roots
|
||||
//(
|
||||
// "/tmp"
|
||||
// "/tmp"
|
||||
//);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,69 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / 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) Gauss upwind;
|
||||
div(U,p) Gauss linear;
|
||||
div(phi,h) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div(phi,R) Gauss upwind;
|
||||
div(R) Gauss linear;
|
||||
div(Ji,Ii_h) Gauss linearUpwind Gauss linear; //Gauss upwind;
|
||||
div((muEff*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(muEff,U) Gauss linear corrected;
|
||||
laplacian((rho*(1|A(U))),p_rgh) Gauss linear corrected;
|
||||
laplacian(alphaEff,h) Gauss linear corrected;
|
||||
laplacian(DkEff,k) Gauss linear corrected;
|
||||
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
|
||||
laplacian(DREff,R) Gauss linear corrected;
|
||||
laplacian(gammaRad,G) Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p_rgh;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,83 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
rho
|
||||
{
|
||||
solver PCG
|
||||
preconditioner DIC;
|
||||
tolerance 1e-7;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
p_rgh
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-7;
|
||||
relTol 0.01;
|
||||
|
||||
smoother GaussSeidel;
|
||||
|
||||
cacheAgglomeration true;
|
||||
nCellsInCoarsestLevel 10;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
|
||||
maxIter 100;
|
||||
}
|
||||
|
||||
"(U|h|k|epsilon|Ii)"
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-7;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
G
|
||||
{
|
||||
$p_rgh;
|
||||
tolerance 1e-05;
|
||||
relTol 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
momentumPredictor on;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
pRefCell 0;
|
||||
pRefValue 100000;
|
||||
rhoMin rhoMin [1 -3 0 0 0] 0.2;
|
||||
rhoMax rhoMax [1 -3 0 0 0] 2;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
rho 1;
|
||||
p_rgh 0.7;
|
||||
U 0.3;
|
||||
h 0.7;
|
||||
nuTilda 0.7;
|
||||
k 0.7;
|
||||
epsilon 0.7;
|
||||
omega 0.7;
|
||||
"ILambda.*" 0.7;
|
||||
Qr 0.7;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user