|
|
|
timeActivatedExplicitCellSource.HGo 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::timeActivatedExplicitSourceNew 00027 00028 Description 00029 Creates a cell set source that is activated at a given time, and remains 00030 active for a specified duration. The source value is either in specific 00031 (XX/m3) or absolute (XX) units. 00032 00033 SourceFiles 00034 timeActivatedExplicitCellSource.C 00035 00036 \*---------------------------------------------------------------------------*/ 00037 00038 #ifndef timeActivatedExplicitCellSource_H 00039 #define timeActivatedExplicitCellSource_H 00040 00041 #include "timeActivatedExplicitSource.H" 00042 #include "topoSetSource.H" 00043 #include "cellSet.H" 00044 00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00046 00047 namespace Foam 00048 { 00049 00050 /*---------------------------------------------------------------------------*\ 00051 Class timeActivatedExplicitCellSource Declaration 00052 \*---------------------------------------------------------------------------*/ 00053 00054 class timeActivatedExplicitCellSource 00055 : 00056 public timeActivatedExplicitSource 00057 { 00058 private: 00059 00060 // Private member functions 00061 00062 //- Update the cell set that the source is acting on 00063 void updateCellSet(); 00064 00065 00066 // Private Member Functions 00067 00068 //- Disallow default bitwise copy construct 00069 timeActivatedExplicitCellSource(const timeActivatedExplicitCellSource&); 00070 00071 //- Disallow default bitwise assignment 00072 void operator=(const timeActivatedExplicitCellSource&); 00073 00074 00075 protected: 00076 00077 // Protected data 00078 00079 // Source properties 00080 00081 //- Value when "on" 00082 scalar onValue_; 00083 00084 //- Value when "off" 00085 scalar offValue_; 00086 00087 00088 // Cell set 00089 00090 //- Cell volumes 00091 scalarList V_; 00092 00093 //- Name of cell source (XXXToCell) 00094 word cellSource_; 00095 00096 //- Method by which the cells will be selected 00097 autoPtr<topoSetSource> cellSelector_; 00098 00099 //- Set of selected cells 00100 cellSet selectedCellSet_; 00101 00102 00103 public: 00104 00105 // Constructors 00106 00107 //- Construct from explicit source name and mesh 00108 timeActivatedExplicitCellSource 00109 ( 00110 const word&, 00111 const fvMesh&, 00112 const dimensionSet& 00113 ); 00114 00115 00116 // Member Functions 00117 00118 // Access 00119 00120 //- Return the "on" value 00121 virtual scalar onValue() const; 00122 00123 //- Return the "off" value 00124 virtual scalar offValue() const; 00125 00126 //- Return a tmp field of the source 00127 virtual tmp<DimensionedField<scalar, volMesh> > Su(); 00128 00129 00130 //- Read properties dictionary 00131 virtual bool read(); 00132 }; 00133 00134 00135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00136 00137 } // End namespace Foam 00138 00139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00140 00141 #endif 00142 00143 // ************************************************************************* // |