alphaContactAngleFvPatchScalarField.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "alphaContactAngleFvPatchScalarField.H"
30 #include "fvPatchFieldMapper.H"
31 
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36 
38 (
39  Istream& is
40 )
41 :
42  theta0_(readScalar(is)),
43  uTheta_(readScalar(is)),
44  thetaA_(readScalar(is)),
45  thetaR_(readScalar(is))
46 {}
47 
48 
49 Istream& operator>>
50 (
51  Istream& is,
52  alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp
53 )
54 {
55  is >> tp.theta0_ >> tp.uTheta_ >> tp.thetaA_ >> tp.thetaR_;
56  return is;
57 }
58 
59 
60 Ostream& operator<<
61 (
62  Ostream& os,
63  const alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp
64 )
65 {
66  os << tp.theta0_ << token::SPACE
67  << tp.uTheta_ << token::SPACE
68  << tp.thetaA_ << token::SPACE
69  << tp.thetaR_;
70 
71  return os;
72 }
73 
74 
75 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
76 
78 (
79  const fvPatch& p,
80  const DimensionedField<scalar, volMesh>& iF
81 )
82 :
83  zeroGradientFvPatchScalarField(p, iF)
84 {}
85 
86 
88 (
89  const alphaContactAngleFvPatchScalarField& gcpsf,
90  const fvPatch& p,
91  const DimensionedField<scalar, volMesh>& iF,
92  const fvPatchFieldMapper& mapper
93 )
94 :
95  zeroGradientFvPatchScalarField(gcpsf, p, iF, mapper),
96  thetaProps_(gcpsf.thetaProps_)
97 {}
98 
99 
101 (
102  const fvPatch& p,
103  const DimensionedField<scalar, volMesh>& iF,
104  const dictionary& dict
105 )
106 :
107  zeroGradientFvPatchScalarField(p, iF),
108  thetaProps_(dict.lookup("thetaProperties"))
109 {
110  evaluate();
111 }
112 
113 
115 (
116  const alphaContactAngleFvPatchScalarField& gcpsf,
117  const DimensionedField<scalar, volMesh>& iF
118 )
119 :
120  zeroGradientFvPatchScalarField(gcpsf, iF),
121  thetaProps_(gcpsf.thetaProps_)
122 {}
123 
124 
125 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
126 
128 {
130  os.writeEntry("thetaProperties", thetaProps_);
131  writeEntry("value", os);
132 }
133 
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
138 (
140  alphaContactAngleFvPatchScalarField
141 );
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 } // End namespace Foam
146 
147 // ************************************************************************* //
Foam::fvPatchScalarField
fvPatchField< scalar > fvPatchScalarField
Definition: fvPatchFieldsFwd.H:40
Foam::fvPatchField< scalar >::write
virtual void write(Ostream &) const
Write.
Definition: fvPatchField.C:384
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
alphaContactAngleFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: alphaContactAngleFvPatchScalarField.C:78
fvPatchFieldMapper.H
Foam::alphaContactAngleFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: alphaContactAngleFvPatchScalarField.C:127
dict
dictionary dict
Definition: searchingEngine.H:14
os
OBJstream os(runTime.globalPath()/outputName)
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::alphaContactAngleFvPatchScalarField::interfaceThetaProps::interfaceThetaProps
interfaceThetaProps()
Definition: alphaContactAngleFvPatchScalarField.H:76
Foam::token::SPACE
Space [isspace].
Definition: token.H:125
Foam::makePatchTypeField
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
Foam::stringOps::evaluate
string evaluate(label fieldWidth, const std::string &s, size_t pos=0, size_t len=std::string::npos)
String evaluation with specified (positive, non-zero) field width.
Definition: stringOpsEvaluate.C:37