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 tractionDisplacementFvPatchVectorField
28 Fixed traction boundary condition for the standard linear elastic, fixed
29 coefficient displacement equation (stressedFoam).
32 Hrvoje Jasak, Wikki Ltd. All rights reserved
35 tractionDisplacementFvPatchVectorField.C
37 \*---------------------------------------------------------------------------*/
39 #ifndef tractionDisplacementFvPatchVectorField_H
40 #define tractionDisplacementFvPatchVectorField_H
42 #include "fvPatchFields.H"
43 #include "fixedGradientFvPatchFields.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class tractionDisplacementFvPatchVectorField Declaration
52 \*---------------------------------------------------------------------------*/
54 class tractionDisplacementFvPatchVectorField
56 public fixedGradientFvPatchVectorField
61 //- Name of the displacement field
64 //- Name of rheology model
65 const word rheologyName_;
68 vectorField traction_;
71 scalarField pressure_;
76 //- Runtime type information
77 TypeName("tractionDisplacement");
82 //- Construct from patch and internal field
83 tractionDisplacementFvPatchVectorField
86 const DimensionedField<vector, volMesh>&
89 //- Construct from patch, internal field and dictionary
90 tractionDisplacementFvPatchVectorField
93 const DimensionedField<vector, volMesh>&,
97 //- Construct by mapping given
98 // tractionDisplacementFvPatchVectorField onto a new patch
99 tractionDisplacementFvPatchVectorField
101 const tractionDisplacementFvPatchVectorField&,
103 const DimensionedField<vector, volMesh>&,
104 const fvPatchFieldMapper&
107 //- Construct as copy
108 tractionDisplacementFvPatchVectorField
110 const tractionDisplacementFvPatchVectorField&
113 //- Construct and return a clone
114 virtual tmp<fvPatchVectorField> clone() const
116 return tmp<fvPatchVectorField>
118 new tractionDisplacementFvPatchVectorField(*this)
122 //- Construct as copy setting internal field reference
123 tractionDisplacementFvPatchVectorField
125 const tractionDisplacementFvPatchVectorField&,
126 const DimensionedField<vector, volMesh>&
129 //- Construct and return a clone setting internal field reference
130 virtual tmp<fvPatchVectorField> clone
132 const DimensionedField<vector, volMesh>& iF
135 return tmp<fvPatchVectorField>
137 new tractionDisplacementFvPatchVectorField(*this, iF)
146 virtual const vectorField& traction() const
151 virtual vectorField& traction()
156 virtual const scalarField& pressure() const
161 virtual scalarField& pressure()
168 //- Map (and resize as needed) from self given a mapping object
171 const fvPatchFieldMapper&
174 //- Reverse map the given fvPatchField onto this fvPatchField
177 const fvPatchVectorField&,
182 //- Update the coefficients associated with the patch field
183 virtual void updateCoeffs();
186 virtual void write(Ostream&) const;
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 } // End namespace Foam
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 // ************************************************************************* //