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

alphaContactAngleFvPatchScalarField.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-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 "alphaContactAngleFvPatchScalarField.H"
00027 #include <OpenFOAM/addToRunTimeSelectionTable.H>
00028 #include <finiteVolume/fvPatchFieldMapper.H>
00029 
00030 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00031 
00032 namespace Foam
00033 {
00034 
00035 alphaContactAngleFvPatchScalarField::interfaceThetaProps::interfaceThetaProps
00036 (
00037     Istream& is
00038 )
00039 :
00040     theta0_(readScalar(is)),
00041     uTheta_(readScalar(is)),
00042     thetaA_(readScalar(is)),
00043     thetaR_(readScalar(is))
00044 {}
00045 
00046 
00047 Istream& operator>>
00048 (
00049     Istream& is,
00050     alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp
00051 )
00052 {
00053     is >> tp.theta0_ >> tp.uTheta_ >> tp.thetaA_ >> tp.thetaR_;
00054     return is;
00055 }
00056 
00057 
00058 Ostream& operator<<
00059 (
00060     Ostream& os,
00061     const alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp
00062 )
00063 {
00064     os  << tp.theta0_ << token::SPACE
00065         << tp.uTheta_ << token::SPACE 
00066         << tp.thetaA_ << token::SPACE
00067         << tp.thetaR_;
00068 
00069     return os;
00070 }
00071 
00072 
00073 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00074 
00075 alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
00076 (
00077     const fvPatch& p,
00078     const DimensionedField<scalar, volMesh>& iF
00079 )
00080 :
00081     zeroGradientFvPatchScalarField(p, iF)
00082 {}
00083 
00084 
00085 alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
00086 (
00087     const alphaContactAngleFvPatchScalarField& gcpsf,
00088     const fvPatch& p,
00089     const DimensionedField<scalar, volMesh>& iF,
00090     const fvPatchFieldMapper& mapper
00091 )
00092 :
00093     zeroGradientFvPatchScalarField(gcpsf, p, iF, mapper),
00094     thetaProps_(gcpsf.thetaProps_)
00095 {}
00096 
00097 
00098 alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
00099 (
00100     const fvPatch& p,
00101     const DimensionedField<scalar, volMesh>& iF,
00102     const dictionary& dict
00103 )
00104 :
00105     zeroGradientFvPatchScalarField(p, iF),
00106     thetaProps_(dict.lookup("thetaProperties"))
00107 {
00108     evaluate();
00109 }
00110 
00111 
00112 alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
00113 (
00114     const alphaContactAngleFvPatchScalarField& gcpsf,
00115     const DimensionedField<scalar, volMesh>& iF
00116 )
00117 :
00118     zeroGradientFvPatchScalarField(gcpsf, iF),
00119     thetaProps_(gcpsf.thetaProps_)
00120 {}
00121 
00122 
00123 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00124 
00125 void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
00126 {
00127     fvPatchScalarField::write(os);
00128     os.writeKeyword("thetaProperties")
00129         << thetaProps_ << token::END_STATEMENT << nl;
00130     writeEntry("value", os);
00131 }
00132 
00133 
00134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00135 
00136 makePatchTypeField(fvPatchScalarField, alphaContactAngleFvPatchScalarField);
00137 
00138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00139 
00140 } // End namespace Foam
00141 
00142 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines