Transferred copyright to the OpenFOAM Foundation
[OpenFOAM-2.0.x.git] / src / regionModels / surfaceFilmModels / surfaceFilmModel / surfaceFilmModel.C
blob80b48adb1e2edb94ff386709c416e63933b008e5
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
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 "surfaceFilmModel.H"
27 #include "fvMesh.H"
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31 namespace Foam
33     template<>
34     const char* NamedEnum
35     <
36         regionModels::surfaceFilmModels::surfaceFilmModel::thermoModelType,
37         2
38     >::names[] =
39     {
40         "constant",
41         "singleComponent"
42     };
45 const Foam::NamedEnum
47     Foam::regionModels::surfaceFilmModels::surfaceFilmModel::thermoModelType,
48     2
50 Foam::regionModels::surfaceFilmModels::surfaceFilmModel::thermoModelTypeNames_;
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 namespace Foam
57 namespace regionModels
59 namespace surfaceFilmModels
62 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
64 defineTypeNameAndDebug(surfaceFilmModel, 0);
65 defineRunTimeSelectionTable(surfaceFilmModel, mesh);
67 // * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
69 bool surfaceFilmModel::read()
71     if (singleLayerRegion::read())
72     {
73         thermoModel_ =
74             thermoModelTypeNames_.read(coeffs_.lookup("thermoModel"));
75         return true;
76     }
77     else
78     {
79         return false;
80     }
84 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
86 surfaceFilmModel::surfaceFilmModel
88     const word& modelType,
89     const fvMesh& mesh,
90     const dimensionedVector& g
93     singleLayerRegion(mesh, "surfaceFilm", modelType),
94     g_(g),
95     thermoModel_(tmConstant)
97     if (active_)
98     {
99         read();
100     }
104 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
106 surfaceFilmModel::~surfaceFilmModel()
110 // * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //
112 Foam::scalar surfaceFilmModel::CourantNumber() const
114     return ROOTVSMALL;
118 tmp<DimensionedField<scalar, volMesh> > surfaceFilmModel::Srho() const
120     notImplemented
121     (
122         "tmp<DimensionedField<scalar, volMesh> > surfaceFilmModel::Srho() const"
123     )
125     return tmp<DimensionedField<scalar, volMesh> >(NULL);
129 tmp<DimensionedField<scalar, volMesh> >
130 surfaceFilmModel::Srho(const label) const
132     notImplemented
133     (
134         "tmp<DimensionedField<scalar, volMesh> > surfaceFilmModel::Srho"
135         "(const label) const"
136     )
138     return tmp<DimensionedField<scalar, volMesh> >(NULL);
142 tmp<DimensionedField<scalar, volMesh> > surfaceFilmModel::Sh() const
144     notImplemented
145     (
146         "tmp<DimensionedField<scalar, volMesh> > surfaceFilmModel::Sh() const"
147     )
149     return tmp<DimensionedField<scalar, volMesh> >(NULL);
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 } // End namespace surfaceFilmModels
156 } // End namespace regionModels
157 } // End namespace Foam
159 // ************************************************************************* //