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-2019 OpenFOAM Foundation
9  Copyright (C) 2022 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
31 #include "fvPatchFieldMapper.H"
32 
33 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 
35 namespace Foam
36 {
37 namespace reactingMultiphaseEuler
38 {
39 
41 (
42  Istream& is
43 )
44 :
45  theta0_(readScalar(is)),
46  uTheta_(readScalar(is)),
47  thetaA_(readScalar(is)),
48  thetaR_(readScalar(is))
49 {}
50 
51 
52 Istream& operator>>
53 (
54  Istream& is,
56 )
57 {
58  is >> tp.theta0_ >> tp.uTheta_ >> tp.thetaA_ >> tp.thetaR_;
59  return is;
60 }
61 
62 
63 Ostream& operator<<
64 (
65  Ostream& os,
67 )
68 {
69  os << tp.theta0_ << token::SPACE
70  << tp.uTheta_ << token::SPACE
71  << tp.thetaA_ << token::SPACE
72  << tp.thetaR_;
73 
74  return os;
75 }
76 
77 
78 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
79 
81 (
82  const fvPatch& p,
84 )
85 :
86  zeroGradientFvPatchScalarField(p, iF)
87 {}
88 
89 
91 (
93  const fvPatch& p,
95  const fvPatchFieldMapper& mapper
96 )
97 :
98  zeroGradientFvPatchScalarField(gcpsf, p, iF, mapper),
99  thetaProps_(gcpsf.thetaProps_)
100 {}
101 
102 
104 (
105  const fvPatch& p,
107  const dictionary& dict
108 )
109 :
110  zeroGradientFvPatchScalarField(p, iF),
111  thetaProps_(dict.lookup("thetaProperties"))
112 {
113  evaluate();
114 }
115 
116 
118 (
121 )
122 :
123  zeroGradientFvPatchScalarField(gcpsf, iF),
124  thetaProps_(gcpsf.thetaProps_)
125 {}
126 
127 
128 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
129 
131 {
133  os.writeEntry("thetaProperties", thetaProps_);
135 }
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
141 (
144 );
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 } // End namespace reactingMultiphaseEuler
149 } // End namespace Foam
150 
151 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
Definition: fvPatchField.H:375
virtual void write(Ostream &) const
Write.
Definition: fvPatchField.C:372
Lookup type of boundary radiation properties.
Definition: lookup.H:57
Macros for easy insertion into run-time selection tables.
A FieldMapper for finite-volume patch fields.
Space [isspace].
Definition: token.H:131
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.
alphaContactAngleFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
OBJstream os(runTime.globalPath()/outputName)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: areaFieldsFwd.H:42
makePatchTypeField(fvPatchScalarField, alphaContactAngleFvPatchScalarField)
Contact-angle boundary condition for multi-phase interface-capturing simulations. Used in conjunction...
volScalarField & p
Namespace for OpenFOAM.