1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
5 \\ / A nd | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend 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 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "constantThermal.H"
27 #include "addToRunTimeSelectionTable.H"
28 #include "zeroGradientFvPatchFields.H"
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
34 defineTypeNameAndDebug(constantThermal, 0);
35 addToRunTimeSelectionTable(thermalLaw, constantThermal, dictionary);
39 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
41 // Construct from dictionary
42 Foam::constantThermal::constantThermal
45 const volScalarField& T,
46 const dictionary& dict
49 thermalLaw(name, T, dict),
52 alpha_(dict.lookup("alpha")),
53 T0_(dict.lookup("T0"))
57 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
59 Foam::constantThermal::~constantThermal()
63 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
65 Foam::tmp<Foam::volScalarField> Foam::constantThermal::C() const
67 tmp<volScalarField> tresult
74 mesh().time().timeName(),
81 zeroGradientFvPatchScalarField::typeName
85 tresult().correctBoundaryConditions();
91 Foam::tmp<Foam::volScalarField> Foam::constantThermal::k() const
93 tmp<volScalarField> tresult
100 mesh().time().timeName(),
107 zeroGradientFvPatchScalarField::typeName
111 tresult().correctBoundaryConditions();
117 Foam::tmp<Foam::volScalarField> Foam::constantThermal::alpha() const
119 tmp<volScalarField> tresult
126 mesh().time().timeName(),
133 zeroGradientFvPatchScalarField::typeName
137 tresult().correctBoundaryConditions();
143 Foam::tmp<Foam::volScalarField> Foam::constantThermal::T0() const
145 tmp<volScalarField> tresult
152 mesh().time().timeName(),
159 zeroGradientFvPatchScalarField::typeName
163 tresult().correctBoundaryConditions();
169 // ************************************************************************* //