~zaveri-saahil/saahil/debian

« back to all changes in this revision

Viewing changes to src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.H

  • Committer: andy
  • Date: 2014-08-22 13:48:41 UTC
  • Revision ID: git-v1:e30b44a5ac09850541602ec18055695e0d5e642f
ENH: Coal combustion - added new intrinsic rate surface oxidation model

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*---------------------------------------------------------------------------*\
 
2
  =========                 |
 
3
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 
4
   \\    /   O peration     |
 
5
    \\  /    A nd           | Copyright (C) 2013-2014 OpenCFD Ltd.
 
6
     \\/     M anipulation  |
 
7
-------------------------------------------------------------------------------
 
8
License
 
9
    This file is part of OpenFOAM.
 
10
 
 
11
    OpenFOAM is free software: you can redistribute it and/or modify it
 
12
    under the terms of the GNU General Public License as published by
 
13
    the Free Software Foundation, either version 3 of the License, or
 
14
    (at your option) any later version.
 
15
 
 
16
    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
 
17
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
18
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 
19
    for more details.
 
20
 
 
21
    You should have received a copy of the GNU General Public License
 
22
    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
23
 
 
24
Class
 
25
    COxidationIntrinsicRate
 
26
 
 
27
Description
 
28
    Intrinsic char surface reaction mndel
 
29
 
 
30
        C(s) + Sb*O2 -> CO2
 
31
 
 
32
    where Sb is the stoichiometry of the reaction
 
33
 
 
34
\*---------------------------------------------------------------------------*/
 
35
 
 
36
#ifndef COxidationIntrinsicRate_H
 
37
#define COxidationIntrinsicRate_H
 
38
 
 
39
#include "SurfaceReactionModel.H"
 
40
 
 
41
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
42
 
 
43
// Forward class declarations
 
44
template<class CloudType>
 
45
class COxidationIntrinsicRate;
 
46
 
 
47
namespace Foam
 
48
{
 
49
/*---------------------------------------------------------------------------*\
 
50
                   Class COxidationIntrinsicRate Declaration
 
51
\*---------------------------------------------------------------------------*/
 
52
 
 
53
template<class CloudType>
 
54
class COxidationIntrinsicRate
 
55
:
 
56
    public SurfaceReactionModel<CloudType>
 
57
{
 
58
    // Private data
 
59
 
 
60
        // Model constants
 
61
 
 
62
            //- Stoichiometry of reaction []
 
63
            const scalar Sb_;
 
64
 
 
65
            //- Mass diffusion limited rate constant
 
66
            const scalar C1_;
 
67
 
 
68
            //- Mean pore radius [m]
 
69
            const scalar rMean_;
 
70
 
 
71
            //- Char porosity [] = 1 - rho_apparent/rho_true
 
72
            const scalar theta_;
 
73
 
 
74
            //- Pre-exponential factor
 
75
            const scalar Ai_;
 
76
 
 
77
            //- Activation energy
 
78
            const scalar Ei_;
 
79
 
 
80
            //- Char specific internal area [m2/kg]
 
81
            const scalar Ag_;
 
82
 
 
83
            //- Pore tortuosity []; default to sqrt(2)
 
84
            const scalar tau_;
 
85
 
 
86
 
 
87
        // Addressing
 
88
 
 
89
            //- Cs positions in global/local lists
 
90
            label CsLocalId_;
 
91
 
 
92
            //- O2 position in global list
 
93
            label O2GlobalId_;
 
94
 
 
95
            //- CO2 positions in global list
 
96
            label CO2GlobalId_;
 
97
 
 
98
 
 
99
        // Local copies of thermo properties
 
100
 
 
101
            //- Molecular weight of C [kg/kmol]
 
102
            scalar WC_;
 
103
 
 
104
            //- Molecular weight of O2 [kg/kmol]
 
105
            scalar WO2_;
 
106
 
 
107
            //- Formation enthalpy for CO2 [J/kg]
 
108
            scalar HcCO2_;
 
109
 
 
110
 
 
111
public:
 
112
 
 
113
    //- Runtime type information
 
114
    TypeName("COxidationIntrinsicRate");
 
115
 
 
116
 
 
117
    // Constructors
 
118
 
 
119
        //- Construct from dictionary
 
120
        COxidationIntrinsicRate
 
121
        (
 
122
            const dictionary& dict,
 
123
            CloudType& owner
 
124
        );
 
125
 
 
126
        //- Construct copy
 
127
        COxidationIntrinsicRate
 
128
        (
 
129
            const COxidationIntrinsicRate<CloudType>& srm
 
130
        );
 
131
 
 
132
        //- Construct and return a clone
 
133
        virtual autoPtr<SurfaceReactionModel<CloudType> > clone() const
 
134
        {
 
135
            return autoPtr<SurfaceReactionModel<CloudType> >
 
136
            (
 
137
                new COxidationIntrinsicRate<CloudType>(*this)
 
138
            );
 
139
        }
 
140
 
 
141
 
 
142
    //- Destructor
 
143
    virtual ~COxidationIntrinsicRate();
 
144
 
 
145
 
 
146
    // Member Functions
 
147
 
 
148
        //- Update surface reactions
 
149
        virtual scalar calculate
 
150
        (
 
151
            const scalar dt,
 
152
            const label cellI,
 
153
            const scalar d,
 
154
            const scalar T,
 
155
            const scalar Tc,
 
156
            const scalar pc,
 
157
            const scalar rhoc,
 
158
            const scalar mass,
 
159
            const scalarField& YGas,
 
160
            const scalarField& YLiquid,
 
161
            const scalarField& YSolid,
 
162
            const scalarField& YMixture,
 
163
            const scalar N,
 
164
            scalarField& dMassGas,
 
165
            scalarField& dMassLiquid,
 
166
            scalarField& dMassSolid,
 
167
            scalarField& dMassSRCarrier
 
168
        ) const;
 
169
};
 
170
 
 
171
 
 
172
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
173
 
 
174
} // End namespace Foam
 
175
 
 
176
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
177
 
 
178
#ifdef NoRepository
 
179
    #include "COxidationIntrinsicRate.C"
 
180
#endif
 
181
 
 
182
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
183
 
 
184
#endif
 
185
 
 
186
// ************************************************************************* //