1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
25 Foam::outletMappedUniformInletFvPatchField
28 Averages the field over the "outlet" patch specified by name
29 "outletPatchName" and applies this as the uniform value of the field
33 outletMappedUniformInletFvPatchField.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef outletMappedUniformInletFvPatchField_H
38 #define outletMappedUniformInletFvPatchField_H
40 #include "fixedValueFvPatchFields.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class outletMappedUniformInletFvPatch Declaration
49 \*---------------------------------------------------------------------------*/
52 class outletMappedUniformInletFvPatchField
54 public fixedValueFvPatchField<Type>
58 //- Name of the outlet patch to be mapped
59 word outletPatchName_;
61 //- Name of the flux transporting the field
67 //- Runtime type information
68 TypeName("outletMappedUniformInlet");
73 //- Construct from patch and internal field
74 outletMappedUniformInletFvPatchField
77 const DimensionedField<Type, volMesh>&
80 //- Construct from patch, internal field and dictionary
81 outletMappedUniformInletFvPatchField
84 const DimensionedField<Type, volMesh>&,
88 //- Construct by mapping given outletMappedUniformInletFvPatchField
90 outletMappedUniformInletFvPatchField
92 const outletMappedUniformInletFvPatchField<Type>&,
94 const DimensionedField<Type, volMesh>&,
95 const fvPatchFieldMapper&
99 outletMappedUniformInletFvPatchField
101 const outletMappedUniformInletFvPatchField<Type>&
104 //- Construct and return a clone
105 virtual tmp<fvPatchField<Type> > clone() const
107 return tmp<fvPatchField<Type> >
109 new outletMappedUniformInletFvPatchField<Type>(*this)
113 //- Construct as copy setting internal field reference
114 outletMappedUniformInletFvPatchField
116 const outletMappedUniformInletFvPatchField<Type>&,
117 const DimensionedField<Type, volMesh>&
120 //- Construct and return a clone setting internal field reference
121 virtual tmp<fvPatchField<Type> > clone
123 const DimensionedField<Type, volMesh>& iF
126 return tmp<fvPatchField<Type> >
128 new outletMappedUniformInletFvPatchField<Type>(*this, iF)
137 //- Name of the outlet patch to be mapped
138 const word& outletPatchName() const
140 return outletPatchName_;
144 // Evaluation functions
146 //- Update the coefficients associated with the patch field
147 virtual void updateCoeffs();
151 virtual void write(Ostream&) const;
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 } // End namespace Foam
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 # include "outletMappedUniformInletFvPatchField.C"
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 // ************************************************************************* //