1 /*---------------------------------------------------------------------------*\
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 -------------------------------------------------------------------------------
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/>.
25 Foam::fixedDisplacementFvPatchVectorField
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:
36 type timeVaryingFixedDisplacement;
37 fileName "$FOAM_CASE/time-series";
38 outOfBounds clamp; // (error|warn|clamp|repeat)
43 timeVaryingFixedDisplacementFvPatchVectorField.C
49 \*---------------------------------------------------------------------------*/
51 #ifndef timeVaryingFixedDisplacementFvPatchVectorField_H
52 #define timeVaryingFixedDisplacementFvPatchVectorField_H
54 #include "fvPatchFields.H"
55 #include "fixedDisplacementFvPatchVectorField.H"
56 #include "interpolationTable.H"
58 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 /*---------------------------------------------------------------------------*\
64 Class timeVaryingFixedDisplacementFvPatch Declaration
65 \*---------------------------------------------------------------------------*/
67 class timeVaryingFixedDisplacementFvPatchVectorField
69 public fixedDisplacementFvPatchVectorField
74 //- The time series being used, including the bounding treatment
75 interpolationTable<vector> timeSeries_;
79 //- Runtime type information
80 TypeName("timeVaryingFixedDisplacement");
85 //- Construct from patch and internal field
86 timeVaryingFixedDisplacementFvPatchVectorField
89 const DimensionedField<vector, volMesh>&
92 //- Construct from patch, internal field and dictionary
93 timeVaryingFixedDisplacementFvPatchVectorField
96 const DimensionedField<vector, volMesh>&,
100 //- Construct by mapping given
101 // timeVaryingFixedDisplacementFvPatchVectorField
103 timeVaryingFixedDisplacementFvPatchVectorField
105 const timeVaryingFixedDisplacementFvPatchVectorField&,
107 const DimensionedField<vector, volMesh>&,
108 const fvPatchFieldMapper&
111 //- Construct as copy
112 timeVaryingFixedDisplacementFvPatchVectorField
114 const timeVaryingFixedDisplacementFvPatchVectorField&
117 //- Construct and return a clone
118 virtual tmp<fvPatchVectorField> clone() const
120 return tmp<fvPatchVectorField>
122 new timeVaryingFixedDisplacementFvPatchVectorField(*this)
126 //- Construct as copy setting internal field reference
127 timeVaryingFixedDisplacementFvPatchVectorField
129 const timeVaryingFixedDisplacementFvPatchVectorField&,
130 const DimensionedField<vector, volMesh>&
133 //- Construct and return a clone setting internal field reference
134 virtual tmp<fvPatchVectorField> clone
136 const DimensionedField<vector, volMesh>& iF
139 return tmp<fvPatchVectorField>
141 new timeVaryingFixedDisplacementFvPatchVectorField(*this, iF)
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
158 // Evaluation functions
161 virtual void write(Ostream&) const;
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 } // End namespace Foam
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 // ************************************************************************* //