1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "fixedUnburntEnthalpyFvPatchScalarField.H"
27 #include "addToRunTimeSelectionTable.H"
28 #include "fvPatchFieldMapper.H"
29 #include "volFields.H"
30 #include "hhuCombustionThermo.H"
33 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
35 Foam::fixedUnburntEnthalpyFvPatchScalarField::
36 fixedUnburntEnthalpyFvPatchScalarField
39 const DimensionedField<scalar, volMesh>& iF
42 fixedValueFvPatchScalarField(p, iF)
46 Foam::fixedUnburntEnthalpyFvPatchScalarField::
47 fixedUnburntEnthalpyFvPatchScalarField
49 const fixedUnburntEnthalpyFvPatchScalarField& ptf,
51 const DimensionedField<scalar, volMesh>& iF,
52 const fvPatchFieldMapper& mapper
55 fixedValueFvPatchScalarField(ptf, p, iF, mapper)
59 Foam::fixedUnburntEnthalpyFvPatchScalarField::
60 fixedUnburntEnthalpyFvPatchScalarField
63 const DimensionedField<scalar, volMesh>& iF,
64 const dictionary& dict
67 fixedValueFvPatchScalarField(p, iF, dict)
71 Foam::fixedUnburntEnthalpyFvPatchScalarField::
72 fixedUnburntEnthalpyFvPatchScalarField
74 const fixedUnburntEnthalpyFvPatchScalarField& tppsf
77 fixedValueFvPatchScalarField(tppsf)
81 Foam::fixedUnburntEnthalpyFvPatchScalarField::
82 fixedUnburntEnthalpyFvPatchScalarField
84 const fixedUnburntEnthalpyFvPatchScalarField& tppsf,
85 const DimensionedField<scalar, volMesh>& iF
88 fixedValueFvPatchScalarField(tppsf, iF)
92 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
94 void Foam::fixedUnburntEnthalpyFvPatchScalarField::updateCoeffs()
101 const hhuCombustionThermo& thermo = db().lookupObject<hhuCombustionThermo>
103 "thermophysicalProperties"
106 const label patchi = patch().index();
108 fvPatchScalarField& Tw =
109 const_cast<fvPatchScalarField&>(thermo.Tu().boundaryField()[patchi]);
111 operator==(thermo.hu(Tw, patchi));
113 fixedValueFvPatchScalarField::updateCoeffs();
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 fixedUnburntEnthalpyFvPatchScalarField
128 // ************************************************************************* //