mixedFixedValueSlipFvPatchField.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 | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::mixedFixedValueSlipFvPatchField
26 
27 Description
28  A mixed boundary type that blends between fixedValue and slip, as opposed
29  to the standard mixed condition that blends between fixedValue and
30  fixedGradient; required to implement maxwellSlipU condition.
31 
32 SourceFiles
33  mixedFixedValueSlipFvPatchField.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef mixedFixedValueSlipFvPatchField_H
38 #define mixedFixedValueSlipFvPatchField_H
39 
40 #include "transformFvPatchField.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class mixedFixedValueSlipFvPatch Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 template<class Type>
53 :
54  public transformFvPatchField<Type>
55 {
56  // Private data
57 
58  //- Value field used for boundary condition
60 
61  //- Fraction (0-1) of value used for boundary condition
63 
64 public:
65 
66  //- Runtime type information
67  TypeName("mixedFixedValueSlip");
68 
69 
70  // Constructors
71 
72  //- Construct from patch and internal field
74  (
75  const fvPatch&,
77  );
78 
79  //- Construct from patch, internal field and dictionary
81  (
82  const fvPatch&,
84  const dictionary&
85  );
86 
87  //- Construct by mapping given mixedFixedValueSlipFvPatchField
88  //- Onto a new patch
90  (
92  const fvPatch&,
94  const fvPatchFieldMapper&
95  );
96 
97  //- Construct as copy
99  (
101  );
102 
103  //- Construct and return a clone
104  virtual tmp<fvPatchField<Type> > clone() const
105  {
106  return tmp<fvPatchField<Type> >
107  (
109  );
110  }
111 
112  //- Construct as copy setting internal field reference
114  (
117  );
118 
119  //- Construct and return a clone setting internal field reference
121  (
123  ) const
124  {
125  return tmp<fvPatchField<Type> >
126  (
128  );
129  }
130 
131  // Member functions
132 
133  // Mapping functions
134 
135  //- Map (and resize as needed) from self given a mapping object
136  virtual void autoMap
137  (
138  const fvPatchFieldMapper&
139  );
140 
141  //- Reverse map the given fvPatchField onto this fvPatchField
142  virtual void rmap
143  (
144  const fvPatchField<Type>&,
145  const labelList&
146  );
147 
148  // Return defining fields
149 
150  virtual Field<Type>& refValue()
151  {
152  return refValue_;
153  }
154 
155  virtual const Field<Type>& refValue() const
156  {
157  return refValue_;
158  }
159 
160  virtual scalarField& valueFraction()
161  {
162  return valueFraction_;
163  }
164 
165  virtual const scalarField& valueFraction() const
166  {
167  return valueFraction_;
168  }
169 
170  // Evaluation functions
171 
172  //- Return gradient at boundary
173  virtual tmp<Field<Type> > snGrad() const;
174 
175  //- Evaluate the patch field
176  virtual void evaluate
177  (
178  const Pstream::commsTypes commsType=Pstream::blocking
179  );
180 
181  //- Return face-gradient transform diagonal
182  virtual tmp<Field<Type> > snGradTransformDiag() const;
183 
184 
185  //- Write
186  virtual void write(Ostream&) const;
187 
188 
189  // Member operators
190 
191  virtual void operator=(const UList<Type>&) {}
192 
193  virtual void operator=(const fvPatchField<Type>&) {}
194  virtual void operator+=(const fvPatchField<Type>&) {}
195  virtual void operator-=(const fvPatchField<Type>&) {}
196  virtual void operator*=(const fvPatchField<scalar>&) {}
197  virtual void operator/=(const fvPatchField<scalar>&) {}
198 
199  virtual void operator+=(const Field<Type>&) {}
200  virtual void operator-=(const Field<Type>&) {}
201 
202  virtual void operator*=(const Field<scalar>&) {}
203  virtual void operator/=(const Field<scalar>&) {}
204 
205  virtual void operator=(const Type&) {}
206  virtual void operator+=(const Type&) {}
207  virtual void operator-=(const Type&) {}
208  virtual void operator*=(const scalar) {}
209  virtual void operator/=(const scalar) {}
210 };
211 
212 
213 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214 
215 } // End namespace Foam
216 
217 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218 
219 #ifdef NoRepository
221 #endif
222 
223 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
224 
225 #endif
226 
227 // ************************************************************************* //
Foam::fvPatchField< Type >
Foam::mixedFixedValueSlipFvPatchField::operator-=
virtual void operator-=(const Type &)
Definition: mixedFixedValueSlipFvPatchField.H:206
Foam::mixedFixedValueSlipFvPatchField::operator+=
virtual void operator+=(const Field< Type > &)
Definition: mixedFixedValueSlipFvPatchField.H:198
Foam::mixedFixedValueSlipFvPatchField::valueFraction
virtual const scalarField & valueFraction() const
Definition: mixedFixedValueSlipFvPatchField.H:164
Foam::mixedFixedValueSlipFvPatchField::snGrad
virtual tmp< Field< Type > > snGrad() const
Return gradient at boundary.
Foam::mixedFixedValueSlipFvPatchField::autoMap
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Foam::mixedFixedValueSlipFvPatchField::operator*=
virtual void operator*=(const scalar)
Definition: mixedFixedValueSlipFvPatchField.H:207
Foam::mixedFixedValueSlipFvPatchField::refValue_
Field< Type > refValue_
Value field used for boundary condition.
Definition: mixedFixedValueSlipFvPatchField.H:58
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::mixedFixedValueSlipFvPatchField::operator/=
virtual void operator/=(const fvPatchField< scalar > &)
Definition: mixedFixedValueSlipFvPatchField.H:196
Foam::mixedFixedValueSlipFvPatchField::operator=
virtual void operator=(const fvPatchField< Type > &)
Definition: mixedFixedValueSlipFvPatchField.H:192
Foam::mixedFixedValueSlipFvPatchField::operator/=
virtual void operator/=(const Field< scalar > &)
Definition: mixedFixedValueSlipFvPatchField.H:202
Foam::mixedFixedValueSlipFvPatchField::operator+=
virtual void operator+=(const Type &)
Definition: mixedFixedValueSlipFvPatchField.H:205
Foam::UPstream::blocking
@ blocking
Definition: UPstream.H:66
Foam::mixedFixedValueSlipFvPatchField::write
virtual void write(Ostream &) const
Write.
Foam::Field< Type >
Foam::mixedFixedValueSlipFvPatchField::operator=
virtual void operator=(const UList< Type > &)
Definition: mixedFixedValueSlipFvPatchField.H:190
Foam::mixedFixedValueSlipFvPatchField::evaluate
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::blocking)
Evaluate the patch field.
Foam::mixedFixedValueSlipFvPatchField::refValue
virtual const Field< Type > & refValue() const
Definition: mixedFixedValueSlipFvPatchField.H:154
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
mixedFixedValueSlipFvPatchField.C
Foam::mixedFixedValueSlipFvPatchField::snGradTransformDiag
virtual tmp< Field< Type > > snGradTransformDiag() const
Return face-gradient transform diagonal.
Foam::mixedFixedValueSlipFvPatchField::operator=
virtual void operator=(const Type &)
Definition: mixedFixedValueSlipFvPatchField.H:204
Foam::mixedFixedValueSlipFvPatchField::operator*=
virtual void operator*=(const Field< scalar > &)
Definition: mixedFixedValueSlipFvPatchField.H:201
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::mixedFixedValueSlipFvPatchField::operator-=
virtual void operator-=(const fvPatchField< Type > &)
Definition: mixedFixedValueSlipFvPatchField.H:194
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::mixedFixedValueSlipFvPatchField::operator/=
virtual void operator/=(const scalar)
Definition: mixedFixedValueSlipFvPatchField.H:208
Foam::mixedFixedValueSlipFvPatchField::operator-=
virtual void operator-=(const Field< Type > &)
Definition: mixedFixedValueSlipFvPatchField.H:199
Foam::mixedFixedValueSlipFvPatchField::mixedFixedValueSlipFvPatchField
mixedFixedValueSlipFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Foam::mixedFixedValueSlipFvPatchField::operator+=
virtual void operator+=(const fvPatchField< Type > &)
Definition: mixedFixedValueSlipFvPatchField.H:193
Foam::mixedFixedValueSlipFvPatchField::operator*=
virtual void operator*=(const fvPatchField< scalar > &)
Definition: mixedFixedValueSlipFvPatchField.H:195
Foam::mixedFixedValueSlipFvPatchField::TypeName
TypeName("mixedFixedValueSlip")
Runtime type information.
Foam::UPstream::commsTypes
commsTypes
Types of communications.
Definition: UPstream.H:64
transformFvPatchField.H
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::UList< Type >
Foam::mixedFixedValueSlipFvPatchField::valueFraction_
scalarField valueFraction_
Fraction (0-1) of value used for boundary condition.
Definition: mixedFixedValueSlipFvPatchField.H:61
Foam::transformFvPatchField
Foam::transformFvPatchField.
Definition: transformFvPatchField.H:52
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::mixedFixedValueSlipFvPatchField
A mixed boundary type that blends between fixedValue and slip, as opposed to the standard mixed condi...
Definition: mixedFixedValueSlipFvPatchField.H:51
Foam::mixedFixedValueSlipFvPatchField::clone
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
Definition: mixedFixedValueSlipFvPatchField.H:103
Foam::mixedFixedValueSlipFvPatchField::rmap
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Foam::mixedFixedValueSlipFvPatchField::refValue
virtual Field< Type > & refValue()
Definition: mixedFixedValueSlipFvPatchField.H:149
Foam::mixedFixedValueSlipFvPatchField::valueFraction
virtual scalarField & valueFraction()
Definition: mixedFixedValueSlipFvPatchField.H:159
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51