Forward compatibility: flex
[foam-extend-3.2.git] / src / solidModels / fvPatchFields / timeVaryingSolidTraction / timeVaryingSolidTractionFvPatchVectorField.H
blob32ddb182f20be38f4c8862a846bb48fa20fe76b2
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     timeVaryingSolidTractionFvPatchVectorField
27 Description
28     Time-varying traction boundary condition for solid foam solvers.
29     Suitable for for total strain or incremental strain total or
30     updated Lagrangian approaches.
31     Contains thermal-elastic, plastic, non-linear terms if required.
32     And non-orthogonal correction.
34     Example of the boundary condition specification:
35     @verbatim
36     inlet
37     {
38         type            timeVaryingSolidTraction;
39         field           U; // or DU
40         nonLinear       OFF;
41         fileName        "$FOAM_CASE/time-series";
42         outOfBounds     clamp;           // (error|warn|clamp|repeat)
43     }
44     @endverbatim
46 Author
47     Philip Cardiff
49 SourceFiles
50     timeVaryingSolidTractionFvPatchVectorField.C
52 \*---------------------------------------------------------------------------*/
54 #ifndef timeVaryingSolidTractionFvPatchVectorField_H
55 #define timeVaryingSolidTractionFvPatchVectorField_H
57 #include "fvPatchFields.H"
58 #include "solidTractionFvPatchVectorField.H"
59 #include "interpolationTable.H"
60 #include "Switch.H"
62 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 namespace Foam
67 /*---------------------------------------------------------------------------*\
68              Class timeVaryingSolidTractionFvPatchVectorField Declaration
69 \*---------------------------------------------------------------------------*/
71 class timeVaryingSolidTractionFvPatchVectorField
73     public solidTractionFvPatchVectorField
76     // Private Data
78         //- The time series being used, including the bounding treatment
79         interpolationTable<vector> timeSeries_;
82 public:
84     //- Runtime type information
85     TypeName("timeVaryingSolidTraction");
88     // Constructors
90         //- Construct from patch and internal field
91         timeVaryingSolidTractionFvPatchVectorField
92         (
93             const fvPatch&,
94             const DimensionedField<vector, volMesh>&
95         );
97         //- Construct from patch, internal field and dictionary
98         timeVaryingSolidTractionFvPatchVectorField
99         (
100             const fvPatch&,
101             const DimensionedField<vector, volMesh>&,
102             const dictionary&
103         );
105         //- Construct by mapping given
106         //  timeVaryingSolidTractionFvPatchVectorField onto a new patch
107         timeVaryingSolidTractionFvPatchVectorField
108         (
109             const timeVaryingSolidTractionFvPatchVectorField&,
110             const fvPatch&,
111             const DimensionedField<vector, volMesh>&,
112             const fvPatchFieldMapper&
113         );
115         //- Construct as copy
116         timeVaryingSolidTractionFvPatchVectorField
117         (
118             const timeVaryingSolidTractionFvPatchVectorField&
119         );
121         //- Construct and return a clone
122         virtual tmp<fvPatchVectorField> clone() const
123         {
124             return tmp<fvPatchVectorField>
125             (
126                 new timeVaryingSolidTractionFvPatchVectorField(*this)
127             );
128         }
130         //- Construct as copy setting internal field reference
131         timeVaryingSolidTractionFvPatchVectorField
132         (
133             const timeVaryingSolidTractionFvPatchVectorField&,
134             const DimensionedField<vector, volMesh>&
135         );
137         //- Construct and return a clone setting internal field reference
138         virtual tmp<fvPatchVectorField> clone
139         (
140             const DimensionedField<vector, volMesh>& iF
141         ) const
142         {
143             return tmp<fvPatchVectorField>
144             (
145                 new timeVaryingSolidTractionFvPatchVectorField(*this, iF)
146             );
147         }
150     // Member functions
152         // Access
154             //- Return the time series used
155             const interpolationTable<vector>& timeSeries() const
156             {
157                 return timeSeries_;
158             }
160         // Mapping functions
162             //- Map (and resize as needed) from self given a mapping object
163             virtual void autoMap
164             (
165                 const fvPatchFieldMapper&
166             );
168             //- Reverse map the given fvPatchField onto this fvPatchField
169             virtual void rmap
170             (
171                 const fvPatchVectorField&,
172                 const labelList&
173             );
176         //- Update the coefficients associated with the patch field
177         virtual void updateCoeffs();
179         //- Write
180         virtual void write(Ostream&) const;
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 } // End namespace Foam
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 #endif
192 // ************************************************************************* //