Initial commit for version 2.0.x patch release
[OpenFOAM-2.0.x.git] / src / regionModels / surfaceFilmModels / submodels / thermo / phaseChangeModel / phaseChangeModel / phaseChangeModel.H
blob1212def980bfda1932f1489b15024f24ae623bee
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2009-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 Class
25     Foam::phaseChangeModel
27 Description
28     Base class for surface film phase change models
30 SourceFiles
31     phaseChangeModel.C
32     phaseChangeModelNew.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef phaseChangeModel_H
37 #define phaseChangeModel_H
39 #include "subModelBase.H"
40 #include "runTimeSelectionTables.H"
41 #include "scalarField.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
47 namespace regionModels
49 namespace surfaceFilmModels
52 /*---------------------------------------------------------------------------*\
53                       Class phaseChangeModel Declaration
54 \*---------------------------------------------------------------------------*/
56 class phaseChangeModel
58     public subModelBase
60 private:
62     // Private Member Functions
64         //- Disallow default bitwise copy construct
65         phaseChangeModel(const phaseChangeModel&);
67         //- Disallow default bitwise assignment
68         void operator=(const phaseChangeModel&);
71 protected:
73     // Protected Member Functions
75         //- Latest mass transfer due to phase change
76         scalar latestMassPC_;
78         //- Total mass transfer due to phase change
79         scalar totalMassPC_;
82 public:
84     //- Runtime type information
85     TypeName("phaseChangeModel");
88     // Declare runtime constructor selection table
90          declareRunTimeSelectionTable
91          (
92              autoPtr,
93              phaseChangeModel,
94              dictionary,
95              (
96                 const surfaceFilmModel& owner,
97                 const dictionary& dict
98              ),
99              (owner, dict)
100          );
102     // Constructors
104         //- Construct null
105         phaseChangeModel(const surfaceFilmModel& owner);
107         //- Construct from type name, dictionary and surface film model
108         phaseChangeModel
109         (
110             const word& type,
111             const surfaceFilmModel& owner,
112             const dictionary& dict
113         );
116     // Selectors
118         //- Return a reference to the selected phase change model
119         static autoPtr<phaseChangeModel> New
120         (
121             const surfaceFilmModel& owner,
122             const dictionary& dict
123         );
126     //- Destructor
127     virtual ~phaseChangeModel();
130     // Member Functions
132         // Evolution
134             //- Correct
135             virtual void correct
136             (
137                 const scalar dt,
138                 scalarField& availableMass,
139                 volScalarField& dMass,
140                 volScalarField& dEnergy
141             );
143             //- Correct
144             virtual void correctModel
145             (
146                 const scalar dt,
147                 scalarField& availableMass,
148                 scalarField& dMass,
149                 scalarField& dEnergy
150             ) = 0;
153         // I-O
155             //- Provide some feedback
156             virtual void info(Ostream& os) const;
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 } // End namespace surfaceFilmModels
163 } // End namespace regionModels
164 } // End namespace Foam
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 #endif
170 // ************************************************************************* //