FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

alphatWallFunctionFvPatchScalarField.C

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) 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 \*---------------------------------------------------------------------------*/
00025 
00026 #include "alphatWallFunctionFvPatchScalarField.H"
00027 #include <finiteVolume/fvPatchFieldMapper.H>
00028 #include <finiteVolume/volFields.H>
00029 #include <OpenFOAM/addToRunTimeSelectionTable.H>
00030 
00031 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00032 
00033 namespace Foam
00034 {
00035 namespace compressible
00036 {
00037 namespace RASModels
00038 {
00039 
00040 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00041 
00042 alphatWallFunctionFvPatchScalarField::
00043 alphatWallFunctionFvPatchScalarField
00044 (
00045     const fvPatch& p,
00046     const DimensionedField<scalar, volMesh>& iF
00047 )
00048 :
00049     fixedValueFvPatchScalarField(p, iF),
00050     mutName_("mut"),
00051     Prt_(0.85)
00052 {}
00053 
00054 
00055 alphatWallFunctionFvPatchScalarField::
00056 alphatWallFunctionFvPatchScalarField
00057 (
00058     const alphatWallFunctionFvPatchScalarField& ptf,
00059     const fvPatch& p,
00060     const DimensionedField<scalar, volMesh>& iF,
00061     const fvPatchFieldMapper& mapper
00062 )
00063 :
00064     fixedValueFvPatchScalarField(ptf, p, iF, mapper),
00065     mutName_(ptf.mutName_),
00066     Prt_(ptf.Prt_)
00067 {}
00068 
00069 
00070 alphatWallFunctionFvPatchScalarField::
00071 alphatWallFunctionFvPatchScalarField
00072 (
00073     const fvPatch& p,
00074     const DimensionedField<scalar, volMesh>& iF,
00075     const dictionary& dict
00076 )
00077 :
00078     fixedValueFvPatchScalarField(p, iF, dict),
00079     mutName_(dict.lookupOrDefault<word>("mut", "mut")),
00080     Prt_(dict.lookupOrDefault<scalar>("Prt", 0.85))
00081 {}
00082 
00083 
00084 alphatWallFunctionFvPatchScalarField::
00085 alphatWallFunctionFvPatchScalarField
00086 (
00087     const alphatWallFunctionFvPatchScalarField& awfpsf
00088 )
00089 :
00090     fixedValueFvPatchScalarField(awfpsf),
00091     mutName_(awfpsf.mutName_),
00092     Prt_(awfpsf.Prt_)
00093 {}
00094 
00095 
00096 alphatWallFunctionFvPatchScalarField::
00097 alphatWallFunctionFvPatchScalarField
00098 (
00099     const alphatWallFunctionFvPatchScalarField& awfpsf,
00100     const DimensionedField<scalar, volMesh>& iF
00101 )
00102 :
00103     fixedValueFvPatchScalarField(awfpsf, iF),
00104     mutName_(awfpsf.mutName_),
00105     Prt_(awfpsf.Prt_)
00106 {}
00107 
00108 
00109 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00110 
00111 void alphatWallFunctionFvPatchScalarField::updateCoeffs()
00112 {
00113     if (updated())
00114     {
00115         return;
00116     }
00117 
00118     const scalarField& mutw =
00119         patch().lookupPatchField<volScalarField, scalar>(mutName_);
00120 
00121     operator==(mutw/Prt_);
00122 
00123     fixedValueFvPatchScalarField::updateCoeffs();
00124 }
00125 
00126 
00127 void alphatWallFunctionFvPatchScalarField::write(Ostream& os) const
00128 {
00129     fvPatchField<scalar>::write(os);
00130     writeEntryIfDifferent<word>(os, "mut", "mut", mutName_);
00131     os.writeKeyword("Prt") << Prt_ << token::END_STATEMENT << nl;
00132     writeEntry("value", os);
00133 }
00134 
00135 
00136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00137 
00138 makePatchTypeField(fvPatchScalarField, alphatWallFunctionFvPatchScalarField);
00139 
00140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00141 
00142 } // End namespace RASModels
00143 } // End namespace compressible
00144 } // End namespace Foam
00145 
00146 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines