1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::oscillatingFixedValueFvPatchField
29 Foam::oscillatingFixedValueFvPatchField
32 oscillatingFixedValueFvPatchField.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef oscillatingFixedValueFvPatchField_H
37 #define oscillatingFixedValueFvPatchField_H
40 #include "fixedValueFvPatchFields.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class oscillatingFixedValueFvPatch Declaration
49 \*---------------------------------------------------------------------------*/
52 class oscillatingFixedValueFvPatchField
54 public fixedValueFvPatchField<Type>
59 Field<Type> refValue_;
67 //- Current time index
71 // Private member functions
73 //- Return current scale
74 scalar currentScale() const;
79 //- Runtime type information
80 TypeName("oscillatingFixedValue");
85 //- Construct from patch and internal field
86 oscillatingFixedValueFvPatchField
89 const DimensionedField<Type, volMesh>&
92 //- Construct from patch, internal field and dictionary
93 oscillatingFixedValueFvPatchField
96 const DimensionedField<Type, volMesh>&,
100 //- Construct by mapping given oscillatingFixedValueFvPatchField
102 oscillatingFixedValueFvPatchField
104 const oscillatingFixedValueFvPatchField<Type>&,
106 const DimensionedField<Type, volMesh>&,
107 const fvPatchFieldMapper&
110 //- Construct as copy
111 oscillatingFixedValueFvPatchField
113 const oscillatingFixedValueFvPatchField<Type>&
116 //- Construct and return a clone
117 virtual tmp<fvPatchField<Type> > clone() const
119 return tmp<fvPatchField<Type> >
121 new oscillatingFixedValueFvPatchField<Type>(*this)
125 //- Construct as copy setting internal field reference
126 oscillatingFixedValueFvPatchField
128 const oscillatingFixedValueFvPatchField<Type>&,
129 const DimensionedField<Type, volMesh>&
132 //- Construct and return a clone setting internal field reference
133 virtual tmp<fvPatchField<Type> > clone
135 const DimensionedField<Type, volMesh>& iF
138 return tmp<fvPatchField<Type> >
140 new oscillatingFixedValueFvPatchField<Type>(*this, iF)
149 //- Return the ref value
150 const Field<Type>& refValue() const
155 //- Return reference to the ref value to allow adjustment
156 Field<Type>& refValue()
162 scalar amplitude() const
173 scalar frequency() const
186 //- Map (and resize as needed) from self given a mapping object
189 const fvPatchFieldMapper&
192 //- Reverse map the given fvPatchField onto this fvPatchField
195 const fvPatchField<Type>&,
200 // Evaluation functions
202 //- Update the coefficients associated with the patch field
203 virtual void updateCoeffs();
207 virtual void write(Ostream&) const;
211 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
213 } // End namespace Foam
215 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218 # include "oscillatingFixedValueFvPatchField.C"
221 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
225 // ************************************************************************* //