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 
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,
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,
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,
81 )
82 :
83  zeroGradientFvPatchScalarField(p, iF)
84 {}
85 
86 
88 (
90  const fvPatch& p,
92  const fvPatchFieldMapper& mapper
93 )
94 :
95  zeroGradientFvPatchScalarField(gcpsf, p, iF, mapper),
96  thetaProps_(gcpsf.thetaProps_)
97 {}
98 
99 
101 (
102  const fvPatch& p,
104  const dictionary& dict
105 )
106 :
107  zeroGradientFvPatchScalarField(p, iF),
108  thetaProps_(dict.lookup("thetaProperties"))
109 {
110  evaluate();
111 }
112 
113 
115 (
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 (
141 );
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 } // End namespace Foam
146 
147 // ************************************************************************* //
Foam::fvPatchField
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: volSurfaceMapping.H:51
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
alphaContactAngleFvPatchScalarField.H
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::alphaContactAngleFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: alphaContactAngleFvPatchScalarField.C:127
Foam::dictionary::lookup
ITstream & lookup(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Definition: dictionary.C:386
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
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
Contact-angle boundary condition for multi-phase interface-capturing simulations. Used in conjunction...
Definition: alphaContactAngleFvPatchScalarField.H:52
Foam::alphaContactAngleFvPatchScalarField::interfaceThetaProps
Definition: alphaContactAngleFvPatchScalarField.H:58
Foam::alphaContactAngleFvPatchScalarField::interfaceThetaProps::interfaceThetaProps
interfaceThetaProps()
Definition: alphaContactAngleFvPatchScalarField.H:76
Foam::token::SPACE
Space [isspace].
Definition: token.H:125
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::makePatchTypeField
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54
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