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

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