Forward compatibility: flex
[foam-extend-3.2.git] / src / solidModels / fvPatchFields / timeVaryingFixedDisplacement / timeVaryingFixedDisplacementFvPatchVectorField.H
blob541c577887463078bc40c6aafc095b8df9f38a54
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend 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 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::fixedDisplacementFvPatchVectorField
27 Description
28     Time varying fixed displacement boundary condition with boundary
29     non-orthogonal correction for stress solvers.
30     Essentially fixedValue with non-orthogonal correction.
32     Example of the boundary condition specification:
33     @verbatim
34     inlet
35     {
36         type            timeVaryingFixedDisplacement;
37         fileName        "$FOAM_CASE/time-series";
38         outOfBounds     clamp;           // (error|warn|clamp|repeat)
39     }
40     @endverbatim
42 SourceFiles
43     timeVaryingFixedDisplacementFvPatchVectorField.C
45 Authro
46     Philip Cardiff
47     Zeljko Tukovic
49 \*---------------------------------------------------------------------------*/
51 #ifndef timeVaryingFixedDisplacementFvPatchVectorField_H
52 #define timeVaryingFixedDisplacementFvPatchVectorField_H
54 #include "fvPatchFields.H"
55 #include "fixedDisplacementFvPatchVectorField.H"
56 #include "interpolationTable.H"
58 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 namespace Foam
63 /*---------------------------------------------------------------------------*\
64                  Class timeVaryingFixedDisplacementFvPatch Declaration
65 \*---------------------------------------------------------------------------*/
67 class timeVaryingFixedDisplacementFvPatchVectorField
69     public fixedDisplacementFvPatchVectorField
72     // Private Data
74         //- The time series being used, including the bounding treatment
75         interpolationTable<vector> timeSeries_;
77 public:
79     //- Runtime type information
80     TypeName("timeVaryingFixedDisplacement");
83     // Constructors
85         //- Construct from patch and internal field
86         timeVaryingFixedDisplacementFvPatchVectorField
87         (
88             const fvPatch&,
89             const DimensionedField<vector, volMesh>&
90         );
92         //- Construct from patch, internal field and dictionary
93         timeVaryingFixedDisplacementFvPatchVectorField
94         (
95             const fvPatch&,
96             const DimensionedField<vector, volMesh>&,
97             const dictionary&
98         );
100         //- Construct by mapping given
101         // timeVaryingFixedDisplacementFvPatchVectorField
102         //  onto a new patch
103         timeVaryingFixedDisplacementFvPatchVectorField
104         (
105             const timeVaryingFixedDisplacementFvPatchVectorField&,
106             const fvPatch&,
107             const DimensionedField<vector, volMesh>&,
108             const fvPatchFieldMapper&
109         );
111         //- Construct as copy
112         timeVaryingFixedDisplacementFvPatchVectorField
113         (
114             const timeVaryingFixedDisplacementFvPatchVectorField&
115         );
117         //- Construct and return a clone
118         virtual tmp<fvPatchVectorField> clone() const
119         {
120             return tmp<fvPatchVectorField>
121             (
122                 new timeVaryingFixedDisplacementFvPatchVectorField(*this)
123             );
124         }
126         //- Construct as copy setting internal field reference
127         timeVaryingFixedDisplacementFvPatchVectorField
128         (
129             const timeVaryingFixedDisplacementFvPatchVectorField&,
130             const DimensionedField<vector, volMesh>&
131         );
133         //- Construct and return a clone setting internal field reference
134         virtual tmp<fvPatchVectorField> clone
135         (
136             const DimensionedField<vector, volMesh>& iF
137         ) const
138         {
139             return tmp<fvPatchVectorField>
140             (
141                 new timeVaryingFixedDisplacementFvPatchVectorField(*this, iF)
142             );
143         }
147     // Member functions
149             //- Update the coefficients associated with the patch field
150             virtual void updateCoeffs();
152             //- Return the time series used
153             const interpolationTable<vector>& timeSeries() const
154             {
155                 return timeSeries_;
156             }
158         // Evaluation functions
160         //- Write
161         virtual void write(Ostream&) const;
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 } // End namespace Foam
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 #endif
173 // ************************************************************************* //