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

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