Merge branch 'master' of ssh://dm/home/dm4/OpenFOAM/repositories/OpenFOAM-dev

This commit is contained in:
Henry
2013-11-29 16:57:11 +00:00
16 changed files with 974 additions and 16 deletions

View File

@ -27,6 +27,11 @@ submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionE
submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C
submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C
/* Soot model */
submodels/sootModel/sootModel/sootModel.C
submodels/sootModel/sootModel/sootModelNew.C
submodels/sootModel/mixtureFractionSoot/mixtureFractionSoots.C
submodels/sootModel/noSoot/noSoot.C
/* Boundary conditions */ /* Boundary conditions */
derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C

View File

@ -337,6 +337,17 @@ Foam::radiation::greyMeanAbsorptionEmission::ECont(const label bandI) const
} }
} }
} }
else
{
WarningIn
(
"tmp<volScalarField>"
"radiation::greyMeanAbsorptionEmission::ECont"
"("
"const label"
") const"
) << "dQ field not found in mesh" << endl;
}
return E; return E;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -255,15 +255,40 @@ Foam::radiation::wideBandAbsorptionEmission::ECont(const label bandI) const
) )
); );
if (mesh().foundObject<volScalarField>("hrr")) if (mesh().foundObject<volScalarField>("dQ"))
{
const volScalarField& dQ = mesh().lookupObject<volScalarField>("dQ");
if (dQ.dimensions() == dimEnergy/dimTime)
{ {
const volScalarField& hrr = mesh().lookupObject<volScalarField>("hrr");
E().internalField() = E().internalField() =
iEhrrCoeffs_[bandI] iEhrrCoeffs_[bandI]
*hrr.internalField() *dQ.internalField()
*(iBands_[bandI][1] - iBands_[bandI][0])
/totalWaveLength_
/mesh_.V();
}
else if (dQ.dimensions() == dimEnergy/dimTime/dimVolume)
{
E().internalField() =
iEhrrCoeffs_[bandI]
*dQ.internalField()
*(iBands_[bandI][1] - iBands_[bandI][0]) *(iBands_[bandI][1] - iBands_[bandI][0])
/totalWaveLength_; /totalWaveLength_;
} }
else
{
WarningIn
(
"tmp<volScalarField>"
"radiation::wideBandAbsorptionEmission::ECont"
"("
"const label"
") const"
)
<< "Incompatible dimensions for dQ field" << endl;
}
}
return E; return E;
} }
@ -289,9 +314,8 @@ void Foam::radiation::wideBandAbsorptionEmission::correct
for (label j=0; j<nBands_; j++) for (label j=0; j<nBands_; j++)
{ {
Info<< "Calculating absorption in band: " << j << endl;
aLambda[j].internalField() = this->a(j); aLambda[j].internalField() = this->a(j);
Info<< "Calculated absorption in band: " << j << endl;
a.internalField() += a.internalField() +=
aLambda[j].internalField() aLambda[j].internalField()
*(iBands_[j][1] - iBands_[j][0]) *(iBands_[j][1] - iBands_[j][0])

View File

@ -0,0 +1,166 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "mixtureFractionSoot.H"
#include "singleStepReactingMixture.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
template<class ThermoType>
const Foam::singleStepReactingMixture<ThermoType>&
Foam::radiation::mixtureFractionSoot<ThermoType>::checkThermo
(
const fluidThermo& thermo
)
{
if (isA<singleStepReactingMixture<ThermoType> >(thermo))
{
return dynamic_cast<const singleStepReactingMixture<ThermoType>& >
(
thermo
);
}
else
{
FatalErrorIn
(
"template<class ThermoType> "
"Foam::radiation::mixtureFractionSoot "
"("
"const dictionary&, "
"const fvMesh&"
")"
)
<< "Inconsistent thermo package for " << thermo.type()
<< "Please select a thermo package based on "
<< "singleStepReactingMixture" << exit(FatalError);
return dynamic_cast<const singleStepReactingMixture<ThermoType>& >
(
thermo
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ThermoType>
Foam::radiation::mixtureFractionSoot<ThermoType>::mixtureFractionSoot
(
const dictionary& dict,
const fvMesh& mesh,
const word& modelType
)
:
sootModel(dict, mesh, modelType),
soot_
(
IOobject
(
"soot",
mesh_.time().timeName(),
mesh_,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh_
),
coeffsDict_(dict.subOrEmptyDict(modelType + "Coeffs")),
nuSoot_(readScalar(coeffsDict_.lookup("nuSoot"))),
Wsoot_(readScalar(coeffsDict_.lookup("Wsoot"))),
sootMax_(-1),
mappingFieldName_
(
coeffsDict_.lookupOrDefault<word>("mappingFieldName", "none")
),
mapFieldMax_(1),
thermo_(mesh.lookupObject<fluidThermo>("thermophysicalProperties")),
mixture_(checkThermo(thermo_))
{
const Reaction<ThermoType>& reaction = mixture_.operator[](0);
const scalarList& specieStoichCoeffs(mixture_.specieStoichCoeffs());
scalar totalMol = 0.0;
forAll(reaction.rhs(), i)
{
label specieI = reaction.rhs()[i].index;
totalMol += mag(specieStoichCoeffs[specieI]);
}
totalMol += nuSoot_;
scalarList Xi(reaction.rhs().size());
scalar Wm = 0.0;
forAll(reaction.rhs(), i)
{
const label specieI = reaction.rhs()[i].index;
Xi[i] = mag(specieStoichCoeffs[specieI])/totalMol;
Wm += Xi[i]*mixture_.speciesData()[specieI].W();
}
const scalar XSoot = nuSoot_/totalMol;
Wm += XSoot*Wsoot_;
sootMax_ = XSoot*Wsoot_/Wm;
Info << "Maximum soot mass concentrations: " << sootMax_ << nl;
if (mappingFieldName_ == "none")
{
const label index = reaction.rhs()[0].index;
mappingFieldName_ = mixture_.Y(index).name();
}
const label mapFieldIndex = mixture_.species()[mappingFieldName_];
mapFieldMax_ = mixture_.Yprod0()[mapFieldIndex];
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class ThermoType>
Foam::radiation::mixtureFractionSoot<ThermoType>::~mixtureFractionSoot()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ThermoType>
void Foam::radiation::mixtureFractionSoot<ThermoType>::correct()
{
const volScalarField& mapField =
mesh_.lookupObject<volScalarField>(mappingFieldName_);
soot_ = sootMax_*(mapField/mapFieldMax_);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -0,0 +1,179 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::radiation::mixtureFractionSoot
Description
This soot model is purely an state model. The ammount of soot produced is
determined by a single step chemistry as :
nuf Fuel + nuOx Ox = nuP P + nuSoot soot
nuSoot is prescribed by the user.
The single step chemistry used is read from the combustion.
The soot is not considered into the thermodynamics of the system and it
is not considered as an extra specie in the solver.
The spacial distribution is given by the normalization of the first product
on the rhs of the reaction by default or it can be added as input.
The input dictionary reads like in the radiationProperties dictionary:
sootModel mixtureFractionSoot<gasHThermoPhysics>;
mixtureFractionSootCoeffs
{
nuSoot 0.015;
Wsoot 12;
mappingFieldName P;
}
SourceFiles
mixtureFractionSoot.C
\*---------------------------------------------------------------------------*/
#ifndef mixtureFractionSoot_H
#define mixtureFractionSoot_H
#include "interpolationLookUpTable.H"
#include "sootModel.H"
#include "HashTable.H"
#include "fluidThermo.H"
#include "singleStepReactingMixture.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace radiation
{
/*---------------------------------------------------------------------------*\
Class mixtureFractionSoot Declaration
\*---------------------------------------------------------------------------*/
template<class ThermoType>
class mixtureFractionSoot
:
public sootModel
{
// Static functions
//- Check mixture in thermo
static const singleStepReactingMixture<ThermoType>& checkThermo
(
const fluidThermo&
);
// Private data
//- Soot mass fraction
volScalarField soot_;
//- Soot model dictionary
dictionary coeffsDict_;
//- Soot yield
scalar nuSoot_;
//- Soot molecular weight
scalar Wsoot_;
//- Maximum soot mass concentration at stoichiometric
scalar sootMax_;
//- Name of the field mapping the soot
word mappingFieldName_;
//- Maximum value of the map field
scalar mapFieldMax_;
//- Thermo package
const fluidThermo& thermo_;
//- Auto Ptr to singleStepReactingMixture
const singleStepReactingMixture<ThermoType>& mixture_;
public:
//- Runtime type information
TypeName("mixtureFractionSoot");
// Constructors
//- Construct from components
mixtureFractionSoot
(
const dictionary& dict,
const fvMesh& mesh,
const word& modelType
);
//- Destructor
virtual ~mixtureFractionSoot();
// Member Functions
// Edit
//- Main update/correction routine
virtual void correct();
// Access
//- Return Ysoot
const volScalarField& soot() const
{
return soot_;
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
} // End namespace radiation
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "mixtureFractionSoot.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,47 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "mixtureFractionSoot.H"
#include "makeSootTypes.H"
#include "thermoPhysicsTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace radiation
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
makeSootTypesThermo(mixtureFractionSoot, gasHThermoPhysics);
makeSootTypesThermo(mixtureFractionSoot, gasEThermoPhysics);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
} // End namespace radiation
// ************************************************************************* //

View File

@ -0,0 +1,77 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "noSoot.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace radiation
{
defineTypeNameAndDebug(noSoot, 0);
addToRunTimeSelectionTable
(
sootModel,
noSoot,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::radiation::noSoot::noSoot
(
const dictionary& dict,
const fvMesh& mesh,
const word& modelType
)
:
sootModel(dict, mesh, modelType)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::radiation::noSoot::~noSoot()
{}
void Foam::radiation::noSoot::correct()
{
//Do nothing
}
const Foam::volScalarField& Foam::radiation::noSoot::soot() const
{
notImplemented
(
"Foam::volScalarField& Foam::radiation::noSoot::soot() const"
);
return tmp<volScalarField>(NULL);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -0,0 +1,98 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::radiation::noSoot
Description
noSoot
SourceFiles
noSoot.C
\*---------------------------------------------------------------------------*/
#ifndef noSoot_H
#define noSoot_H
#include "sootModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace radiation
{
/*---------------------------------------------------------------------------*\
Class noSoot Declaration
\*---------------------------------------------------------------------------*/
class noSoot
:
public sootModel
{
public:
//- Runtime type information
TypeName("none");
// Constructors
//- Construct from components
noSoot(const dictionary& dict, const fvMesh& mesh, const word&);
//- Destructor
virtual ~noSoot();
// Member Functions
// Edit
//- Main update/correction routine
void correct();
// Access
//- Return Ysoot
const volScalarField& soot() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
} // End namespace radiation
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,57 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#ifndef makeSootTypes_H
#define makeSootTypes_H
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeSootTypesThermo(sootModelType, Thermo) \
\
typedef sootModelType<Thermo> sootModelType##Thermo; \
\
defineTemplateTypeNameAndDebugWithName \
( \
sootModelType##Thermo, \
#sootModelType"<"#Thermo">", \
0 \
); \
\
addToRunTimeSelectionTable \
( \
sootModel, \
sootModelType##Thermo, \
dictionary \
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,62 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "sootModel.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace radiation
{
defineTypeNameAndDebug(sootModel, 0);
defineRunTimeSelectionTable(sootModel, dictionary);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::radiation::sootModel::sootModel
(
const dictionary& dict,
const fvMesh& mesh,
const word& modelType
)
:
dict_(dict),
mesh_(mesh)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
Foam::radiation::sootModel::~sootModel()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -0,0 +1,153 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::radiation::sootModel
Description
Base class for soor models
\*---------------------------------------------------------------------------*/
#ifndef radiationsootModel_H
#define radiationsootModel_H
#include "IOdictionary.H"
#include "autoPtr.H"
#include "runTimeSelectionTables.H"
#include "volFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace radiation
{
/*---------------------------------------------------------------------------*\
Class sootModel Declaration
\*---------------------------------------------------------------------------*/
class sootModel
{
protected:
// Protected data
//- Radiation model dictionary
const dictionary dict_;
//- Reference to the fvMesh
const fvMesh& mesh_;
public:
//- Runtime type information
TypeName("sootModel");
//- Declare runtime constructor selection table
declareRunTimeSelectionTable
(
autoPtr,
sootModel,
dictionary,
(
const dictionary& dict,
const fvMesh& mesh,
const word& modelType
),
(dict, mesh, modelType)
);
// Constructors
//- Construct from components
sootModel
(
const dictionary& dict,
const fvMesh& mesh,
const word& modelType
);
//- Selector
static autoPtr<sootModel> New
(
const dictionary& dict,
const fvMesh& mesh
);
//- Destructor
virtual ~sootModel();
// Member Functions
// Access
//- Reference to the mesh
inline const fvMesh& mesh() const
{
return mesh_;
}
//- Reference to the dictionary
inline const dictionary& dict() const
{
return dict_;
}
// Member Functions
// Edit
//- Main update/correction routine
virtual void correct() = 0;
// Access
//- Return const reference to soot
virtual const volScalarField& soot() const = 0;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
} // End namespace radiation
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,69 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "error.H"
#include "sootModel.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::radiation::sootModel>
Foam::radiation::sootModel::New
(
const dictionary& dict,
const fvMesh& mesh
)
{
word modelType("none");
if (dict.found("sootModel"))
{
dict.lookup("sootModel") >> modelType;
Info<< "Selecting sootModel " << modelType << endl;
}
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"sootModel::New(const dictionary&, const fvMesh&)"
) << "Unknown sootModel type "
<< modelType << nl << nl
<< "Valid sootModel types are :" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError);
}
const label tempOpen = modelType.find('<');
const word className = modelType(0, tempOpen);
return autoPtr<sootModel>(cstrIter()(dict, mesh, className));
}
// ************************************************************************* //

View File

@ -48,13 +48,10 @@ greyMeanAbsorptionEmissionSootCoeffs
EhrrCoeff 0.4; EhrrCoeff 0.4;
} }
scatterModel constantScatter; scatterModel none;
constantScatterCoeffs
{ sootModel none;
sigma sigma [ 0 -1 0 0 0 0 0 ] 0;
C C [ 0 0 0 0 0 0 0 ] 0;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -191,5 +191,6 @@ greyMeanAbsorptionEmissionCoeffs
scatterModel none; scatterModel none;
sootModel none;
// ************************************************************************* // // ************************************************************************* //

View File

@ -15,6 +15,8 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
radiation on;
radiationModel fvDOM; radiationModel fvDOM;
fvDOMCoeffs fvDOMCoeffs
@ -187,5 +189,12 @@ greyMeanAbsorptionEmissionCoeffs
scatterModel none; scatterModel none;
sootModel mixtureFractionSoot<gasHThermoPhysics>;
mixtureFractionSootCoeffs
{
//CH4 + 2O2 + 7.5N2 = CO2 + 2H2O + 7.5N2 + nuSoot soot
nuSoot 0.055;
Wsoot 12;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -16,6 +16,8 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
radiation on;
radiationModel fvDOM; radiationModel fvDOM;
fvDOMCoeffs fvDOMCoeffs
@ -188,5 +190,6 @@ greyMeanAbsorptionEmissionCoeffs
scatterModel none; scatterModel none;
sootModel none;
// ************************************************************************* // // ************************************************************************* //