temperatureDependentAlphaContactAngleFvPatchScalarField.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) 2015-2016 OpenFOAM Foundation
9 Copyright (C) 2019-2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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
30#include "fvPatchFieldMapper.H"
31#include "volFields.H"
33
34// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
35
36Foam::temperatureDependentAlphaContactAngleFvPatchScalarField::
37temperatureDependentAlphaContactAngleFvPatchScalarField
38(
39 const fvPatch& p,
41)
42:
44 TName_("T"),
45 theta0_()
46{}
47
48
49Foam::temperatureDependentAlphaContactAngleFvPatchScalarField::
50temperatureDependentAlphaContactAngleFvPatchScalarField
51(
52 const fvPatch& p,
54 const dictionary& dict
55)
56:
58 TName_(dict.getOrDefault<word>("T", "T")),
59 theta0_(Function1<scalar>::New("theta0", dict, &db()))
60{
61 evaluate();
62}
63
64
65Foam::temperatureDependentAlphaContactAngleFvPatchScalarField::
66temperatureDependentAlphaContactAngleFvPatchScalarField
67(
69 const fvPatch& p,
71 const fvPatchFieldMapper& mapper
72)
73:
75 TName_(psf.TName_),
76 theta0_(psf.theta0_.clone())
77{}
78
79
80Foam::temperatureDependentAlphaContactAngleFvPatchScalarField::
81temperatureDependentAlphaContactAngleFvPatchScalarField
82(
84)
85:
87 TName_(psf.TName_),
88 theta0_(psf.theta0_.clone())
89{}
90
91
92Foam::temperatureDependentAlphaContactAngleFvPatchScalarField::
93temperatureDependentAlphaContactAngleFvPatchScalarField
94(
97)
98:
100 TName_(psf.TName_),
101 theta0_(psf.theta0_.clone())
102{}
103
104
105// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
106
109(
110 const fvPatchVectorField&,
112) const
113{
114 return theta0_->value
115 (
116 patch().lookupPatchField<volScalarField, scalar>(TName_)
117 );
118}
119
120
122(
123 Ostream& os
124) const
125{
127 os.writeEntryIfDifferent<word>("T", "T", TName_);
128 theta0_->writeData(os);
129 writeEntry("value", os);
130}
131
132
133// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134
135namespace Foam
136{
138 (
141 );
142}
143
144// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
Definition: Function1.H:96
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
Definition: Ostream.H:251
Abstract base class for two-phase alphaContactAngle boundary conditions.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field.
virtual scalar theta() const
Return current crank-angle.
Definition: crankConRod.C:137
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
virtual bool write()
Write the output fields.
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
volScalarField & p
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
Definition: fvPatchField.H:676
Namespace for OpenFOAM.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
dictionary dict