clampedPlateFaPatchField.H
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) 2020 OpenCFD Ltd.
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
26Class
27 Foam::clampedPlateFaPatchField
28
29Description
30 This BC provides a clamped BC. It sets zero fixe value and zeroGradient.
31
32Usage
33 Example of the boundary condition specification:
34 \verbatim
35 <patchName>
36 {
37 // Mandatory entries (unmodifiable)
38 type clampedPlate;
39
40 // Mandatory/Optional (inherited) entries
41 ...
42 }
43 \endverbatim
44
45 where the entries mean:
46 \table
47 Property | Description | Type | Reqd | Dflt
48 type | Type name: clampedPlate | word | yes | -
49 \endtable
50
51 The inherited entries are elaborated in:
52 - \link faPatchFields.H \endlink
53
54SourceFiles
55 clampedPlateFaPatchField.C
56
57\*---------------------------------------------------------------------------*/
58
59#ifndef clampedPlateFaPatchField_H
60#define clampedPlateFaPatchField_H
61
62#include "faPatchField.H"
63
64// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65
66namespace Foam
67{
68
69/*---------------------------------------------------------------------------*\
70 Class clampedPlateFaPatch Declaration
71\*---------------------------------------------------------------------------*/
72
73template<class Type>
74class clampedPlateFaPatchField
75:
76 public faPatchField<Type>
77{
78public:
79
80 //- Runtime type information
81 TypeName("clampedPlate");
82
83
84 // Constructors
86 //- Construct from patch and internal field
88 (
89 const faPatch&,
91 );
93 //- Construct from patch, internal field and dictionary
95 (
96 const faPatch&,
98 const dictionary&
99 );
100
101 //- Construct by mapping the given clampedPlateFaPatchField<Type>
102 //- onto a new patch
104 (
106 const faPatch&,
108 const faPatchFieldMapper&
109 );
110
111 //- Construct as copy
113 (
115 );
116
117 //- Construct and return a clone
118 virtual tmp<faPatchField<Type>> clone() const
119 {
121 (
123 );
124 }
125
126 //- Construct as copy setting internal field reference
128 (
131 );
132
133 //- Construct and return a clone setting internal field reference
135 (
137 ) const
138 {
140 (
141 new clampedPlateFaPatchField<Type>(*this, iF)
142 );
143 }
144
146 //- Destructor
148 {}
149
150
151 // Member Functions
152
153 // Evaluation
154
155 //- Return gradient at boundary
156 virtual tmp<Field<Type>> snGrad() const
157 {
159 (
160 new Field<Type>(this->size(), Zero)
161 );
162 }
163
164 //- Evaluate the patch field
165 virtual void evaluate
166 (
168 );
169
170 //- Return the matrix diagonal coefficients corresponding to the
171 //- evaluation of the value of this patchField with given weights
173 (
174 const tmp<scalarField>&
175 ) const;
176
177 //- Return the matrix source coefficients corresponding to the
178 //- evaluation of the value of this patchField with given weights
180 (
181 const tmp<scalarField>&
182 ) const;
183
184 //- Return the matrix diagonal coefficients corresponding to the
185 //- evaluation of the gradient of this patchField
186 virtual tmp<Field<Type> > gradientInternalCoeffs() const;
187
188 //- Return the matrix source coefficients corresponding to the
189 //- evaluation of the gradient of this patchField
190 virtual tmp<Field<Type> > gradientBoundaryCoeffs() const;
191
192
193 // IO
194
195 //- Write
196 virtual void write(Ostream&) const;
197};
198
199
200// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201
202} // End namespace Foam
203
204// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205
206#ifdef NoRepository
208#endif
209
210// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211
212#endif
213
214// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic templated field type.
Definition: Field.H:82
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
label size() const noexcept
The number of elements in the UList.
Definition: UListI.H:420
commsTypes
Types of communications.
Definition: UPstream.H:67
This BC provides a clamped BC. It sets zero fixe value and zeroGradient.
virtual tmp< faPatchField< Type > > clone() const
Construct and return a clone.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field.
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
TypeName("clampedPlate")
Runtime type information.
virtual tmp< Field< Type > > snGrad() const
Return gradient at boundary.
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< scalarField > &) const
virtual ~clampedPlateFaPatchField()
Destructor.
virtual tmp< Field< Type > > gradientBoundaryCoeffs() const
virtual tmp< faPatchField< Type > > clone(const DimensionedField< Type, areaMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual tmp< Field< Type > > gradientInternalCoeffs() const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A FieldMapper for finite-area patch fields.
faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cover...
Definition: faPatchField.H:82
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition: faPatch.H:78
A class for managing temporary objects.
Definition: tmp.H:65
Namespace for OpenFOAM.
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73