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) 2013 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
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
34namespace 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
49Istream& 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
60Ostream& 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
77alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
78(
79 const fvPatch& p,
80 const DimensionedField<scalar, volMesh>& iF
81)
82:
83 zeroGradientFvPatchScalarField(p, iF)
84{}
85
86
87alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
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
100alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
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
114alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
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
127void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
128{
129 fvPatchScalarField::write(os);
130 os.writeEntry("thetaProperties", thetaProps_);
131 writeEntry("value", os);
132}
133
134
135// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136
138(
139 fvPatchScalarField,
140 alphaContactAngleFvPatchScalarField
141);
142
143// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144
145} // End namespace Foam
146
147// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
volScalarField & p
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
Definition: fvPatchField.H:676
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.
Namespace for OpenFOAM.
dictionary dict