From 64c0a9813fed00cbf17469aef73df58876757d17 Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 14 May 2009 15:17:47 +0100 Subject: [PATCH] intial commit of coal combustion functionality --- .../combustion/coalChemistryFoam/Make/files | 3 + .../combustion/coalChemistryFoam/Make/options | 40 ++++ .../combustion/coalChemistryFoam/UEqn.H | 17 ++ .../combustion/coalChemistryFoam/YEqn.H | 43 ++++ .../coalChemistryFoam/additionalOutput.H | 48 ++++ .../combustion/coalChemistryFoam/chemistry.H | 25 ++ .../coalChemistryFoam/coalChemistryFoam.C | 133 +++++++++++ .../coalChemistryFoam/createClouds.H | 52 ++++ .../coalChemistryFoam/createFields.H | 143 +++++++++++ .../combustion/coalChemistryFoam/hEqn.H | 22 ++ .../combustion/coalChemistryFoam/pEqn.H | 72 ++++++ .../readChemistryProperties.H | 22 ++ .../combustion/coalChemistryFoam/rhoEqn.H | 43 ++++ src/lagrangian/coalCombustion/Make/files | 19 ++ src/lagrangian/coalCombustion/Make/options | 35 +++ .../coalCombustion/coalCloud/coalCloud.C | 77 ++++++ .../coalCombustion/coalCloud/coalCloud.H | 102 ++++++++ .../coalCombustion/coalParcel/coalParcel.C | 92 +++++++ .../coalCombustion/coalParcel/coalParcel.H | 114 +++++++++ .../coalParcel/defineCoalParcel.C | 50 ++++ .../makeCoalParcelCompositionModels.C | 48 ++++ .../makeCoalParcelDevolatilisationModels.C | 65 +++++ .../makeCoalParcelDispersionModels.C | 68 ++++++ .../submodels/makeCoalParcelDragModels.C | 45 ++++ .../makeCoalParcelHeatTransferModels.C | 45 ++++ .../submodels/makeCoalParcelInjectionModels.C | 49 ++++ .../makeCoalParcelPhaseChangeModels.C | 58 +++++ .../makeCoalParcelSurfaceReactionModels.C | 55 +++++ .../makeCoalParcelWallInteractionModels.C | 55 +++++ .../COxidationMurphyShaddix.C | 225 ++++++++++++++++++ .../COxidationMurphyShaddix.H | 169 +++++++++++++ 31 files changed, 2034 insertions(+) create mode 100644 applications/solvers/combustion/coalChemistryFoam/Make/files create mode 100644 applications/solvers/combustion/coalChemistryFoam/Make/options create mode 100644 applications/solvers/combustion/coalChemistryFoam/UEqn.H create mode 100644 applications/solvers/combustion/coalChemistryFoam/YEqn.H create mode 100644 applications/solvers/combustion/coalChemistryFoam/additionalOutput.H create mode 100644 applications/solvers/combustion/coalChemistryFoam/chemistry.H create mode 100644 applications/solvers/combustion/coalChemistryFoam/coalChemistryFoam.C create mode 100644 applications/solvers/combustion/coalChemistryFoam/createClouds.H create mode 100644 applications/solvers/combustion/coalChemistryFoam/createFields.H create mode 100644 applications/solvers/combustion/coalChemistryFoam/hEqn.H create mode 100644 applications/solvers/combustion/coalChemistryFoam/pEqn.H create mode 100644 applications/solvers/combustion/coalChemistryFoam/readChemistryProperties.H create mode 100644 applications/solvers/combustion/coalChemistryFoam/rhoEqn.H create mode 100755 src/lagrangian/coalCombustion/Make/files create mode 100755 src/lagrangian/coalCombustion/Make/options create mode 100644 src/lagrangian/coalCombustion/coalCloud/coalCloud.C create mode 100644 src/lagrangian/coalCombustion/coalCloud/coalCloud.H create mode 100644 src/lagrangian/coalCombustion/coalParcel/coalParcel.C create mode 100644 src/lagrangian/coalCombustion/coalParcel/coalParcel.H create mode 100644 src/lagrangian/coalCombustion/coalParcel/defineCoalParcel.C create mode 100644 src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelCompositionModels.C create mode 100644 src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDevolatilisationModels.C create mode 100644 src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDispersionModels.C create mode 100644 src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDragModels.C create mode 100644 src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelHeatTransferModels.C create mode 100644 src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelInjectionModels.C create mode 100644 src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelPhaseChangeModels.C create mode 100644 src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelSurfaceReactionModels.C create mode 100644 src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelWallInteractionModels.C create mode 100644 src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C create mode 100644 src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H diff --git a/applications/solvers/combustion/coalChemistryFoam/Make/files b/applications/solvers/combustion/coalChemistryFoam/Make/files new file mode 100644 index 0000000000..6a1392f01c --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/Make/files @@ -0,0 +1,3 @@ +coalChemistryFoam.C + +EXE = $(FOAM_USER_APPBIN)/coalChemistryFoam diff --git a/applications/solvers/combustion/coalChemistryFoam/Make/options b/applications/solvers/combustion/coalChemistryFoam/Make/options new file mode 100644 index 0000000000..21575a94ae --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/Make/options @@ -0,0 +1,40 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I${LIB_SRC}/meshTools/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/lagrangian/basic/lnInclude \ + -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ + -I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/pdfs/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/liquidMixture/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/solids/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/solidMixture/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ + -I$(LIB_SRC)/ODE/lnInclude + +EXE_LIBS = \ + -L$(FOAM_USER_LIBBIN) \ + -lfiniteVolume \ + -lmeshTools \ + -lcompressibleRASModels \ + -lcompressibleLESModels \ + -llagrangian \ + -llagrangianIntermediate \ + -lcoalCombustion\ + -lspecie \ + -lbasicThermophysicalModels \ + -lliquids \ + -lliquidMixture \ + -lsolids \ + -lsolidMixture \ + -lthermophysicalFunctions \ + -lcombustionThermophysicalModels \ + -lchemistryModel \ + -lradiation \ + -lODE diff --git a/applications/solvers/combustion/coalChemistryFoam/UEqn.H b/applications/solvers/combustion/coalChemistryFoam/UEqn.H new file mode 100644 index 0000000000..b02a7c61e8 --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/UEqn.H @@ -0,0 +1,17 @@ + fvVectorMatrix UEqn + ( + fvm::ddt(rho, U) + + fvm::div(phi, U) + + turbulence->divDevRhoReff(U) + == + rho.dimensionedInternalField()*g + + coalParcels.SU() + + limestoneParcels.SU() + ); + + UEqn.relax(); + + if (momentumPredictor) + { + solve(UEqn == -fvc::grad(p)); + } diff --git a/applications/solvers/combustion/coalChemistryFoam/YEqn.H b/applications/solvers/combustion/coalChemistryFoam/YEqn.H new file mode 100644 index 0000000000..5c84cfdb3f --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/YEqn.H @@ -0,0 +1,43 @@ +tmp > mvConvection +( + fv::convectionScheme::New + ( + mesh, + fields, + phi, + mesh.divScheme("div(phi,Yi_h)") + ) +); + + +{ + label inertIndex = -1; + volScalarField Yt = 0.0*Y[0]; + + for (label i=0; ifvmDiv(phi, Yi) + - fvm::laplacian(turbulence->muEff(), Yi) + == + coalParcels.Srho(i) + + kappa*chemistry.RR(i)().dimensionedInternalField() + ); + + Yi.max(0.0); + Yt += Yi; + } + else + { + inertIndex = i; + } + } + + Y[inertIndex] = scalar(1) - Yt; + Y[inertIndex].max(0.0); +} diff --git a/applications/solvers/combustion/coalChemistryFoam/additionalOutput.H b/applications/solvers/combustion/coalChemistryFoam/additionalOutput.H new file mode 100644 index 0000000000..9edd35eb7c --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/additionalOutput.H @@ -0,0 +1,48 @@ +{ + tmp tdQ + ( + new volScalarField + ( + IOobject + ( + "dQ", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar + ( + "zero", + dimensionSet(1, -3, -1, 0, 0, 0, 0), + 0.0 + ) + ) + ); + + scalarField& dQ = tdQ(); + + scalarField cp(dQ.size(), 0.0); + + forAll(Y, i) + { + volScalarField RRi = chemistry.RR(i); + + forAll(h, celli) + { + scalar Ti = T[celli]; + cp[celli] += Y[i][celli]*chemistry.specieThermo()[i].Cp(Ti); + scalar hi = chemistry.specieThermo()[i].h(Ti); + scalar RR = RRi[celli]; + dQ[celli] -= hi*RR; + } + } + + forAll(dQ, celli) + { + dQ[celli] /= cp[celli]; + } + + tdQ().write(); +} diff --git a/applications/solvers/combustion/coalChemistryFoam/chemistry.H b/applications/solvers/combustion/coalChemistryFoam/chemistry.H new file mode 100644 index 0000000000..07b1e9953b --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/chemistry.H @@ -0,0 +1,25 @@ +{ + Info << "Solving chemistry" << endl; + + chemistry.solve + ( + runTime.value() - runTime.deltaT().value(), + runTime.deltaT().value() + ); + + // turbulent time scale + if (turbulentReaction) + { + DimensionedField tk = + Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon()); + DimensionedField tc = + chemistry.tc()().dimensionedInternalField(); + + // Chalmers PaSR model + kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk); + } + else + { + kappa = 1.0; + } +} diff --git a/applications/solvers/combustion/coalChemistryFoam/coalChemistryFoam.C b/applications/solvers/combustion/coalChemistryFoam/coalChemistryFoam.C new file mode 100644 index 0000000000..4b28e3b37f --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/coalChemistryFoam.C @@ -0,0 +1,133 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 + +Application + coalChemistryFoam + +Description + Transient solver for compressible, turbulent flow with coal and + limestone parcel injections, and combustion. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "hCombustionThermo.H" +#include "turbulenceModel.H" +#include "basicThermoCloud.H" +#include "coalCloud.H" +#include "chemistryModel.H" +#include "chemistrySolver.H" +#include "ReactingCloudThermoTypes.H" +#include "timeActivatedExplicitSource.H" +#include "radiationModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + + #include "createTime.H" + #include "createMesh.H" + #include "readChemistryProperties.H" + #include "readEnvironmentalProperties.H" + #include "createFields.H" + #include "createClouds.H" + #include "createRadiationModel.H" + #include "readPISOControls.H" + #include "initContinuityErrs.H" + #include "readTimeControls.H" + #include "compressibleCourantNo.H" + #include "setInitialDeltaT.H" + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nStarting time loop\n" << endl; + + while (runTime.run()) + { + #include "readTimeControls.H" + #include "readPISOControls.H" + #include "compressibleCourantNo.H" + #include "setDeltaT.H" + + runTime++; + + Info<< "Time = " << runTime.timeName() << nl << endl; + + Info << "Evolving coal cloud" << endl; + + coalParcels.evolve(); + + coalParcels.info(); + + Info << "Evolving limestone cloud" << endl; + + limestoneParcels.evolve(); + + limestoneParcels.info(); + + #include "chemistry.H" + #include "rhoEqn.H" + + // --- PIMPLE loop + for (int ocorr=1; ocorr<=nOuterCorr; ocorr++) + { + #include "UEqn.H" + #include "YEqn.H" + + // --- PISO loop + for (int corr=1; corr<=nCorr; corr++) + { + #include "hEqn.H" + #include "pEqn.H" + } + + Info<< "T gas min/max = " << min(T).value() << ", " + << max(T).value() << endl; + } + + turbulence->correct(); + + enthalpySource.update(); + + rho = thermo->rho(); + + if (runTime.write()) + { + #include "additionalOutput.H" + } + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + } + + Info<< "End\n" << endl; + + return(0); +} + + +// ************************************************************************* // diff --git a/applications/solvers/combustion/coalChemistryFoam/createClouds.H b/applications/solvers/combustion/coalChemistryFoam/createClouds.H new file mode 100644 index 0000000000..34398f6b82 --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/createClouds.H @@ -0,0 +1,52 @@ +Info<< "\nConstructing interpolation" << endl; + +Info << "\nConstructing gas properties" << endl; +/* +PtrList gasProperties(Y.size()); +forAll(gasProperties, i) +{ + gasProperties.set + ( + i, + new specieConstProperties + ( + dynamic_cast > > >&> + (thermo()).speciesData()[i] + ) + ); +} +*/ +PtrList gasProperties(Y.size()); +forAll(gasProperties, i) +{ + gasProperties.set + ( + i, + new specieReactingProperties + ( + dynamic_cast(thermo()).speciesData()[i] + ) + ); +} + +Info<< "\nConstructing coal cloud" << endl; +coalCloud coalParcels +( + "coalCloud1", + rho, + U, + g, + thermo(), + gasProperties +); + +Info<< "\nConstructing limestone cloud" << endl; +basicThermoCloud limestoneParcels +( + "limestoneCloud1", + rho, + U, + g, + thermo() +); diff --git a/applications/solvers/combustion/coalChemistryFoam/createFields.H b/applications/solvers/combustion/coalChemistryFoam/createFields.H new file mode 100644 index 0000000000..0cc8632562 --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/createFields.H @@ -0,0 +1,143 @@ + Info<< "Reading thermophysical properties\n" << endl; + + autoPtr thermo + ( + hCombustionThermo::New(mesh) + ); + + combustionMixture& composition = thermo->composition(); + PtrList& Y = composition.Y(); + + word inertSpecie(thermo->lookup("inertSpecie")); + + volScalarField& p = thermo->p(); + volScalarField& h = thermo->h(); + const volScalarField& T = thermo->T(); + const volScalarField& psi = thermo->psi(); + + volScalarField rho + ( + IOobject + ( + "rho", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + thermo->rho() + ); + +// lagrangian coal density field +/* volScalarField rholc + ( + IOobject + ( + "rholc", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("zero", dimensionSet(1, -3, 0, 0, 0, 0, 0), 0.0) + ); + +// lagrangian limestone density field + volScalarField rhols + ( + IOobject + ( + "rhols", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("zero", dimensionSet(1, -3, 0, 0, 0, 0, 0), 0.0) + ); + +// lagrangian total density field + volScalarField rhol + ( + IOobject + ( + "rhol", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("zero", dimensionSet(1, -3, 0, 0, 0, 0, 0), 0.0) + );*/ + + Info<< "\nReading field U\n" << endl; + volVectorField U + ( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + +# include "compressibleCreatePhi.H" + + DimensionedField kappa + ( + IOobject + ( + "kappa", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("zero", dimless, 0.0) + ); + + Info<< "Creating turbulence model\n" << endl; + autoPtr turbulence + ( + compressible::turbulenceModel::New + ( + rho, + U, + phi, + thermo() + ) + ); + + Info<< "Creating field DpDt\n" << endl; + volScalarField DpDt = + fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); + + Info<< "\nConstructing explicit enthalpy source" << endl; + timeActivatedExplicitSource enthalpySource + ( + "enthalpySource", + mesh, + h.dimensions()*phi.dimensions()/mesh.V().dimensions() + ); + + Info << "Constructing chemical mechanism" << endl; + chemistryModel chemistry + ( + thermo(), + rho + ); + + multivariateSurfaceInterpolationScheme::fieldTable fields; + + forAll (Y, i) + { + fields.add(Y[i]); + } + fields.add(h); diff --git a/applications/solvers/combustion/coalChemistryFoam/hEqn.H b/applications/solvers/combustion/coalChemistryFoam/hEqn.H new file mode 100644 index 0000000000..6f0d532437 --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/hEqn.H @@ -0,0 +1,22 @@ +{ + fvScalarMatrix hEqn + ( + fvm::ddt(rho, h) + + fvm::div(phi, h) + - fvm::laplacian(turbulence->alphaEff(), h) + == + DpDt + + coalParcels.Sh() + + limestoneParcels.Sh() + + enthalpySource.Su() + + radiation->Sh(thermo()) + ); + + hEqn.relax(); + + hEqn.solve(); + + thermo->correct(); + + radiation->correct(); +} diff --git a/applications/solvers/combustion/coalChemistryFoam/pEqn.H b/applications/solvers/combustion/coalChemistryFoam/pEqn.H new file mode 100644 index 0000000000..4a94c725bc --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/pEqn.H @@ -0,0 +1,72 @@ +rho = thermo->rho(); + +volScalarField rUA = 1.0/UEqn.A(); +U = rUA*UEqn.H(); + +if (transonic) +{ + surfaceScalarField phid + ( + "phid", + fvc::interpolate(thermo->psi()) + *( + (fvc::interpolate(U) & mesh.Sf()) + + fvc::ddtPhiCorr(rUA, rho, U, phi) + ) + ); + + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + fvScalarMatrix pEqn + ( + fvm::ddt(psi, p) + + fvm::div(phid, p) + - fvm::laplacian(rho*rUA, p) + == + coalParcels.Srho() + ); + + pEqn.solve(); + + if (nonOrth == nNonOrthCorr) + { + phi == pEqn.flux(); + } + } +} +else +{ + phi = + fvc::interpolate(rho)* + ( + (fvc::interpolate(U) & mesh.Sf()) + + fvc::ddtPhiCorr(rUA, rho, U, phi) + ); + + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + fvScalarMatrix pEqn + ( + fvm::ddt(psi, p) + + fvc::div(phi) + - fvm::laplacian(rho*rUA, p) + == + coalParcels.Srho() + ); + + pEqn.solve(); + + if (nonOrth == nNonOrthCorr) + { + phi += pEqn.flux(); + } + } +} + +#include "rhoEqn.H" +#include "compressibleContinuityErrs.H" + +U -= rUA*fvc::grad(p); +U.correctBoundaryConditions(); + +DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/combustion/coalChemistryFoam/readChemistryProperties.H b/applications/solvers/combustion/coalChemistryFoam/readChemistryProperties.H new file mode 100644 index 0000000000..1a60e6fb34 --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/readChemistryProperties.H @@ -0,0 +1,22 @@ +Info<< "Reading chemistry properties\n" << endl; + +IOdictionary chemistryProperties +( + IOobject + ( + "chemistryProperties", + runTime.constant(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) +); + +Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction")); + +dimensionedScalar Cmix("Cmix", dimless, 1.0); + +if (turbulentReaction) +{ + chemistryProperties.lookup("Cmix") >> Cmix; +} diff --git a/applications/solvers/combustion/coalChemistryFoam/rhoEqn.H b/applications/solvers/combustion/coalChemistryFoam/rhoEqn.H new file mode 100644 index 0000000000..fdc338a959 --- /dev/null +++ b/applications/solvers/combustion/coalChemistryFoam/rhoEqn.H @@ -0,0 +1,43 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 + +Global + rhoEqn + +Description + Solve the continuity for density. + +\*---------------------------------------------------------------------------*/ + +{ + solve + ( + fvm::ddt(rho) + + fvc::div(phi) + == + coalParcels.Srho() + ); +} + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/Make/files b/src/lagrangian/coalCombustion/Make/files new file mode 100755 index 0000000000..b4af07a35d --- /dev/null +++ b/src/lagrangian/coalCombustion/Make/files @@ -0,0 +1,19 @@ +/* coal cloud */ +coalCloud/coalCloud.C + +/* coal parcel and sub-models */ +coalParcel/coalParcel.C +coalParcel/defineCoalParcel.C +coalParcel/submodels/makeCoalParcelCompositionModels.C +coalParcel/submodels/makeCoalParcelDevolatilisationModels.C +coalParcel/submodels/makeCoalParcelDragModels.C +coalParcel/submodels/makeCoalParcelDispersionModels.C +coalParcel/submodels/makeCoalParcelInjectionModels.C +coalParcel/submodels/makeCoalParcelHeatTransferModels.C +coalParcel/submodels/makeCoalParcelPhaseChangeModels.C +coalParcel/submodels/makeCoalParcelSurfaceReactionModels.C +coalParcel/submodels/makeCoalParcelWallInteractionModels.C +submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C + + +LIB = $(FOAM_USER_LIBBIN)/libcoalCombustion diff --git a/src/lagrangian/coalCombustion/Make/options b/src/lagrangian/coalCombustion/Make/options new file mode 100755 index 0000000000..21dc5327f1 --- /dev/null +++ b/src/lagrangian/coalCombustion/Make/options @@ -0,0 +1,35 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/lagrangian/basic/lnInclude \ + -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/pdfs/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/liquidMixture/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/solids/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/solidMixture/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ + -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude + +LIB_LIBS = \ + -lfiniteVolume \ + -lmeshTools \ + -llagrangian \ + -llagrangianIntermediate \ + -lpdf \ + -lspecie \ + -lbasicThermophysicalModels \ + -lliquids \ + -lliquidMixture \ + -lsolids \ + -lsolidMixture \ + -lcombustionThermophysicalModels \ + -lcompressibleRASModels \ + -lcompressibleLESModels diff --git a/src/lagrangian/coalCombustion/coalCloud/coalCloud.C b/src/lagrangian/coalCombustion/coalCloud/coalCloud.C new file mode 100644 index 0000000000..a8d1dd867b --- /dev/null +++ b/src/lagrangian/coalCombustion/coalCloud/coalCloud.C @@ -0,0 +1,77 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 "coalCloud.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(coalCloud, 0); +}; + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::coalCloud::coalCloud +( + const word& cloudType, + const volScalarField& rho, + const volVectorField& U, + const dimensionedVector& g, + hCombustionThermo& thermo, + PtrList& gases +) +: + ReactingMultiphaseCloud + ( + cloudType, + rho, + U, + g, + thermo, + gases + ) +{ + coalParcel::readFields(*this); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::coalCloud::~coalCloud() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::coalCloud::writeFields() const +{ + coalParcel::writeFields(*this); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/coalCloud/coalCloud.H b/src/lagrangian/coalCombustion/coalCloud/coalCloud.H new file mode 100644 index 0000000000..72949ce144 --- /dev/null +++ b/src/lagrangian/coalCombustion/coalCloud/coalCloud.H @@ -0,0 +1,102 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 + +Class + coalCloud + +Description + +SourceFiles + coalCloud.C + +\*---------------------------------------------------------------------------*/ + +#ifndef coalCloud_H +#define coalCloud_H + +#include "ReactingMultiphaseCloud.H" +#include "coalParcel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class coalCloud Declaration +\*---------------------------------------------------------------------------*/ + +class coalCloud +: + public ReactingMultiphaseCloud +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + coalCloud(const coalCloud&); + + //- Disallow default bitwise assignment + void operator=(const coalCloud&); + + +public: + + //-Runtime type information + TypeName("coalCloud"); + + + // Constructors + + //- Construct given carrier gas fields + coalCloud + ( + const word& cloudType, + const volScalarField& rho, + const volVectorField& U, + const dimensionedVector& g, + hCombustionThermo& thermo, + PtrList& gases + ); + + + //- Destructor + ~coalCloud(); + + + // Member Functions + + //- Write fields + void writeFields() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/coalParcel/coalParcel.C b/src/lagrangian/coalCombustion/coalParcel/coalParcel.C new file mode 100644 index 0000000000..b1b6120906 --- /dev/null +++ b/src/lagrangian/coalCombustion/coalParcel/coalParcel.C @@ -0,0 +1,92 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 "coalParcel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(coalParcel, 0); + defineParticleTypeNameAndDebug(coalParcel, 0); + defineParcelTypeNameAndDebug(coalParcel, 0); +}; + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::coalParcel::coalParcel +( + ReactingMultiphaseCloud& owner, + const vector& position, + const label celli, + const label typeId, + const scalar nParticle0, + const scalar d0, + const vector& U0, + const scalarField& YMixture0, + const scalarField& YGas0, + const scalarField& YLiquid0, + const scalarField& YSolid0, + const constantProperties& constProps +) +: + ReactingMultiphaseParcel + ( + owner, + position, + celli, + typeId, + nParticle0, + d0, + U0, + YMixture0, + YGas0, + YLiquid0, + YSolid0, + constProps + ) +{} + + +Foam::coalParcel::coalParcel +( + const Cloud& cloud, + Istream& is, + bool readFields +) +: + ReactingMultiphaseParcel(cloud, is, readFields) +{} + + +// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * // + +Foam::coalParcel::~coalParcel() +{} + + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/coalParcel/coalParcel.H b/src/lagrangian/coalCombustion/coalParcel/coalParcel.H new file mode 100644 index 0000000000..af3be65f84 --- /dev/null +++ b/src/lagrangian/coalCombustion/coalParcel/coalParcel.H @@ -0,0 +1,114 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 + +Class + coalParcel + +Description + + +SourceFiles + coalParcel.C + coalParcelIO.C + +\*---------------------------------------------------------------------------*/ + +#ifndef coalParcel_H +#define coalParcel_H + +#include "ReactingMultiphaseParcel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class coalParcel Declaration +\*---------------------------------------------------------------------------*/ + +class coalParcel +: + public ReactingMultiphaseParcel +{ +public: + + // Run-time type information + TypeName("coalParcel"); + + // Constructors + + //- Construct from components + coalParcel + ( + ReactingMultiphaseCloud& owner, + const vector& position, + const label celli, + const label typeId, + const scalar nParticle0, + const scalar d0, + const vector& U0, + const scalarField& YMixture0, + const scalarField& YGas0, + const scalarField& YLiquid0, + const scalarField& YSolid0, + const constantProperties& constProps + ); + + //- Construct from Istream + coalParcel + ( + const Cloud& c, + Istream& is, + bool readFields = true + ); + + //- Construct and return a clone + autoPtr clone() const + { + return autoPtr(new coalParcel(*this)); + } + + + //- Destructor + virtual ~coalParcel(); +}; + + +template<> +inline bool contiguous() +{ + return false; // Now have scalar lists/fields (mass fractions) +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/coalParcel/defineCoalParcel.C b/src/lagrangian/coalCombustion/coalParcel/defineCoalParcel.C new file mode 100644 index 0000000000..2c41d82898 --- /dev/null +++ b/src/lagrangian/coalCombustion/coalParcel/defineCoalParcel.C @@ -0,0 +1,50 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 "coalParcel.H" +#include "ReactingMultiphaseCloud.H" + +namespace Foam +{ + defineTemplateTypeNameAndDebug(Cloud, 0); + + defineParcelTypeNameAndDebug(KinematicParcel, 0); +// defineTemplateTypeNameAndDebug(KinematicParcel, 0); + defineParcelTypeNameAndDebug(ThermoParcel, 0); + defineTemplateTypeNameAndDebug(ThermoParcel, 0); + defineParcelTypeNameAndDebug(ReactingParcel, 0); + defineTemplateTypeNameAndDebug(ReactingParcel, 0); + defineParcelTypeNameAndDebug(ReactingMultiphaseParcel, 0); + defineTemplateTypeNameAndDebug(ReactingMultiphaseParcel, 0); + + defineParcelTypeNameAndDebug(KinematicCloud, 0); + defineParcelTypeNameAndDebug(ThermoCloud, 0); + defineParcelTypeNameAndDebug(ReactingCloud, 0); + defineParcelTypeNameAndDebug(ReactingMultiphaseCloud, 0); +}; + + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelCompositionModels.C b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelCompositionModels.C new file mode 100644 index 0000000000..f6dea63009 --- /dev/null +++ b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelCompositionModels.C @@ -0,0 +1,48 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 "coalParcel.H" +#include "ReactingCloud.H" + +#include "SingleMixtureFraction.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeCompositionModel(ReactingCloud); + + // Add instances of composition model to the table + makeCompositionModelType + ( + SingleMixtureFraction, + ReactingCloud, + coalParcel + ); +}; + + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDevolatilisationModels.C b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDevolatilisationModels.C new file mode 100644 index 0000000000..041a132d66 --- /dev/null +++ b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDevolatilisationModels.C @@ -0,0 +1,65 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 "coalParcel.H" +#include "ReactingMultiphaseCloud.H" + +#include "NoDevolatilisation.H" +#include "ConstantRateDevolatilisation.H" +#include "SingleKineticRateDevolatilisation.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeDevolatilisationModel + ( + ReactingMultiphaseCloud + ); + + // Add instances of devolatilisation model to the table + makeDevolatilisationModelType + ( + NoDevolatilisation, + ReactingMultiphaseCloud, + coalParcel + ); + makeDevolatilisationModelType + ( + ConstantRateDevolatilisation, + ReactingMultiphaseCloud, + coalParcel + ); + makeDevolatilisationModelType + ( + SingleKineticRateDevolatilisation, + ReactingMultiphaseCloud, + coalParcel + ); +}; + + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDispersionModels.C b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDispersionModels.C new file mode 100644 index 0000000000..d6f1cc8232 --- /dev/null +++ b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDispersionModels.C @@ -0,0 +1,68 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 "coalParcel.H" +#include "KinematicCloud.H" + +#include "NoDispersion.H" +#include "GradientDispersionRAS.H" +#include "StochasticDispersionRAS.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeDispersionModel(KinematicCloud); + + defineNamedTemplateTypeNameAndDebug + ( + DispersionRASModel >, + 0 + ); + + // Add instances of dispersion model to the table + makeDispersionModelType + ( + NoDispersion, + KinematicCloud, + coalParcel + ); + makeDispersionModelType + ( + GradientDispersionRAS, + KinematicCloud, + coalParcel + ); + makeDispersionModelType + ( + StochasticDispersionRAS, + KinematicCloud, + coalParcel + ); +}; + + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDragModels.C b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDragModels.C new file mode 100644 index 0000000000..162e1d56c2 --- /dev/null +++ b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelDragModels.C @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 "coalParcel.H" +#include "KinematicCloud.H" + +#include "NoDrag.H" +#include "SphereDrag.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeDragModel(KinematicCloud); + + // Add instances of drag model to the table + makeDragModelType(NoDrag, KinematicCloud, coalParcel); + makeDragModelType(SphereDrag, KinematicCloud, coalParcel); +}; + + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelHeatTransferModels.C b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelHeatTransferModels.C new file mode 100644 index 0000000000..92e1a67270 --- /dev/null +++ b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelHeatTransferModels.C @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 "coalParcel.H" +#include "ThermoCloud.H" + +#include "NoHeatTransfer.H" +#include "RanzMarshall.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeHeatTransferModel(ThermoCloud); + + // Add instances of heat transfer model to the table + makeHeatTransferModelType(NoHeatTransfer, ThermoCloud, coalParcel); + makeHeatTransferModelType(RanzMarshall, ThermoCloud, coalParcel); +}; + + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelInjectionModels.C b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelInjectionModels.C new file mode 100644 index 0000000000..bf68b99477 --- /dev/null +++ b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelInjectionModels.C @@ -0,0 +1,49 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 "coalParcel.H" +#include "ReactingCloud.H" + +#include "ConeInjection.H" +#include "FieldActivatedInjection.H" +#include "ManualInjection.H" +#include "NoInjection.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeInjectionModel(KinematicCloud); + + // Add instances of injection model to the table + makeInjectionModelType(ConeInjection, KinematicCloud, coalParcel); + makeInjectionModelType(FieldActivatedInjection, KinematicCloud, coalParcel); + makeInjectionModelType(ManualInjection, KinematicCloud, coalParcel); + makeInjectionModelType(NoInjection, KinematicCloud, coalParcel); +}; + + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelPhaseChangeModels.C b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelPhaseChangeModels.C new file mode 100644 index 0000000000..ebacd714bd --- /dev/null +++ b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelPhaseChangeModels.C @@ -0,0 +1,58 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 "coalParcel.H" +#include "ReactingCloud.H" + +#include "NoPhaseChange.H" +#include "LiquidEvaporation.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makePhaseChangeModel + ( + ReactingCloud + ); + + // Add instances of phase change model to the table + makePhaseChangeModelType + ( + NoPhaseChange, + ReactingCloud, + coalParcel + ); + makePhaseChangeModelType + ( + LiquidEvaporation, + ReactingCloud, + coalParcel + ); +}; + + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelSurfaceReactionModels.C b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelSurfaceReactionModels.C new file mode 100644 index 0000000000..603cd1d25d --- /dev/null +++ b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelSurfaceReactionModels.C @@ -0,0 +1,55 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 "coalParcel.H" +#include "ReactingMultiphaseCloud.H" + +#include "NoSurfaceReaction.H" +#include "COxidationMurphyShaddix.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeSurfaceReactionModel(ReactingMultiphaseCloud); + + // Add instances of surface reaction model to the table + makeSurfaceReactionModelType + ( + NoSurfaceReaction, + ReactingMultiphaseCloud, + coalParcel + ); + makeSurfaceReactionModelTypeInstance + ( + COxidationMurphyShaddix, + ReactingMultiphaseCloud, + coalParcel + ); +}; + + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelWallInteractionModels.C b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelWallInteractionModels.C new file mode 100644 index 0000000000..fedf097d4f --- /dev/null +++ b/src/lagrangian/coalCombustion/coalParcel/submodels/makeCoalParcelWallInteractionModels.C @@ -0,0 +1,55 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 "coalParcel.H" +#include "ReactingCloud.H" + +#include "Rebound.H" +#include "StandardWallInteraction.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeWallInteractionModel(KinematicCloud); + + // Add instances of wall interaction model to the table + makeWallInteractionModelType + ( + Rebound, + KinematicCloud, + coalParcel + ); + makeWallInteractionModelType + ( + StandardWallInteraction, + KinematicCloud, + coalParcel + ); +}; + + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C new file mode 100644 index 0000000000..10deb09404 --- /dev/null +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C @@ -0,0 +1,225 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 "COxidationMurphyShaddix.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +Foam::label Foam::COxidationMurphyShaddix::maxIters_ = 1000; + +Foam::scalar Foam::COxidationMurphyShaddix::tolerance_ = 1e-06; + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::COxidationMurphyShaddix::COxidationMurphyShaddix +( + const dictionary& dict, + ReactingMultiphaseCloud& owner +) +: + SurfaceReactionModel > + ( + dict, + owner, + typeName + ), + coeffDict_(dict.subDict(typeName + "Coeffs")), + D0_(dimensionedScalar(coeffDict_.lookup("D0")).value()), + rho0_(dimensionedScalar(coeffDict_.lookup("rho0")).value()), + T0_(dimensionedScalar(coeffDict_.lookup("T0")).value()), + Dn_(dimensionedScalar(coeffDict_.lookup("Dn")).value()), + A_(dimensionedScalar(coeffDict_.lookup("A")).value()), + E_(dimensionedScalar(coeffDict_.lookup("E")).value()), + n_(dimensionedScalar(coeffDict_.lookup("n")).value()), + WVol_(dimensionedScalar(coeffDict_.lookup("WVol")).value()), + dH0_(dimensionedScalar(coeffDict_.lookup("dH0")).value()), + TMaxdH_(dimensionedScalar(coeffDict_.lookup("TmaxdH")).value()), + CsLocalId_(-1), + O2GlobalId_(-1), + CO2GlobalId_(-1) +{ + // Determine carrier phase Ids of reactants/products + label idGas = owner.composition().idGas(); + O2GlobalId_ = owner.composition().globalId(idGas, "O2"); + CO2GlobalId_ = owner.composition().globalId(idGas, "CO2"); + + // Determine Cs ids + label idSolid = owner.composition().idSolid(); + CsLocalId_ = owner.composition().localId(idSolid, "Cs"); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::COxidationMurphyShaddix::~COxidationMurphyShaddix() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +bool Foam::COxidationMurphyShaddix::active() const +{ + return true; +} + + +Foam::scalar Foam::COxidationMurphyShaddix::calculate +( + const scalar dt, + const label cellI, + const scalar d, + const scalar T, + const scalar Tc, + const scalar pc, + const scalar rhoc, + const scalar mass, + const scalarField& YGas, + const scalarField& YLiquid, + const scalarField& YSolid, + const scalarField& YMixture, + const scalarField& dMassVolatile, + scalarField& dMassGas, + scalarField& dMassLiquid, + scalarField& dMassSolid, + scalarField& dMassSRCarrier +) const +{ + // Fraction of remaining combustible material + const scalar fComb = YMixture[coalParcel::SLD]*YSolid[CsLocalId_]; + + // Surface combustion until combustible fraction is consumed + if (fComb < SMALL) + { + return 0.0; + } + + // Cell carrier phase O2 species density [kg/m^3] + const scalar rhoO2 = + owner().carrierThermo().composition().Y(O2GlobalId_)[cellI] + *rhoc; + + if (rhoO2 < SMALL) + { + return 0.0; + } + + // Particle surface area [m^2] + const scalar Ap = mathematicalConstant::pi*sqr(d); + +// // Film temperature [K] +// const scalar Tf = (T + Tc)/2; + + // Calculate diffision constant at continuous phase temperature + // and density [m^2/s] + const scalar D = D0_*(rho0_/rhoc)*pow(Tc/T0_, Dn_); + + // Molecular weight of O2 [kg/kmol] + const scalar WO2 = owner().composition().gases()[O2GlobalId_].W(); + + // Molecular weight of CO2 [kg/kmol] + const scalar WCO2 = owner().composition().gases()[CO2GlobalId_].W(); + + // Molecular weight of C [kg/kmol] + const scalar WC = WCO2 - WO2; + + // Far field partial pressure O2 [Pa] + const scalar PO2 = rhoO2/WO2*specie::RR*Tc; + + // Molar emission rate of volatiles per unit surface area + const scalar qVol = sum(dMassVolatile)/(WVol_*Ap); + + // Total molar concentration of the carrier phase [kmol/m^3] + const scalar C = pc/(specie::RR*Tc); + + if (debug) + { + Pout << " C = " << C << endl; + } + + // Molar reaction rate per unit surface area [kmol/(m^2.s)] + scalar qCsOld = 0; + scalar qCs = 1; + + if (debug) + { + Pout<< "mass = " << mass << nl + << "fComb = " << fComb << nl + << "WC = " << WC << nl + << "Ap = " << Ap << nl + << "dt = " << dt + << nl << endl; + } + + const scalar qCsLim = mass*fComb/(WC*Ap*dt); + + if (debug) + { + Pout << "qCsLim = " << qCsLim << endl; + } + + label iter = 0; + while ((fabs(qCs - qCsOld)/qCs>tolerance_) && (iter<=maxIters_)) + { + qCsOld = qCs; + const scalar PO2Surface = PO2*exp(-(qCs + qVol)*d/(2*C*D)); + qCs = A_*exp(-E_/(specie::RR*T))*pow(PO2Surface, n_); + qCs = (100.0*qCs + iter*qCsOld)/(100.0 + iter); + qCs = min(qCs, qCsLim); + + if (debug) + { + Pout<< "iter = " << iter + << ", qCsOld = " << qCsOld + << ", qCs = " << qCs + << nl << endl; + } + + iter++; + } + + if (iter > maxIters_) + { + WarningIn("scalar Foam::COxidationMurphyShaddix::calculate(...)") + << "iter limit reached (" << maxIters_ << ")" << nl << endl; + } + + // Calculate the number of molar units reacted + scalar dOmega = qCs*Ap*dt; + + // Add to carrier phase mass transfer + dMassSRCarrier[O2GlobalId_] += -dOmega*WO2; + dMassSRCarrier[CO2GlobalId_] += dOmega*WCO2; + + // Add to particle mass transfer + dMassSolid[CsLocalId_] = dOmega*WC; + + // Heat of reaction + return dOmega*dH0_*cos(mathematicalConstant::pi/2*T/TMaxdH_); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H new file mode 100644 index 0000000000..06bf1f404b --- /dev/null +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H @@ -0,0 +1,169 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 + +Class + COxidationMurphyShaddix + +Description + Kinetics/diffusion limited rate surface reaction model for coal parcel + Limited to C(s) + O2 -> CO2 + +\*---------------------------------------------------------------------------*/ + +#ifndef COxidationMurphyShaddix_H +#define COxidationMurphyShaddix_H + +#include "SurfaceReactionModel.H" +#include "coalParcel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +/*---------------------------------------------------------------------------*\ + Class COxidationMurphyShaddix Declaration +\*---------------------------------------------------------------------------*/ + +class COxidationMurphyShaddix +: + public SurfaceReactionModel > +{ + // Private data + + //- Coefficients dictionary + const dictionary& coeffDict_; + + + // Model constants + + //- Reference diffusion constant + const scalar D0_; + + //- Reference density for reference diffusion constant + const scalar rho0_; + + //- Reference temperature for reference diffusion constant + const scalar T0_; + + //- Exponent for diffusion equation + const scalar Dn_; + + //- Kinetic rate coefficient + const scalar A_; + + //- Kinetic rate activation energy + const scalar E_; + + //- Reaction order + const scalar n_; + + //- Effective molecular weight of gaseous volatiles + const scalar WVol_; + + //- Enthalpy retained by particle during surface combustion + const scalar dH0_; + + //- TdHMax: dH = dH0_*cos(pi/2*Tp/TMaxdH_) + const scalar TMaxdH_; + + + // Static constants + + //- Maximum number of iterations + static label maxIters_; + + //- Tolerance used in inner iterations + static scalar tolerance_; + + + // Addressing + + //- Cs positions in global/local lists + label CsLocalId_; + + //- O2 position in global list + label O2GlobalId_; + + //- CO2 positions in global list + label CO2GlobalId_; + + +public: + + //- Runtime type information + TypeName("COxidationMurphyShaddix"); + + + // Constructors + + //- Construct from dictionary + COxidationMurphyShaddix + ( + const dictionary& dict, + ReactingMultiphaseCloud& owner + ); + + + //- Destructor + virtual ~COxidationMurphyShaddix(); + + + // Member Functions + + //- Flag to indicate whether model activates surface reaction model + virtual bool active() const; + + //- Update surface reactions + virtual scalar calculate + ( + const scalar dt, + const label cellI, + const scalar d, + const scalar T, + const scalar Tc, + const scalar pc, + const scalar rhoc, + const scalar mass, + const scalarField& YGas, + const scalarField& YLiquid, + const scalarField& YSolid, + const scalarField& YMixture, + const scalarField& dMassVolatile, + scalarField& dMassGas, + scalarField& dMassLiquid, + scalarField& dMassSolid, + scalarField& dMassSRCarrier + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* //