Initial commit for version 2.0.x patch release
[OpenFOAM-2.0.x.git] / src / regionModels / thermoBaffleModels / noThermo / noThermo.C
blob32b8e32e04039031c78ae30819620c05f97d2356
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011-2011 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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 "noThermo.H"
27 #include "addToRunTimeSelectionTable.H"
28 #include "volFields.H"
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32 namespace Foam
34 namespace regionModels
36 namespace thermoBaffleModels
39 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
41 defineTypeNameAndDebug(noThermo, 0);
42 addToRunTimeSelectionTable(thermoBaffleModel, noThermo, mesh);
44 // * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
46 bool noThermo::read()
48     return regionModel1D::read();
52 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
54 noThermo::noThermo(const word& modelType, const fvMesh& mesh)
56     thermoBaffleModel(mesh)
59 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
61 noThermo::~noThermo()
64 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
66 void noThermo::preEvolveRegion()
70 void noThermo::evolveRegion()
74 const tmp<volScalarField> noThermo::Cp() const
76     FatalErrorIn("const tmp<volScalarField>& noThermo::Cp() const")
77         << "Cp field not available for " << type() << abort(FatalError);
79     return tmp<volScalarField>
80     (
81         new volScalarField
82         (
83             IOobject
84             (
85                 "noThermo::Cp",
86                 time().timeName(),
87                 primaryMesh(),
88                 IOobject::NO_READ,
89                 IOobject::NO_WRITE,
90                 false
91             ),
92             primaryMesh(),
93             dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0)
94         )
95     );
98 const volScalarField& noThermo::kappa() const
100     FatalErrorIn("const volScalarField& noThermo::kappa() const")
101         << "kappa field not available for " << type() << abort(FatalError);
102     return volScalarField::null();
106 const volScalarField& noThermo::rho() const
108     FatalErrorIn("const volScalarField& noThermo::rho() const")
109         << "rho field not available for " << type() << abort(FatalError);
110     return volScalarField::null();
114 const volScalarField& noThermo::K() const
116    FatalErrorIn("const volScalarField& noThermo::K() const")
117         << "K field not available for " << type() << abort(FatalError);
118     return volScalarField::null();
122 const volScalarField& noThermo::T() const
124     FatalErrorIn("const volScalarField& noThermo::T() const")
125         << "T field not available for " << type() << abort(FatalError);
126     return volScalarField::null();
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 } // End namespace thermoBaffleModels
133 } // End namespace regionModels
134 } // End namespace Foam
136 // ************************************************************************* //