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

constantAlphaContactAngleFvPatchScalarField.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) 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 \*---------------------------------------------------------------------------*/
00026 
00027 #include "constantAlphaContactAngleFvPatchScalarField.H"
00028 #include "addToRunTimeSelectionTable.H"
00029 #include "volMesh.H"
00030 #include "fvPatchFieldMapper.H"
00031 
00032 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00033 
00034 Foam::constantAlphaContactAngleFvPatchScalarField::
00035 constantAlphaContactAngleFvPatchScalarField
00036 (
00037     const fvPatch& p,
00038     const DimensionedField<scalar, volMesh>& iF
00039 )
00040 :
00041     alphaContactAngleFvPatchScalarField(p, iF),
00042     theta0_(0.0)
00043 {}
00044 
00045 
00046 Foam::constantAlphaContactAngleFvPatchScalarField::
00047 constantAlphaContactAngleFvPatchScalarField
00048 (
00049     const constantAlphaContactAngleFvPatchScalarField& gcpsf,
00050     const fvPatch& p,
00051     const DimensionedField<scalar, volMesh>& iF,
00052     const fvPatchFieldMapper& mapper
00053 )
00054 :
00055     alphaContactAngleFvPatchScalarField(gcpsf, p, iF, mapper),
00056     theta0_(gcpsf.theta0_)
00057 {}
00058 
00059 
00060 Foam::constantAlphaContactAngleFvPatchScalarField::
00061 constantAlphaContactAngleFvPatchScalarField
00062 (
00063     const fvPatch& p,
00064     const DimensionedField<scalar, volMesh>& iF,
00065     const dictionary& dict
00066 )
00067 :
00068     alphaContactAngleFvPatchScalarField(p, iF),
00069     theta0_(readScalar(dict.lookup("theta0")))
00070 {
00071     evaluate();
00072 }
00073 
00074 
00075 Foam::constantAlphaContactAngleFvPatchScalarField::
00076 constantAlphaContactAngleFvPatchScalarField
00077 (
00078     const constantAlphaContactAngleFvPatchScalarField& gcpsf
00079 )
00080 :
00081     alphaContactAngleFvPatchScalarField(gcpsf),
00082     theta0_(gcpsf.theta0_)
00083 {}
00084 
00085 
00086 Foam::constantAlphaContactAngleFvPatchScalarField::
00087 constantAlphaContactAngleFvPatchScalarField
00088 (
00089     const constantAlphaContactAngleFvPatchScalarField& gcpsf,
00090     const DimensionedField<scalar, volMesh>& iF
00091 )
00092 :
00093     alphaContactAngleFvPatchScalarField(gcpsf, iF),
00094     theta0_(gcpsf.theta0_)
00095 {}
00096 
00097 
00098 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00099 
00100 Foam::tmp<Foam::scalarField>
00101 Foam::constantAlphaContactAngleFvPatchScalarField::theta
00102 (
00103     const fvPatchVectorField&,
00104     const fvsPatchVectorField&
00105 ) const
00106 {
00107     return tmp<scalarField>(new scalarField(size(), theta0_));
00108 }
00109 
00110 
00111 void Foam::constantAlphaContactAngleFvPatchScalarField::write
00112 (
00113     Ostream& os
00114 ) const
00115 {
00116     fvPatchScalarField::write(os);
00117     os.writeKeyword("theta0") << theta0_ << token::END_STATEMENT << nl;
00118     writeEntry("value", os);
00119 }
00120 
00121 
00122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00123 
00124 namespace Foam
00125 {
00126     makePatchTypeField
00127     (
00128         fvPatchScalarField,
00129         constantAlphaContactAngleFvPatchScalarField
00130     );
00131 }
00132 
00133 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd