00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 2008-2010 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 00013 the Free Software Foundation, either version 3 of the License, or 00014 (at your 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, see <http://www.gnu.org/licenses/>. 00023 00024 Class 00025 Foam::compressible::RASModels::epsilonWallFunctionFvPatchScalarField 00026 00027 Description 00028 Boundary condition for epsilon when using wall functions 00029 - calculates epsilon and G 00030 - epsilon values added directly into the matrix to act as a constraint 00031 00032 SourceFiles 00033 epsilonWallFunctionFvPatchScalarField.C 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef compressibleEpsilonWallFunctionFvPatchScalarField_H 00038 #define compressibleEpsilonWallFunctionFvPatchScalarField_H 00039 00040 #include <finiteVolume/fixedInternalValueFvPatchField.H> 00041 00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00043 00044 namespace Foam 00045 { 00046 namespace compressible 00047 { 00048 namespace RASModels 00049 { 00050 00051 /*---------------------------------------------------------------------------*\ 00052 Class epsilonWallFunctionFvPatchScalarField Declaration 00053 \*---------------------------------------------------------------------------*/ 00054 00055 class epsilonWallFunctionFvPatchScalarField 00056 : 00057 public fixedInternalValueFvPatchField<scalar> 00058 { 00059 // Private data 00060 00061 //- Name of velocity field 00062 word UName_; 00063 00064 //- Name of turbulence kinetic energy field 00065 word kName_; 00066 00067 //- Name of turbulence generation field 00068 word GName_; 00069 00070 //- Name of laminar viscosity field 00071 word muName_; 00072 00073 //- Name of turbulent viscosity field 00074 word mutName_; 00075 00076 //- Cmu coefficient 00077 scalar Cmu_; 00078 00079 //- Von Karman constant 00080 scalar kappa_; 00081 00082 //- E coefficient 00083 scalar E_; 00084 00085 00086 // Private member functions 00087 00088 //- Check the type of the patch 00089 void checkType(); 00090 00091 00092 public: 00093 00094 //- Runtime type information 00095 TypeName("compressible::epsilonWallFunction"); 00096 00097 00098 // Constructors 00099 00100 //- Construct from patch and internal field 00101 epsilonWallFunctionFvPatchScalarField 00102 ( 00103 const fvPatch&, 00104 const DimensionedField<scalar, volMesh>& 00105 ); 00106 00107 //- Construct from patch, internal field and dictionary 00108 epsilonWallFunctionFvPatchScalarField 00109 ( 00110 const fvPatch&, 00111 const DimensionedField<scalar, volMesh>&, 00112 const dictionary& 00113 ); 00114 00115 //- Construct by mapping given 00116 // epsilonWallFunctionFvPatchScalarField 00117 // onto a new patch 00118 epsilonWallFunctionFvPatchScalarField 00119 ( 00120 const epsilonWallFunctionFvPatchScalarField&, 00121 const fvPatch&, 00122 const DimensionedField<scalar, volMesh>&, 00123 const fvPatchFieldMapper& 00124 ); 00125 00126 //- Construct as copy 00127 epsilonWallFunctionFvPatchScalarField 00128 ( 00129 const epsilonWallFunctionFvPatchScalarField& 00130 ); 00131 00132 //- Construct and return a clone 00133 virtual tmp<fvPatchScalarField> clone() const 00134 { 00135 return tmp<fvPatchScalarField> 00136 ( 00137 new epsilonWallFunctionFvPatchScalarField(*this) 00138 ); 00139 } 00140 00141 //- Construct as copy setting internal field reference 00142 epsilonWallFunctionFvPatchScalarField 00143 ( 00144 const epsilonWallFunctionFvPatchScalarField&, 00145 const DimensionedField<scalar, volMesh>& 00146 ); 00147 00148 //- Construct and return a clone setting internal field reference 00149 virtual tmp<fvPatchScalarField> clone 00150 ( 00151 const DimensionedField<scalar, volMesh>& iF 00152 ) const 00153 { 00154 return tmp<fvPatchScalarField> 00155 ( 00156 new epsilonWallFunctionFvPatchScalarField(*this, iF) 00157 ); 00158 } 00159 00160 00161 // Member functions 00162 00163 // Evaluation functions 00164 00165 //- Update the coefficients associated with the patch field 00166 virtual void updateCoeffs(); 00167 00168 //- Evaluate the patchField 00169 virtual void evaluate(const Pstream::commsTypes); 00170 00171 00172 // I-O 00173 00174 //- Write 00175 void write(Ostream&) const; 00176 }; 00177 00178 00179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00180 00181 } // End namespace RASModels 00182 } // End namespace compressible 00183 } // End namespace Foam 00184 00185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00186 00187 #endif 00188 00189 // ************************ vim: set sw=4 sts=4 et: ************************ //