1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
27 #include "hhuCombustionThermo.H"
29 #include "zeroGradientFvPatchFields.H"
30 #include "fixedUnburntEnthalpyFvPatchScalarField.H"
31 #include "gradientUnburntEnthalpyFvPatchScalarField.H"
32 #include "mixedUnburntEnthalpyFvPatchScalarField.H"
34 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 /* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
41 defineTypeNameAndDebug(hhuCombustionThermo, 0);
42 defineRunTimeSelectionTable(hhuCombustionThermo, fvMesh);
44 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
46 wordList hhuCombustionThermo::huBoundaryTypes()
48 const volScalarField::GeometricBoundaryField& tbf = Tu_.boundaryField();
50 wordList hbt = tbf.types();
54 if (isA<fixedValueFvPatchScalarField>(tbf[patchi]))
56 hbt[patchi] = fixedUnburntEnthalpyFvPatchScalarField::typeName;
60 isA<zeroGradientFvPatchScalarField>(tbf[patchi])
61 || isA<fixedGradientFvPatchScalarField>(tbf[patchi])
64 hbt[patchi] = gradientUnburntEnthalpyFvPatchScalarField::typeName;
66 else if (isA<mixedFvPatchScalarField>(tbf[patchi]))
68 hbt[patchi] = mixedUnburntEnthalpyFvPatchScalarField::typeName;
75 void hhuCombustionThermo::huBoundaryCorrection(volScalarField& hu)
77 volScalarField::GeometricBoundaryField& hbf = hu.boundaryField();
83 isA<gradientUnburntEnthalpyFvPatchScalarField>(hbf[patchi])
86 refCast<gradientUnburntEnthalpyFvPatchScalarField>(hbf[patchi])
87 .gradient() = hbf[patchi].fvPatchField::snGrad();
91 isA<mixedUnburntEnthalpyFvPatchScalarField>(hbf[patchi])
94 refCast<mixedUnburntEnthalpyFvPatchScalarField>(hbf[patchi])
95 .refGrad() = hbf[patchi].fvPatchField::snGrad();
101 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
103 hhuCombustionThermo::hhuCombustionThermo(const fvMesh& mesh)
105 hCombustionThermo(mesh),
112 mesh.time().timeName(),
125 mesh.time().timeName(),
131 dimensionSet(0, 2, -2, 0, 0),
137 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
139 hhuCombustionThermo::~hhuCombustionThermo()
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 } // End namespace Foam
147 // ************************************************************************* //