uniformJumpAMIFvPatchField.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) 2012-2016 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 Class
27  Foam::uniformJumpAMIFvPatchField
28 
29 Group
30  grpCoupledBoundaryConditions
31 
32 Description
33  This boundary condition provides a jump condition, using the \c cyclicAMI
34  condition as a base. The jump is specified as a time-varying uniform
35  value across the patch.
36 
37 Usage
38  \table
39  Property | Description | Required | Default value
40  patchType | underlying patch type should be \c cyclicAMI| yes |
41  jumpTable | jump value | yes |
42  \endtable
43 
44  Example of the boundary condition specification:
45  \verbatim
46  <patchName>
47  {
48  type uniformJumpAMI;
49  patchType cyclicAMI;
50  jumpTable constant 10;
51  }
52  \endverbatim
53 
54  The above example shows the use of a fixed jump of '10'.
55 
56 Note
57  The uniformValue entry is a Function1 type, able to describe time
58  varying functions. The example above gives the usage for supplying a
59  constant value.
60 
61  The underlying \c patchType should be set to \c cyclic
62 
63 See also
64  Foam::jumpCyclicAMIFvPatchField
65  Foam::Function1Types
66 
67 SourceFiles
68  uniformJumpAMIFvPatchField.C
69 
70 \*---------------------------------------------------------------------------*/
71 
72 #ifndef uniformJumpAMIFvPatchField_H
73 #define uniformJumpAMIFvPatchField_H
74 
76 #include "Function1.H"
77 
78 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
79 
80 namespace Foam
81 {
82 
83 /*---------------------------------------------------------------------------*\
84  Class uniformJumpAMIFvPatchField Declaration
85 \*---------------------------------------------------------------------------*/
86 
87 template<class Type>
88 class uniformJumpAMIFvPatchField
89 :
90  public fixedJumpAMIFvPatchField<Type>
91 {
92 
93 protected:
94 
95  // Protected data
96 
97  //- "jump" table
98  autoPtr<Function1<Type>> jumpTable_;
99 
100 
101 public:
102 
103  //- Runtime type information
104  TypeName("uniformJumpAMI");
105 
106  // Constructors
107 
108  //- Construct from patch and internal field
110  (
111  const fvPatch&,
113  );
114 
115  //- Construct from patch, internal field and dictionary
117  (
118  const fvPatch&,
120  const dictionary&
121  );
122 
123  //- Construct by mapping given uniformJumpAMIFvPatchField onto a
124  // new patch
126  (
128  const fvPatch&,
130  const fvPatchFieldMapper&
131  );
132 
133  //- Construct as copy
135  (
137  );
138 
139  //- Construct and return a clone
140  virtual tmp<fvPatchField<Type>> clone() const
141  {
142  return tmp<fvPatchField<Type>>
143  (
145  );
146  }
147 
148  //- Construct as copy setting internal field reference
150  (
153  );
154 
155  //- Construct and return a clone setting internal field reference
157  (
159  ) const
160  {
161  return tmp<fvPatchField<Type>>
162  (
163  new uniformJumpAMIFvPatchField<Type>(*this, iF)
164  );
165  }
166 
167 
168  // Member functions
169 
170  //- Update the coefficients
171  virtual void updateCoeffs();
172 
173  //- Write
174  virtual void write(Ostream&) const;
175 };
176 
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 } // End namespace Foam
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 #ifdef NoRepository
186 #endif
187 
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 
190 #endif
191 
192 // ************************************************************************* //
Foam::uniformJumpAMIFvPatchField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients.
Definition: uniformJumpAMIFvPatchField.C:112
Foam::uniformJumpAMIFvPatchField
This boundary condition provides a jump condition, using the cyclicAMI condition as a base....
Definition: uniformJumpAMIFvPatchField.H:102
Foam::uniformJumpAMIFvPatchField::jumpTable_
autoPtr< Function1< Type > > jumpTable_
"jump" table
Definition: uniformJumpAMIFvPatchField.H:112
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Function1.H
fixedJumpAMIFvPatchField.H
Foam::fixedJumpAMIFvPatchField
This boundary condition provides a jump condition, across non-conformal cyclic path-pairs,...
Definition: fixedJumpAMIFvPatchField.H:98
uniformJumpAMIFvPatchField.C
Foam::uniformJumpAMIFvPatchField::clone
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
Definition: uniformJumpAMIFvPatchField.H:154
Foam::uniformJumpAMIFvPatchField::uniformJumpAMIFvPatchField
uniformJumpAMIFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Definition: uniformJumpAMIFvPatchField.C:35
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::uniformJumpAMIFvPatchField::write
virtual void write(Ostream &) const
Write.
Definition: uniformJumpAMIFvPatchField.C:129
Foam::uniformJumpAMIFvPatchField::TypeName
TypeName("uniformJumpAMI")
Runtime type information.
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::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54