OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

dragModel.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::dragModel
00027 
00028 Description
00029 
00030 SourceFiles
00031     dragModel.C
00032     newDragModel.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef dragModel_H
00037 #define dragModel_H
00038 
00039 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00040 
00041 #include "dictionary.H"
00042 #include "phaseModel.H"
00043 #include "runTimeSelectionTables.H"
00044 
00045 namespace Foam
00046 {
00047 
00048 /*---------------------------------------------------------------------------*\
00049                            Class dragModel Declaration
00050 \*---------------------------------------------------------------------------*/
00051 
00052 class dragModel
00053 {
00054 protected:
00055 
00056     // Protected data
00057 
00058         const dictionary& interfaceDict_;
00059         const volScalarField& alpha_;
00060         const phaseModel& phasea_;
00061         const phaseModel& phaseb_;
00062 
00063 
00064 public:
00065 
00066     //- Runtime type information
00067     TypeName("dragModel");
00068 
00069 
00070     // Declare runtime construction
00071 
00072         declareRunTimeSelectionTable
00073         (
00074             autoPtr,
00075             dragModel,
00076             dictionary,
00077             (
00078                 const dictionary& interfaceDict,
00079                 const volScalarField& alpha,
00080                 const phaseModel& phasea,
00081                 const phaseModel& phaseb
00082             ),
00083             (interfaceDict, alpha, phasea, phaseb)
00084         );
00085 
00086 
00087     // Constructors
00088 
00089         dragModel
00090         (
00091             const dictionary& interfaceDict,
00092             const volScalarField& alpha,
00093             const phaseModel& phasea,
00094             const phaseModel& phaseb
00095         );
00096 
00097 
00098     //- Destructor
00099     virtual ~dragModel();
00100 
00101 
00102     // Selectors
00103 
00104         static autoPtr<dragModel> New
00105         (
00106             const dictionary& interfaceDict,
00107             const volScalarField& alpha,
00108             const phaseModel& phasea,
00109             const phaseModel& phaseb
00110         );
00111 
00112 
00113     // Member Functions
00114 
00115         //- the dragfunction K used in the momentum eq.
00116         //    ddt(alpha*rhoa*Ua) + ... = ... alpha*beta*K*(Ua-Ub)
00117         //    ddt(beta*rhob*Ub) + ...  = ... alpha*beta*K*(Ub-Ua)
00118         // ********************************** NB ! *****************************
00119         // for numerical reasons alpha and beta has been
00120         // extracted from the dragFunction K,
00121         // so you MUST divide K by alpha*beta when implemnting the drag function
00122         // ********************************** NB ! *****************************
00123         virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0;
00124 };
00125 
00126 
00127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00128 
00129 } // End namespace Foam
00130 
00131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00132 
00133 #endif
00134 
00135 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd