mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -42,9 +42,18 @@ defineTypeNameAndDebug(noPyrolysis, 0);
|
|||||||
addToRunTimeSelectionTable(pyrolysisModel, noPyrolysis, mesh);
|
addToRunTimeSelectionTable(pyrolysisModel, noPyrolysis, mesh);
|
||||||
addToRunTimeSelectionTable(pyrolysisModel, noPyrolysis, dictionary);
|
addToRunTimeSelectionTable(pyrolysisModel, noPyrolysis, dictionary);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void noPyrolysis::constructThermoChemistry()
|
||||||
|
{
|
||||||
|
solidChemistry_.reset
|
||||||
|
(
|
||||||
|
solidChemistryModel::New(regionMesh()).ptr()
|
||||||
|
);
|
||||||
|
|
||||||
|
solidThermo_.reset(&solidChemistry_->solidThermo());
|
||||||
|
}
|
||||||
|
|
||||||
bool noPyrolysis::read()
|
bool noPyrolysis::read()
|
||||||
{
|
{
|
||||||
if (pyrolysisModel::read())
|
if (pyrolysisModel::read())
|
||||||
@ -77,10 +86,15 @@ bool noPyrolysis::read(const dictionary& dict)
|
|||||||
|
|
||||||
noPyrolysis::noPyrolysis(const word& modelType, const fvMesh& mesh)
|
noPyrolysis::noPyrolysis(const word& modelType, const fvMesh& mesh)
|
||||||
:
|
:
|
||||||
pyrolysisModel(modelType, mesh),
|
pyrolysisModel(mesh),
|
||||||
solidChemistry_(solidChemistryModel::New(regionMesh())),
|
solidChemistry_(NULL),
|
||||||
solidThermo_(solidChemistry_->solidThermo())
|
solidThermo_(NULL)
|
||||||
{}
|
{
|
||||||
|
if (active())
|
||||||
|
{
|
||||||
|
constructThermoChemistry();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
noPyrolysis::noPyrolysis
|
noPyrolysis::noPyrolysis
|
||||||
@ -89,11 +103,15 @@ noPyrolysis::noPyrolysis
|
|||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
):
|
):
|
||||||
pyrolysisModel(modelType, mesh, dict),
|
pyrolysisModel(mesh),
|
||||||
solidChemistry_(solidChemistryModel::New(regionMesh())),
|
solidChemistry_(NULL),
|
||||||
solidThermo_(solidChemistry_->solidThermo())
|
solidThermo_(NULL)
|
||||||
{}
|
{
|
||||||
|
if (active())
|
||||||
|
{
|
||||||
|
constructThermoChemistry();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -114,33 +132,34 @@ void noPyrolysis::evolveRegion()
|
|||||||
//Do nothing
|
//Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const volScalarField& noPyrolysis::rho() const
|
const volScalarField& noPyrolysis::rho() const
|
||||||
{
|
{
|
||||||
return (solidThermo_.rho());
|
return (solidThermo_->rho());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const volScalarField& noPyrolysis::T() const
|
const volScalarField& noPyrolysis::T() const
|
||||||
{
|
{
|
||||||
return (solidThermo_.T());
|
return (solidThermo_->T());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const tmp<volScalarField> noPyrolysis::Cp() const
|
const tmp<volScalarField> noPyrolysis::Cp() const
|
||||||
{
|
{
|
||||||
return (solidThermo_.Cp());
|
return (solidThermo_->Cp());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const volScalarField& noPyrolysis::kappa() const
|
const volScalarField& noPyrolysis::kappa() const
|
||||||
{
|
{
|
||||||
return (solidThermo_.kappa());
|
return (solidThermo_->kappa());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const volScalarField& noPyrolysis::K() const
|
const volScalarField& noPyrolysis::K() const
|
||||||
{
|
{
|
||||||
return (solidThermo_.K());
|
return (solidThermo_->K());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -154,7 +173,7 @@ const surfaceScalarField& noPyrolysis::phiGas() const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace pyrolysisFilmModels
|
} // End namespace surfaceFilmModels
|
||||||
} // End namespace regionModels
|
} // End namespace regionModels
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
|
|||||||
@ -76,11 +76,14 @@ protected:
|
|||||||
//- Read control parameters from dictionary
|
//- Read control parameters from dictionary
|
||||||
virtual bool read(const dictionary& dict);
|
virtual bool read(const dictionary& dict);
|
||||||
|
|
||||||
|
//- Reset solidChemistryModel and basicSolidThermo pointers
|
||||||
|
void constructThermoChemistry();
|
||||||
|
|
||||||
//- Reference to the solid chemistry model
|
//- Reference to the solid chemistry model
|
||||||
autoPtr<solidChemistryModel> solidChemistry_;
|
autoPtr<solidChemistryModel> solidChemistry_;
|
||||||
|
|
||||||
//- Reference to solid thermo
|
//- Reference to solid thermo
|
||||||
basicSolidThermo& solidThermo_;
|
autoPtr<basicSolidThermo> solidThermo_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -103,7 +106,6 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~noPyrolysis();
|
virtual ~noPyrolysis();
|
||||||
|
|
||||||
|
|||||||
@ -142,30 +142,16 @@ scalar pyrolysisModelCollection::maxDiff() const
|
|||||||
|
|
||||||
scalar pyrolysisModelCollection::solidRegionDiffNo() const
|
scalar pyrolysisModelCollection::solidRegionDiffNo() const
|
||||||
{
|
{
|
||||||
scalar regionDiNum = 0.0;
|
scalar totalDiNum = GREAT;
|
||||||
scalar totalDiNum = 0.0;
|
|
||||||
|
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
{
|
{
|
||||||
const pyrolysisModel& pyrolysis = this->operator[](i);
|
if
|
||||||
|
(
|
||||||
if (pyrolysis.regionMesh().nInternalFaces() > 0)
|
totalDiNum > this->operator[](i).solidRegionDiffNo()
|
||||||
|
)
|
||||||
{
|
{
|
||||||
surfaceScalarField KrhoCpbyDelta
|
totalDiNum = this->operator[](i).solidRegionDiffNo();
|
||||||
(
|
|
||||||
pyrolysis.regionMesh().surfaceInterpolation::deltaCoeffs()
|
|
||||||
* fvc::interpolate(pyrolysis.K())
|
|
||||||
/ fvc::interpolate(pyrolysis.Cp()*pyrolysis.rho())
|
|
||||||
);
|
|
||||||
|
|
||||||
regionDiNum =
|
|
||||||
max(KrhoCpbyDelta.internalField())
|
|
||||||
*pyrolysis.time().deltaTValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (regionDiNum > totalDiNum)
|
|
||||||
{
|
|
||||||
totalDiNum = regionDiNum;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -11,27 +11,34 @@ FoamFile
|
|||||||
format binary;
|
format binary;
|
||||||
class dictionary;
|
class dictionary;
|
||||||
location "constant";
|
location "constant";
|
||||||
object pyrolysisProperties;
|
object pyrolysisZones;
|
||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
active false;
|
1
|
||||||
|
(
|
||||||
|
pyrolysis
|
||||||
|
{
|
||||||
|
|
||||||
pyrolysisModel none;
|
active false;
|
||||||
|
|
||||||
regionName panelRegion;
|
pyrolysisModel none;
|
||||||
|
|
||||||
reactingOneDimCoeffs
|
regionName panelRegion;
|
||||||
{
|
|
||||||
filmCoupled false;
|
|
||||||
|
|
||||||
radFluxName Qr;
|
reactingOneDimCoeffs
|
||||||
|
{
|
||||||
|
filmCoupled false;
|
||||||
|
|
||||||
minimumDelta 1e-8;
|
radFluxName Qr;
|
||||||
|
|
||||||
moveMesh false;
|
minimumDelta 1e-8;
|
||||||
}
|
|
||||||
|
|
||||||
infoOutput false;
|
moveMesh false;
|
||||||
|
}
|
||||||
|
|
||||||
|
infoOutput false;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -11,27 +11,34 @@ FoamFile
|
|||||||
format binary;
|
format binary;
|
||||||
class dictionary;
|
class dictionary;
|
||||||
location "constant";
|
location "constant";
|
||||||
object pyrolysisProperties;
|
object pyrolysisZones;
|
||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
active false;
|
1
|
||||||
|
(
|
||||||
|
pyrolysis
|
||||||
|
{
|
||||||
|
|
||||||
pyrolysisModel none;
|
active false;
|
||||||
|
|
||||||
regionName panelRegion;
|
pyrolysisModel none;
|
||||||
|
|
||||||
reactingOneDimCoeffs
|
regionName panelRegion;
|
||||||
{
|
|
||||||
filmCoupled false;
|
|
||||||
|
|
||||||
radFluxName Qr;
|
reactingOneDimCoeffs
|
||||||
|
{
|
||||||
|
filmCoupled false;
|
||||||
|
|
||||||
minimumDelta 1e-8;
|
radFluxName Qr;
|
||||||
|
|
||||||
moveMesh false;
|
minimumDelta 1e-8;
|
||||||
}
|
|
||||||
|
|
||||||
infoOutput false;
|
moveMesh false;
|
||||||
|
}
|
||||||
|
|
||||||
|
infoOutput false;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user